solvers::incompressibleFluid: New solver module for incompressible fluid flow
executed with foamRun for single region simulations of foamMultiRun for
multi-region simulations. Replaces pimpleFoam, pisoFoam and simpleFoam and all
the corresponding tutorials have been updated and moved to
tutorials/modules/incompressibleFluid.
Class
Foam::solvers::incompressibleFluid
Description
Solver module for steady or transient turbulent flow of incompressible
isothermal fluids with optional mesh motion and change.
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, constraining or limiting
the solution.
Reference:
\verbatim
Greenshields, C. J., & Weller, H. G. (2022).
Notes on Computational Fluid Dynamics: General Principles.
CFD Direct Ltd.: Reading, UK.
\endverbatim
SourceFiles
incompressibleFluid.C
See also
Foam::solvers::fluidSolver
Foam::solvers::isothermalFluid
This commit is contained in:
@ -0,0 +1,228 @@
|
||||
/*--------------------------------*- 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 blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 0.01;
|
||||
|
||||
r1 4;
|
||||
r2 6;
|
||||
r3 8;
|
||||
r4 10;
|
||||
|
||||
y1 3.86370330516;
|
||||
y2 5.79555495773;
|
||||
y3 7.72740661031;
|
||||
y4 9.65925826289;
|
||||
|
||||
nz1 -1.03527618041;
|
||||
nz2 -1.55291427062;
|
||||
nz3 -2.07055236082;
|
||||
nz4 -2.58819045103;
|
||||
|
||||
pz1 1.03527618041;
|
||||
pz2 1.55291427062;
|
||||
pz3 2.07055236082;
|
||||
pz4 2.58819045103;
|
||||
|
||||
vertices
|
||||
(
|
||||
(0 $y1 $nz1) (2 $y1 $nz1) (4 $y1 $nz1) (4 $y1 $nz1) (6 $y1 $nz1)
|
||||
(0 $y2 $nz2) (2 $y2 $nz2) (4 $y2 $nz2) (4 $y2 $nz2) (6 $y2 $nz2)
|
||||
(0 $y3 $nz3) (2 $y3 $nz3)
|
||||
(0 $y3 $nz3) (2 $y3 $nz3)
|
||||
(0 $y4 $nz4) (2 $y4 $nz4)
|
||||
|
||||
(0 $y1 $pz1) (2 $y1 $pz1) (4 $y1 $pz1) (4 $y1 $pz1) (6 $y1 $pz1)
|
||||
(0 $y2 $pz2) (2 $y2 $pz2) (4 $y2 $pz2) (4 $y2 $pz2) (6 $y2 $pz2)
|
||||
(0 $y3 $pz3) (2 $y3 $pz3)
|
||||
(0 $y3 $pz3) (2 $y3 $pz3)
|
||||
(0 $y4 $pz4) (2 $y4 $pz4)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex ( 0 1 6 5 16 17 22 21) rotating (11 11 17) simpleGrading (1 1 1)
|
||||
hex ( 1 2 7 6 17 18 23 22) rotating (11 11 17) simpleGrading (1 1 1)
|
||||
hex ( 3 4 9 8 19 20 25 24) (10 10 16) simpleGrading (1 1 1)
|
||||
hex ( 5 6 11 10 21 22 27 26) rotating (11 11 17) simpleGrading (1 1 1)
|
||||
hex (12 13 15 14 28 29 31 30) (10 10 16) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
arc 0 16 (0 $r1 0)
|
||||
arc 1 17 (2 $r1 0)
|
||||
arc 2 18 (4 $r1 0)
|
||||
arc 3 19 (4 $r1 0)
|
||||
arc 4 20 (6 $r1 0)
|
||||
|
||||
arc 5 21 (0 $r2 0)
|
||||
arc 6 22 (2 $r2 0)
|
||||
arc 7 23 (4 $r2 0)
|
||||
arc 8 24 (4 $r2 0)
|
||||
arc 9 25 (6 $r2 0)
|
||||
|
||||
arc 10 26 (0 $r3 0)
|
||||
arc 11 27 (2 $r3 0)
|
||||
arc 12 28 (0 $r3 0)
|
||||
arc 13 29 (2 $r3 0)
|
||||
|
||||
arc 14 30 (0 $r4 0)
|
||||
arc 15 31 (2 $r4 0)
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
statorDuct
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(3 4 20 19)
|
||||
(8 9 25 24)
|
||||
(12 14 30 28)
|
||||
(13 15 31 29)
|
||||
);
|
||||
}
|
||||
|
||||
rotorDuct
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(0 1 17 16)
|
||||
(1 2 18 17)
|
||||
(0 5 21 16)
|
||||
(5 10 26 21)
|
||||
(6 7 23 22)
|
||||
(6 11 27 22)
|
||||
);
|
||||
}
|
||||
|
||||
rotorBlades
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(0 1 6 5)
|
||||
(1 2 7 6)
|
||||
(5 6 11 10)
|
||||
(16 17 22 21)
|
||||
(17 18 23 22)
|
||||
(21 22 27 26)
|
||||
);
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(4 9 25 20)
|
||||
);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(14 15 31 30)
|
||||
);
|
||||
}
|
||||
|
||||
cyclicIn1
|
||||
{
|
||||
type cyclic;
|
||||
neighbourPatch cyclicIn2;
|
||||
faces
|
||||
(
|
||||
(3 4 9 8)
|
||||
);
|
||||
}
|
||||
|
||||
cyclicIn2
|
||||
{
|
||||
type cyclic;
|
||||
neighbourPatch cyclicIn1;
|
||||
faces
|
||||
(
|
||||
(19 20 25 24)
|
||||
);
|
||||
}
|
||||
|
||||
nonCoupleIn1
|
||||
{
|
||||
type patch;
|
||||
inGroups (nonCouple);
|
||||
faces
|
||||
(
|
||||
(3 8 24 19)
|
||||
);
|
||||
}
|
||||
|
||||
nonCoupleIn2
|
||||
{
|
||||
type patch;
|
||||
inGroups (nonCouple);
|
||||
faces
|
||||
(
|
||||
(2 7 23 18)
|
||||
);
|
||||
}
|
||||
|
||||
cyclicOut1
|
||||
{
|
||||
type cyclic;
|
||||
neighbourPatch cyclicOut2;
|
||||
faces
|
||||
(
|
||||
(12 14 15 13)
|
||||
);
|
||||
}
|
||||
|
||||
cyclicOut2
|
||||
{
|
||||
type cyclic;
|
||||
neighbourPatch cyclicOut1;
|
||||
faces
|
||||
(
|
||||
(28 30 31 29)
|
||||
);
|
||||
}
|
||||
|
||||
nonCoupleOut1
|
||||
{
|
||||
type patch;
|
||||
inGroups (nonCouple);
|
||||
faces
|
||||
(
|
||||
(10 11 27 26)
|
||||
);
|
||||
}
|
||||
|
||||
nonCoupleOut2
|
||||
{
|
||||
type patch;
|
||||
inGroups (nonCouple);
|
||||
faces
|
||||
(
|
||||
(12 13 29 28)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,74 @@
|
||||
/*--------------------------------*- 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 incompressibleFluid;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 5;
|
||||
|
||||
deltaT 1e-3;
|
||||
|
||||
writeControl adjustableRunTime;
|
||||
|
||||
writeInterval 0.05;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat binary;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
adjustTimeStep yes;
|
||||
|
||||
maxCo 1.0;
|
||||
|
||||
functions
|
||||
{
|
||||
#includeFunc patchFlowRate(patch=inlet, funcName=inletFlowRate)
|
||||
#includeFunc patchFlowRate(patch=outlet, funcName=outletFlowRate)
|
||||
|
||||
cartesianToCylindrical
|
||||
{
|
||||
type cylindrical;
|
||||
libs ("libfieldFunctionObjects.so");
|
||||
|
||||
origin (0 0 0);
|
||||
axis (1 0 0);
|
||||
|
||||
field U;
|
||||
|
||||
writeControl outputTime;
|
||||
writeInterval 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,69 @@
|
||||
/*--------------------------------*- 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 createNonConformalCouplesDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
nonConformalCoupleIn0
|
||||
{
|
||||
patches (nonCoupleIn1 nonCoupleIn2);
|
||||
transform none;
|
||||
}
|
||||
|
||||
nonConformalCoupleIn30
|
||||
{
|
||||
$nonConformalCoupleIn0;
|
||||
transform rotational;
|
||||
rotationAxis (-1 0 0);
|
||||
rotationCentre (0 0 0);
|
||||
rotationAngle 30;
|
||||
}
|
||||
|
||||
nonConformalCoupleIn60 { $nonConformalCoupleIn30; rotationAngle 60; }
|
||||
nonConformalCoupleIn90 { $nonConformalCoupleIn30; rotationAngle 90; }
|
||||
nonConformalCoupleIn120 { $nonConformalCoupleIn30; rotationAngle 120; }
|
||||
nonConformalCoupleIn150 { $nonConformalCoupleIn30; rotationAngle 150; }
|
||||
nonConformalCoupleIn180 { $nonConformalCoupleIn30; rotationAngle 180; }
|
||||
nonConformalCoupleIn210 { $nonConformalCoupleIn30; rotationAngle 210; }
|
||||
nonConformalCoupleIn240 { $nonConformalCoupleIn30; rotationAngle 240; }
|
||||
nonConformalCoupleIn270 { $nonConformalCoupleIn30; rotationAngle 270; }
|
||||
nonConformalCoupleIn300 { $nonConformalCoupleIn30; rotationAngle 300; }
|
||||
nonConformalCoupleIn330 { $nonConformalCoupleIn30; rotationAngle 330; }
|
||||
|
||||
nonConformalCoupleOut0
|
||||
{
|
||||
patches (nonCoupleOut1 nonCoupleOut2);
|
||||
transform none;
|
||||
}
|
||||
|
||||
nonConformalCoupleOut30
|
||||
{
|
||||
patches (nonCoupleOut1 nonCoupleOut2);
|
||||
transform rotational;
|
||||
rotationAxis (-1 0 0);
|
||||
rotationCentre (0 0 0);
|
||||
rotationAngle -30;
|
||||
}
|
||||
|
||||
nonConformalCoupleOut60 { $nonConformalCoupleOut30; rotationAngle -60; }
|
||||
nonConformalCoupleOut90 { $nonConformalCoupleOut30; rotationAngle -90; }
|
||||
nonConformalCoupleOut120 { $nonConformalCoupleOut30; rotationAngle -120; }
|
||||
nonConformalCoupleOut150 { $nonConformalCoupleOut30; rotationAngle -150; }
|
||||
nonConformalCoupleOut180 { $nonConformalCoupleOut30; rotationAngle -180; }
|
||||
nonConformalCoupleOut210 { $nonConformalCoupleOut30; rotationAngle -210; }
|
||||
nonConformalCoupleOut240 { $nonConformalCoupleOut30; rotationAngle -240; }
|
||||
nonConformalCoupleOut270 { $nonConformalCoupleOut30; rotationAngle -270; }
|
||||
nonConformalCoupleOut300 { $nonConformalCoupleOut30; rotationAngle -300; }
|
||||
nonConformalCoupleOut330 { $nonConformalCoupleOut30; rotationAngle -330; }
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,22 @@
|
||||
/*--------------------------------*- 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 decomposeParDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 4;
|
||||
|
||||
method scotch;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,54 @@
|
||||
/*--------------------------------*- 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;
|
||||
grad(p) Gauss linear;
|
||||
grad(U) cellLimited Gauss linear 1;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,U) Gauss linearUpwind grad(U);
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
div((nuEff*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,73 @@
|
||||
/*--------------------------------*- 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
|
||||
{
|
||||
"pcorr.*"
|
||||
{
|
||||
solver GAMG;
|
||||
smoother DICGaussSeidel;
|
||||
tolerance 0.1;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
p
|
||||
{
|
||||
$pcorr;
|
||||
tolerance 1e-06;
|
||||
relTol 0.01;
|
||||
}
|
||||
|
||||
pFinal
|
||||
{
|
||||
$p;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"(U|k|epsilon)"
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-06;
|
||||
relTol 0.01;
|
||||
}
|
||||
|
||||
"(U|k|epsilon)Final"
|
||||
{
|
||||
$U;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
correctPhi no;
|
||||
correctMeshPhi no;
|
||||
nOuterCorrectors 2;
|
||||
nCorrectors 1;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
equations
|
||||
{
|
||||
".*" 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user