tutorials/*/DTCHull, propeller: Clone meshes, if available
These cases now check for a mesh in geometrically identical cases and copy rather than re-generate if possible. This reduces the run-time of the test loop by about 20 minutes.
This commit is contained in:
@ -4,7 +4,11 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
./Allmesh
|
||||
# Mesh if necessary
|
||||
if ! cloneMesh ../../../../multiphase/interPhaseChangeFoam/propeller .
|
||||
then
|
||||
./Allmesh
|
||||
fi
|
||||
|
||||
runApplication decomposePar
|
||||
runParallel $(getApplication)
|
||||
|
||||
27
tutorials/multiphase/interFoam/RAS/DTCHull/Allmesh
Executable file
27
tutorials/multiphase/interFoam/RAS/DTCHull/Allmesh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Copy DTC hull surface from resources folder
|
||||
cp $FOAM_TUTORIALS/resources/geometry/DTC-scaled.stl.gz constant/triSurface/
|
||||
|
||||
runApplication surfaceFeatures
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
for i in 1 2 3 4 5 6
|
||||
do
|
||||
runApplication -s $i \
|
||||
topoSet -dict system/topoSetDict.${i}
|
||||
|
||||
runApplication -s $i \
|
||||
refineMesh -dict system/refineMeshDict -overwrite
|
||||
done
|
||||
|
||||
runApplication snappyHexMesh -overwrite
|
||||
|
||||
runApplication renumberMesh -noFields -overwrite
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -4,25 +4,11 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# copy DTC hull surface from resources folder
|
||||
cp $FOAM_TUTORIALS/resources/geometry/DTC-scaled.stl.gz constant/triSurface/
|
||||
|
||||
runApplication surfaceFeatures
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
for i in 1 2 3 4 5 6
|
||||
do
|
||||
runApplication -s $i \
|
||||
topoSet -dict system/topoSetDict.${i}
|
||||
|
||||
runApplication -s $i \
|
||||
refineMesh -dict system/refineMeshDict -overwrite
|
||||
done
|
||||
|
||||
runApplication snappyHexMesh -overwrite
|
||||
|
||||
runApplication renumberMesh -noFields -overwrite
|
||||
# Mesh if necessary
|
||||
if ! cloneMesh ../DTCHullMoving . && ! cloneMesh ../DTCHullWave .
|
||||
then
|
||||
./Allmesh
|
||||
fi
|
||||
|
||||
runApplication setFields
|
||||
|
||||
|
||||
@ -5,54 +5,19 @@
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
|
||||
root "";
|
||||
case "";
|
||||
instance "";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object decomposeParDict;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object decomposeParDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 8;
|
||||
|
||||
method scotch;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
n (2 1 1);
|
||||
delta 0.001;
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (1 1 1);
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
metisCoeffs
|
||||
{
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "";
|
||||
}
|
||||
|
||||
distributed no;
|
||||
|
||||
roots
|
||||
(
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
27
tutorials/multiphase/interFoam/RAS/DTCHullMoving/Allmesh
Executable file
27
tutorials/multiphase/interFoam/RAS/DTCHullMoving/Allmesh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Copy DTC hull surface from resources folder
|
||||
cp $FOAM_TUTORIALS/resources/geometry/DTC-scaled.stl.gz constant/triSurface/
|
||||
|
||||
runApplication surfaceFeatures
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
for i in 1 2 3 4 5 6
|
||||
do
|
||||
runApplication -s $i \
|
||||
topoSet -dict system/topoSetDict.${i}
|
||||
|
||||
runApplication -s $i \
|
||||
refineMesh -dict system/refineMeshDict -overwrite
|
||||
done
|
||||
|
||||
runApplication snappyHexMesh -overwrite
|
||||
|
||||
runApplication renumberMesh -noFields -overwrite
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -4,25 +4,11 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# copy DTC hull surface from resources folder
|
||||
cp $FOAM_TUTORIALS/resources/geometry/DTC-scaled.stl.gz constant/triSurface/
|
||||
|
||||
runApplication surfaceFeatures
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
for i in 1 2 3 4 5 6
|
||||
do
|
||||
runApplication -s $i \
|
||||
topoSet -dict system/topoSetDict.${i}
|
||||
|
||||
runApplication -s $i \
|
||||
refineMesh -dict system/refineMeshDict -overwrite
|
||||
done
|
||||
|
||||
runApplication snappyHexMesh -overwrite
|
||||
|
||||
runApplication renumberMesh -noFields -overwrite
|
||||
# Mesh if necessary
|
||||
if ! cloneMesh ../DTCHull . && ! cloneMesh ../DTCHullWave .
|
||||
then
|
||||
./Allmesh
|
||||
fi
|
||||
|
||||
runApplication setFields
|
||||
|
||||
|
||||
@ -5,54 +5,19 @@
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
|
||||
root "";
|
||||
case "";
|
||||
instance "";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object decomposeParDict;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object decomposeParDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 8;
|
||||
|
||||
method scotch;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
n (2 1 1);
|
||||
delta 0.001;
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (1 1 1);
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
metisCoeffs
|
||||
{
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "";
|
||||
}
|
||||
|
||||
distributed no;
|
||||
|
||||
roots
|
||||
(
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -4,13 +4,12 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
# remove surface
|
||||
# Remove surface
|
||||
rm -f constant/triSurface/DTC-scaled.stl.gz > /dev/null 2>&1
|
||||
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
|
||||
rm -f constant/triSurface/DTC-scaled.eMesh > /dev/null 2>&1
|
||||
|
||||
cleanCase
|
||||
rm constant/polyMesh/boundary > /dev/null 2>&1
|
||||
rm system/topoSetDict > /dev/null 2>&1
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
27
tutorials/multiphase/interFoam/RAS/DTCHullWave/Allmesh
Executable file
27
tutorials/multiphase/interFoam/RAS/DTCHullWave/Allmesh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Copy DTC hull surface from resources folder
|
||||
cp $FOAM_TUTORIALS/resources/geometry/DTC-scaled.stl.gz constant/triSurface/
|
||||
|
||||
runApplication surfaceFeatures
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
for i in 1 2 3 4 5 6
|
||||
do
|
||||
runApplication -s $i \
|
||||
topoSet -dict system/topoSetDict.${i}
|
||||
|
||||
runApplication -s $i \
|
||||
refineMesh -dict system/refineMeshDict -overwrite
|
||||
done
|
||||
|
||||
runApplication snappyHexMesh -overwrite
|
||||
|
||||
runApplication renumberMesh -noFields -overwrite
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -1,29 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# copy DTC hull surface from resources folder
|
||||
cp $FOAM_TUTORIALS/resources/geometry/DTC-scaled.stl.gz constant/triSurface/
|
||||
|
||||
runApplication surfaceFeatures
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
for i in 1 2 3 4 5 6
|
||||
do
|
||||
runApplication -s $i \
|
||||
topoSet -dict system/topoSetDict.${i}
|
||||
|
||||
runApplication -s $i \
|
||||
refineMesh -dict system/refineMeshDict -overwrite
|
||||
done
|
||||
|
||||
runApplication snappyHexMesh -overwrite
|
||||
|
||||
runApplication renumberMesh -noFields -overwrite
|
||||
# Mesh if necessary
|
||||
if ! cloneMesh ../DTCHull . && ! cloneMesh ../DTCHullMoving .
|
||||
then
|
||||
./Allmesh
|
||||
fi
|
||||
|
||||
runApplication setWaves
|
||||
|
||||
|
||||
@ -10,7 +10,6 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -19,50 +18,50 @@ convertToMeters 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(-20 -10 -10)
|
||||
(10 -10 -10)
|
||||
(10 0 -10)
|
||||
(-20 0 -10)
|
||||
(-26 -19 -16)
|
||||
(16 -19 -16)
|
||||
(16 0 -16)
|
||||
(-26 0 -16)
|
||||
|
||||
(-20 -10 -1.112)
|
||||
(10 -10 -1.112)
|
||||
(10 0 -1.112)
|
||||
(-20 0 -1.112)
|
||||
(-26 -19 -1)
|
||||
(16 -19 -1)
|
||||
(16 0 -1)
|
||||
(-26 0 -1)
|
||||
|
||||
(-20 -10 0.188)
|
||||
(10 -10 0.188)
|
||||
(10 0 0.188)
|
||||
(-20 0 0.188)
|
||||
(-26 -19 0.185)
|
||||
(16 -19 0.185)
|
||||
(16 0 0.185)
|
||||
(-26 0 0.185)
|
||||
|
||||
(-20 -10 0.244)
|
||||
(10 -10 0.244)
|
||||
(10 0 0.244)
|
||||
(-20 0 0.244)
|
||||
(-26 -19 0.244)
|
||||
(16 -19 0.244)
|
||||
(16 0 0.244)
|
||||
(-26 0 0.244)
|
||||
|
||||
(-20 -10 0.3)
|
||||
(10 -10 0.3)
|
||||
(10 0 0.3)
|
||||
(-20 0 0.3)
|
||||
(-26 -19 0.3)
|
||||
(16 -19 0.3)
|
||||
(16 0 0.3)
|
||||
(-26 0 0.3)
|
||||
|
||||
(-20 -10 1.6)
|
||||
(10 -10 1.6)
|
||||
(10 0 1.6)
|
||||
(-20 0 1.6)
|
||||
(-26 -19 1.6)
|
||||
(16 -19 1.6)
|
||||
(16 0 1.6)
|
||||
(-26 0 1.6)
|
||||
|
||||
(-20 -10 4)
|
||||
(10 -10 4)
|
||||
(10 0 4)
|
||||
(-20 0 4)
|
||||
(-26 -19 4)
|
||||
(16 -19 4)
|
||||
(16 0 4)
|
||||
(-26 0 4)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (30 10 30) simpleGrading (1 1 0.05)
|
||||
hex (4 5 6 7 8 9 10 11) (30 10 40) simpleGrading (1 1 1)
|
||||
hex (8 9 10 11 12 13 14 15) (30 10 4) simpleGrading (1 1 1)
|
||||
hex (12 13 14 15 16 17 18 19) (30 10 4) simpleGrading (1 1 1)
|
||||
hex (16 17 18 19 20 21 22 23) (30 10 40) simpleGrading (1 1 1)
|
||||
hex (20 21 22 23 24 25 26 27) (30 10 10) simpleGrading (1 1 20)
|
||||
hex (0 1 2 3 4 5 6 7) (42 19 50) simpleGrading (1 1 0.05)
|
||||
hex (4 5 6 7 8 9 10 11) (42 19 50) simpleGrading (1 1 1)
|
||||
hex (8 9 10 11 12 13 14 15) (42 19 4) simpleGrading (1 1 1)
|
||||
hex (12 13 14 15 16 17 18 19) (42 19 4) simpleGrading (1 1 1)
|
||||
hex (16 17 18 19 20 21 22 23) (42 19 40) simpleGrading (1 1 1)
|
||||
hex (20 21 22 23 24 25 26 27) (42 19 20) simpleGrading (1 1 5)
|
||||
);
|
||||
|
||||
edges
|
||||
|
||||
@ -38,7 +38,6 @@ solvers
|
||||
"pcorr.*"
|
||||
{
|
||||
solver GAMG;
|
||||
|
||||
smoother DIC;
|
||||
|
||||
tolerance 1e-3;
|
||||
@ -48,7 +47,6 @@ solvers
|
||||
p_rgh
|
||||
{
|
||||
solver GAMG;
|
||||
|
||||
smoother DIC;
|
||||
|
||||
tolerance 5e-8;
|
||||
@ -64,10 +62,9 @@ solvers
|
||||
"(U|k|omega).*"
|
||||
{
|
||||
solver smoothSolver;
|
||||
|
||||
smoother symGaussSeidel;
|
||||
nSweeps 1;
|
||||
|
||||
nSweeps 1;
|
||||
tolerance 1e-7;
|
||||
relTol 0;
|
||||
minIter 1;
|
||||
|
||||
@ -0,0 +1,49 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object setFieldsDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defaultFieldValues
|
||||
(
|
||||
volScalarFieldValue alpha.water 0
|
||||
);
|
||||
|
||||
regions
|
||||
(
|
||||
// Set cell values
|
||||
// (does zerogradient on boundaries)
|
||||
boxToCell
|
||||
{
|
||||
box (-999 -999 -999) (999 999 0.244);
|
||||
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue alpha.water 1
|
||||
);
|
||||
}
|
||||
|
||||
// Set patch values (using ==)
|
||||
boxToFace
|
||||
{
|
||||
box (-999 -999 -999) (999 999 0.244);
|
||||
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue alpha.water 1
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -10,9 +10,9 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object snappyHexMeshDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Which of the steps to run
|
||||
|
||||
@ -24,7 +24,7 @@ actions
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (-4 -5 -3) (10 0 3);
|
||||
box (-10 -6 -3) (10 0 3);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@ -24,7 +24,7 @@ actions
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (-3 -3 -2.5) (10 0 2);
|
||||
box (-5 -3 -2.5) (9 0 2);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@ -24,7 +24,7 @@ actions
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (-2 -1.5 -1) (10 0 1.5);
|
||||
box (-3 -1.5 -1) (8 0 1.5);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@ -24,7 +24,7 @@ actions
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (-1 -1 -0.6) (10 0 1);
|
||||
box (-2 -1 -0.6) (7 0 1);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@ -24,7 +24,7 @@ actions
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (-0.5 -0.6 -0.3) (10 0 0.8);
|
||||
box (-1 -0.6 -0.3) (6.5 0 0.8);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@ -24,7 +24,7 @@ actions
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (-0.25 -0.55 -0.15) (6.25 0 0.65);
|
||||
box (-0.5 -0.55 -0.15) (6.25 0 0.65);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@ -4,7 +4,11 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
./Allmesh
|
||||
# Mesh if necessary
|
||||
if ! cloneMesh ../../../incompressible/pimpleFoam/RAS/propeller .
|
||||
then
|
||||
./Allmesh
|
||||
fi
|
||||
|
||||
runApplication decomposePar
|
||||
|
||||
|
||||
Reference in New Issue
Block a user