TUT: aerofoilNACA0012 tutorial for rhoSimpleFoam and rhoPimpleFoam
The tutorial demonstrates generation of a C-grid mesh using blockMesh The geometry is provided by a surface mesh (OBJ file) of the NACA0012 aerofoil The case is setup with a freestream flow speed of Ma=0.72 Thanks to Kai Bastos at Duke University for the geometry and helpful input.
This commit is contained in:
parent
7d205cc790
commit
1fc177152a
@ -0,0 +1,40 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Tinlet 298;
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform $Tinlet;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
freestream
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform $Tinlet;
|
||||
value $inletValue;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,39 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Uinlet (200 0 0);
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform $Uinlet;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
freestream
|
||||
{
|
||||
type freestreamVelocity;
|
||||
freestreamValue uniform $Uinlet;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,38 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object alphat;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
freestream
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type compressible::alphatWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,41 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object k;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
kInlet 0.01;
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform $kInlet;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
freestream
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform $kInlet;
|
||||
value uniform $kInlet;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform $kInlet;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,39 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object mut;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
freestream
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type nutkWallFunction;
|
||||
type nutkWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,41 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object omega;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
omegaInlet 10;
|
||||
|
||||
dimensions [0 0 -1 0 0 0 0];
|
||||
|
||||
internalField uniform $omegaInlet;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
freestream
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform $omegaInlet;
|
||||
value uniform $omegaInlet;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type omegaWallFunction;
|
||||
value uniform $omegaInlet;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,50 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
pOut 1e5;
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform $pOut;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
outlet
|
||||
{
|
||||
type waveTransmissive;
|
||||
field p;
|
||||
psi thermo:psi;
|
||||
gamma 1.4;
|
||||
fieldInf $pOut;
|
||||
lInf 5;
|
||||
value uniform $pOut;
|
||||
}
|
||||
|
||||
freestream
|
||||
{
|
||||
type freestreamPressure;
|
||||
freestreamValue uniform $pOut;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
11
tutorials/compressible/rhoPimpleFoam/RAS/aerofoilNACA0012/Allclean
Executable file
11
tutorials/compressible/rhoPimpleFoam/RAS/aerofoilNACA0012/Allclean
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
|
||||
rm constant/geometry/boundaryLayer.obj > /dev/null 2>&1
|
||||
|
||||
#------------------------------------------------------------------------------
|
15
tutorials/compressible/rhoPimpleFoam/RAS/aerofoilNACA0012/Allrun
Executable file
15
tutorials/compressible/rhoPimpleFoam/RAS/aerofoilNACA0012/Allrun
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application="$(getApplication)"
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication transformPoints -scale "(1 0 1)"
|
||||
runApplication extrudeMesh
|
||||
|
||||
runApplication $application
|
||||
|
||||
#------------------------------------------------------------------------------
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,47 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType
|
||||
{
|
||||
type hePsiThermo;
|
||||
mixture pureMixture;
|
||||
transport const;
|
||||
thermo hConst;
|
||||
equationOfState perfectGas;
|
||||
specie specie;
|
||||
energy sensibleInternalEnergy;
|
||||
}
|
||||
|
||||
mixture // air at room temperature (293 K)
|
||||
{
|
||||
specie
|
||||
{
|
||||
molWeight 28.9;
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Cp 1005;
|
||||
Hf 0;
|
||||
}
|
||||
transport
|
||||
{
|
||||
mu 1.82e-05;
|
||||
Pr 0.71;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,26 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object turbulenceProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType RAS;
|
||||
|
||||
RAS
|
||||
{
|
||||
RASModel kOmegaSST;
|
||||
turbulence on;
|
||||
printCoeffs on;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,225 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
domain
|
||||
{
|
||||
xMin -4;
|
||||
xMax 4;
|
||||
zMin -2;
|
||||
zMax 2;
|
||||
|
||||
// Number of cells
|
||||
zCells 80; // aerofoil to far field
|
||||
xUCells 30; // upstream
|
||||
xMCells 30; // middle
|
||||
xDCells 40; // downstream
|
||||
|
||||
// Mesh grading
|
||||
zGrading 40; // aerofoil to far field
|
||||
xUGrading 5; // towards centre upstream
|
||||
leadGrading 0.2; // towards leading edge
|
||||
xDGrading 10; // downstream
|
||||
}
|
||||
|
||||
aerofoil
|
||||
{
|
||||
xLead 0;
|
||||
zLead 0;
|
||||
xTrail 1;
|
||||
zTrail 0;
|
||||
xUpper 0.3;
|
||||
zUpper 0.06;
|
||||
xLower 0.3;
|
||||
zLower -0.06;
|
||||
}
|
||||
|
||||
geometry
|
||||
{
|
||||
aerofoil
|
||||
{
|
||||
type triSurfaceMesh;
|
||||
file "NACA0012.obj";
|
||||
}
|
||||
cylinder
|
||||
{
|
||||
type searchableCylinder;
|
||||
point1 ($:aerofoil.xUpper -1e3 0);
|
||||
point2 ($:aerofoil.xUpper 1e3 0);
|
||||
radius $:domain.zMax;
|
||||
}
|
||||
}
|
||||
|
||||
vertices
|
||||
(
|
||||
project ($aerofoil.xLower -0.1 $domain.zMin) (cylinder)
|
||||
($aerofoil.xTrail -0.1 $domain.zMin)
|
||||
($domain.xMax -0.1 $domain.zMin)
|
||||
|
||||
project ($domain.xMin -0.1 $aerofoil.zLead) (cylinder)
|
||||
project ($aerofoil.xLead -0.1 $aerofoil.zLead) (aerofoil)
|
||||
project ($aerofoil.xTrail -0.1 $aerofoil.zTrail) (aerofoil)
|
||||
($domain.xMax -0.1 $aerofoil.zTrail)
|
||||
|
||||
project ($aerofoil.xLower -0.1 $aerofoil.zLower) (aerofoil)
|
||||
project ($aerofoil.xUpper -0.1 $aerofoil.zUpper) (aerofoil)
|
||||
|
||||
project ($aerofoil.xUpper -0.1 $domain.zMax) (aerofoil)
|
||||
project ($aerofoil.xTrail -0.1 $domain.zMax) (aerofoil)
|
||||
($domain.xMax -0.1 $domain.zMax)
|
||||
|
||||
project ($aerofoil.xLower 0.1 $domain.zMin) (cylinder)
|
||||
($aerofoil.xTrail 0.1 $domain.zMin)
|
||||
($domain.xMax 0.1 $domain.zMin)
|
||||
|
||||
project ($domain.xMin 0.1 $aerofoil.zLead) (cylinder)
|
||||
project ($aerofoil.xLead 0.1 $aerofoil.zLead) (aerofoil)
|
||||
project ($aerofoil.xTrail 0.1 $aerofoil.zTrail) (aerofoil)
|
||||
($domain.xMax 0.1 $aerofoil.zTrail)
|
||||
|
||||
project ($aerofoil.xLower 0.1 $aerofoil.zLower) (aerofoil)
|
||||
project ($aerofoil.xUpper 0.1 $aerofoil.zUpper) (aerofoil)
|
||||
|
||||
project ($aerofoil.xUpper 0.1 $domain.zMax) (aerofoil)
|
||||
project ($aerofoil.xTrail 0.1 $domain.zMax) (aerofoil)
|
||||
($domain.xMax 0.1 $domain.zMax)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex ( 7 4 16 19 0 3 15 12)
|
||||
($:domain.xUCells 1 $:domain.zCells)
|
||||
edgeGrading
|
||||
(
|
||||
$:domain.leadGrading $:domain.leadGrading $:domain.xUGrading $:domain.xUGrading
|
||||
1 1 1 1
|
||||
$:domain.zGrading $:domain.zGrading $:domain.zGrading $:domain.zGrading
|
||||
)
|
||||
|
||||
hex ( 5 7 19 17 1 0 12 13)
|
||||
($:domain.xMCells 1 $:domain.zCells)
|
||||
simpleGrading (1 1 $:domain.zGrading)
|
||||
|
||||
hex ( 17 18 6 5 13 14 2 1)
|
||||
($:domain.xDCells 1 $:domain.zCells)
|
||||
simpleGrading ($:domain.xDGrading 1 $:domain.zGrading)
|
||||
|
||||
hex ( 20 16 4 8 21 15 3 9)
|
||||
($:domain.xUCells 1 $:domain.zCells)
|
||||
edgeGrading
|
||||
(
|
||||
$:domain.leadGrading $:domain.leadGrading $:domain.xUGrading $:domain.xUGrading
|
||||
1 1 1 1
|
||||
$:domain.zGrading $:domain.zGrading $:domain.zGrading $:domain.zGrading
|
||||
)
|
||||
|
||||
hex ( 17 20 8 5 22 21 9 10)
|
||||
($:domain.xMCells 1 $:domain.zCells)
|
||||
simpleGrading (1 1 $:domain.zGrading)
|
||||
|
||||
hex ( 5 6 18 17 10 11 23 22)
|
||||
($:domain.xDCells 1 $:domain.zCells)
|
||||
simpleGrading ($:domain.xDGrading 1 $:domain.zGrading)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
|
||||
project 4 7 (aerofoil)
|
||||
project 7 5 (aerofoil)
|
||||
project 4 8 (aerofoil)
|
||||
project 8 5 (aerofoil)
|
||||
|
||||
project 16 19 (aerofoil)
|
||||
project 19 17 (aerofoil)
|
||||
project 16 20 (aerofoil)
|
||||
project 20 17 (aerofoil)
|
||||
|
||||
project 3 0 (cylinder)
|
||||
project 3 9 (cylinder)
|
||||
project 15 12 (cylinder)
|
||||
project 15 21 (cylinder)
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
aerofoil
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(4 7 19 16)
|
||||
(7 5 17 19)
|
||||
(5 8 20 17)
|
||||
(8 4 16 20)
|
||||
);
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
inGroups (freestream);
|
||||
faces
|
||||
(
|
||||
(3 0 12 15)
|
||||
(0 1 13 12)
|
||||
(1 2 14 13)
|
||||
(11 10 22 23)
|
||||
(10 9 21 22)
|
||||
(9 3 15 21)
|
||||
);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
inGroups (freestream);
|
||||
faces
|
||||
(
|
||||
(2 6 18 14)
|
||||
(6 11 23 18)
|
||||
);
|
||||
}
|
||||
|
||||
back
|
||||
{
|
||||
type empty;
|
||||
faces
|
||||
(
|
||||
(3 4 7 0)
|
||||
(7 5 1 0)
|
||||
(5 6 2 1)
|
||||
(3 9 8 4)
|
||||
(9 10 5 8)
|
||||
(10 11 6 5)
|
||||
);
|
||||
}
|
||||
|
||||
front
|
||||
{
|
||||
type empty;
|
||||
faces
|
||||
(
|
||||
(15 16 19 12)
|
||||
(19 17 13 12)
|
||||
(17 18 14 13)
|
||||
(15 16 20 21)
|
||||
(20 17 22 21)
|
||||
(17 18 23 22)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,55 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
libs ("libmodifiedInletOutlet.so");
|
||||
|
||||
application rhoPimpleFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 0.15;
|
||||
|
||||
deltaT 2e-5;
|
||||
|
||||
writeControl adjustableRunTime;
|
||||
|
||||
writeInterval 0.001;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 8;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
functions
|
||||
{
|
||||
#includeFunc MachNo
|
||||
#includeFunc residuals
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,30 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object extrudeProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
constructFrom patch;
|
||||
sourceCase "$FOAM_CASE";
|
||||
|
||||
sourcePatches (back);
|
||||
exposedPatchName front;
|
||||
|
||||
extrudeModel linearDirection;
|
||||
direction (0 -1 0);
|
||||
thickness 0.1;
|
||||
|
||||
flipNormals false;
|
||||
mergeFaces false;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
@ -0,0 +1,25 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 5 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object porousZone;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
limitT
|
||||
{
|
||||
type limitTemperature;
|
||||
min 101;
|
||||
max 1000;
|
||||
selectionMode all;
|
||||
}
|
||||
|
||||
//************************************************************************** //
|
@ -0,0 +1,74 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
|
||||
limited cellLimited Gauss linear 1;
|
||||
grad(U) $limited;
|
||||
grad(k) $limited;
|
||||
grad(omega) $limited;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
|
||||
div(phi,U) Gauss linearUpwind limited;
|
||||
|
||||
turbulence Gauss linearUpwind limited;
|
||||
energy Gauss linearUpwind limited;
|
||||
|
||||
div(phi,k) $turbulence;
|
||||
div(phi,omega) $turbulence;
|
||||
|
||||
div(phi,e) $energy;
|
||||
div(phi,K) $energy;
|
||||
div(phi,Ekp) $energy;
|
||||
|
||||
div(phiv,p) Gauss upwind;
|
||||
div((phi|interpolate(rho)),p) Gauss upwind;
|
||||
|
||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
wallDist
|
||||
{
|
||||
method meshWave;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,79 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
p
|
||||
{
|
||||
solver GAMG;
|
||||
smoother GaussSeidel;
|
||||
tolerance 1e-6;
|
||||
relTol 0.01;
|
||||
}
|
||||
|
||||
pFinal
|
||||
{
|
||||
$p;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"(rho|U|k|omega|e)"
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-6;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
"(rho|U|k|omega|e)Final"
|
||||
{
|
||||
$U;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
SIMPLE
|
||||
{
|
||||
residualControl
|
||||
{
|
||||
p 1e-4;
|
||||
U 1e-4;
|
||||
"(k|omega|e)" 1e-4;
|
||||
}
|
||||
|
||||
nNonOrthogonalCorrectors 0;
|
||||
pMinFactor 0.1;
|
||||
pMaxFactor 2;
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
nCorrectors 2;
|
||||
nNonOrthogonalCorrectors 1;
|
||||
nOuterCorrectors 1;
|
||||
pMinFactor 0.1;
|
||||
pMaxFactor 2;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
equations
|
||||
{
|
||||
".*" 1;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,19 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Web: www.OpenFOAM.org
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Description
|
||||
For specified fields, writes out the initial residuals for the first
|
||||
solution of each time step; for non-scalar fields (e.g. vectors), writes
|
||||
the largest of the residuals for each component (e.g. x, y, z).
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/numerical/residuals.cfg"
|
||||
|
||||
fields (p U e k omega);
|
||||
|
||||
// ************************************************************************* //
|
40
tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/0/T
Normal file
40
tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/0/T
Normal file
@ -0,0 +1,40 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Tinlet 298;
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform $Tinlet;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
freestream
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform $Tinlet;
|
||||
value $inletValue;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
40
tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/0/U
Normal file
40
tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/0/U
Normal file
@ -0,0 +1,40 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------* \
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Uinlet (250 0 0);
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform $Uinlet;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
freestream
|
||||
{
|
||||
type freestreamVelocity;
|
||||
freestreamValue uniform $Uinlet;
|
||||
value uniform $Uinlet;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,38 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object alphat;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
freestream
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type compressible::alphatWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
41
tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/0/k
Normal file
41
tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/0/k
Normal file
@ -0,0 +1,41 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object k;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
kInlet 0.01;
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform $kInlet;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
freestream
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform $kInlet;
|
||||
value uniform $kInlet;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform $kInlet;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
39
tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/0/nut
Normal file
39
tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/0/nut
Normal file
@ -0,0 +1,39 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object mut;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
freestream
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type nutkWallFunction;
|
||||
type nutkWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,41 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object omega;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
omegaInlet 10;
|
||||
|
||||
dimensions [0 0 -1 0 0 0 0];
|
||||
|
||||
internalField uniform $omegaInlet;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
freestream
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform $omegaInlet;
|
||||
value uniform $omegaInlet;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type omegaWallFunction;
|
||||
value uniform $omegaInlet;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
39
tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/0/p
Normal file
39
tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/0/p
Normal file
@ -0,0 +1,39 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
pOut 1e5;
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform $pOut;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
freestream
|
||||
{
|
||||
type freestreamPressure;
|
||||
freestreamValue uniform $pOut;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
11
tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/Allclean
Executable file
11
tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/Allclean
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
|
||||
rm constant/geometry/boundaryLayer.obj > /dev/null 2>&1
|
||||
|
||||
#------------------------------------------------------------------------------
|
15
tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/Allrun
Executable file
15
tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/Allrun
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application="$(getApplication)"
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication transformPoints -scale "(1 0 1)"
|
||||
runApplication extrudeMesh
|
||||
|
||||
runApplication $application
|
||||
|
||||
#------------------------------------------------------------------------------
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,47 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType
|
||||
{
|
||||
type hePsiThermo;
|
||||
mixture pureMixture;
|
||||
transport const;
|
||||
thermo hConst;
|
||||
equationOfState perfectGas;
|
||||
specie specie;
|
||||
energy sensibleInternalEnergy;
|
||||
}
|
||||
|
||||
mixture // air at room temperature (293 K)
|
||||
{
|
||||
specie
|
||||
{
|
||||
molWeight 28.9;
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Cp 1005;
|
||||
Hf 0;
|
||||
}
|
||||
transport
|
||||
{
|
||||
mu 1.82e-05;
|
||||
Pr 0.71;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,26 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object turbulenceProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType RAS;
|
||||
|
||||
RAS
|
||||
{
|
||||
RASModel kOmegaSST;
|
||||
turbulence on;
|
||||
printCoeffs on;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,225 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
domain
|
||||
{
|
||||
xMin -4;
|
||||
xMax 4;
|
||||
zMin -2;
|
||||
zMax 2;
|
||||
|
||||
// Number of cells
|
||||
zCells 80; // aerofoil to far field
|
||||
xUCells 30; // upstream
|
||||
xMCells 30; // middle
|
||||
xDCells 40; // downstream
|
||||
|
||||
// Mesh grading
|
||||
zGrading 40; // aerofoil to far field
|
||||
xUGrading 5; // towards centre upstream
|
||||
leadGrading 0.2; // towards leading edge
|
||||
xDGrading 10; // downstream
|
||||
}
|
||||
|
||||
aerofoil
|
||||
{
|
||||
xLead 0;
|
||||
zLead 0;
|
||||
xTrail 1;
|
||||
zTrail 0;
|
||||
xUpper 0.3;
|
||||
zUpper 0.06;
|
||||
xLower 0.3;
|
||||
zLower -0.06;
|
||||
}
|
||||
|
||||
geometry
|
||||
{
|
||||
aerofoil
|
||||
{
|
||||
type triSurfaceMesh;
|
||||
file "NACA0012.obj";
|
||||
}
|
||||
cylinder
|
||||
{
|
||||
type searchableCylinder;
|
||||
point1 ($:aerofoil.xUpper -1e3 0);
|
||||
point2 ($:aerofoil.xUpper 1e3 0);
|
||||
radius $:domain.zMax;
|
||||
}
|
||||
}
|
||||
|
||||
vertices
|
||||
(
|
||||
project ($aerofoil.xLower -0.1 $domain.zMin) (cylinder)
|
||||
($aerofoil.xTrail -0.1 $domain.zMin)
|
||||
($domain.xMax -0.1 $domain.zMin)
|
||||
|
||||
project ($domain.xMin -0.1 $aerofoil.zLead) (cylinder)
|
||||
project ($aerofoil.xLead -0.1 $aerofoil.zLead) (aerofoil)
|
||||
project ($aerofoil.xTrail -0.1 $aerofoil.zTrail) (aerofoil)
|
||||
($domain.xMax -0.1 $aerofoil.zTrail)
|
||||
|
||||
project ($aerofoil.xLower -0.1 $aerofoil.zLower) (aerofoil)
|
||||
project ($aerofoil.xUpper -0.1 $aerofoil.zUpper) (aerofoil)
|
||||
|
||||
project ($aerofoil.xUpper -0.1 $domain.zMax) (aerofoil)
|
||||
project ($aerofoil.xTrail -0.1 $domain.zMax) (aerofoil)
|
||||
($domain.xMax -0.1 $domain.zMax)
|
||||
|
||||
project ($aerofoil.xLower 0.1 $domain.zMin) (cylinder)
|
||||
($aerofoil.xTrail 0.1 $domain.zMin)
|
||||
($domain.xMax 0.1 $domain.zMin)
|
||||
|
||||
project ($domain.xMin 0.1 $aerofoil.zLead) (cylinder)
|
||||
project ($aerofoil.xLead 0.1 $aerofoil.zLead) (aerofoil)
|
||||
project ($aerofoil.xTrail 0.1 $aerofoil.zTrail) (aerofoil)
|
||||
($domain.xMax 0.1 $aerofoil.zTrail)
|
||||
|
||||
project ($aerofoil.xLower 0.1 $aerofoil.zLower) (aerofoil)
|
||||
project ($aerofoil.xUpper 0.1 $aerofoil.zUpper) (aerofoil)
|
||||
|
||||
project ($aerofoil.xUpper 0.1 $domain.zMax) (aerofoil)
|
||||
project ($aerofoil.xTrail 0.1 $domain.zMax) (aerofoil)
|
||||
($domain.xMax 0.1 $domain.zMax)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex ( 7 4 16 19 0 3 15 12)
|
||||
($:domain.xUCells 1 $:domain.zCells)
|
||||
edgeGrading
|
||||
(
|
||||
$:domain.leadGrading $:domain.leadGrading $:domain.xUGrading $:domain.xUGrading
|
||||
1 1 1 1
|
||||
$:domain.zGrading $:domain.zGrading $:domain.zGrading $:domain.zGrading
|
||||
)
|
||||
|
||||
hex ( 5 7 19 17 1 0 12 13)
|
||||
($:domain.xMCells 1 $:domain.zCells)
|
||||
simpleGrading (1 1 $:domain.zGrading)
|
||||
|
||||
hex ( 17 18 6 5 13 14 2 1)
|
||||
($:domain.xDCells 1 $:domain.zCells)
|
||||
simpleGrading ($:domain.xDGrading 1 $:domain.zGrading)
|
||||
|
||||
hex ( 20 16 4 8 21 15 3 9)
|
||||
($:domain.xUCells 1 $:domain.zCells)
|
||||
edgeGrading
|
||||
(
|
||||
$:domain.leadGrading $:domain.leadGrading $:domain.xUGrading $:domain.xUGrading
|
||||
1 1 1 1
|
||||
$:domain.zGrading $:domain.zGrading $:domain.zGrading $:domain.zGrading
|
||||
)
|
||||
|
||||
hex ( 17 20 8 5 22 21 9 10)
|
||||
($:domain.xMCells 1 $:domain.zCells)
|
||||
simpleGrading (1 1 $:domain.zGrading)
|
||||
|
||||
hex ( 5 6 18 17 10 11 23 22)
|
||||
($:domain.xDCells 1 $:domain.zCells)
|
||||
simpleGrading ($:domain.xDGrading 1 $:domain.zGrading)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
|
||||
project 4 7 (aerofoil)
|
||||
project 7 5 (aerofoil)
|
||||
project 4 8 (aerofoil)
|
||||
project 8 5 (aerofoil)
|
||||
|
||||
project 16 19 (aerofoil)
|
||||
project 19 17 (aerofoil)
|
||||
project 16 20 (aerofoil)
|
||||
project 20 17 (aerofoil)
|
||||
|
||||
project 3 0 (cylinder)
|
||||
project 3 9 (cylinder)
|
||||
project 15 12 (cylinder)
|
||||
project 15 21 (cylinder)
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
aerofoil
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(4 7 19 16)
|
||||
(7 5 17 19)
|
||||
(5 8 20 17)
|
||||
(8 4 16 20)
|
||||
);
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
inGroups (freestream);
|
||||
faces
|
||||
(
|
||||
(3 0 12 15)
|
||||
(0 1 13 12)
|
||||
(1 2 14 13)
|
||||
(11 10 22 23)
|
||||
(10 9 21 22)
|
||||
(9 3 15 21)
|
||||
);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
inGroups (freestream);
|
||||
faces
|
||||
(
|
||||
(2 6 18 14)
|
||||
(6 11 23 18)
|
||||
);
|
||||
}
|
||||
|
||||
back
|
||||
{
|
||||
type empty;
|
||||
faces
|
||||
(
|
||||
(3 4 7 0)
|
||||
(7 5 1 0)
|
||||
(5 6 2 1)
|
||||
(3 9 8 4)
|
||||
(9 10 5 8)
|
||||
(10 11 6 5)
|
||||
);
|
||||
}
|
||||
|
||||
front
|
||||
{
|
||||
type empty;
|
||||
faces
|
||||
(
|
||||
(15 16 19 12)
|
||||
(19 17 13 12)
|
||||
(17 18 14 13)
|
||||
(15 16 20 21)
|
||||
(20 17 22 21)
|
||||
(17 18 23 22)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,53 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application rhoSimpleFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 1000;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 50;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 8;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
functions
|
||||
{
|
||||
#includeFunc MachNo
|
||||
#includeFunc residuals
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,30 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object extrudeProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
constructFrom patch;
|
||||
sourceCase "$FOAM_CASE";
|
||||
|
||||
sourcePatches (back);
|
||||
exposedPatchName front;
|
||||
|
||||
extrudeModel linearDirection;
|
||||
direction (0 -1 0);
|
||||
thickness 0.1;
|
||||
|
||||
flipNormals false;
|
||||
mergeFaces false;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
@ -0,0 +1,25 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 5 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object porousZone;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
limitT
|
||||
{
|
||||
type limitTemperature;
|
||||
min 101;
|
||||
max 1000;
|
||||
selectionMode all;
|
||||
}
|
||||
|
||||
//************************************************************************** //
|
@ -0,0 +1,74 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default steadyState;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
|
||||
limited cellLimited Gauss linear 1;
|
||||
grad(U) $limited;
|
||||
grad(k) $limited;
|
||||
grad(omega) $limited;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
|
||||
div(phi,U) bounded Gauss linearUpwind limited;
|
||||
|
||||
turbulence bounded Gauss upwind;
|
||||
energy bounded Gauss linearUpwind limited;
|
||||
|
||||
div(phi,k) $turbulence;
|
||||
div(phi,omega) $turbulence;
|
||||
|
||||
div(phi,e) $energy;
|
||||
div(phi,K) $energy;
|
||||
div(phi,Ekp) $energy;
|
||||
|
||||
div(phid,p) Gauss upwind;
|
||||
div((phi|interpolate(rho)),p) bounded Gauss upwind;
|
||||
|
||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
wallDist
|
||||
{
|
||||
method meshWave;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,65 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
p
|
||||
{
|
||||
solver GAMG;
|
||||
smoother GaussSeidel;
|
||||
tolerance 1e-6;
|
||||
relTol 0.01;
|
||||
}
|
||||
|
||||
"(U|k|omega|e)"
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-6;
|
||||
relTol 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
SIMPLE
|
||||
{
|
||||
residualControl
|
||||
{
|
||||
p 1e-4;
|
||||
U 1e-4;
|
||||
"(k|omega|e)" 1e-4;
|
||||
}
|
||||
|
||||
nNonOrthogonalCorrectors 0;
|
||||
pMinFactor 0.1;
|
||||
pMaxFactor 2;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
fields
|
||||
{
|
||||
p 0.7;
|
||||
rho 0.01;
|
||||
}
|
||||
equations
|
||||
{
|
||||
U 0.3;
|
||||
e 0.7;
|
||||
"(k|omega)" 0.7;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,19 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Web: www.OpenFOAM.org
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Description
|
||||
For specified fields, writes out the initial residuals for the first
|
||||
solution of each time step; for non-scalar fields (e.g. vectors), writes
|
||||
the largest of the residuals for each component (e.g. x, y, z).
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/numerical/residuals.cfg"
|
||||
|
||||
fields (p U e k omega);
|
||||
|
||||
// ************************************************************************* //
|
Loading…
Reference in New Issue
Block a user