mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Tried to sort out the scripts in the tutorials but found it is messed up. Will start again from a new version from Mattijs
This commit is contained in:
@ -1,12 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
cases="angledDuctExplicit angledDuctImplicit"
|
||||
application=${PWD##*/}
|
||||
|
||||
tutorialPath=`dirname $0`/..
|
||||
. $tutorialPath/CleanFunctions
|
||||
|
||||
for case in $cases
|
||||
do
|
||||
cleanCase $case
|
||||
done
|
||||
@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
application=${PWD##*/}
|
||||
cases="angledDuctImplicit angledDuctExplicit"
|
||||
|
||||
tutorialPath=`dirname $0`/..
|
||||
. $tutorialPath/RunFunctions
|
||||
|
||||
# compileApplication $currDir $application
|
||||
|
||||
for case in $cases
|
||||
do
|
||||
runApplication blockMesh $case
|
||||
runApplication $application $case
|
||||
done
|
||||
@ -1 +0,0 @@
|
||||
../angledDuctImplicit/0
|
||||
@ -1 +0,0 @@
|
||||
../angledDuctImplicit/constant
|
||||
@ -1,51 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.2 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location system;
|
||||
object controlDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application rhoPorousSimpleFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 1000;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 100;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression uncompressed;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
graphFormat raw;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,89 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.2 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location system;
|
||||
object fvSchemes;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default steadyState;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
// UEqn
|
||||
grad(U) Gauss linear;
|
||||
grad(p) Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
//- default Gauss upwind;
|
||||
// UEqn
|
||||
div(phi,U) Gauss upwind;
|
||||
div((muEff*dev2(grad(U).T()))) Gauss linear;
|
||||
// hEqn
|
||||
div(phi,h) Gauss upwind;
|
||||
// epsilonEqn
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
// kEqn
|
||||
div(phi,k) Gauss upwind;
|
||||
|
||||
// experimental
|
||||
div(phid,p) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
//- default Gauss linear corrected;
|
||||
// UEqn
|
||||
laplacian(muEff,U) Gauss linear corrected;
|
||||
|
||||
// hEqn
|
||||
laplacian(alphaEff,h) Gauss linear corrected;
|
||||
|
||||
// pCorrect
|
||||
laplacian((rho|A(U)),p) Gauss linear corrected;
|
||||
|
||||
// epsilonEqn
|
||||
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
|
||||
|
||||
// kEqn
|
||||
laplacian(DkEff,k) Gauss linear corrected;
|
||||
|
||||
// potential
|
||||
laplacian(1,p) Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
// default upwind phi;
|
||||
div(U,p) upwind phi;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,84 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.2 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location system;
|
||||
object fvSolution;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
p GAMG
|
||||
{
|
||||
tolerance 1e-8;
|
||||
relTol 0.05;
|
||||
|
||||
smoother GaussSeidel;
|
||||
|
||||
cacheAgglomeration off;
|
||||
|
||||
nCellsInCoarsestLevel 20;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
};
|
||||
|
||||
U smoothSolver
|
||||
{
|
||||
smoother GaussSeidel;
|
||||
nSweeps 2;
|
||||
tolerance 1e-6;
|
||||
relTol 0.1;
|
||||
};
|
||||
|
||||
h PBiCG
|
||||
{
|
||||
preconditioner DILU;
|
||||
tolerance 1e-6;
|
||||
relTol 0.1;
|
||||
};
|
||||
|
||||
k smoothSolver
|
||||
{
|
||||
smoother GaussSeidel;
|
||||
nSweeps 2;
|
||||
tolerance 1e-7;
|
||||
relTol 0.1;
|
||||
};
|
||||
|
||||
epsilon smoothSolver
|
||||
{
|
||||
smoother GaussSeidel;
|
||||
nSweeps 2;
|
||||
tolerance 1e-7;
|
||||
relTol 0.1;
|
||||
};
|
||||
}
|
||||
|
||||
SIMPLE
|
||||
{
|
||||
// nUCorrectors 0;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
pMin pMin [1 -1 -2 0 0 0 0] 100;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
p 0.3;
|
||||
rho 0.05;
|
||||
U 0.7;
|
||||
k 0.7;
|
||||
epsilon 0.7;
|
||||
h 0.5;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,56 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.2 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object T;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 293;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
|
||||
front
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
back
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
wall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
porosityWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
value $internalField;
|
||||
inletValue $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,59 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.2 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
location "0";
|
||||
object U;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
front
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
back
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
wall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
porosityWall
|
||||
{
|
||||
type slip;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type massFlowRateInletVelocity;
|
||||
massFlowRate 0.1;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
value uniform (0 0 0);
|
||||
inletValue uniform (0 0 0);
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,57 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.2 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object epsilon;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
dimensions [0 2 -3 0 0 0 0];
|
||||
|
||||
internalField uniform 200;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
|
||||
front
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
back
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
wall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
porosityWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type turbulentMixingLengthDissipationRateInlet;
|
||||
mixingLength 0.005;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
}
|
||||
// ************************************************************************* //
|
||||
@ -1,57 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.2 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object k;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
|
||||
front
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
back
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
wall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
porosityWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type turbulentIntensityKineticEnergyInlet;
|
||||
intensity 0.05;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
}
|
||||
// ************************************************************************* //
|
||||
@ -1,53 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.2 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object p;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 1.0e5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
front
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
back
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
wall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
porosityWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,126 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.2 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
note "generated from blockMeshDict.m4";
|
||||
location constant/polyMesh;
|
||||
object blockMeshDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// block definition for a porosity with an angled inlet/outlet
|
||||
// the porosity is not aligned with the main axes
|
||||
//
|
||||
|
||||
convertToMeters 0.001;
|
||||
|
||||
vertices
|
||||
(
|
||||
// inlet region
|
||||
( -150 0 -25 ) // pt 0 (in1b)
|
||||
( -150 35.35533906 -25 ) // pt 1 (in2b)
|
||||
( -150 0 25 ) // pt 2 (in1f)
|
||||
( -150 35.35533906 25 ) // pt 3 (in2f)
|
||||
|
||||
// join inlet->outlet
|
||||
( 0 0 -25 ) // pt 4 (join1b)
|
||||
( -35.35533906 35.35533906 -25 ) // pt 5 (join2b)
|
||||
( 0 0 25 ) // pt 6 (join1f)
|
||||
( -35.35533906 35.35533906 25 ) // pt 7 (join2f)
|
||||
|
||||
// porosity ends ->outlet
|
||||
( 70.71067812 70.71067812 -25 ) // pt 8 (poro1b)
|
||||
( 35.35533906 106.06601718 -25 ) // pt 9 (poro2b)
|
||||
( 70.71067812 70.71067812 25 ) // pt 10 (poro1f)
|
||||
( 35.35533906 106.06601718 25 ) // pt 11 (poro2f)
|
||||
|
||||
// outlet
|
||||
( 141.42135624 141.42135624 -25 ) // pt 12 (out1b)
|
||||
( 106.06601718 176.7766953 -25 ) // pt 13 (out2b)
|
||||
( 141.42135624 141.42135624 25 ) // pt 14 (out1f)
|
||||
( 106.06601718 176.7766953 25 ) // pt 15 (out2f)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
// inlet block
|
||||
hex (0 4 5 1 2 6 7 3)
|
||||
inlet ( 15 20 20 ) simpleGrading (1 1 1)
|
||||
|
||||
// porosity block
|
||||
hex (4 8 9 5 6 10 11 7)
|
||||
porosity ( 20 20 20 ) simpleGrading (1 1 1)
|
||||
|
||||
// outlet block
|
||||
hex (8 12 13 9 10 14 15 11)
|
||||
outlet ( 20 20 20 ) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
patches
|
||||
(
|
||||
// is there no way of defining all my 'defaultFaces' to be 'wall'?
|
||||
wall front
|
||||
(
|
||||
// inlet block
|
||||
(2 6 7 3)
|
||||
// outlet block
|
||||
(10 14 15 11)
|
||||
)
|
||||
|
||||
wall back
|
||||
(
|
||||
// inlet block
|
||||
(1 5 4 0)
|
||||
// outlet block
|
||||
(9 13 12 8)
|
||||
)
|
||||
|
||||
wall wall
|
||||
(
|
||||
// inlet block
|
||||
(2 0 4 6)
|
||||
(7 5 1 3)
|
||||
// outlet block
|
||||
(10 8 12 14)
|
||||
(15 13 9 11)
|
||||
)
|
||||
|
||||
wall porosityWall
|
||||
(
|
||||
// porosity block
|
||||
(6 10 11 7)
|
||||
// porosity block
|
||||
(5 9 8 4)
|
||||
// porosity block
|
||||
(6 4 8 10)
|
||||
(11 9 5 7)
|
||||
)
|
||||
|
||||
patch inlet
|
||||
(
|
||||
(3 1 0 2)
|
||||
)
|
||||
|
||||
patch outlet
|
||||
(
|
||||
(15 13 12 14)
|
||||
)
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,168 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.2 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
note "generated from blockMeshDict.m4";
|
||||
location constant/polyMesh;
|
||||
object blockMeshDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// block definition for a porosity with an angled inlet/outlet
|
||||
// the porosity is not aligned with the main axes
|
||||
//
|
||||
dnl> -----------------------------------------------------------------
|
||||
dnl> <STANDARD DEFINTIONS>
|
||||
dnl>
|
||||
changecom(//)changequote([,]) dnl>
|
||||
define(calc, [esyscmd(perl -e 'print ($1)')]) dnl>
|
||||
define(VCOUNT, 0) dnl>
|
||||
define(vlabel, [[// ]pt VCOUNT ($1) define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))]) dnl>
|
||||
dnl>
|
||||
define(hex2D, hex ($1b $2b $3b $4b $1f $2f $3f $4f)) dnl>
|
||||
define(quad2D, ($1f $1b $2b $2f)) dnl>
|
||||
define(frontQuad, ($1f $2f $3f $4f)) dnl>
|
||||
define(backQuad, ($4b $3b $2b $1b)) dnl>
|
||||
dnl>
|
||||
dnl> </STANDARD DEFINTIONS>
|
||||
dnl> -----------------------------------------------------------------
|
||||
dnl>
|
||||
define(ncells, 20) dnl>
|
||||
define(ninlet, 15) dnl>
|
||||
define(nporo, 20) dnl>
|
||||
define(noutlet, 20) dnl>
|
||||
dnl>
|
||||
define(x0,0) dnl>
|
||||
define(y0,0) dnl>
|
||||
define(y0,0) dnl>
|
||||
define(Cos,0.7071067812) dnl> == cos(45)
|
||||
define(Sin,0.7071067812) dnl> == sin(45)
|
||||
dnl>
|
||||
define(width,50) dnl>
|
||||
define(zBack,calc(-width/2)) dnl>
|
||||
define(zFront,calc(width/2)) dnl>
|
||||
define(leninlet,150)dnl>
|
||||
define(lenporo,100)dnl>
|
||||
define(lenoutlet,100)dnl>
|
||||
dnl>
|
||||
define(xhyp,calc(Sin*width)) dnl>
|
||||
define(yhyp,calc(Cos*width)) dnl>
|
||||
define(xinlet,leninlet)dnl>
|
||||
define(xporo,calc(Cos*lenporo)) dnl>
|
||||
define(yporo,calc(Sin*lenporo)) dnl>
|
||||
define(xoutlet,calc(xporo + Cos*lenoutlet)) dnl>
|
||||
define(youtlet,calc(yporo + Sin*lenoutlet)) dnl>
|
||||
dnl>
|
||||
|
||||
convertToMeters 0.001;
|
||||
|
||||
vertices
|
||||
(
|
||||
// inlet region
|
||||
( -xinlet y0 zBack ) vlabel(in1b)
|
||||
( -xinlet yhyp zBack ) vlabel(in2b)
|
||||
( -xinlet y0 zFront ) vlabel(in1f)
|
||||
( -xinlet yhyp zFront ) vlabel(in2f)
|
||||
|
||||
// join inlet->outlet
|
||||
( x0 y0 zBack ) vlabel(join1b)
|
||||
( -xhyp yhyp zBack ) vlabel(join2b)
|
||||
( x0 y0 zFront ) vlabel(join1f)
|
||||
( -xhyp yhyp zFront ) vlabel(join2f)
|
||||
|
||||
// porosity ends ->outlet
|
||||
( xporo yporo zBack ) vlabel(poro1b)
|
||||
( calc(xporo - xhyp) calc(yporo + yhyp) zBack ) vlabel(poro2b)
|
||||
( xporo yporo zFront ) vlabel(poro1f)
|
||||
( calc(xporo - xhyp) calc(yporo + yhyp) zFront ) vlabel(poro2f)
|
||||
|
||||
// outlet
|
||||
( xoutlet youtlet zBack ) vlabel(out1b)
|
||||
( calc(xoutlet - xhyp) calc(youtlet + yhyp) zBack ) vlabel(out2b)
|
||||
( xoutlet youtlet zFront ) vlabel(out1f)
|
||||
( calc(xoutlet - xhyp) calc(youtlet + yhyp) zFront ) vlabel(out2f)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
// inlet block
|
||||
hex2D(in1, join1, join2, in2)
|
||||
inlet ( ninlet ncells ncells ) simpleGrading (1 1 1)
|
||||
|
||||
// porosity block
|
||||
hex2D(join1, poro1, poro2, join2)
|
||||
porosity ( nporo ncells ncells ) simpleGrading (1 1 1)
|
||||
|
||||
// outlet block
|
||||
hex2D(poro1, out1, out2, poro2)
|
||||
outlet ( noutlet ncells ncells ) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
patches
|
||||
(
|
||||
// is there no way of defining all my 'defaultFaces' to be 'wall'?
|
||||
wall front
|
||||
(
|
||||
// inlet block
|
||||
frontQuad(in1, join1, join2, in2)
|
||||
// outlet block
|
||||
frontQuad(poro1, out1, out2, poro2)
|
||||
)
|
||||
|
||||
wall back
|
||||
(
|
||||
// inlet block
|
||||
backQuad(in1, join1, join2, in2)
|
||||
// outlet block
|
||||
backQuad(poro1, out1, out2, poro2)
|
||||
)
|
||||
|
||||
wall wall
|
||||
(
|
||||
// inlet block
|
||||
quad2D(in1, join1)
|
||||
quad2D(join2, in2)
|
||||
// outlet block
|
||||
quad2D(poro1, out1)
|
||||
quad2D(out2, poro2)
|
||||
)
|
||||
|
||||
wall porosityWall
|
||||
(
|
||||
// porosity block
|
||||
frontQuad(join1, poro1, poro2, join2)
|
||||
// porosity block
|
||||
backQuad(join1, poro1, poro2, join2)
|
||||
// porosity block
|
||||
quad2D(join1, poro1)
|
||||
quad2D(poro2, join2)
|
||||
)
|
||||
|
||||
patch inlet
|
||||
(
|
||||
quad2D(in2, in1)
|
||||
)
|
||||
|
||||
patch outlet
|
||||
(
|
||||
quad2D(out2, out1)
|
||||
)
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,38 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.2 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
note "negative values indicate a multiplier (of max value)";
|
||||
location constant;
|
||||
object porousZones;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
1
|
||||
(
|
||||
porosity
|
||||
{
|
||||
coordinateSystem
|
||||
{
|
||||
e1 (0.70710678 0.70710678 0);
|
||||
e2 (0 0 1);
|
||||
}
|
||||
|
||||
Darcy
|
||||
{
|
||||
d d [0 -2 0 0 0 0 0] (5e7 -1000 -1000);
|
||||
f f [0 -1 0 0 0 0 0] (0 0 0);
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,30 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.2 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location constant;
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
thermoType hThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>;
|
||||
|
||||
mixture
|
||||
air 1 28.9 // specieThermo
|
||||
1007 0 // hConstThermo
|
||||
// 1.84766e-05 0.7 // constTransport - 300K
|
||||
// 2.68477e-05 0.7 // constTransport - 500K
|
||||
// 3.93094e-05 0.7 // constTransport - 900K
|
||||
1.4792e-06 116 // sutherlandTransport (Star-CD)
|
||||
// 1.4584e-06 110.33 // sutherlandTransport (European Space Agency)
|
||||
;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,97 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.2 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location constant;
|
||||
object turbulenceProperties;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
turbulenceModel kEpsilon;
|
||||
turbulence on;
|
||||
|
||||
laminarCoeffs
|
||||
{
|
||||
}
|
||||
|
||||
kEpsilonCoeffs
|
||||
{
|
||||
Cmu Cmu [0 0 0 0 0 0 0] 0.09;
|
||||
C1 C1 [0 0 0 0 0 0 0] 1.44;
|
||||
C2 C2 [0 0 0 0 0 0 0] 1.92;
|
||||
C3 C3 [0 0 0 0 0 0 0] -0.33;
|
||||
alphah alphah [0 0 0 0 0 0 0] 1;
|
||||
alphak alphak [0 0 0 0 0 0 0] 1;
|
||||
alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923;
|
||||
}
|
||||
|
||||
RNGkEpsilonCoeffs
|
||||
{
|
||||
Cmu Cmu [0 0 0 0 0 0 0] 0.0845;
|
||||
C1 C1 [0 0 0 0 0 0 0] 1.42;
|
||||
C2 C2 [0 0 0 0 0 0 0] 1.68;
|
||||
C3 C3 [0 0 0 0 0 0 0] -0.33;
|
||||
alphah alphah [0 0 0 0 0 0 0] 1;
|
||||
alphak alphaK [0 0 0 0 0 0 0] 1.39;
|
||||
alphaEps alphaEps [0 0 0 0 0 0 0] 1.39;
|
||||
eta0 eta0 [0 0 0 0 0 0 0] 4.38;
|
||||
beta beta [0 0 0 0 0 0 0] 0.012;
|
||||
}
|
||||
|
||||
LaunderSharmaKECoeffs
|
||||
{
|
||||
Cmu Cmu [0 0 0 0 0 0 0] 0.09;
|
||||
C1 C1 [0 0 0 0 0 0 0] 1.44;
|
||||
C2 C2 [0 0 0 0 0 0 0] 1.92;
|
||||
C3 C3 [0 0 0 0 0 0 0] -0.33;
|
||||
alphah alphah [0 0 0 0 0 0 0] 1;
|
||||
alphak alphak [0 0 0 0 0 0 0] 1;
|
||||
alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923;
|
||||
}
|
||||
|
||||
LRRCoeffs
|
||||
{
|
||||
Cmu Cmu [0 0 0 0 0 0 0] 0.09;
|
||||
Clrr1 Clrr1 [0 0 0 0 0 0 0] 1.8;
|
||||
Clrr2 Clrr2 [0 0 0 0 0 0 0] 0.6;
|
||||
C1 C1 [0 0 0 0 0 0 0] 1.44;
|
||||
C2 C2 [0 0 0 0 0 0 0] 1.92;
|
||||
Cs Cs [0 0 0 0 0 0 0] 0.25;
|
||||
Ceps Ceps [0 0 0 0 0 0 0] 0.15;
|
||||
alphah alphah [0 0 0 0 0 0 0] 1;
|
||||
alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923;
|
||||
alphaR alphaR [0 0 0 0 0 0 0] 1.22;
|
||||
}
|
||||
|
||||
LaunderGibsonRSTMCoeffs
|
||||
{
|
||||
Cmu Cmu [0 0 0 0 0 0 0] 0.09;
|
||||
Clg1 Clg1 [0 0 0 0 0 0 0] 1.8;
|
||||
Clg2 Clg2 [0 0 0 0 0 0 0] 0.6;
|
||||
C1 C1 [0 0 0 0 0 0 0] 1.44;
|
||||
C2 C2 [0 0 0 0 0 0 0] 1.92;
|
||||
C1Ref C1Ref [0 0 0 0 0 0 0] 0.5;
|
||||
C2Ref C2Ref [0 0 0 0 0 0 0] 0.3;
|
||||
Cs Cs [0 0 0 0 0 0 0] 0.25;
|
||||
Ceps Ceps [0 0 0 0 0 0 0] 0.15;
|
||||
alphah alphah [0 0 0 0 0 0 0] 1;
|
||||
alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923;
|
||||
alphaR alphaR [0 0 0 0 0 0 0] 1.22;
|
||||
}
|
||||
|
||||
wallFunctionCoeffs
|
||||
{
|
||||
kappa kappa [0 0 0 0 0 0 0] 0.4187;
|
||||
E E [0 0 0 0 0 0 0] 9;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,51 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.2 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location system;
|
||||
object controlDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application rhoPorousSimpleFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 100;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 10;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat binary;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression uncompressed;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
graphFormat raw;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,89 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.2 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location system;
|
||||
object fvSchemes;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default steadyState;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
// UEqn
|
||||
grad(U) Gauss linear;
|
||||
grad(p) Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
//- default Gauss upwind;
|
||||
// UEqn
|
||||
div(phi,U) Gauss upwind;
|
||||
div((muEff*dev2(grad(U).T()))) Gauss linear;
|
||||
// hEqn
|
||||
div(phi,h) Gauss upwind;
|
||||
// epsilonEqn
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
// kEqn
|
||||
div(phi,k) Gauss upwind;
|
||||
|
||||
// experimental
|
||||
div(phid,p) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
//- default Gauss linear corrected;
|
||||
// UEqn
|
||||
laplacian(muEff,U) Gauss linear corrected;
|
||||
|
||||
// hEqn
|
||||
laplacian(alphaEff,h) Gauss linear corrected;
|
||||
|
||||
// pCorrect
|
||||
laplacian((rho*rAU),p) Gauss linear corrected;
|
||||
|
||||
// epsilonEqn
|
||||
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
|
||||
|
||||
// kEqn
|
||||
laplacian(DkEff,k) Gauss linear corrected;
|
||||
|
||||
// potential
|
||||
laplacian(1,p) Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
// default upwind phi;
|
||||
div(U,p) upwind phi;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,76 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.2 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location system;
|
||||
object fvSolution;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
p GAMG
|
||||
{
|
||||
tolerance 1e-8;
|
||||
relTol 0.05;
|
||||
|
||||
smoother GaussSeidel;
|
||||
|
||||
cacheAgglomeration off;
|
||||
|
||||
nCellsInCoarsestLevel 20;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
};
|
||||
|
||||
h PBiCG
|
||||
{
|
||||
preconditioner DILU;
|
||||
tolerance 1e-6;
|
||||
relTol 0.1;
|
||||
};
|
||||
|
||||
k smoothSolver
|
||||
{
|
||||
smoother GaussSeidel;
|
||||
nSweeps 2;
|
||||
tolerance 1e-7;
|
||||
relTol 0.1;
|
||||
};
|
||||
|
||||
epsilon smoothSolver
|
||||
{
|
||||
smoother GaussSeidel;
|
||||
nSweeps 2;
|
||||
tolerance 1e-7;
|
||||
relTol 0.1;
|
||||
};
|
||||
}
|
||||
|
||||
SIMPLE
|
||||
{
|
||||
nUCorrectors 2;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
pMin pMin [1 -1 -2 0 0 0 0] 100;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
p 0.3;
|
||||
rho 1;
|
||||
U 0.7;
|
||||
k 0.9;
|
||||
epsilon 0.9;
|
||||
h 0.9;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user