Various minor changes to tutorial scripts. In particular, ensuring that they all change to the containing directory so that batches of tutorials can be run easily from the root of the installation.
34 lines
880 B
Bash
Executable File
34 lines
880 B
Bash
Executable File
#!/bin/sh
|
|
cd ${0%/*} || exit 1 # Run from this directory
|
|
|
|
# Source tutorial run functions
|
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
|
|
|
# Copy torus surface from resources directory
|
|
mkdir constant/geometry && cp $FOAM_TUTORIALS/resources/geometry/ballValve-torus.obj.gz constant/geometry
|
|
|
|
# Mesh
|
|
runApplication blockMesh -dict $FOAM_TUTORIALS/resources/blockMesh/ballValve
|
|
runApplication topoSet
|
|
runApplication transformPoints -pointSet ball "Rz=-45"
|
|
|
|
# Create couples
|
|
runApplication createNonConformalCouples -overwrite pipeNonCouple ballNonCouple
|
|
|
|
# Decompose
|
|
runApplication decomposePar -cellProc
|
|
|
|
# Set the value of the scalar transport field
|
|
runParallel setFields
|
|
|
|
# Run
|
|
runParallel $(getApplication);
|
|
|
|
# Reconstruct
|
|
runApplication reconstructPar -newTimes
|
|
|
|
# Plot the flow rates
|
|
./createGraphs
|
|
|
|
#------------------------------------------------------------------------------
|