mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
TUT: adjust tutorials for test loop
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd ${0%/*} || exit 1 # Run from this directory
|
cd "${0%/*}" || exit # Run from this directory
|
||||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
|
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Run serial
|
# Run serial
|
||||||
(cd left && runApplication blockMesh)
|
(cd left && runApplication blockMesh)
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd "${0%/*}" || exit # Run from this directory
|
cd "${0%/*}" || exit # Run from this directory
|
||||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
(cd precursor && ./Allclean)
|
(cd precursor && ./Allclean)
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd "${0%/*}" || exit # Run from this directory
|
cd "${0%/*}" || exit # Run from this directory
|
||||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Run a precursor init case
|
# Run a precursor init case
|
||||||
|
|||||||
@ -7,6 +7,6 @@ vibroAcousticCase="../main"
|
|||||||
|
|
||||||
cleanCase0
|
cleanCase0
|
||||||
|
|
||||||
rm -rf $vibroAcousticCase/constant/boundaryData
|
rm -rf "$vibroAcousticCase"/constant/boundaryData
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|||||||
@ -3,7 +3,8 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
[[ -d constant/polyMesh ]] || runApplication ./Allrun.pre
|
# Generate mesh if required
|
||||||
|
[ -d constant/polyMesh ] || ./Allrun.pre
|
||||||
|
|
||||||
restore0Dir
|
restore0Dir
|
||||||
|
|
||||||
@ -14,7 +15,7 @@ runParallel $(getApplication)
|
|||||||
vibroAcousticCase="../main"
|
vibroAcousticCase="../main"
|
||||||
dataDir="postProcessing/surfaces/window"
|
dataDir="postProcessing/surfaces/window"
|
||||||
|
|
||||||
mkdir -p "$vibroAcousticCase/constant/boundaryData"
|
mkdir -p "$vibroAcousticCase"/constant/boundaryData
|
||||||
cp -rf "$dataDir" "$vibroAcousticCase/constant/boundaryData/window"
|
cp -rf "$dataDir" "$vibroAcousticCase"/constant/boundaryData/window
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd "${0%/*}" || exit # Run from this directory
|
cd "${0%/*}" || exit # Run from this directory
|
||||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
(cd steady && ./Allrun-parallel)
|
(cd steady && ./Allrun-parallel)
|
||||||
|
|||||||
@ -3,7 +3,8 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
[[ -d constant/polyMesh ]] || runApplication ./Allrun.pre
|
# Generate mesh if required
|
||||||
|
[ -d constant/polyMesh ] || ./Allrun.pre
|
||||||
|
|
||||||
runApplication decomposePar
|
runApplication decomposePar
|
||||||
|
|
||||||
|
|||||||
@ -3,14 +3,26 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
[[ -d constant/polyMesh ]] || rm -rf constant/polyMesh
|
parent="../steady"
|
||||||
|
latestTime=$(foamListTimes -case "$parent" -noZero -latestTime)
|
||||||
|
|
||||||
cp -rf ../steady/constant/polyMesh constant
|
if [ -z "$latestTime" ]
|
||||||
|
then
|
||||||
|
echo "FatalError: no latestTime found for $PWD/$parent"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Replace mesh unconditionally
|
||||||
|
rm -rf constant/polyMesh
|
||||||
|
cp -rf "$parent"/constant/polyMesh constant
|
||||||
|
|
||||||
restore0Dir
|
restore0Dir
|
||||||
|
|
||||||
cp -f ../steady/500/U 0/
|
# Restart from steady
|
||||||
cp -f ../steady/500/p 0/
|
cp -f \
|
||||||
|
"$parent/$latestTime"/U \
|
||||||
|
"$parent/$latestTime"/p \
|
||||||
|
0/
|
||||||
|
|
||||||
runApplication $(getApplication)
|
runApplication $(getApplication)
|
||||||
|
|
||||||
|
|||||||
@ -3,14 +3,26 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
[[ -d constant/polyMesh ]] || rm -rf constant/polyMesh
|
parent="../steady"
|
||||||
|
latestTime=$(foamListTimes -case "$parent" -noZero -latestTime)
|
||||||
|
|
||||||
cp -rf ../steady/constant/polyMesh constant
|
if [ -z "$latestTime" ]
|
||||||
|
then
|
||||||
|
echo "FatalError: no latestTime found for $PWD/$parent"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Replace mesh unconditionally
|
||||||
|
rm -rf constant/polyMesh
|
||||||
|
cp -rf "$parent"/constant/polyMesh constant
|
||||||
|
|
||||||
restore0Dir
|
restore0Dir
|
||||||
|
|
||||||
cp -f ../steady/500/U 0/
|
# Restart from steady
|
||||||
cp -f ../steady/500/p 0/
|
cp -f \
|
||||||
|
"$parent/$latestTime"/U \
|
||||||
|
"$parent/$latestTime"/p \
|
||||||
|
0/
|
||||||
|
|
||||||
runApplication decomposePar
|
runApplication decomposePar
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd ${0%/*} || exit 1 # Run from this directory
|
cd "${0%/*}" || exit # Run from this directory
|
||||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
|
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
(cd fluid && ./Allrun.pre)
|
(cd fluid && ./Allrun.pre)
|
||||||
(cd solid && runApplication blockMesh)
|
(cd solid && runApplication blockMesh)
|
||||||
@ -11,9 +12,11 @@ mpirun -app ./mpirun.schema
|
|||||||
# Run parallel
|
# Run parallel
|
||||||
(cd fluid && runApplication decomposePar)
|
(cd fluid && runApplication decomposePar)
|
||||||
(cd solid && runApplication decomposePar)
|
(cd solid && runApplication decomposePar)
|
||||||
|
|
||||||
#mpirun -app ./mpirun.schema_parallel
|
#mpirun -app ./mpirun.schema_parallel
|
||||||
# The problem is keeping the log files separate so use the openmpi
|
# The problem is keeping the log files separate so use the openmpi
|
||||||
# mpirun option to keep the separate outputs in the logs/ directory
|
# mpirun option to keep the separate outputs in the logs/ directory
|
||||||
|
|
||||||
mpirun \
|
mpirun \
|
||||||
--output-filename logs \
|
--output-filename logs \
|
||||||
-np 3 compressibleInterFoam -case fluid -world fluid -parallel : \
|
-np 3 compressibleInterFoam -case fluid -world fluid -parallel : \
|
||||||
|
|||||||
Reference in New Issue
Block a user