TUT: added tutorial files (issue #671)
- also cleanup by using 0.orig/ directory. - use foamListRegions to obtain region names
This commit is contained in:
parent
5713efede3
commit
8bf98e74da
@ -2,23 +2,11 @@
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
|
||||
cleanCase
|
||||
cleanCase0
|
||||
|
||||
rm -rf comms
|
||||
rm -rf VTK
|
||||
rm -rf constant/cellToRegion
|
||||
|
||||
rm -rf 0/bottomWater
|
||||
rm -rf 0/topAir
|
||||
rm -rf 0/heater
|
||||
rm -rf 0/leftSolid
|
||||
rm -rf 0/rightSolid
|
||||
rm -f 0/cellToRegion
|
||||
|
||||
rm -rf constant/bottomWater/polyMesh
|
||||
rm -rf constant/topAir/polyMesh
|
||||
rm -rf constant/heater/polyMesh
|
||||
rm -rf constant/leftSolid/polyMesh
|
||||
rm -rf constant/rightSolid/polyMesh
|
||||
rm -rf constant/*/polyMesh # region meshes
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -4,18 +4,22 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication topoSet
|
||||
|
||||
# Restore initial fields
|
||||
restore0Dir
|
||||
|
||||
runApplication splitMeshRegions -cellZones -overwrite
|
||||
|
||||
# remove fluid fields from solid regions (important for post-processing)
|
||||
for i in heater leftSolid rightSolid
|
||||
# Remove fluid fields from solid regions (important for post-processing)
|
||||
for region in $(foamListRegions solid)
|
||||
do
|
||||
rm -f 0*/$i/{nut,alphat,epsilon,k,U,p_rgh}
|
||||
rm -f 0/$region/{nut,alphat,epsilon,k,U,p_rgh}
|
||||
rm -f processor*/0/$region/{nut,alphat,epsilon,k,U,p_rgh}
|
||||
done
|
||||
|
||||
|
||||
for i in bottomWater topAir heater leftSolid rightSolid
|
||||
for region in $(foamListRegions)
|
||||
do
|
||||
changeDictionary -region $i > log.changeDictionary.$i 2>&1
|
||||
runApplication -s $region changeDictionary -region $region
|
||||
done
|
||||
|
||||
# Create coupling geometry
|
||||
@ -23,8 +27,7 @@ runApplication createExternalCoupledPatchGeometry \
|
||||
-regions '(topAir heater)' coupleGroup
|
||||
|
||||
echo
|
||||
echo "creating files for paraview post-processing"
|
||||
echo "Use paraFoam -touch-all to create files for paraview post-processing"
|
||||
echo
|
||||
paraFoam -touchAll 2>/dev/null
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -6,11 +6,7 @@ cleanCase0
|
||||
|
||||
rm -rf VTK
|
||||
rm -rf constant/cellToRegion
|
||||
|
||||
rm -rf constant/air/polyMesh
|
||||
rm -rf constant/solid/polyMesh
|
||||
rm -rf constant/floor/polyMesh
|
||||
rm -rf constant/triSurface
|
||||
rm -rf constant/*/polyMesh # region meshes
|
||||
|
||||
rm -f constant/air/F
|
||||
rm -f constant/air/constructMap*
|
||||
@ -19,11 +15,4 @@ rm -f constant/air/globalFaceFaces
|
||||
rm -f constant/air/mapDist
|
||||
rm -f constant/air/visibleFaceFaces
|
||||
|
||||
rm -f 0/air/facesAgglomeration
|
||||
rm -f 0/air/viewFactorField
|
||||
rm -f 0/air/cellToRegion
|
||||
rm -f 0/floor/cellToRegion
|
||||
rm -f 0/solid/cellToRegion
|
||||
rm -f 0/cellToRegion
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -8,24 +8,23 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
#-- Run on single processor
|
||||
|
||||
# Agglomerate patch faces
|
||||
for i in air
|
||||
for region in air
|
||||
do
|
||||
runApplication -s $i \
|
||||
faceAgglomerate -region $i -dict constant/viewFactorsDict
|
||||
runApplication -s $region \
|
||||
faceAgglomerate -region $region -dict constant/viewFactorsDict
|
||||
done
|
||||
|
||||
# Generate view factors
|
||||
for i in air
|
||||
for region in air
|
||||
do
|
||||
runApplication -s $i \
|
||||
viewFactorsGen -region $i
|
||||
runApplication -s $region \
|
||||
viewFactorsGen -region $region
|
||||
done
|
||||
|
||||
runApplication $(getApplication)
|
||||
|
||||
echo
|
||||
echo "Creating files for paraview post-processing"
|
||||
echo "Use paraFoam -touch-all to create files for paraview post-processing"
|
||||
echo
|
||||
paraFoam -touchAll
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -11,17 +11,17 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
runApplication decomposePar -allRegions -constant
|
||||
|
||||
# Agglomerate patch faces
|
||||
for i in air
|
||||
for region in air
|
||||
do
|
||||
runParallel -s $i \
|
||||
faceAgglomerate -region $i -dict constant/viewFactorsDict
|
||||
runParallel -s $region \
|
||||
faceAgglomerate -region $region -dict constant/viewFactorsDict
|
||||
done
|
||||
|
||||
# Generate view factors
|
||||
for i in air
|
||||
for region in air
|
||||
do
|
||||
runParallel -s $i \
|
||||
viewFactorsGen -region $i
|
||||
runParallel -s $region \
|
||||
viewFactorsGen -region $region
|
||||
done
|
||||
|
||||
# Set the initial fields
|
||||
@ -33,8 +33,7 @@ runParallel $(getApplication)
|
||||
runApplication reconstructPar -allRegions
|
||||
|
||||
echo
|
||||
echo "Creating files for paraview post-processing"
|
||||
echo "Use paraFoam -touch-all to create files for paraview post-processing"
|
||||
echo
|
||||
paraFoam -touchAll
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -10,18 +10,19 @@ runApplication splitMeshRegions -cellZones -overwrite
|
||||
rm -rf 0/domain3 constant/domain3 system/domain3
|
||||
|
||||
# Remove fluid fields from solid regions (important for post-processing)
|
||||
for i in solid floor
|
||||
for region in $(foamListRegions solid)
|
||||
do
|
||||
rm -f 0*/$i/{rho,mut,alphat,epsilon,k,U,p_rgh,qr,G,IDefault}
|
||||
rm -f 0/$region/{rho,mut,alphat,epsilon,k,U,p_rgh,qr,G,IDefault}
|
||||
rm -f processor*/0/$region/{rho,mut,alphat,epsilon,k,U,p_rgh,qr,G,IDefault}
|
||||
done
|
||||
|
||||
# Set the initial fields
|
||||
restore0Dir
|
||||
|
||||
for i in air solid floor
|
||||
for region in $(foamListRegions)
|
||||
do
|
||||
runApplication -s $i changeDictionary \
|
||||
-region $i -subDict dictionaryReplacement
|
||||
runApplication -s $region changeDictionary \
|
||||
-region $region -subDict dictionaryReplacement
|
||||
done
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -6,11 +6,6 @@ cleanCase0
|
||||
|
||||
rm -rf VTK
|
||||
rm -rf constant/cellToRegion
|
||||
|
||||
rm -rf constant/bottomWater/polyMesh
|
||||
rm -rf constant/topAir/polyMesh
|
||||
rm -rf constant/heater/polyMesh
|
||||
rm -rf constant/leftSolid/polyMesh
|
||||
rm -rf constant/rightSolid/polyMesh
|
||||
rm -rf constant/*/polyMesh # region meshes
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -14,6 +14,7 @@ runApplication splitMeshRegions -cellZones -overwrite
|
||||
for region in $(foamListRegions solid)
|
||||
do
|
||||
rm -f 0/$region/{nut,alphat,epsilon,k,U,p_rgh}
|
||||
rm -f processor*/0/$region/{nut,alphat,epsilon,k,U,p_rgh}
|
||||
done
|
||||
|
||||
for region in $(foamListRegions)
|
||||
|
@ -9,11 +9,6 @@ rm -f constant/triSurface/*.eMesh > /dev/null 2>&1
|
||||
|
||||
rm -rf VTK
|
||||
rm -rf constant/cellToRegion
|
||||
|
||||
rm -rf constant/bottomAir/polyMesh
|
||||
rm -rf constant/topAir/polyMesh
|
||||
rm -rf constant/heater/polyMesh
|
||||
rm -rf constant/leftSolid/polyMesh
|
||||
rm -rf constant/rightSolid/polyMesh
|
||||
rm -rf constant/*/polyMesh # region meshes
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -18,6 +18,7 @@ runApplication splitMeshRegions -cellZones -overwrite
|
||||
for region in $(foamListRegions solid)
|
||||
do
|
||||
rm -f 0/$region/{nut,alphat,epsilon,k,U,p_rgh}
|
||||
rm -f processor*/0/$region/{nut,alphat,epsilon,k,U,p_rgh}
|
||||
done
|
||||
|
||||
for region in $(foamListRegions)
|
||||
|
@ -4,7 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
cleanCase0
|
||||
|
||||
rm -rf constant/windshield/polyMesh
|
||||
rm -rf constant/cabin/polyMesh
|
||||
rm -rf constant/*/polyMesh # region meshes
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -30,8 +30,7 @@ runParallel $(getApplication)
|
||||
runApplication reconstructPar -allRegions
|
||||
|
||||
echo
|
||||
echo "creating files for paraview post-processing"
|
||||
echo "Use paraFoam -touch-all to create files for paraview post-processing"
|
||||
echo
|
||||
paraFoam -touchAll
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -4,8 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
cleanCase0
|
||||
|
||||
rm -rf constant/exterior/polyMesh
|
||||
rm -rf constant/ice/polyMesh
|
||||
rm -rf constant/cabin/polyMesh
|
||||
rm -rf constant/*/polyMesh # region meshes
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -16,5 +16,4 @@ runApplication -s cabin reconstructPar -region cabin
|
||||
runApplication -s ice reconstructPar -region ice
|
||||
runApplication -s exterior reconstructPar -region exterior
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -0,0 +1,30 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0.01 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,30 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object epsilon;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -3 0 0 0 0];
|
||||
|
||||
internalField uniform 0.01;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,30 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object k;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0.1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -2,19 +2,12 @@
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
|
||||
cleanCase
|
||||
cleanCase0
|
||||
|
||||
rm -rf comms
|
||||
rm -rf VTK
|
||||
rm -rf constant/cellToRegion
|
||||
|
||||
rm -rf 0/bottomWater
|
||||
rm -rf 0/topAir
|
||||
rm -rf 0/heater
|
||||
rm -rf 0/leftSolid
|
||||
rm -rf 0/rightSolid
|
||||
rm -f 0/cellToRegion
|
||||
|
||||
rm -rf constant/bottomWater/polyMesh
|
||||
rm -rf constant/topAir/polyMesh
|
||||
rm -rf constant/heater/polyMesh
|
||||
|
@ -4,27 +4,30 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication topoSet
|
||||
|
||||
# Restore initial fields
|
||||
restore0Dir
|
||||
|
||||
runApplication splitMeshRegions -cellZones -overwrite
|
||||
|
||||
# remove fluid fields from solid regions (important for post-processing)
|
||||
for i in heater leftSolid rightSolid
|
||||
# Remove fluid fields from solid regions (important for post-processing)
|
||||
for region in $(foamListRegions solid)
|
||||
do
|
||||
rm -f 0*/$i/{nut,alphat,epsilon,k,U,p_rgh}
|
||||
rm -f 0/$region/{nut,alphat,epsilon,k,U,p_rgh}
|
||||
rm -f processor*/0/$region/{nut,alphat,epsilon,k,U,p_rgh}
|
||||
done
|
||||
|
||||
|
||||
for i in bottomWater topAir heater leftSolid rightSolid
|
||||
for region in $(foamListRegions)
|
||||
do
|
||||
changeDictionary -region $i > log.changeDictionary.$i 2>&1
|
||||
runApplication -s $region changeDictionary -region $region
|
||||
done
|
||||
|
||||
# Create coupling geometry
|
||||
runApplication createExternalCoupledPatchGeometry \
|
||||
-regions '(topAir heater)' coupleGroup
|
||||
|
||||
# echo
|
||||
# echo "creating files for paraview post-processing"
|
||||
# echo
|
||||
# paraFoam -touchAll 2>/dev/null
|
||||
echo
|
||||
echo "Use paraFoam -touch-all to create files for paraview post-processing"
|
||||
echo
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -20,16 +20,6 @@ numberOfSubdomains 4;
|
||||
// preserveFaceZones (heater solid1 solid3);
|
||||
|
||||
method scotch;
|
||||
// method hierarchical;
|
||||
// method simple;
|
||||
// method manual;
|
||||
|
||||
coeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
//delta 0.001; // default=0.001
|
||||
//order xyz; // default=xzy
|
||||
dataFile "decompositionData";
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -13,6 +13,9 @@ externalCoupled
|
||||
// Does external process start first
|
||||
initByExternal true;
|
||||
|
||||
// Frequency of coupling
|
||||
calcFrequency 4;
|
||||
|
||||
// Additional output
|
||||
log true;
|
||||
|
||||
|
@ -19,7 +19,11 @@ SIMPLE
|
||||
{
|
||||
energyCoupling
|
||||
{
|
||||
iterations 50;
|
||||
iterations 10;
|
||||
|
||||
timeStart 10;
|
||||
|
||||
timeEnd 100;
|
||||
|
||||
interval 0;
|
||||
|
||||
|
@ -2,26 +2,27 @@
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
|
||||
|
||||
#create meshes
|
||||
# Create meshes
|
||||
runApplication -s air blockMesh -region air
|
||||
runApplication -s porous blockMesh -region porous
|
||||
|
||||
# create rotor blades in air region
|
||||
# Create rotor blades in air region
|
||||
runApplication -s air.1 \
|
||||
topoSet -region air -dict system/topoSetDict.1
|
||||
|
||||
runApplication createBaffles -region air -overwrite
|
||||
|
||||
# create rotor zone in air region for MRF
|
||||
# Create rotor zone in air region for MRF
|
||||
runApplication -s air.2 \
|
||||
topoSet -region air -dict system/topoSetDict.2
|
||||
|
||||
rm -rf constant/air/polyMesh/sets
|
||||
|
||||
# create dummy files for post-processing
|
||||
# Create dummy files for post-processing
|
||||
paraFoam -touch -region porous
|
||||
paraFoam -touch -region air
|
||||
|
||||
# Set initial fields
|
||||
restore0Dir
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -0,0 +1,22 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
SIMPLE
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,30 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,30 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 1e5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,30 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p_rgh;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 1e5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -2,22 +2,11 @@
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
|
||||
cleanCase
|
||||
cleanCase0
|
||||
|
||||
rm -rf VTK
|
||||
rm -rf constant/cellToRegion
|
||||
rm -rf 0/bottomAir
|
||||
rm -rf 0/topAir
|
||||
rm -rf 0/heater
|
||||
rm -rf 0/leftSolid
|
||||
rm -rf 0/rightSolid
|
||||
rm -f 0/cellToRegion
|
||||
|
||||
rm -rf constant/bottomAir/polyMesh
|
||||
rm -rf constant/topAir/polyMesh
|
||||
rm -rf constant/heater/polyMesh
|
||||
rm -rf constant/leftSolid/polyMesh
|
||||
rm -rf constant/rightSolid/polyMesh
|
||||
rm -rf constant/*/polyMesh # region meshes
|
||||
|
||||
rm -f constant/bottomAir/F
|
||||
rm -f constant/bottomAir/constructMap*
|
||||
|
@ -2,32 +2,29 @@
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
|
||||
|
||||
|
||||
# Setup case
|
||||
./Allrun.pre
|
||||
|
||||
|
||||
#-- Run on single processor
|
||||
|
||||
# Agglomerate patch faces
|
||||
for i in bottomAir topAir
|
||||
for region in bottomAir topAir
|
||||
do
|
||||
runApplication -s $i \
|
||||
faceAgglomerate -region $i -dict constant/viewFactorsDict
|
||||
runApplication -s $region \
|
||||
faceAgglomerate -region $region -dict constant/viewFactorsDict
|
||||
done
|
||||
|
||||
# Generate view factors
|
||||
for i in bottomAir topAir
|
||||
for region in bottomAir topAir
|
||||
do
|
||||
runApplication -s $i \
|
||||
viewFactorsGen -region $i
|
||||
runApplication -s $region \
|
||||
viewFactorsGen -region $region
|
||||
done
|
||||
|
||||
runApplication $(getApplication)
|
||||
|
||||
echo
|
||||
echo "creating files for paraview post-processing"
|
||||
echo "Use paraFoam -touch-all to create files for paraview post-processing"
|
||||
echo
|
||||
paraFoam -touchAll
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -11,17 +11,17 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
runApplication decomposePar -allRegions
|
||||
|
||||
# Agglomerate patch faces
|
||||
for i in bottomAir topAir
|
||||
for region in bottomAir topAir
|
||||
do
|
||||
runParallel -s $i \
|
||||
faceAgglomerate -region $i -dict constant/viewFactorsDict
|
||||
runParallel -s $region \
|
||||
faceAgglomerate -region $region -dict constant/viewFactorsDict
|
||||
done
|
||||
|
||||
# Generate view factors
|
||||
for i in bottomAir topAir
|
||||
for region in bottomAir topAir
|
||||
do
|
||||
runParallel -s $i \
|
||||
viewFactorsGen -region $i
|
||||
runParallel -s $region \
|
||||
viewFactorsGen -region $region
|
||||
done
|
||||
|
||||
# Run
|
||||
@ -31,8 +31,7 @@ runParallel $(getApplication)
|
||||
runApplication reconstructPar -allRegions
|
||||
|
||||
echo
|
||||
echo "Creating files for paraview post-processing"
|
||||
echo "Use paraFoam -touch-all to create files for paraview post-processing"
|
||||
echo
|
||||
paraFoam -touchAll
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -4,18 +4,22 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication topoSet
|
||||
|
||||
# Restore initial fields
|
||||
restore0Dir
|
||||
|
||||
runApplication splitMeshRegions -cellZones -overwrite
|
||||
|
||||
# remove fluid fields from solid regions (important for post-processing)
|
||||
for i in heater leftSolid rightSolid
|
||||
# Remove fluid fields from solid regions (important for post-processing)
|
||||
for region in $(foamListRegions solid)
|
||||
do
|
||||
rm -f 0*/$i/{rho,nut,alphat,epsilon,k,U,p_rgh,qr,G,IDefault}
|
||||
rm -f 0/$region/{rho,nut,alphat,epsilon,k,U,p_rgh,qr,G,IDefault}
|
||||
rm -f processor*/0/$region/{rho,nut,alphat,epsilon,k,U,p_rgh,qr,G,IDefault}
|
||||
done
|
||||
|
||||
for i in bottomAir topAir heater leftSolid rightSolid
|
||||
for region in $(foamListRegions)
|
||||
do
|
||||
runApplication -s $i changeDictionary -region $i
|
||||
runApplication -s $region changeDictionary -region $region
|
||||
done
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user