Commit 019e29d8 authored by Andrew Heather's avatar Andrew Heather Committed by graham
Browse files

new tutorials

parent 0bdc9681
#!/bin/sh
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cd throttle
rm -rf constant/polyMesh/sets > /dev/null 2>&1
rm -rf 0/polyMesh > /dev/null 2>&1
rm system/cellSetDict > /dev/null 2>&1
cleanCase
cd ..
cd throttle3D
rm -rf constant/polyMesh/sets > /dev/null 2>&1
rm -rf 0 > /dev/null 2>&1
cp -r 0.orig 0
rm system/cellSetDict > /dev/null 2>&1
rm -rf processor[0-9] > /dev/null 2>&1
cleanCase
cd ..
#!/bin/sh
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
application="lesCavitatingFoam"
refineMeshByCellSet()
{
echo "creating cell set for primary zone - $1"
cp system/cellSetDict.$1 system/cellSetDict
cellSet >& log.cellSet.$1
echo "refining primary zone - $1"
refineMesh -dict -overwrite >& log.refineMesh.$1
}
cd throttle
runApplication blockMesh
refineMeshByCellSet 1
refineMeshByCellSet 2
refineMeshByCellSet 3
runApplication $application
cd ..
cd throttle3D
cp -r 0.orig 0
runApplication blockMesh
refineMeshByCellSet 1
refineMeshByCellSet 2
refineMeshByCellSet 3
echo "mapping fields from 2D throttle case"
mapFields ../throttle -sourceTime latestTime >& log.mapFields
runApplication decomposePar
hostname > system/machines
runParallel $application 4 system/machines
runApplication reconstructPar
cd ..
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0];
internalField uniform (0 0 0);
boundaryField
{
inlet
{
type zeroGradient;
value uniform (0 0 0);
}
outlet
{
type zeroGradient;
value uniform (0 0 0);
}
walls
{
type fixedValue;
value uniform (0 0 0);
}
frontBack
{
type empty;
}
}
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class volScalarField;
object gamma;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0];
internalField uniform 0;
boundaryField
{
inlet
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
walls
{
type calculated;
value uniform 0;
}
frontBack
{
type empty;
}
}
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class volScalarField;
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0];
internalField uniform 10.0;
boundaryField
{
inlet
{
type fixedValue;
value uniform 0.5;
}
outlet
{
type zeroGradient;
}
walls
{
type zeroGradient;
}
frontBack
{
type empty;
}
}
// ************************************************************************* //
/*--------------------------------*- 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 binary;
class volScalarField;
object nuSgs;
location "0";
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 1e-11;
boundaryField
{
inlet
{
type zeroGradient;
}
outlet
{
type zeroGradient;
}
walls
{
type fixedValue;
value uniform 0;
}
frontBack
{
type empty;
}
}
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0];
internalField uniform 300e5;
boundaryField
{
inlet
{
type totalPressure;
U U;
phi phiv;
rho rho;
psi none;
gamma 1;
p0 uniform 300e5;
}
outlet
{
type fixedValue;
value uniform 100e5;
}
walls
{
type zeroGradient;
}
frontBack
{
type empty;
}
}
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class volScalarField;
object rho;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -3 0 0 0];
internalField uniform 845;
boundaryField
{
inlet
{
type fixedValue;
value uniform 845;
}
outlet
{
type fixedValue;
value uniform 835;
}
walls
{
type zeroGradient;
}
frontBack
{
type empty;
}
}
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object LESProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
LESModel devOneEqEddy;
delta smooth;
laminarCoeffs
{
}
devOneEqEddyCoeffs
{
ck 0.07;
ce 1.05;
}
oneEqEddyCoeffs
{
ck 0.07;
ce 1.05;
}
dynOneEqEddyCoeffs
{
ce 1.05;
filter simple;
}
locDynOneEqEddyCoeffs
{
ce 1.05;
filter simple;
}
SmagorinskyCoeffs
{
ce 1.05;
ck 0.07;
}
Smagorinsky2Coeffs
{
ce 1.05;
ck 0.07;
cD2 0.02;
}
spectEddyViscCoeffs
{
ce 1.05;
cB 8.22;
cK1 0.83;
cK2 1.03;
cK3 4.75;
cK4 2.55;
}
dynSmagorinskyCoeffs
{
ce 1.05;
filter simple;
}
mixedSmagorinskyCoeffs
{
ce 1.05;
ck 0.07;
filter simple;
}
dynMixedSmagorinskyCoeffs
{
ce 1.05;
filter simple;
}
LRRDiffStressCoeffs
{
ce 1.05;
ck 0.09;
c1 1.8;
c2 0.6;
}
DeardorffDiffStressCoeffs
{
ce 1.05;
ck 0.09;
cm 4.13;
}
SpalartAllmarasCoeffs
{
alphaNut 1.5;
Cb1 0.1355;
Cb2 0.622;
Cw2 0.3;
Cw3 2;
Cv1 7.1;
Cv2 5.0;
CDES 0.65;
ck 0.07;
}
cubeRootVolCoeffs
{
deltaCoeff 1;
}
PrandtlCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}
smoothCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}
maxDeltaRatio 1.1;
}
Cdelta 0.158;
}
vanDriestCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}
smoothCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}
maxDeltaRatio 1.1;
}
Aplus 26;
Cdelta 0.158;
}
smoothCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}
maxDeltaRatio 1.1;
}
kappa 0.4187;
wallFunctionCoeffs
{
E 9;
}
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.0 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 1.0e-3;
vertices
(
( 0.00 -2.50 -0.50)
( 5.00 -2.50 -0.50)
( 5.00 -0.15 -0.50)
( 7.00 -0.15 -0.50)
( 7.00 -2.50 -0.50)
(17.00 -2.50 -0.50)
(17.00 -0.15 -0.50)
(17.00 0.15 -0.50)
(17.00 2.50 -0.50)