solvers::multiphaseEuler: New solver module for Euler-Euler multiphase simulations
executed with foamRun for single region simulations of foamMultiRun for
multi-region simulations. Replaces multiphaseEulerFoam and all the
corresponding tutorials have been updated and moved to
tutorials/modules/multiphaseEuler.
Class
Foam::solvers::multiphaseEuler
Description
Solver module for a system of any number of compressible fluid phases with a
common pressure, but otherwise separate properties. The type of phase model
is run time selectable and can optionally represent multiple species and
in-phase reactions. The phase system is also run time selectable and can
optionally represent different types of momentum, heat and mass transfer.
Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
pseudo-transient and steady simulations.
Optional fvModels and fvConstraints are provided to enhance the simulation
in many ways including adding various sources, Lagrangian
particles, surface film etc. and constraining or limiting the solution.
SourceFiles
multiphaseEuler.C
See also
Foam::solvers::compressibleVoF
Foam::solvers::fluidSolver
Foam::solvers::incompressibleFluid
This commit is contained in:
@ -0,0 +1,96 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
backgroundMesh
|
||||
{
|
||||
length 3.5;
|
||||
rA 0.0096;
|
||||
lengthCells 350;
|
||||
rAcells 40;
|
||||
}
|
||||
|
||||
convertToMeters 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
( 0 0 -1)
|
||||
($!backgroundMesh/length 0 -1)
|
||||
( 0 $!backgroundMesh/rA -1)
|
||||
($!backgroundMesh/length $!backgroundMesh/rA -1)
|
||||
|
||||
( 0 0 0)
|
||||
($!backgroundMesh/length 0 0)
|
||||
( 0 $!backgroundMesh/rA 0)
|
||||
($!backgroundMesh/length $!backgroundMesh/rA 0)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 3 2 4 5 7 6)
|
||||
($!backgroundMesh/lengthCells $!backgroundMesh/rAcells 1)
|
||||
simpleGrading (1 0.5 1)
|
||||
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
inlet
|
||||
{
|
||||
type mappedInternal;
|
||||
offset (0.05 0 0);
|
||||
faces
|
||||
(
|
||||
(0 4 6 2)
|
||||
);
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(1 5 7 3)
|
||||
);
|
||||
}
|
||||
front
|
||||
{
|
||||
type symmetry;
|
||||
faces
|
||||
(
|
||||
(4 5 7 6)
|
||||
);
|
||||
}
|
||||
|
||||
back
|
||||
{
|
||||
type symmetry;
|
||||
faces
|
||||
(
|
||||
(0 1 3 2)
|
||||
);
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(3 2 6 7)
|
||||
(1 0 4 5)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,151 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application foamRun;
|
||||
|
||||
solver multiphaseEuler;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 0.5;
|
||||
|
||||
deltaT 0.0001;
|
||||
|
||||
writeControl adjustableRunTime;
|
||||
|
||||
writeInterval 0.5;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 9;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
adjustTimeStep yes;
|
||||
|
||||
maxCo 0.5;
|
||||
|
||||
maxDeltaT 0.001;
|
||||
|
||||
functions
|
||||
{
|
||||
outflow
|
||||
{
|
||||
type surfaceFieldValue;
|
||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||
log yes;
|
||||
writeFields false;
|
||||
regionType patch;
|
||||
name outlet;
|
||||
operation sum;
|
||||
fields ( alphaRhoPhi.gas alphaRhoPhi.liquid);
|
||||
}
|
||||
inflow
|
||||
{
|
||||
type surfaceFieldValue;
|
||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||
log yes;
|
||||
writeFields false;
|
||||
regionType patch;
|
||||
name inlet;
|
||||
operation sum;
|
||||
fields ( alphaRhoPhi.gas alphaRhoPhi.liquid);
|
||||
}
|
||||
outletGas
|
||||
{
|
||||
type surfaceFieldValue;
|
||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||
log yes;
|
||||
writeFields false;
|
||||
regionType patch;
|
||||
name outlet;
|
||||
operation sum;
|
||||
weightField alphaRhoPhi.gas;
|
||||
fields ( h.gas );
|
||||
}
|
||||
outletLiquid
|
||||
{
|
||||
type surfaceFieldValue;
|
||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||
log yes;
|
||||
writeFields false;
|
||||
regionType patch;
|
||||
name outlet;
|
||||
operation sum;
|
||||
weightField alphaRhoPhi.liquid;
|
||||
fields ( h.liquid );
|
||||
}
|
||||
inletGas
|
||||
{
|
||||
type surfaceFieldValue;
|
||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||
log yes;
|
||||
writeFields false;
|
||||
regionType patch;
|
||||
name inlet;
|
||||
operation sum;
|
||||
weightField alphaRhoPhi.gas;
|
||||
fields ( h.gas );
|
||||
}
|
||||
inletLiquid
|
||||
{
|
||||
type surfaceFieldValue;
|
||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||
log yes;
|
||||
writeFields false;
|
||||
regionType patch;
|
||||
name inlet;
|
||||
operation sum;
|
||||
weightField alphaRhoPhi.liquid;
|
||||
fields ( h.liquid );
|
||||
}
|
||||
writeObjects1
|
||||
{
|
||||
type writeObjects;
|
||||
libs ("libutilityFunctionObjects.so");
|
||||
|
||||
objects
|
||||
(
|
||||
rho.gas
|
||||
mu.gas
|
||||
psi.gas
|
||||
kappa.gas
|
||||
rho.liquid
|
||||
mu.liquid
|
||||
psi.liquid
|
||||
kappa.liquid
|
||||
h.liquid
|
||||
h.gas
|
||||
);
|
||||
writeControl writeTime;
|
||||
writeInterval 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,38 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object decomposeParDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 4;
|
||||
|
||||
method scotch;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
n (1 1 24);
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (1 1 1);
|
||||
order xyz;
|
||||
}
|
||||
|
||||
distributed no;
|
||||
|
||||
roots
|
||||
(
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,34 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object extrudeProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
constructFrom patch;
|
||||
sourceCase "$FOAM_CASE";
|
||||
|
||||
sourcePatches (front);
|
||||
exposedPatchName back;
|
||||
|
||||
extrudeModel wedge;
|
||||
|
||||
sectorCoeffs
|
||||
{
|
||||
axisPt (0 0 0);
|
||||
axis (1 0 0);
|
||||
angle 1;
|
||||
}
|
||||
|
||||
flipNormals false;
|
||||
mergeFaces false;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,23 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvConstraints;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
limitp
|
||||
{
|
||||
type limitPressure;
|
||||
|
||||
min 1e4;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,75 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
limited cellLimited Gauss linear 1;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
|
||||
div(phi,alpha) Gauss vanLeer;
|
||||
div(phir,alpha) Gauss vanLeer;
|
||||
|
||||
div(alphaRhoPhi,U) Gauss linearUpwind limited;
|
||||
div(phi,U) Gauss linearUpwind limited;
|
||||
|
||||
div(alphaRhoPhi,Yi) Gauss linearUpwind limited;
|
||||
"div\(alphaRhoPhi,(h|e)\)" Gauss linearUpwind limited;
|
||||
div(alphaRhoPhi,K) Gauss linearUpwind limited;
|
||||
div(alphaRhoPhi,(p|rho)) Gauss linearUpwind limited;
|
||||
"div\(alphaRhoPhi,(k|epsilon|omega)\)" Gauss linearUpwind limited;
|
||||
"div\(phim,(k|epsilon)m\)" Gauss linearUpwind limited;
|
||||
|
||||
div((((alpha*rho)*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
}
|
||||
|
||||
wallDist
|
||||
{
|
||||
method meshWave;
|
||||
nRequired yes;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,87 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
"alpha.*"
|
||||
{
|
||||
nAlphaCorr 1;
|
||||
nAlphaSubCycles 1;
|
||||
}
|
||||
|
||||
p_rgh
|
||||
{
|
||||
solver GAMG;
|
||||
smoother DIC;
|
||||
tolerance 1e-8;
|
||||
relTol 0.01;
|
||||
maxIter 20;
|
||||
minIter 2;
|
||||
}
|
||||
|
||||
p_rghFinal
|
||||
{
|
||||
$p_rgh;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"(e|h).*"
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-12;
|
||||
relTol 0.001;
|
||||
minIter 1;
|
||||
maxIter 20;
|
||||
}
|
||||
|
||||
"(k|epsilon|omega).*"
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-8;
|
||||
relTol 0;
|
||||
minIter 1;
|
||||
}
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
nOuterCorrectors 1;
|
||||
nCorrectors 1;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
nEnergyCorrectors 1;
|
||||
|
||||
faceMomentum yes;
|
||||
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
fields
|
||||
{
|
||||
thermalPhaseChange:dmdtf 1.0;
|
||||
}
|
||||
|
||||
equations
|
||||
{
|
||||
".*" 1;
|
||||
"h\..*" 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user