Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev

This commit is contained in:
mattijs
2009-08-13 17:28:42 +01:00
26 changed files with 985 additions and 82 deletions

View File

@ -7,8 +7,7 @@
scalar epsilon = turbulence->epsilon()()[cellId]; scalar epsilon = turbulence->epsilon()()[cellId];
// scalar omega = turbulence->omega()()[cellId]; // scalar omega = turbulence->omega()()[cellId];
scalar k = turbulence->k()()[cellId]; scalar k = turbulence->k()()[cellId];
scalar Up = scalar magUp = mag(U[cellId] - U.boundaryField()[patchId][faceId]);
flowDirection & (U[cellId] - U.boundaryField()[patchId][faceId]);
scalar tauw = flowDirection & R & wallNormal; scalar tauw = flowDirection & R & wallNormal;
@ -16,7 +15,7 @@
scalar yPlus = uTau*y[cellId]/(nu + ROOTVSMALL); scalar yPlus = uTau*y[cellId]/(nu + ROOTVSMALL);
scalar uPlus = Up/(uTau + ROOTVSMALL); scalar uPlus = magUp/(uTau + ROOTVSMALL);
scalar nutPlus = nut/nu; scalar nutPlus = nut/nu;
@ -26,7 +25,7 @@
// scalar omegaPlus = omega*nu/(sqr(uTau) + ROOTVSMALL); // scalar omegaPlus = omega*nu/(sqr(uTau) + ROOTVSMALL);
scalar Rey = Up*y[cellId]/nu; scalar Rey = magUp*y[cellId]/nu;
Info<< "Rey = " << Rey << ", uTau = " << uTau << ", nut+ = " << nutPlus Info<< "Rey = " << Rey << ", uTau = " << uTau << ", nut+ = " << nutPlus
<< ", y+ = " << yPlus << ", u+ = " << uPlus << ", y+ = " << yPlus << ", u+ = " << uPlus

View File

@ -56,20 +56,11 @@
); );
dimensionedScalar rhoc dimensionedScalar rhoc(transportProperties.lookup("rhoc"));
(
transportProperties.lookup("rhoc")
);
dimensionedScalar rhod dimensionedScalar rhod(transportProperties.lookup("rhod"));
(
transportProperties.lookup("rhod")
);
dimensionedScalar muc dimensionedScalar muc(transportProperties.lookup("muc"));
(
transportProperties.lookup("muc")
);
dimensionedScalar plasticViscosityCoeff dimensionedScalar plasticViscosityCoeff
( (
@ -96,10 +87,7 @@
transportProperties.lookup("yieldStressOffset") transportProperties.lookup("yieldStressOffset")
); );
Switch BinghamPlastic Switch BinghamPlastic(transportProperties.lookup("BinghamPlastic"));
(
transportProperties.lookup("BinghamPlastic")
);
volScalarField rho volScalarField rho
( (
@ -147,8 +135,8 @@
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
muc + muc
plasticViscosity + plasticViscosity
( (
plasticViscosityCoeff, plasticViscosityCoeff,
plasticViscosityExponent, plasticViscosityExponent,
@ -176,10 +164,7 @@
Info<< "Selecting Drift-Flux model " << endl; Info<< "Selecting Drift-Flux model " << endl;
word VdjModel word VdjModel(transportProperties.lookup("VdjModel"));
(
transportProperties.lookup("VdjModel")
);
Info<< tab << VdjModel << " selected\n" << endl; Info<< tab << VdjModel << " selected\n" << endl;
@ -188,26 +173,13 @@
transportProperties.subDict(VdjModel + "Coeffs") transportProperties.subDict(VdjModel + "Coeffs")
); );
dimensionedVector V0 dimensionedVector V0(VdjModelCoeffs.lookup("V0"));
(
VdjModelCoeffs.lookup("V0")
);
dimensionedScalar a dimensionedScalar a(VdjModelCoeffs.lookup("a"));
(
VdjModelCoeffs.lookup("a")
);
dimensionedScalar a1 dimensionedScalar a1(VdjModelCoeffs.lookup("a1"));
(
VdjModelCoeffs.lookup("a1")
);
dimensionedScalar alphaMin
(
VdjModelCoeffs.lookup("alphaMin")
);
dimensionedScalar alphaMin(VdjModelCoeffs.lookup("alphaMin"));
IOdictionary RASProperties IOdictionary RASProperties
@ -223,15 +195,9 @@
); );
Switch turbulence Switch turbulence(RASProperties.lookup("turbulence"));
(
RASProperties.lookup("turbulence")
);
dictionary kEpsilonDict dictionary kEpsilonDict(RASProperties.subDictPtr("kEpsilonCoeffs"));
(
RASProperties.subDictPtr("kEpsilonCoeffs")
);
dimensionedScalar Cmu dimensionedScalar Cmu
( (
@ -273,30 +239,27 @@
) )
); );
dimensionedScalar alphak dimensionedScalar sigmak
( (
dimensionedScalar::lookupOrAddToDict dimensionedScalar::lookupOrAddToDict
( (
"alphaEps", "sigmak",
kEpsilonDict, kEpsilonDict,
1.0 1.0
) )
); );
dimensionedScalar alphaEps dimensionedScalar sigmaEps
( (
dimensionedScalar::lookupOrAddToDict dimensionedScalar::lookupOrAddToDict
( (
"alphaEps", "sigmaEps",
kEpsilonDict, kEpsilonDict,
0.76923 1.3
) )
); );
dictionary wallFunctionDict dictionary wallFunctionDict(RASProperties.subDictPtr("wallFunctionCoeffs"));
(
RASProperties.subDictPtr("wallFunctionCoeffs")
);
dimensionedScalar kappa dimensionedScalar kappa
( (

View File

@ -1,4 +1,4 @@
if(turbulence) if (turbulence)
{ {
if (mesh.changing()) if (mesh.changing())
{ {
@ -15,9 +15,9 @@ if(turbulence)
tgradU.clear(); tgradU.clear();
volScalarField Gcoef = volScalarField Gcoef =
alphak*Cmu*k*(g & fvc::grad(rho))/(epsilon + epsilon0); Cmu*k/sigmak*(g & fvc::grad(rho))/(epsilon + epsilon0);
# include "wallFunctions.H" #include "wallFunctions.H"
// Dissipation equation // Dissipation equation
fvScalarMatrix epsEqn fvScalarMatrix epsEqn
@ -26,7 +26,7 @@ if(turbulence)
+ fvm::div(phi, epsilon) + fvm::div(phi, epsilon)
- fvm::laplacian - fvm::laplacian
( (
alphaEps*mut + mul, epsilon, mut/sigmaEps + mul, epsilon,
"laplacian(DepsilonEff,epsilon)" "laplacian(DepsilonEff,epsilon)"
) )
== ==
@ -35,7 +35,7 @@ if(turbulence)
- fvm::Sp(C2*rho*epsilon/k, epsilon) - fvm::Sp(C2*rho*epsilon/k, epsilon)
); );
# include "wallDissipation.H" #include "wallDissipation.H"
epsEqn.relax(); epsEqn.relax();
epsEqn.solve(); epsEqn.solve();
@ -51,7 +51,7 @@ if(turbulence)
+ fvm::div(phi, k) + fvm::div(phi, k)
- fvm::laplacian - fvm::laplacian
( (
alphak*mut + mul, k, mut/sigmak + mul, k,
"laplacian(DkEff,k)" "laplacian(DkEff,k)"
) )
== ==
@ -66,7 +66,7 @@ if(turbulence)
//- Re-calculate viscosity //- Re-calculate viscosity
mut = rho*Cmu*sqr(k)/(epsilon + epsilon0); mut = rho*Cmu*sqr(k)/(epsilon + epsilon0);
# include "wallViscosity.H" #include "wallViscosity.H"
} }
mu = mut + mul; mu = mut + mul;

View File

@ -72,10 +72,12 @@ namespace Foam
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
# include "addRegionOption.H" argList::validOptions.insert("instance", "instance");
# include "setRootCase.H" #include "addRegionOption.H"
# include "createTime.H"
# include "createNamedMesh.H" #include "setRootCase.H"
#include "createTime.H"
#include "createNamedMesh.H"
fileName regionPrefix = ""; fileName regionPrefix = "";
if (regionName != fvMesh::defaultRegion) if (regionName != fvMesh::defaultRegion)
@ -83,6 +85,12 @@ int main(int argc, char *argv[])
regionPrefix = regionName; regionPrefix = regionName;
} }
word instance = runTime.timeName();
if (args.options().found("instance"))
{
instance = args.options()["instance"];
}
// Get the replacement rules from a dictionary // Get the replacement rules from a dictionary
IOdictionary dict IOdictionary dict
( (
@ -196,12 +204,13 @@ int main(int argc, char *argv[])
Info<< "Loading dictionary " << fieldName << endl; Info<< "Loading dictionary " << fieldName << endl;
const word oldTypeName = IOdictionary::typeName; const word oldTypeName = IOdictionary::typeName;
const_cast<word&>(IOdictionary::typeName) = word::null; const_cast<word&>(IOdictionary::typeName) = word::null;
IOdictionary fieldDict IOdictionary fieldDict
( (
IOobject IOobject
( (
fieldName, fieldName,
runTime.timeName(), instance,
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE, IOobject::NO_WRITE,

View File

@ -58,9 +58,9 @@ cat <<LABHELP
The default is to extract for all the 'Solved for' variables the initial The default is to extract for all the 'Solved for' variables the initial
residual, the final residual and the number of iterations. Additionally, a residual, the final residual and the number of iterations. Additionally, a
(user editable) database is used to extract data for standard non-solved for (user editable) database is used to extract data for standard non-solved for
variables like Courant number, execution time. variables like Courant number, and execution time.
$PROGNAME -l lists all the possible variables without extract them. $PROGNAME -l lists all the possible variables without extracting them.
The program will generate and run an awk script which writes a set of files, The program will generate and run an awk script which writes a set of files,
logs/<var>_<subIter>, for every <var> specified, for every occurrence inside logs/<var>_<subIter>, for every <var> specified, for every occurrence inside
@ -69,7 +69,7 @@ a time step.
For variables that are 'Solved for', the initial residual name will be For variables that are 'Solved for', the initial residual name will be
<var>, the final residual receive the name <var>FinalRes, <var>, the final residual receive the name <var>FinalRes,
The files are a simple xy format with the first column Time (default) The files are output in a simple xy format with the first column Time (default)
and the second the extracted values. Option -n creates single column and the second the extracted values. Option -n creates single column
files with the extracted data only. files with the extracted data only.
@ -82,6 +82,7 @@ separated with '/' :
The value taken will be the first (non-space)word after this column. The value taken will be the first (non-space)word after this column.
The database ($PROGNAME.db) will taken from these locations: The database ($PROGNAME.db) will taken from these locations:
.
$HOME/.OpenFOAM/$WM_PROJECT_VERSION $HOME/.OpenFOAM/$WM_PROJECT_VERSION
$HOME/.OpenFOAM $HOME/.OpenFOAM
$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION
@ -98,6 +99,7 @@ LABHELP
# The various places to be searched: # The various places to be searched:
for i in \ for i in \
. \
$HOME/.OpenFOAM/$WM_PROJECT_VERSION \ $HOME/.OpenFOAM/$WM_PROJECT_VERSION \
$HOME/.OpenFOAM \ $HOME/.OpenFOAM \
$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION \ $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION \
@ -114,7 +116,6 @@ do
done done
myEcho() { myEcho() {
if [ "$VERBOSE" ] if [ "$VERBOSE" ]
then then
@ -171,6 +172,7 @@ getSolveQueryList() {
done done
} }
# getAllQueries dbFile logFile # getAllQueries dbFile logFile
# Gets all queries from database and from logfile # Gets all queries from database and from logfile
getAllQueries() { getAllQueries() {
@ -202,6 +204,7 @@ getAllQueries() {
done | sort -u done | sort -u
} }
#----------------------------- #-----------------------------
# Main # Main
#----------------------------- #-----------------------------
@ -314,8 +317,6 @@ myEcho ""
# Generate Awk program # Generate Awk program
#----------------------------- #-----------------------------
#-- header #-- header
rm -f $AWKFILE; touch $AWKFILE rm -f $AWKFILE; touch $AWKFILE
@ -355,9 +356,6 @@ function extract(inLine,columnSel,outVar,
LABEL LABEL
#-- Generate code for iteration separator (increments 'Iteration') #-- Generate code for iteration separator (increments 'Iteration')
getQueries $DBFILE 'Separator' getQueries $DBFILE 'Separator'
cat <<LABSEP >> $AWKFILE cat <<LABSEP >> $AWKFILE
@ -418,6 +416,7 @@ cat <<LABSOLVE >> $AWKFILE
LABSOLVE LABSOLVE
#-- generate code to process queries #-- generate code to process queries
for queryName in $QUERYNAMES for queryName in $QUERYNAMES
do do
@ -438,7 +437,6 @@ do
done done
#----------------------------- #-----------------------------
# Run awk program on log # Run awk program on log
#----------------------------- #-----------------------------

View File

@ -0,0 +1,12 @@
* Buoyancy driven, natural convection
* Reference: Betts, P.L. and Bokhari, I.H.; "Experiments in turbulent natural convection in an enclosed tall cavity"; International Journal of Heat and Fluid Flow; volume 21; 2000; pp 675-683.
* Test case considers the lower of the two plate temperature differences, 19.6 degC.
* Experimental data publicly available from (13/08/2009):
http://cfd.mace.manchester.ac.uk/cgi-bin/cfddb/prpage.cgi?79&EXP&database/cases/case79/Case_data&database/cases/case79&cas79_head.html&cas79_desc.html&cas79_meth.html&cas79_data.html&cas79_refs.html&cas79_rsol.html&1&0&0&0&0&unknown

View File

@ -0,0 +1,46 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (1 0 0);
boundaryField
{
lowerWall
{
type fixedValue;
value uniform (0 0 0);
}
upperWall
{
type fixedValue;
value uniform (0 0 0);
}
frontBack
{
type cyclic;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,46 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: 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 1e-08;
boundaryField
{
lowerWall
{
type epsilonWallFunction;
value uniform 1e-08;
}
upperWall
{
type epsilonWallFunction;
value uniform 1e-08;
}
frontBack
{
type cyclic;
value uniform 1e-08;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,46 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: 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 0.000000001;
boundaryField
{
lowerWall
{
type kqRWallFunction;
internalField uniform 0.1;
}
upperWall
{
type kqRWallFunction;
internalField uniform 0.1;
}
frontBack
{
type cyclic;
internalField uniform 0.1;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object nuTilda;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
lowerWall
{
type zeroGradient;
}
upperWall
{
type zeroGradient;
}
frontBack
{
type cyclic;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,46 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
lowerWall
{
type nutkWallFunction;
value uniform 0;
}
upperWall
{
type nutkWallFunction;
value uniform 0;
}
frontBack
{
type cyclic;
value uniform 0;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,46 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
lowerWall
{
type nutkWallFunction;
value uniform 0;
}
upperWall
{
type nutkWallFunction;
value uniform 0;
}
frontBack
{
type cyclic;
value uniform 0;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,46 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
lowerWall
{
type nutUSpaldingWallFunction;
value uniform 0;
}
upperWall
{
type nutUSpaldingWallFunction;
value uniform 0;
}
frontBack
{
type cyclic;
value uniform 0;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,46 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object omega;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 -1 0 0 0 0];
internalField uniform 1111.11;
boundaryField
{
lowerWall
{
type omegaWallFunction;
value uniform 1111.11;
}
upperWall
{
type omegaWallFunction;
value uniform 1111.11;
}
frontBack
{
type cyclic;
value uniform 1111.11;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,11 @@
#!/bin/sh
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
rm -rf logs
rm -f *.eps yPlus_vs_uPlus
echo "done"

View File

@ -0,0 +1,69 @@
#!/bin/sh
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh
exponents="2 3 4 5 6 7 8"
echo "# yPlus vs uPlus" > yPlus_vs_uPlus
for e in $exponents; do
echo " Setting nu to 1e-$e"
sed "s/XXX/$e/g" constant/transportProperties.template \
> constant/transportProperties
runApplication boundaryFoam
mv log.boundaryFoam log.boundaryFoam_$e
# extract y+, U+
# note: both must be added to foamLog.db
runApplication foamLog log.boundaryFoam_$e
mv log.foamLog log.foamLog_$e
if [ -e logs/yPlus_0 ]; then
yPlus=`awk < logs/yPlus_0 'END{print $2}'`
uPlus=`awk < logs/uPlus_0 'END{print $2}'`
echo "$yPlus $uPlus" >> yPlus_vs_uPlus
fi
rm -rf logs
done
# create validation plot
# test if gnuplot exists on the system
type -P gnuplot &>/dev/null || {
echo "gnuplot not found - skipping graph creation" >&2; exit 1;
}
graphName="OF_vs_ANAYTICAL.eps"
echo "Creating graph of u+ vs y+ to $graphName"
gnuplot<<EOF
set terminal postscript eps color enhanced
set output "$graphName"
set grid
set xlabel "y+"
set ylabel "u+"
set key top left
set size 0.75, 0.75
set parametric
# u+ range
set trange [0:35]
# Spaldings law
k=0.41
E=9.8
f(t) = t + 1/E*(exp(k*t) - 1 - k*t*(1 + 0.5*k*t) - 1/6*k*t**3)
set logscale x
set format x "10^{%T}"
plot f(t),t title "Spalding" with lines linetype -1, \
"yPlus_vs_uPlus" title "OpenFOAM" with points lt 1 pt 6
EOF
echo "done"

View File

@ -0,0 +1,14 @@
Test for momentum wall functions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computes a series of steady boundary layer calculations, varying the Reynolds
number. Wall u+ plotted as a function of log10(y+), and compared with wall
profile given by Spalding's law.
Usage:
- run test using Allrun script
- uses foamLog to generate u+ and y+ values
- postscript (.eps) plot generated using gnuplot, OF_vs_ANAYTICAL.eps

View File

@ -0,0 +1,25 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object RASProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
RASModel kEpsilon; // SpalartAllmaras;
turbulence on;
printCoeffs on;
// ************************************************************************* //

View File

@ -0,0 +1,71 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 0.05;
vertices
(
(0 -1 0)
(0 0 0)
(0 1 0)
(0.1 -1 0)
(0.1 0 0)
(0.1 1 0)
(0 -1 0.1)
(0 0 0.1)
(0 1 0.1)
(0.1 -1 0.1)
(0.1 0 0.1)
(0.1 1 0.1)
);
blocks
(
hex (0 3 4 1 6 9 10 7) (1 40 1) simpleGrading (1 1 1)
hex (1 4 5 2 7 10 11 8) (1 40 1) simpleGrading (1 1 1)
);
edges
(
);
patches
(
wall lowerWall
(
(0 3 9 6)
)
wall upperWall
(
(2 8 11 5)
)
cyclic frontBack
(
(0 6 7 1)
(1 7 8 2)
(9 3 4 10)
(10 4 5 11)
)
);
mergePatchPairs
(
);
// ************************************************************************* //

View File

@ -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 polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
4
(
lowerWall
{
type wall;
nFaces 1;
startFace 79;
}
upperWall
{
type wall;
nFaces 1;
startFace 80;
}
frontBack
{
type cyclic;
nFaces 160;
startFace 81;
featureCos 0.9;
}
defaultFaces
{
type empty;
nFaces 160;
startFace 241;
}
)
// ************************************************************************* //

View File

@ -0,0 +1,25 @@
/*--------------------------------*- 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 transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Ubar Ubar [ 0 1 -1 0 0 0 0 ] ( 10 0 0 );
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-8;
// ************************************************************************* //

View File

@ -0,0 +1,25 @@
/*--------------------------------*- 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 transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Ubar Ubar [ 0 1 -1 0 0 0 0 ] ( 10 0 0 );
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-XXX;
// ************************************************************************* //

View File

@ -0,0 +1,62 @@
#------------------------------------------------------------------------------
# Query database for Foam Log extraction.
# Each line stands for one query:
#
# name '/' line selector '/' column selector
#
# e.g.
# kMin/bounding k,/min:
#
# The extraction will select a line using 'bounding k,' and in the line
# takes the word following 'min:' as the value.
#
# A special entry is the 'Separator' entry which delimits one iteration
# from the other.
#
#------------------------------------------------------------------------------
#- String to recognize new iteration by (usually same as 'Time')
Separator/^[ \t]*Time = /Time =
#- Time value:
Time/^[ \t]*Time = /Time =
#- Continuity errors:
contLocal/time step continuity errors :/sum local =
contGlobal/time step continuity errors :/ global =
contCumulative/time step continuity errors :/cumulative =
#- Special for combustion code:
minFu/min\(fu\) = /min(fu) =
minFt/min\(ft\) = /min(ft) =
#- Execution time:
executionTime/ExecutionTime = /ExecutionTime =
#- Courant no:
CourantMax/Courant Number /max:
CourantMean/Courant Number /mean:
#- K bounding
kMin/bounding k,/min:
kMax/bounding k,/max:
kAvg/bounding k,/average:
#- epsilon bounding
epsMin/bounding epsilon,/min:
epsMax/bounding epsilon,/max:
epsAvg/bounding epsilon,/average:
#- gamma bounding
gammaMin/Min\(gamma\) =/Min(gamma) =
gammaMax/Max\(gamma\) =/Max(gamma) =
#- Wall function data - line begins with Rey =
Rey/Rey = /Rey =
uTau/Rey = /uTau =
nutPlus/Rey = /nut+ =
yPlus/Rey = /y+ =
uPlus/Rey = /u+ =
kPlus/Rey = /k+ =
epsilonPlus/Rey = /epsilon+ =

View File

@ -0,0 +1,58 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application boundaryFoam;
libs
(
"libOpenFOAM.so"
"libinterpolationTables_16x.so"
"libtabulatedWallFunctionFvPatchFields_16x.so"
);
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 1000;
deltaT 1;
writeControl timeStep;
writeInterval 100;
purgeWrite 1;
writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
graphFormat raw;
// ************************************************************************* //

View File

@ -0,0 +1,61 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default steadyState;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
div(phi,k) Gauss linear;
div(phi,epsilon) Gauss linear;
div(phi,omega) Gauss linear;
div(phi,R) Gauss linear;
div(phi,nuTilda) Gauss linear;
div((nuEff*dev(grad(U).T()))) Gauss linear;
}
laplacianSchemes
{
default none;
laplacian(nuEff,U) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
laplacian(DomegaEff,omega) Gauss linear corrected;
laplacian(DREff,R) Gauss linear corrected;
laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
// ************************************************************************* //

View File

@ -0,0 +1,88 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
U
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0;
}
k
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-06;
relTol 0;
}
epsilon
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-06;
relTol 0;
}
omega
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-06;
relTol 0;
}
R
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-06;
relTol 0;
}
nuTilda
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-06;
relTol 0;
}
}
PISO
{
nCorrectors 2;
nNonOrthogonalCorrectors 0;
momentumPredictor yes;
fluxGradp no;
}
relaxationFactors
{
U 0.5;
k 0.7;
epsilon 0.7;
omega 0.7;
R 0.7;
nuTilda 0.7;
}
// ************************************************************************* //