Merge branch 'tutorial-review.kbc' into 'develop'

TUT: cleanup compressible tutorials

See merge request Development/openfoam!337
This commit is contained in:
Andrew Heather 2020-01-29 12:42:39 +00:00
commit fdece1d7dd
108 changed files with 343 additions and 67068 deletions

View File

@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -60,7 +61,7 @@ int main(int argc, char *argv[])
if (!args.check())
{
FatalError.exit();
FatalError.exit();
}
#include "createTime.H"
@ -87,23 +88,23 @@ int main(int argc, char *argv[])
Istring >> block;
Istring >> jPoints;
Info<< "Number of vertices in i direction = " << iPoints << endl
Info<< "Number of vertices in i direction = " << iPoints << nl
<< "Number of vertices in j direction = " << jPoints << endl;
// We ignore the first layer of points in i and j the biconic meshes
label nPointsij = (iPoints - 1)*(jPoints - 1);
const label nPointsij = (iPoints - 1)*(jPoints - 1);
pointField points(nPointsij, Zero);
for (direction comp = 0; comp < 2; comp++)
for (direction comp = 0; comp < 2; ++comp)
{
label p(0);
label p = 0;
for (label j = 0; j < jPoints; j++)
for (label j = 0; j < jPoints; ++j)
{
for (label i = 0; i < iPoints; i++)
for (label i = 0; i < iPoints; ++i)
{
double coord;
scalar coord;
plot3dFile >> coord;
// if statement ignores the first layer in i and j
@ -126,31 +127,37 @@ int main(int argc, char *argv[])
pointField pointsWedge(nPointsij*2, Zero);
fileName pointsFile(runTime.constantPath()/"points.tmp");
OFstream pFile(pointsFile);
const scalar a = degToRad(0.1);
tensor rotateZ =
tensor
(
1.0, 0.0, 0.0,
0.0, 1.0, 0.0,
0.0, -::sin(a), ::cos(a)
);
const tensor rotateZ
(
1.0, 0.0, 0.0,
0.0, 1.0, 0.0,
0.0, -::sin(a), ::cos(a)
);
forAll(points, i)
{
pointsWedge[i] = (rotateZ & points[i]);
pointsWedge[i+nPointsij] = cmptMultiply
(
vector(1.0, 1.0, -1.0),
pointsWedge[i]
);
pointsWedge[i + nPointsij] =
cmptMultiply
(
vector(1.0, 1.0, -1.0),
pointsWedge[i]
);
}
const fileName polyMeshPath(runTime.constantPath()/"polyMesh");
const fileName pointsFile(polyMeshPath/"points");
OFstream pFile(pointsFile);
if (!exists(polyMeshPath)) mkDir(polyMeshPath);
Info<< "Writing points to: " << nl
<< " " << pointsFile << endl;
<< " " << pointsFile << endl;
runTime.writeHeader(pFile, "vectorField");
pFile << pointsWedge;
runTime.writeEndDivider(pFile);
Info<< "End" << endl;

View File

@ -32,6 +32,7 @@ boundaryField
type fixedValue;
value uniform 400;
}
overset
{
type overset;

View File

@ -34,16 +34,17 @@ boundaryField
value uniform (0 0 0);
}
outlet
{
type uniformFixedValue;
uniformValue (0 0 0);
}
inlet
{
type uniformFixedValue;
uniformValue (0 0 0);
}
outlet
{
type uniformFixedValue;
uniformValue (0 0 0);
}
inlet
{
type uniformFixedValue;
uniformValue (0 0 0);
}
overset
{

View File

@ -14,7 +14,6 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [ 0 2 -3 0 0 0 0 ];
internalField uniform 0.1;
@ -33,7 +32,6 @@ boundaryField
type epsilonWallFunction;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -26,6 +26,7 @@ boundaryField
{
type zeroGradient;
}
overset
{
type overset;

View File

@ -1,41 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1912 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class pointVectorField;
object pointDisplacement;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 0 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
".*"
{
type uniformFixedValue;
uniformValue (0 0 0);
}
hole
{
type zeroGradient;
}
overset
{
patchType overset;
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -1,5 +1,7 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
#------------------------------------------------------------------------------
# An extruded mesh around cylinder
(cd cylinderAndBackground && ./Allclean)

View File

@ -10,7 +10,6 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
location "0";
object alphat;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -29,6 +28,7 @@ boundaryField
Prt 0.85;
value uniform 0;
}
".*"
{
type calculated;
@ -36,5 +36,4 @@ boundaryField
}
}
// ************************************************************************* //

View File

@ -1,15 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1912 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
inlet
{
type fixedValue;
value $internalField;
}
// ************************************************************************* //

View File

@ -11,6 +11,5 @@ pressure 1e5;
temperature 300;
turbulentEpsilon 10;
turbulentKE 1;
#inputMode merge
// ************************************************************************* //

View File

@ -28,15 +28,18 @@ boundaryField
{
type zeroGradient;
}
inlet
{
type zeroGradient;
}
outlet
{
type fixedValue;
value $internalField;
}
topAndBottom
{
type zeroGradient;

View File

@ -5,7 +5,6 @@ cd "${0%/*}" || exit # Run from this directory
./Allrun.pre
# Run it for a bit
runApplication $(getApplication)
#------------------------------------------------------------------------------

View File

@ -10,6 +10,7 @@ FoamFile
version 2.0;
format ascii;
class dictionary;
location "constant";
object dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -10,30 +10,14 @@ FoamFile
version 2.0;
format ascii;
class dictionary;
location "constant";
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
DT DT [ 0 2 -1 0 0 0 0 ] 1; //4e-05;
DT 1;
transportModel Newtonian;
nu 1e-03;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-03;
CrossPowerLawCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
m m [ 0 0 1 0 0 0 0 ] 1;
n n [ 0 0 0 0 0 0 0 ] 1;
}
BirdCarreauCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
k k [ 0 0 1 0 0 0 0 ] 0;
n n [ 0 0 0 0 0 0 0 ] 1;
}
// ************************************************************************* //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class dictionary;
note "mesh decomposition control dictionary";
location "system";
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -35,9 +35,7 @@ divSchemes
div(phi,h) bounded Gauss upwind;
div(phi,epsilon) bounded Gauss upwind;
div(phi,k) bounded Gauss upwind;
div(phi,Ekp) bounded Gauss upwind;
div(phi,K) bounded Gauss upwind;
}

View File

@ -54,9 +54,7 @@ SIMPLE
p 1e-3;
U 1e-4;
e 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
"(k|epsilon)" 1e-3;
}
}

View File

@ -10,6 +10,7 @@ FoamFile
version 2.0;
format ascii;
class dictionary;
location "system";
object setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -10,6 +10,7 @@ FoamFile
version 2.0;
format ascii;
class dictionary;
location "system";
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -10,6 +10,7 @@ FoamFile
version 2.0;
format ascii;
class dictionary;
location "system";
object createPatchDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -78,7 +79,7 @@ patches
// If constructFrom = set : name of faceSet
set f0;
}
);
// ************************************************************************* //

View File

@ -1,58 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1912 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss limitedLinearV 1;
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div(phi,R) Gauss upwind;
div(R) Gauss linear;
div(phid,p) Gauss limitedLinear 1;
div(phi,K) Gauss limitedLinear 1;
div(phi,e) Gauss limitedLinear 1;
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear limited corrected 0.5;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
// ************************************************************************* //

View File

@ -1,51 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1912 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
p
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-12;
relTol 0;
}
rho
{
solver PCG;
preconditioner DIC;
tolerance 1e-08;
relTol 0;
}
"(U|e|k|epsilon|R)"
{
$p;
tolerance 1e-08;
relTol 0;
}
}
PISO
{
nCorrectors 2;
nNonOrthogonalCorrectors 2;
}
// ************************************************************************* //

View File

@ -25,28 +25,34 @@ boundaryField
type uniformFixedValue;
uniformValue constant 160;
}
farFieldMoving
{
type slip;
}
fixedWall
{
type uniformFixedValue;
uniformValue constant 0;
}
left
{
type uniformFixedValue;
uniformValue constant 0;
}
farField
{
type slip;
}
back
{
type wedge;
}
front
{
type wedge;

View File

@ -31,7 +31,7 @@ writeControl adjustable;
writeInterval 5e-7;
purgeWrite 0;
purgeWrite 5;
writeFormat binary;

View File

@ -47,8 +47,15 @@ boundaryField
value uniform 297.0;
}
wedge1 {type wedge;}
wedge2 {type wedge;}
wedge1
{
type wedge;
}
wedge2
{
type wedge;
}
}
// ************************************************************************* //

View File

@ -43,8 +43,15 @@ boundaryField
type noSlip;
}
wedge1 {type wedge;}
wedge2 {type wedge;}
wedge1
{
type wedge;
}
wedge2
{
type wedge;
}
}
// ************************************************************************* //

View File

@ -52,8 +52,15 @@ boundaryField
type zeroGradient;
}
wedge1 {type wedge;}
wedge2 {type wedge;}
wedge1
{
type wedge;
}
wedge2
{
type wedge;
}
}
// ************************************************************************* //

View File

@ -1,23 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1912 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object mapFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
patchMap ( );
cuttingPatches ( );
// ************************************************************************* //

View File

@ -1,56 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1912 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object sample;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
type sets;
libs (sampling);
interpolationScheme cellPointFace;
writeFormat raw;
sampleSets
(
face
{
name cone25;
axis x;
start (0 0 0);
end (0.09208087 0.042939 0);
nPoints 92;
}
face
{
name cone55;
axis x;
start (0.09208087 0.042939 0);
end (0.153683 0.13092 0);
nPoints 61;
}
face
{
name base;
axis x;
start (0.153683 0.13092 0);
end (0.193675 0.13092 0);
nPoints 40;
}
);
fields ( p wallHeatTransRate );
// ************************************************************************* //

View File

@ -5,5 +5,6 @@ cd "${0%/*}" || exit # Run from this directory
cleanCase
cleanSamples
rm -rf 0/pointPriority
#------------------------------------------------------------------------------

View File

@ -4,17 +4,12 @@ cd "${0%/*}" || exit # Run from this directory
#------------------------------------------------------------------------------
runApplication blockMesh
runApplication datToFoam grid256.dat
CONST="constant"
cat $CONST/pointsHeader $CONST/points.tmp > $CONST/polyMesh/points
runApplication collapseEdges -overwrite
echo "Changing patch type to wedge type in boundary file"
mv $CONST/polyMesh/boundary $CONST/polyMesh/boundary.bak
sed -f $CONST/wedgeScr $CONST/polyMesh/boundary.bak > $CONST/polyMesh/boundary
rm $CONST/polyMesh/boundary.bak
echo "Overwriting 'patch' type as 'wedge' type in 'boundary' dictionary"
sed -if '/wedge1/,/nFaces/{s/patch/wedge/};/wedge2/,/nFaces/{s/patch/wedge/}'\
constant/polyMesh/boundary
runApplication $(getApplication)

View File

@ -1,14 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1912 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class vectorField;
object points;
}

View File

@ -37,8 +37,26 @@ mixture
Tlow 100;
Thigh 10000;
Tcommon 1000;
highCpCoeffs ( 2.9525407 0.0013968838 -4.9262577e-07 7.8600091e-11 -4.6074978e-15 -923.93753 5.8718221 );
lowCpCoeffs ( 3.5309628 -0.0001236595 -5.0299339e-07 2.4352768e-09 -1.4087954e-12 -1046.9637 2.9674391 );
highCpCoeffs
(
2.9525407
0.0013968838
-4.9262577e-07
7.8600091e-11
-4.6074978e-15
-923.93753
5.8718221
);
lowCpCoeffs
(
3.5309628
-0.0001236595
-5.0299339e-07
2.4352768e-09
-1.4087954e-12
-1046.9637
2.9674391
);
}
transport
{

View File

@ -1,6 +0,0 @@
/wedge1/,/nFaces/{
s/patch/wedge/
}
/wedge2/,/nFaces/{
s/patch/wedge/
}

View File

@ -31,7 +31,7 @@ writeControl adjustable;
writeInterval 5e-5;
cycleWrite 0;
purgeWrite 0;
writeFormat binary;

View File

@ -31,7 +31,7 @@ writeControl adjustable;
writeInterval 0.1;
purgeWrite 0;
purgeWrite 10;
writeFormat ascii;

View File

@ -4,6 +4,5 @@ cd "${0%/*}" || exit # Run from this directory
#------------------------------------------------------------------------------
cleanCase0
cleanSamples
#------------------------------------------------------------------------------

View File

@ -1,40 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1912 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object sample;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
type sets;
libs (sampling);
interpolationScheme cellPoint;
setFormat raw;
sets
(
line
{
type face;
axis x;
start (-5 0 0);
end (5 0 0);
nPoints 100;
}
);
fields ( p U.component(0) T rho );
// ************************************************************************* //

View File

@ -15,9 +15,25 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
defaultFieldValues ( volVectorFieldValue U (0 0 0) volScalarFieldValue T 348.432 volScalarFieldValue p 100000 );
defaultFieldValues
(
volVectorFieldValue U (0 0 0)
volScalarFieldValue T 348.432
volScalarFieldValue p 100000
);
regions ( boxToCell { box (0 -1 -1) (5 1 1) ; fieldValues ( volScalarFieldValue T 278.746 volScalarFieldValue p 10000 ) ; } );
regions
(
boxToCell
{
box (0 -1 -1) (5 1 1);
fieldValues
(
volScalarFieldValue T 278.746
volScalarFieldValue p 10000
);
}
);
// ************************************************************************* //

View File

@ -31,7 +31,7 @@ writeControl timeStep;
writeInterval 100;
purgeWrite 0;
purgeWrite 10;
writeFormat ascii;

View File

@ -14,9 +14,12 @@ FoamFile
object fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
viscousDissipation
{
type viscousDissipation;
enabled true;
}
// ************************************************************************* //

View File

@ -55,7 +55,6 @@ boundaryField
// debugParser true;
}
outlet2
{
type fixedValue;

View File

@ -14,9 +14,12 @@ FoamFile
object fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
viscousDissipation
{
type viscousDissipation;
enabled true;
}
// ************************************************************************* //

View File

@ -30,7 +30,7 @@ writeControl adjustable;
writeInterval 0.001;
purgeWrite 0;
purgeWrite 10;
writeFormat ascii;

View File

@ -20,19 +20,21 @@ internalField uniform 293;
boundaryField
{
front
{
type zeroGradient;
}
back
{
type zeroGradient;
}
wall
{
type zeroGradient;
}
porosityWall
{
type zeroGradient;
@ -43,6 +45,7 @@ boundaryField
type fixedValue;
value $internalField;
}
outlet
{
type inletOutlet;

View File

@ -24,25 +24,30 @@ boundaryField
{
type noSlip;
}
back
{
type noSlip;
}
walls
{
type noSlip;
}
porosityWall
{
type slip;
value uniform (0 0 0);
}
inlet
{
type flowRateInletVelocity;
massFlowRate constant 0.1;
rhoInlet 1; // estimate for initial rho
}
outlet
{
type pressureInletOutletVelocity;

View File

@ -26,26 +26,31 @@ boundaryField
type compressible::alphatWallFunction;
value $internalField;
}
back
{
type compressible::alphatWallFunction;
value $internalField;
}
walls
{
type compressible::alphatWallFunction;
value $internalField;
}
porosityWall
{
type compressible::alphatWallFunction;
value $internalField;
}
inlet
{
type calculated;
value $internalField;
}
outlet
{
type calculated;

View File

@ -26,27 +26,32 @@ boundaryField
type epsilonWallFunction;
value uniform 200;
}
back
{
type epsilonWallFunction;
value uniform 200;
}
walls
{
type epsilonWallFunction;
value uniform 200;
}
porosityWall
{
type epsilonWallFunction;
value uniform 200;
}
inlet
{
type turbulentMixingLengthDissipationRateInlet;
mixingLength 0.005;
value uniform 200;
}
outlet
{
type inletOutlet;

View File

@ -26,27 +26,32 @@ boundaryField
type kqRWallFunction;
value uniform 1;
}
back
{
type kqRWallFunction;
value uniform 1;
}
walls
{
type kqRWallFunction;
value uniform 1;
}
porosityWall
{
type kqRWallFunction;
value uniform 1;
}
inlet
{
type turbulentIntensityKineticEnergyInlet;
intensity 0.05;
value uniform 1;
}
outlet
{
type inletOutlet;

View File

@ -26,26 +26,31 @@ boundaryField
type nutkWallFunction;
value uniform 0;
}
back
{
type nutkWallFunction;
value uniform 0;
}
walls
{
type nutkWallFunction;
value uniform 0;
}
porosityWall
{
type nutkWallFunction;
value uniform 0;
}
inlet
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;

View File

@ -24,14 +24,17 @@ boundaryField
{
type zeroGradient;
}
back
{
type zeroGradient;
}
walls
{
type zeroGradient;
}
porosityWall
{
type zeroGradient;
@ -41,6 +44,7 @@ boundaryField
{
type zeroGradient;
}
outlet
{
type fixedValue;

View File

@ -1,9 +1,8 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
#------------------------------------------------------------------------------
m4 system/blockMeshDict.m4 > system/blockMeshDict
runApplication blockMesh
cleanCase0
#------------------------------------------------------------------------------

View File

@ -6,6 +6,7 @@ cd "${0%/*}" || exit # Run from this directory
m4 system/blockMeshDict.m4 > system/blockMeshDict
runApplication blockMesh
restore0Dir
runApplication $(getApplication)
#------------------------------------------------------------------------------

View File

@ -31,7 +31,7 @@ solvers
relTol 0;
}
"(rho|U|e|k|epsilon|omega)"
"(rho|U|e|k|epsilon)"
{
solver smoothSolver;
smoother symGaussSeidel;
@ -39,7 +39,7 @@ solvers
relTol 0.1;
}
"(rho|U|e|k|epsilon|omega)Final"
"(rho|U|e|k|epsilon)Final"
{
$U;
relTol 0;
@ -82,7 +82,7 @@ relaxationFactors
{
"U.*" 0.7;
"e.*" 0.7;
"(k|epsilon|omega).*" 0.7;
"(k|epsilon).*" 0.7;
}
}

View File

@ -20,19 +20,21 @@ internalField uniform 293;
boundaryField
{
front
{
type zeroGradient;
}
back
{
type zeroGradient;
}
walls
{
type zeroGradient;
}
porosityWall
{
type zeroGradient;
@ -43,6 +45,7 @@ boundaryField
type fixedValue;
value $internalField;
}
outlet
{
type inletOutlet;

View File

@ -24,25 +24,30 @@ boundaryField
{
type noSlip;
}
back
{
type noSlip;
}
walls
{
type noSlip;
}
porosityWall
{
type slip;
value uniform (0 0 0);
}
inlet
{
type flowRateInletVelocity;
massFlowRate constant 0.1;
value uniform (0 0 0);
}
outlet
{
type fluxCorrectedVelocity; //inletOutlet;

View File

@ -26,26 +26,31 @@ boundaryField
type compressible::alphatWallFunction;
value uniform 0;
}
back
{
type compressible::alphatWallFunction;
value uniform 0;
}
walls
{
type compressible::alphatWallFunction;
value uniform 0;
}
porosityWall
{
type compressible::alphatWallFunction;
value uniform 0;
}
inlet
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;

View File

@ -26,27 +26,32 @@ boundaryField
type epsilonWallFunction;
value uniform 200;
}
back
{
type epsilonWallFunction;
value uniform 200;
}
walls
{
type epsilonWallFunction;
value uniform 200;
}
porosityWall
{
type epsilonWallFunction;
value uniform 200;
}
inlet
{
type turbulentMixingLengthDissipationRateInlet;
mixingLength 0.005;
value uniform 200;
}
outlet
{
type inletOutlet;

View File

@ -26,27 +26,32 @@ boundaryField
type kqRWallFunction;
value uniform 1;
}
back
{
type kqRWallFunction;
value uniform 1;
}
walls
{
type kqRWallFunction;
value uniform 1;
}
porosityWall
{
type kqRWallFunction;
value uniform 1;
}
inlet
{
type turbulentIntensityKineticEnergyInlet;
intensity 0.05;
value uniform 1;
}
outlet
{
type inletOutlet;

View File

@ -26,26 +26,31 @@ boundaryField
type nutkWallFunction;
value uniform 0;
}
back
{
type nutkWallFunction;
value uniform 0;
}
walls
{
type nutkWallFunction;
value uniform 0;
}
porosityWall
{
type nutkWallFunction;
value uniform 0;
}
inlet
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;

View File

@ -24,14 +24,17 @@ boundaryField
{
type zeroGradient;
}
back
{
type zeroGradient;
}
walls
{
type zeroGradient;
}
porosityWall
{
type zeroGradient;
@ -41,6 +44,7 @@ boundaryField
{
type zeroGradient;
}
outlet
{
type fixedValue;

View File

@ -0,0 +1,8 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
#------------------------------------------------------------------------------
cleanCase0
#------------------------------------------------------------------------------

View File

@ -6,6 +6,7 @@ cd "${0%/*}" || exit # Run from this directory
m4 system/blockMeshDict.m4 > system/blockMeshDict
runApplication blockMesh
restore0Dir
runApplication $(getApplication)
#------------------------------------------------------------------------------

View File

@ -32,7 +32,7 @@ solvers
relTol 0.1;
}
"(rho|U|h|k|epsilon|omega)"
"(rho|U|h|k|epsilon)"
{
solver smoothSolver;
smoother symGaussSeidel;
@ -40,7 +40,7 @@ solvers
relTol 0.1;
}
"(rho|U|h|k|epsilon|omega)Final"
"(rho|U|h|k|epsilon)Final"
{
$U;
tolerance 1e-05;

View File

@ -27,16 +27,19 @@ boundaryField
Prt 0.85;
value uniform 0;
}
stator
{
type compressible::alphatWallFunction;
Prt 0.85;
value uniform 0;
}
front
{
type empty;
}
back
{
type empty;

View File

@ -0,0 +1,8 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
#------------------------------------------------------------------------------
cleanCase0
#------------------------------------------------------------------------------

View File

@ -3,7 +3,10 @@ cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
./makeMesh
m4 system/blockMeshDict.m4 > system/blockMeshDict
runApplication blockMesh
restore0Dir
runApplication $(getApplication)
#------------------------------------------------------------------------------

View File

@ -31,7 +31,7 @@ writeControl runTime;
writeInterval 0.0002;
purgeWrite 0;
purgeWrite 10;
writeFormat ascii; // binary;

View File

@ -62,10 +62,4 @@ PIMPLE
}
// ************************************************************************* //

View File

@ -20,19 +20,21 @@ internalField uniform 293;
boundaryField
{
front
{
type zeroGradient;
}
back
{
type zeroGradient;
}
walls
{
type zeroGradient;
}
porosityWall
{
type zeroGradient;
@ -43,6 +45,7 @@ boundaryField
type fixedValue;
value $internalField;
}
outlet
{
type inletOutlet;

View File

@ -24,25 +24,30 @@ boundaryField
{
type noSlip;
}
back
{
type noSlip;
}
walls
{
type noSlip;
}
porosityWall
{
type slip;
value $internalField;
}
inlet
{
type flowRateInletVelocity;
massFlowRate constant 0.1;
value $internalField;
}
outlet
{
type inletOutlet;

View File

@ -26,26 +26,31 @@ boundaryField
type compressible::alphatWallFunction;
value $internalField;
}
back
{
type compressible::alphatWallFunction;
value $internalField;
}
walls
{
type compressible::alphatWallFunction;
value $internalField;
}
porosityWall
{
type compressible::alphatWallFunction;
value $internalField;
}
inlet
{
type calculated;
value $internalField;
}
outlet
{
type calculated;

View File

@ -24,14 +24,17 @@ boundaryField
{
type zeroGradient;
}
back
{
type zeroGradient;
}
walls
{
type zeroGradient;
}
porosityWall
{
type zeroGradient;
@ -41,6 +44,7 @@ boundaryField
{
type zeroGradient;
}
outlet
{
type fixedValue;

View File

@ -62,9 +62,7 @@ SIMPLE
p 1e-2;
U 1e-4;
e 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
"(k|epsilon)" 1e-3;
}
}

View File

@ -56,9 +56,7 @@ SIMPLE
p 1e-3;
U 1e-4;
e 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
"(k|epsilon)" 1e-3;
}
}

View File

@ -28,7 +28,6 @@ boundaryField
wall
{
type nutkWallFunction;
type nutkWallFunction;
value uniform 0;
}

View File

@ -5,6 +5,4 @@ cd "${0%/*}" || exit # Run from this directory
cleanCase
rm -f constant/geometry/boundaryLayer.obj
#------------------------------------------------------------------------------

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / O peration | Version: v1912
\\ / A nd | Website: www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------

View File

@ -20,19 +20,21 @@ internalField uniform 293;
boundaryField
{
front
{
type zeroGradient;
}
back
{
type zeroGradient;
}
walls
{
type zeroGradient;
}
porosityWall
{
type zeroGradient;
@ -43,6 +45,7 @@ boundaryField
type fixedValue;
value $internalField;
}
outlet
{
type inletOutlet;

View File

@ -24,25 +24,30 @@ boundaryField
{
type noSlip;
}
back
{
type noSlip;
}
walls
{
type noSlip;
}
porosityWall
{
type slip;
value uniform (0 0 0);
}
inlet
{
type flowRateInletVelocity;
massFlowRate constant 0.1;
value uniform (0 0 0);
}
outlet
{
type inletOutlet;

View File

@ -26,26 +26,31 @@ boundaryField
type compressible::alphatWallFunction;
value uniform 0;
}
back
{
type compressible::alphatWallFunction;
value uniform 0;
}
walls
{
type compressible::alphatWallFunction;
value uniform 0;
}
porosityWall
{
type compressible::alphatWallFunction;
value uniform 0;
}
inlet
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;

View File

@ -24,14 +24,17 @@ boundaryField
{
type zeroGradient;
}
back
{
type zeroGradient;
}
walls
{
type zeroGradient;
}
porosityWall
{
type zeroGradient;
@ -41,6 +44,7 @@ boundaryField
{
type zeroGradient;
}
outlet
{
type fixedValue;

View File

@ -0,0 +1,8 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
#------------------------------------------------------------------------------
cleanCase
#------------------------------------------------------------------------------

View File

@ -62,9 +62,7 @@ SIMPLE
p 1e-2;
U 1e-4;
e 1e-3;
// Possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
"(k|epsilon)" 1e-3;
}
}

View File

@ -100,9 +100,7 @@ SIMPLE
p 1e-3;
U 1e-4;
e 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
"(k|epsilon)" 1e-3;
}

View File

@ -49,9 +49,7 @@ SIMPLE
p 1e-3;
U 1e-4;
e 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
"(k|epsilon)" 1e-3;
}
}

View File

@ -25,28 +25,34 @@ boundaryField
type uniformFixedValue;
uniformValue constant 160;
}
farFieldMoving
{
type slip;
}
fixedWall
{
type uniformFixedValue;
uniformValue constant 0;
}
left
{
type uniformFixedValue;
uniformValue constant 0;
}
farField
{
type slip;
}
back
{
type wedge;
}
front
{
type wedge;

View File

@ -31,7 +31,7 @@ writeControl adjustable;
writeInterval 5e-7;
purgeWrite 0;
purgeWrite 10;
writeFormat binary;

View File

@ -1,38 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1912 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
cuttingPlane
{
type surfaces;
libs (sampling);
writeControl writeTime;
surfaceFormat vtk;
fields ( p U );
interpolationScheme cellPoint;
surfaces
(
zNormal
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (0 0 0);
normal (0 0 1);
}
interpolate true;
}
);
}
// ************************************************************************* //

Some files were not shown because too many files have changed in this diff Show More