mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
simpleFoam/turbineSiting: Simplified case to mesh in parallel but avoid the need for redistribution
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -12,3 +14,5 @@ runApplication snappyHexMesh -overwrite
|
||||
|
||||
runApplication potentialFoam -noFunctionObjects -writep
|
||||
runApplication `getApplication`
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -16,4 +16,9 @@ sides
|
||||
type slip;
|
||||
}
|
||||
|
||||
"proc.*"
|
||||
{
|
||||
type processor;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -4,22 +4,11 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
rm -rf VTK
|
||||
#rm -rf constant/cellToRegion constant/polyMesh/sets
|
||||
rm -rf constant/polyMesh/sets
|
||||
#rm -rf constant/cellLevel
|
||||
#rm -rf constant/cellZones
|
||||
#rm -rf constant/faceZones
|
||||
#rm -rf constant/faces
|
||||
#rm -rf constant/neighbour
|
||||
#rm -rf constant/owner
|
||||
#rm -rf constant/pointZones
|
||||
#rm -rf constant/points
|
||||
#rm -rf constant/refinementHistory
|
||||
#rm -rf constant/surfaceIndex
|
||||
rm -rf 0 > /dev/null 2>&1
|
||||
|
||||
# Reset decomposeParDict
|
||||
cp system/decomposeParDict-nonPar system/decomposeParDict
|
||||
cleanCase
|
||||
|
||||
# Remove decomposeParDict
|
||||
rm -f system/decomposeParDict
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -4,36 +4,19 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Make dummy 0 directory
|
||||
mkdir 0
|
||||
|
||||
runApplication blockMesh
|
||||
cp system/decomposeParDict-nonPar system/decomposeParDict
|
||||
cp system/decomposeParDict.hierarchical system/decomposeParDict
|
||||
runApplication decomposePar
|
||||
|
||||
#runApplication snappyHexMesh -overwrite
|
||||
#runApplication setSet -batch makeZones
|
||||
#runApplication setsToZones -noFlipMap
|
||||
#runApplication `getApplication`
|
||||
cp system/decomposeParDict.ptscotch system/decomposeParDict
|
||||
runParallel snappyHexMesh 4 -overwrite
|
||||
|
||||
cp system/decomposeParDict-par system/decomposeParDict
|
||||
runParallel snappyHexMesh 2 -overwrite
|
||||
# *ProcAddressing files written by decomposePar no longer valid
|
||||
rm -f processor*/constant/polyMesh/*ProcAddressing
|
||||
find . -type f -iname "*level*" -exec rm {} \;
|
||||
|
||||
# Add wildcard entries for meshed patches since not preserved
|
||||
# by decomposePar. Notice -literalRE option to add wildcard itself
|
||||
# without evaluation.
|
||||
runParallel changeDictionary 2 -literalRE -enableFunctionEntries
|
||||
|
||||
cp system/decomposeParDict-4proc system/decomposeParDict
|
||||
# Unset floating point trapping since creating processor directories
|
||||
unset FOAM_SIGFPE
|
||||
unset FOAM_SETNAN
|
||||
runParallel redistributePar 4 -overwrite
|
||||
runParallel renumberMesh 4 -overwrite
|
||||
|
||||
# Add wildcard entries for meshes patches since not preserved
|
||||
# by decomposePar. Notice -literalRE option to add wildcard itself
|
||||
# without evaluation.
|
||||
#runParallel changeDictionary 4 -literalRE
|
||||
ls -d processor* | xargs -i cp -r 0.org/* ./{}/0/ $1
|
||||
|
||||
runParallel topoSet 4
|
||||
runParallel `getApplication` 4
|
||||
|
||||
@ -8,44 +8,50 @@
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
format binary;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
5
|
||||
6
|
||||
(
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
nFaces 600;
|
||||
startFace 51900;
|
||||
nFaces 922;
|
||||
startFace 364825;
|
||||
}
|
||||
sides
|
||||
{
|
||||
type patch;
|
||||
nFaces 1200;
|
||||
startFace 52500;
|
||||
nFaces 1834;
|
||||
startFace 365747;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
nFaces 600;
|
||||
startFace 53700;
|
||||
nFaces 923;
|
||||
startFace 367581;
|
||||
}
|
||||
ground
|
||||
{
|
||||
type wall;
|
||||
nFaces 900;
|
||||
startFace 54300;
|
||||
nFaces 0;
|
||||
startFace 368504;
|
||||
}
|
||||
top
|
||||
{
|
||||
type patch;
|
||||
nFaces 900;
|
||||
startFace 55200;
|
||||
startFace 368504;
|
||||
}
|
||||
terrain_patch0
|
||||
{
|
||||
type wall;
|
||||
nFaces 14400;
|
||||
startFace 369404;
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@ -1,200 +0,0 @@
|
||||
/*--------------------------------*- 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;
|
||||
object changeDictionaryDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "$FOAM_CASE/0/include/initialConditions"
|
||||
#include "$FOAM_CASE/0/include/ABLConditions"
|
||||
|
||||
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;
|
||||
uniformValue constant $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 constant $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 $Uref;
|
||||
Href $Href;
|
||||
n $windDirection;
|
||||
z $zDirection;
|
||||
z0 $z0;
|
||||
zGround $zGround;
|
||||
value uniform $flowVelocity;
|
||||
}
|
||||
"terrain_.*"
|
||||
{
|
||||
type uniformFixedValue;
|
||||
uniformValue constant $flowVelocity;
|
||||
}
|
||||
ground
|
||||
{
|
||||
type uniformFixedValue;
|
||||
uniformValue constant $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 nutkAtmRoughWallFunction;
|
||||
z0 $z0;
|
||||
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;
|
||||
z $zDirection;
|
||||
z0 $z0;
|
||||
zGround $zGround;
|
||||
Uref $Uref;
|
||||
Href $Href;
|
||||
value uniform $turbulentEpsilon;
|
||||
}
|
||||
"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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,29 +0,0 @@
|
||||
/*--------------------------------*- 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;
|
||||
object decomposeParDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 2;
|
||||
|
||||
method hierarchical;
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (2 1 1);
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,22 +0,0 @@
|
||||
/*--------------------------------*- 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;
|
||||
object decomposeParDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 2;
|
||||
|
||||
method ptscotch;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -15,13 +15,13 @@ FoamFile
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 2;
|
||||
numberOfSubdomains 4;
|
||||
|
||||
method hierarchical;
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (2 1 1);
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
Reference in New Issue
Block a user