tutorials: Consistency of All* scripts
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.
This commit is contained in:
@ -6,3 +6,5 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
runApplication blockMesh -dict $FOAM_TUTORIALS/resources/blockMesh/angledDuct
|
||||
runApplication $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -6,3 +6,5 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
runApplication blockMesh -dict $FOAM_TUTORIALS/resources/blockMesh/angledDuct
|
||||
runApplication $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
cd ${0%/*} || exit 1
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase && rm -f constant/alpha.*
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
cd ${0%/*} || exit 1
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication foamPostProcess -func generateAlphas
|
||||
runApplication $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
|
||||
@ -1,36 +1,4 @@
|
||||
#!/bin/sh
|
||||
#------------------------------------------------------------------------------
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration | Website: https://openfoam.org
|
||||
# \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM.
|
||||
#
|
||||
# OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Script
|
||||
# createGraphs
|
||||
#
|
||||
# Description
|
||||
# Creates .eps graphs of OpenFOAM results vs experiment for the buoyant
|
||||
# cavity case
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Stop on first error
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
# Functionality is hard-coded for this particular test case
|
||||
# - patch temperatures increased by 1K on each step
|
||||
#
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
echo "Executing dummy external solver"
|
||||
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
@ -7,3 +9,5 @@ cleanCase
|
||||
(cd system && rm -f blockMeshDict.caseBlocks blockMeshDict.caseBoundary)
|
||||
|
||||
rm -rf resolved modelled pressure.eps
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
cd ${0%/*} || exit 1
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Run function links the appropriate mesh files and clones the case
|
||||
@ -30,6 +30,12 @@ run resolved
|
||||
# Run with the plenum modelled by a boundary condition
|
||||
run modelled
|
||||
|
||||
if ! which gnuplot > /dev/null 2>&1
|
||||
then
|
||||
echo "gnuplot not found - skipping graph creation" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Plot a comparison of the pressure in the neck
|
||||
cat << EOF | gnuplot -persist
|
||||
|
||||
@ -45,3 +51,5 @@ plot \
|
||||
"modelled/postProcessing/probes/0/p" us 1:(\$4-1e5) t "Modelled Plenum" w l
|
||||
|
||||
EOF
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
@ -7,3 +8,5 @@ application=$(getApplication)
|
||||
|
||||
runApplication blockMesh -dict $FOAM_TUTORIALS/resources/blockMesh/mixerVessel2D
|
||||
runApplication $application
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
if ! which gnuplot > /dev/null 2>&1
|
||||
then
|
||||
echo 'gnuplot not found - skipping graph creation' >&2
|
||||
echo "gnuplot not found - skipping graph creation" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user