Solid mechanics clean-up
This commit is contained in:
parent
abdb73255b
commit
7cd690af95
342 changed files with 24 additions and 696 deletions
|
@ -1,20 +0,0 @@
|
|||
#!/bin/sh
|
||||
set -x
|
||||
|
||||
wclean solidModels
|
||||
|
||||
wclean elasticContactSolidFoam
|
||||
wclean elasticContactIncrSolidFoam
|
||||
wclean elasticContactNonLinULSolidFoam
|
||||
wclean elasticGravitySolidFoam
|
||||
wclean elasticIncrSolidFoam
|
||||
wclean elasticNonLinTLSolidFoam
|
||||
wclean elasticNonLinULSolidFoam
|
||||
wclean elasticPlasticSolidFoam
|
||||
wclean elasticPlasticNonLinULSolidFoam
|
||||
wclean elasticSolidFoam
|
||||
wclean elasticThermalSolidFoam
|
||||
wclean icoFsiElasticNonLinULSolidFoam
|
||||
wclean viscoElasticSolidFoam
|
||||
|
||||
(cd utilities && ./Allwclean)
|
|
@ -1,20 +0,0 @@
|
|||
#!/bin/sh
|
||||
set -x
|
||||
|
||||
wmake libso solidModels
|
||||
|
||||
wmake elasticContactSolidFoam
|
||||
wmake elasticContactIncrSolidFoam
|
||||
wmake elasticContactNonLinULSolidFoam
|
||||
wmake elasticGravitySolidFoam
|
||||
wmake elasticIncrSolidFoam
|
||||
wmake elasticNonLinTLSolidFoam
|
||||
wmake elasticNonLinULSolidFoam
|
||||
wmake elasticPlasticNonLinULSolidFoam
|
||||
wmake elasticPlasticSolidFoam
|
||||
wmake elasticSolidFoam
|
||||
wmake elasticThermalSolidFoam
|
||||
wmake icoFsiElasticNonLinULSolidFoam
|
||||
wmake viscoElasticSolidFoam
|
||||
|
||||
(cd utilities && ./Allwmake)
|
|
@ -1,3 +1,3 @@
|
|||
elasticContactIncrSolidFoam.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/elasticContactIncrSolidFoam
|
||||
EXE = $(FOAM_APPBIN)/elasticContactIncrSolidFoam
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
elasticContactNonLinULSolidFoam.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/elasticContactNonLinULSolidFoam
|
||||
EXE = $(FOAM_APPBIN)/elasticContactNonLinULSolidFoam
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
elasticContactSolidFoam.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/elasticContactSolidFoam
|
||||
EXE = $(FOAM_APPBIN)/elasticContactSolidFoam
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
elasticGravitySolidFoam.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/elasticGravitySolidFoam
|
||||
EXE = $(FOAM_APPBIN)/elasticGravitySolidFoam
|
|
@ -1,3 +1,3 @@
|
|||
elasticIncrSolidFoam.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/elasticIncrSolidFoam
|
||||
EXE = $(FOAM_APPBIN)/elasticIncrSolidFoam
|
|
@ -1,3 +1,3 @@
|
|||
elasticNonLinTLSolidFoam.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/elasticNonLinTLSolidFoam
|
||||
EXE = $(FOAM_APPBIN)/elasticNonLinTLSolidFoam
|
|
@ -1,3 +1,3 @@
|
|||
elasticNonLinULSolidFoam.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/elasticNonLinULSolidFoam
|
||||
EXE = $(FOAM_APPBIN)/elasticNonLinULSolidFoam
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
elasticPlasticNonLinULSolidFoam.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/elasticPlasticNonLinULSolidFoam
|
||||
EXE = $(FOAM_APPBIN)/elasticPlasticNonLinULSolidFoam
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
elasticPlasticSolidFoam.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/elasticPlasticSolidFoam
|
||||
EXE = $(FOAM_APPBIN)/elasticPlasticSolidFoam
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
elasticSolidFoam.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/elasticSolidFoam
|
||||
EXE = $(FOAM_APPBIN)/elasticSolidFoam
|
|
@ -1,3 +1,3 @@
|
|||
elasticThermalSolidFoam.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/elasticThermalSolidFoam
|
||||
EXE = $(FOAM_APPBIN)/elasticThermalSolidFoam
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
icoFsiElasticNonLinULSolidFoam.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/icoFsiElasticNonLinULSolidFoam
|
||||
EXE = $(FOAM_APPBIN)/icoFsiElasticNonLinULSolidFoam
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/sh
|
||||
set -x
|
||||
|
||||
wclean foamMeshToAbaqus
|
||||
wclean setMatFromCellZones
|
||||
wclean patchStressIntegrate
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/sh
|
||||
set -x
|
||||
|
||||
|
||||
wmake foamMeshToAbaqus
|
||||
wmake setMatFromCellZones
|
||||
wmake patchStressIntegrate
|
|
@ -1,3 +0,0 @@
|
|||
foamMeshToAbaqus.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/foamMeshToAbaqus
|
|
@ -1,3 +0,0 @@
|
|||
patchStressIntegrate.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/patchStressIntegrate
|
|
@ -1,3 +0,0 @@
|
|||
setMatFromCellZones.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/setMatFromCellZones
|
|
@ -1,3 +1,3 @@
|
|||
viscoElasticSolidFoam.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/viscoElasticSolidFoam
|
||||
EXE = $(FOAM_APPBIN)/viscoElasticSolidFoam
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
foamMeshToAbaqus.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/foamMeshToAbaqus
|
|
@ -86,6 +86,7 @@ class mergePolyMesh
|
|||
//- Cell zones
|
||||
DynamicList<label> cellZones_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
|
|
|
@ -113,7 +113,7 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
|
|||
|
||||
// Algorithm:
|
||||
// During mirroring, the faces that were previously boundary faces
|
||||
// in the mirror plane may become ineternal faces. In order to
|
||||
// in the mirror plane may become internal faces. In order to
|
||||
// deal with the ordering of the faces, the algorithm is split
|
||||
// into two parts. For original faces, the internal faces are
|
||||
// distributed to their owner cells. Once all internal faces are
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
patchStressIntegrate.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/patchStressIntegrate
|
|
@ -0,0 +1,3 @@
|
|||
setMatFromCellZones.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/setMatFromCellZones
|
|
@ -1,129 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright held by original author
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Application
|
||||
MRFSimpleFoam
|
||||
|
||||
Description
|
||||
Steady-state solver for incompressible, turbulent flow of non-Newtonian
|
||||
fluids with MRF regions.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
|
||||
#include "incompressible/RAS/RASModel/RASModel.H"
|
||||
#include "MRFZones.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
# include "setRootCase.H"
|
||||
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
# include "createFields.H"
|
||||
# include "initContinuityErrs.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
for (runTime++; !runTime.end(); runTime++)
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
# include "readSIMPLEControls.H"
|
||||
|
||||
p.storePrevIter();
|
||||
|
||||
// Pressure-velocity SIMPLE corrector
|
||||
{
|
||||
// Momentum predictor
|
||||
|
||||
tmp<fvVectorMatrix> UEqn
|
||||
(
|
||||
fvm::div(phi, U)
|
||||
+ turbulence->divDevReff(U)
|
||||
);
|
||||
mrfZones.addCoriolis(UEqn());
|
||||
|
||||
UEqn().relax();
|
||||
|
||||
solve(UEqn() == -fvc::grad(p));
|
||||
|
||||
p.boundaryField().updateCoeffs();
|
||||
volScalarField rAU = 1.0/UEqn().A();
|
||||
U = rAU*UEqn().H();
|
||||
UEqn.clear();
|
||||
|
||||
phi = fvc::interpolate(U, "interpolate(HbyA)") & mesh.Sf();
|
||||
mrfZones.relativeFlux(phi);
|
||||
adjustPhi(phi, U, p);
|
||||
|
||||
// Non-orthogonal pressure corrector loop
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::laplacian(rAU, p) == fvc::div(phi)
|
||||
);
|
||||
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
{
|
||||
phi -= pEqn.flux();
|
||||
}
|
||||
}
|
||||
|
||||
# include "continuityErrs.H"
|
||||
|
||||
// Explicitly relax pressure for momentum corrector
|
||||
p.relax();
|
||||
|
||||
// Momentum corrector
|
||||
U -= rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
turbulence->correct();
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
|
@ -1,3 +0,0 @@
|
|||
MRFSimpleFoam.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/MRFSimpleFoam
|
|
@ -1,10 +0,0 @@
|
|||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/transportModels
|
||||
|
||||
EXE_LIBS = \
|
||||
-lincompressibleRASModels \
|
||||
-lincompressibleTransportModels \
|
||||
-lfiniteVolume \
|
||||
-llduSolvers
|
|
@ -1,46 +0,0 @@
|
|||
Info << "Reading field p\n" << endl;
|
||||
volScalarField p
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"p",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info << "Reading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
# include "createPhi.H"
|
||||
|
||||
|
||||
label pRefCell = 0;
|
||||
scalar pRefValue = 0.0;
|
||||
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
|
||||
|
||||
|
||||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
|
||||
autoPtr<incompressible::RASModel> turbulence
|
||||
(
|
||||
incompressible::RASModel::New(U, phi, laminarTransport)
|
||||
);
|
||||
|
||||
|
||||
MRFZones mrfZones(mesh);
|
||||
mrfZones.correctBoundaryVelocity(U);
|
|
@ -1,3 +0,0 @@
|
|||
simpleSRFFoam.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/simpleSRFFoam
|
|
@ -1,11 +0,0 @@
|
|||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/transportModels
|
||||
|
||||
EXE_LIBS = \
|
||||
-lincompressibleRASModels \
|
||||
-lincompressibleTransportModels \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-llduSolvers
|
|
@ -1,74 +0,0 @@
|
|||
Info << "Reading field p\n" << endl;
|
||||
volScalarField p
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"p",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< "Reading field Urel\n" << endl;
|
||||
volVectorField Urel
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Urel",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< "Reading/calculating face flux field phi\n" << endl;
|
||||
surfaceScalarField phi
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"phi",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
linearInterpolate(Urel) & mesh.Sf()
|
||||
);
|
||||
|
||||
label pRefCell = 0;
|
||||
scalar pRefValue = 0.0;
|
||||
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
|
||||
|
||||
singlePhaseTransportModel laminarTransport(Urel, phi);
|
||||
|
||||
autoPtr<incompressible::RASModel> turbulence
|
||||
(
|
||||
incompressible::RASModel::New(Urel, phi, laminarTransport)
|
||||
);
|
||||
|
||||
Info<< "Creating SRF model\n" << endl;
|
||||
autoPtr<SRF::SRFModel> SRF
|
||||
(
|
||||
SRF::SRFModel::New(Urel)
|
||||
);
|
||||
|
||||
// Create Uabs as a permanent field to make it available for on-the-fly
|
||||
// post-processing operations
|
||||
volVectorField Uabs
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Uabs",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
Urel + SRF->U()
|
||||
);
|
||||
|
|
@ -1,131 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright held by original author
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Application
|
||||
simpleSRFFoam
|
||||
|
||||
Description
|
||||
Steady-state solver for incompressible, turbulent flow of non-Newtonian
|
||||
fluids with single rotating frame.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
|
||||
#include "incompressible/RAS/RASModel/RASModel.H"
|
||||
#include "SRFModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
# include "setRootCase.H"
|
||||
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
# include "createFields.H"
|
||||
# include "initContinuityErrs.H"
|
||||
|
||||
//mesh.clearPrimitives();
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
for (runTime++; !runTime.end(); runTime++)
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
# include "readSIMPLEControls.H"
|
||||
|
||||
p.storePrevIter();
|
||||
|
||||
// Pressure-velocity SIMPLE corrector
|
||||
{
|
||||
// Momentum predictor
|
||||
tmp<fvVectorMatrix> UrelEqn
|
||||
(
|
||||
fvm::div(phi, Urel)
|
||||
+ turbulence->divDevReff(Urel)
|
||||
+ SRF->Su()
|
||||
);
|
||||
|
||||
UrelEqn().relax();
|
||||
|
||||
solve(UrelEqn() == -fvc::grad(p));
|
||||
|
||||
p.boundaryField().updateCoeffs();
|
||||
volScalarField AUrel = UrelEqn().A();
|
||||
Urel = UrelEqn().H()/AUrel;
|
||||
UrelEqn.clear();
|
||||
phi = fvc::interpolate(Urel) & mesh.Sf();
|
||||
adjustPhi(phi, Urel, p);
|
||||
|
||||
// Non-orthogonal pressure corrector loop
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::laplacian(1.0/AUrel, p) == fvc::div(phi)
|
||||
);
|
||||
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
{
|
||||
phi -= pEqn.flux();
|
||||
}
|
||||
}
|
||||
|
||||
# include "continuityErrs.H"
|
||||
|
||||
// Explicitly relax pressure for momentum corrector
|
||||
p.relax();
|
||||
|
||||
// Momentum corrector
|
||||
Urel -= fvc::grad(p)/AUrel;
|
||||
Urel.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
turbulence->correct();
|
||||
|
||||
// Recalculate Uabs
|
||||
Uabs = Urel + SRF->U();
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
|
@ -1,109 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright held by original author
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Application
|
||||
MRFInterFoam
|
||||
|
||||
Description
|
||||
Solver for 2 incompressible, isothermal immiscible fluids using a VOF
|
||||
(volume of fluid) phase-fraction based interface capturing approach.
|
||||
The momentum and other fluid properties are of the "mixture" and a single
|
||||
momentum equation is solved.
|
||||
|
||||
Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
|
||||
|
||||
For a two-fluid approach see twoPhaseEulerFoam.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "MULES.H"
|
||||
#include "subCycle.H"
|
||||
#include "interfaceProperties.H"
|
||||
#include "twoPhaseMixture.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "MRFZones.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "readPISOControls.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "createFields.H"
|
||||
#include "createMRFZones.H"
|
||||
#include "readTimeControls.H"
|
||||
#include "correctPhi.H"
|
||||
#include "CourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.run())
|
||||
{
|
||||
#include "readPISOControls.H"
|
||||
#include "readTimeControls.H"
|
||||
#include "CourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
twoPhaseProperties.correct();
|
||||
|
||||
#include "alphaEqnSubCycle.H"
|
||||
|
||||
#include "UEqn.H"
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr=0; corr<nCorr; corr++)
|
||||
{
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
#include "continuityErrs.H"
|
||||
|
||||
turbulence->correct();
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
|
@ -1,3 +0,0 @@
|
|||
MRFInterFoam.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/MRFInterFoam
|
|
@ -1,15 +0,0 @@
|
|||
EXE_INC = \
|
||||
-I$(FOAM_SOLVERS)/multiphase/interFoam \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-linterfaceProperties \
|
||||
-lincompressibleTransportModels \
|
||||
-lincompressibleTurbulenceModel \
|
||||
-lincompressibleRASModels \
|
||||
-lincompressibleLESModels \
|
||||
-lfiniteVolume
|
|
@ -1,35 +0,0 @@
|
|||
surfaceScalarField muEff
|
||||
(
|
||||
"muEff",
|
||||
twoPhaseProperties.muf()
|
||||
+ fvc::interpolate(rho*turbulence->nut())
|
||||
);
|
||||
|
||||
fvVectorMatrix UEqn
|
||||
(
|
||||
fvm::ddt(rho, U)
|
||||
+ fvm::div(rhoPhi, U)
|
||||
- fvm::laplacian(muEff, U)
|
||||
- (fvc::grad(U) & fvc::grad(muEff))
|
||||
//- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf()))
|
||||
);
|
||||
mrfZones.addCoriolis(rho, UEqn);
|
||||
|
||||
UEqn.relax();
|
||||
|
||||
if (momentumPredictor)
|
||||
{
|
||||
solve
|
||||
(
|
||||
UEqn
|
||||
==
|
||||
fvc::reconstruct
|
||||
(
|
||||
fvc::interpolate(rho)*(g & mesh.Sf())
|
||||
+ (
|
||||
fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)
|
||||
- fvc::snGrad(pd)
|
||||
) * mesh.magSf()
|
||||
)
|
||||
);
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
MRFZones mrfZones(mesh);
|
||||
mrfZones.correctBoundaryVelocity(U);
|
|
@ -1,49 +0,0 @@
|
|||
{
|
||||
volScalarField rUA = 1.0/UEqn.A();
|
||||
surfaceScalarField rUAf = fvc::interpolate(rUA);
|
||||
|
||||
U = rUA*UEqn.H();
|
||||
|
||||
surfaceScalarField phiU
|
||||
(
|
||||
"phiU",
|
||||
(fvc::interpolate(U) & mesh.Sf())
|
||||
//+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||
);
|
||||
mrfZones.relativeFlux(phiU);
|
||||
|
||||
phi = phiU +
|
||||
(
|
||||
fvc::interpolate(interface.sigmaK())*
|
||||
fvc::snGrad(alpha1)*mesh.magSf()
|
||||
+ fvc::interpolate(rho)*(g & mesh.Sf())
|
||||
)*rUAf;
|
||||
adjustPhi(phi, U, p);
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pdEqn
|
||||
(
|
||||
fvm::laplacian(rUAf, pd) == fvc::div(phi)
|
||||
);
|
||||
|
||||
pdEqn.setReference(pdRefCell, pdRefValue);
|
||||
|
||||
if (corr == nCorr-1 && nonOrth == nNonOrthCorr)
|
||||
{
|
||||
pdEqn.solve(mesh.solutionDict().solver(pd.name() + "Final"));
|
||||
}
|
||||
else
|
||||
{
|
||||
pdEqn.solve(mesh.solutionDict().solver(pd.name()));
|
||||
}
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
{
|
||||
phi -= pdEqn.flux();
|
||||
}
|
||||
}
|
||||
|
||||
U += rUA*fvc::reconstruct((phi - phiU)/rUAf);
|
||||
U.correctBoundaryConditions();
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue