ENH: windSimpleFoam tutorial update

This commit is contained in:
mattijs
2010-12-10 16:04:13 +00:00
parent c025f7e0b2
commit 123de44f51
9 changed files with 270 additions and 66 deletions

View File

@ -46,13 +46,15 @@ boundaryField
"terrain_.*"
{
type fixedValue;
type uniformFixedValue;
uniformValue (0 0 0);
value uniform (0 0 0);
}
ground
{
type fixedValue;
type uniformFixedValue;
uniformValue (0 0 0);
value uniform (0 0 0);
}

View File

@ -23,7 +23,7 @@ internalField uniform $turbulentEpsilon;
boundaryField
{
#include "include/ABLConditions"
#include "include/ABLConditions"
"terrain_.*"
{

View File

@ -32,8 +32,9 @@ boundaryField
}
inlet
{
type fixedValue;
value uniform $turbulentKE;
type uniformFixedValue;
uniformValue $turbulentKE;
value $turbulentKE;
}
"terrain_.*"
{

View File

@ -29,8 +29,9 @@ boundaryField
outlet
{
type fixedValue;
value $internalField;
type uniformFixedValue;
value uniform $pressure;
uniformValue $pressure;
}
"terrain_.*"

View File

@ -4,10 +4,27 @@ cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
compileApplication windSimpleFoam
runApplication blockMesh
runApplication snappyHexMesh -overwrite
runApplication setSet -batch makeZones
runApplication setsToZones -noFlipMap
runApplication windSimpleFoam
runApplication decomposePar
#runApplication snappyHexMesh -overwrite
#runApplication setSet -batch makeZones
#runApplication setsToZones -noFlipMap
#runApplication windSimpleFoam
runParallel snappyHexMesh 2 -overwrite
# Add wildcard entries for meshes patches since not preserved
# by decomposePar. Notice -literalRE option to add wildcard itself
# without evaluation.
runParallel changeDictionary 2 -literalRE
runParallel setSet 2 -batch makeZones
runParallel windSimpleFoam 2
runApplication reconstructParMesh -constant
runApplication reconstructPar
# ----------------------------------------------------------------- end-of-file

View File

@ -1,2 +1,4 @@
cellSet actuationDisk1 new boxToCell (581850.5 4785805 1061) (581850.8 4785815 1071)
cellZoneSet actuationDisk1 new setToCellZone actuationDisk1
cellSet actuationDisk2 new boxToCell (581754 4785658 1065) (581754.4 4785668 1075)
cellZoneSet actuationDisk2 new setToCellZone actuationDisk2

View File

@ -0,0 +1,201 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object changeDictionaryDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Use absolute path to make sure it also works in parallel
#include "$FOAM_CASE/0/include/initialConditions"
dictionaryReplacement
{
// Specify
// - all fvPatchFields with potential non-uniform values
// - all fvPatchFields originating from meshing
// - all fvPatchFields originating from mesh-redistribution
p
{
boundaryField
{
outlet
{
type uniformFixedValue;
value $pressure;
uniformValue $pressure;
}
inlet
{
type zeroGradient;
}
"terrain_.*"
{
type zeroGradient;
}
ground
{
type zeroGradient;
}
#include "$FOAM_CASE/0/include/sideAndTopPatches"
"procBoundary.*"
{
type processor;
}
}
}
k
{
boundaryField
{
outlet
{
type inletOutlet;
inletValue uniform 0.0;
value uniform $turbulentKE;
}
inlet
{
type uniformFixedValue;
uniformValue $turbulentKE;
}
"terrain_.*"
{
type kqRWallFunction;
value uniform 0.0;
}
ground
{
type zeroGradient;
}
#include "$FOAM_CASE/0/include/sideAndTopPatches"
"procBoundary.*"
{
type processor;
}
}
}
U
{
boundaryField
{
outlet
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform $flowVelocity;
}
inlet
{
type atmBoundaryLayerInletVelocity;
Uref 10.0;
Href 20;
n (1 0 0);
z (0 0 1);
z0 0.1;
zGround 935.0;
value uniform $flowVelocity;
}
"terrain_.*"
{
type uniformFixedValue;
uniformValue $flowVelocity;
}
ground
{
type uniformFixedValue;
uniformValue $flowVelocity;
}
#include "$FOAM_CASE/0/include/sideAndTopPatches"
"procBoundary.*"
{
type processor;
}
}
}
nut
{
boundaryField
{
outlet
{
type calculated;
value uniform 0;
}
inlet
{
type calculated;
value uniform 0;
}
"terrain_.*"
{
type nutkRoughWallFunction;
Ks uniform 0.2; //Ks = 20 Z0
Cs uniform 0.5;
value uniform 0.0;
}
ground
{
type calculated;
value uniform 0;
}
#include "$FOAM_CASE/0/include/sideAndTopPatches"
"procBoundary.*"
{
type processor;
}
}
}
epsilon
{
boundaryField
{
outlet
{
type zeroGradient;
}
inlet
{
type atmBoundaryLayerInletEpsilon;
Ustar 0.82;
z (0 0 1);
z0 0.1;
value uniform $turbulentEpsilon;
zGround 935.0;
}
"terrain_.*"
{
type epsilonWallFunction;
Cmu 0.09;
kappa 0.4;
E 9.8;
value uniform $turbulentEpsilon;
}
ground
{
type zeroGradient;
}
#include "$FOAM_CASE/0/include/sideAndTopPatches"
"procBoundary.*"
{
type processor;
}
}
}
}
// ************************************************************************* //

View File

@ -15,35 +15,15 @@ FoamFile
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 1;
numberOfSubdomains 2;
method hierarchical;
// method metis;
// method ptscotch;
simpleCoeffs
{
n (4 1 1);
delta 0.001;
}
hierarchicalCoeffs
{
n (1 1 1);
delta 0.001;
order xyz;
n (2 1 1);
delta 0.001;
order xyz;
}
manualCoeffs
{
dataFile "cellDecomposition";
}
metisCoeffs
{
//n (5 1 1);
//cellWeightsFile "constant/cellWeightsFile";
}
// ************************************************************************* //

View File

@ -18,49 +18,49 @@ solvers
{
p
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-6;
relTol 0.01;
maxIter 300;
};
solver GAMG;
tolerance 1e-7;
relTol 0.1;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
cacheAgglomeration on;
agglomerator faceAreaPair;
nCellsInCoarsestLevel 10;
mergeLevels 1;
}
U
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-6;
relTol 0.01;
};
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0.1;
nSweeps 1;
}
k
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-6;
relTol 0.01;
};
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0.1;
nSweeps 1;
}
epsilon
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-6;
relTol 0.01;
};
omega
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-6;
relTol 0.1;
};
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0.1;
nSweeps 1;
}
}
SIMPLE
{
nNonOrthogonalCorrectors 1;
nNonOrthogonalCorrectors 0;
convergence 1e-3;
}