mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Get the application from the controlDict where necessary.
This commit is contained in:
@ -50,7 +50,7 @@ elif [ -d "./system" ]
|
||||
then
|
||||
# Normal case.
|
||||
parentDir=`dirname $PWD`
|
||||
application=`basename $parentDir`
|
||||
application=`getApplication`
|
||||
runApplication blockMesh
|
||||
runApplication $application
|
||||
else
|
||||
|
||||
@ -29,6 +29,11 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
getApplication ()
|
||||
{
|
||||
grep application system/controlDict | sed "s/application *\([a-zA-Z]*\);/\1/"
|
||||
}
|
||||
|
||||
runApplication ()
|
||||
{
|
||||
APP_RUN=$1; shift
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application="dnsFoam"
|
||||
# Get application name
|
||||
application=`getApplication`
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication boxTurb
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application directory
|
||||
application="laplacianFoam"
|
||||
# Get application name
|
||||
application=`getApplication`
|
||||
|
||||
runAnsysToFoam()
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application="potentialFoam"
|
||||
application=`getApplication`
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication $application
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application="potentialFoam"
|
||||
application=`getApplication`
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication $application
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
# Set application name
|
||||
application="XiFoam"
|
||||
|
||||
setControlDict () {
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application="engineFoam"
|
||||
# Get application name
|
||||
application=`getApplication`
|
||||
|
||||
runKivaToFoam ()
|
||||
{
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application=${PWD##*/}
|
||||
# Get application name
|
||||
application="rhoCentralFoam"
|
||||
|
||||
cases=" \
|
||||
shockTube \
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application="rhoSonicFoam"
|
||||
# Get application name
|
||||
application=`getApplication`
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication setFields
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application="rhopSonicFoam"
|
||||
application=`getApplication`
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication setFields
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -x
|
||||
|
||||
(cd laminar && ./Allrun)
|
||||
(cd ras && ./Allrun)
|
||||
@ -1,22 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application=sonicFoam
|
||||
|
||||
cases=" \
|
||||
forwardStep \
|
||||
shockTube \
|
||||
"
|
||||
for case in $cases
|
||||
do
|
||||
(cd $case && runApplication blockMesh)
|
||||
#
|
||||
if [ "$case" = "shockTube" ] ; then
|
||||
(cd $case && ./Allrun)
|
||||
else
|
||||
(cd $case && runApplication $application)
|
||||
fi
|
||||
#
|
||||
done
|
||||
@ -2,7 +2,7 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application="sonicFoam"
|
||||
application=`getApplication`
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication setFields
|
||||
|
||||
@ -1,29 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application=${PWD##*/}
|
||||
|
||||
runStarToFoam ()
|
||||
{
|
||||
if [ -f log.starToFoam ] ; then
|
||||
echo "starToFoam already run on $PWD: remove log file to run"
|
||||
else
|
||||
echo "starToFoam: converting mesh $1"
|
||||
starToFoam $1 > log.starToFoam 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
# Do prism
|
||||
(cd prism && foamRunTutorials)
|
||||
|
||||
# Special handling for nacaAirfoil
|
||||
cd nacaAirfoil
|
||||
runStarToFoam prostar/nacaAirfoil
|
||||
mv constant/polyMesh/boundary temp
|
||||
sed -e s/"\([\t ]*type[\t ]*\)symmetryPlane"/"\1empty"/g \
|
||||
temp > constant/polyMesh/boundary
|
||||
rm temp
|
||||
runApplication $application
|
||||
cd ..
|
||||
23
tutorials/compressible/sonicFoam/ras/nacaAirfoil/Allrun
Executable file
23
tutorials/compressible/sonicFoam/ras/nacaAirfoil/Allrun
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name
|
||||
application=`getApplication`
|
||||
|
||||
runStarToFoam ()
|
||||
{
|
||||
if [ -f log.starToFoam ] ; then
|
||||
echo "starToFoam already run on $PWD: remove log file to run"
|
||||
else
|
||||
echo "starToFoam: converting mesh $1"
|
||||
starToFoam $1 > log.starToFoam 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
runStarToFoam prostar/nacaAirfoil
|
||||
mv constant/polyMesh/boundary temp
|
||||
sed -e s/"\([\t ]*type[\t ]*\)symmetryPlane"/"\1empty"/g \
|
||||
temp > constant/polyMesh/boundary
|
||||
rm temp
|
||||
runApplication $application
|
||||
@ -2,11 +2,7 @@ nacaAirfoil
|
||||
~~~~~~~~~~~
|
||||
* large domain with airfoil section near centre
|
||||
* extremely non-orthogonal, highly skew mesh refined around the airfoil
|
||||
* running at Mach 1.78
|
||||
* running at Mach 1.78
|
||||
* limited 0.5 on all laplacianSchemes because the mesh is so poor
|
||||
* run to t = 0.02 with nextWrite; change to stopAt endTime to continue running
|
||||
* deltaT can be increased later in the run to 2e-07
|
||||
|
||||
prism
|
||||
~~~~~
|
||||
* run to t = 0.0014 for convergence
|
||||
* run to t = 0.02 with nextWrite; change to stopAt endTime to continue running
|
||||
* deltaT can be increased later in the run to 2e-07
|
||||
@ -2,8 +2,8 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application=${PWD##*/}
|
||||
# Set application name
|
||||
application="sonicLiquidFoam"
|
||||
|
||||
setDecompressionTankFine ()
|
||||
{
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cd nanoNozzle
|
||||
rm -rf constant/polyMesh/sets
|
||||
rm -rf processor[0-9]
|
||||
cleanCase
|
||||
cd ..
|
||||
@ -1,19 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application="mdFoam"
|
||||
|
||||
cd nanoNozzle
|
||||
runApplication blockMesh
|
||||
|
||||
runApplication decomposePar
|
||||
hostname > system/machines
|
||||
|
||||
runParallel mdInitialise 4 system/machines
|
||||
runParallel $application 4 system/machines
|
||||
|
||||
runApplication reconstructPar
|
||||
cd ..
|
||||
|
||||
8
tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allclean
Executable file
8
tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allclean
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
rm -rf constant/polyMesh/sets
|
||||
rm -rf processor[0-9]
|
||||
cleanCase
|
||||
16
tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allrun
Executable file
16
tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allrun
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application=`getApplication`
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
runApplication decomposePar
|
||||
hostname > system/machines
|
||||
|
||||
runParallel mdInitialise 4 system/machines
|
||||
runParallel $application 4 system/machines
|
||||
|
||||
runApplication reconstructPar
|
||||
@ -2,7 +2,7 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
# Set application name
|
||||
application="mhdFoam"
|
||||
|
||||
(cd hartmann && runApplication blockMesh)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application="buoyantBoussinesqPisoFoam"
|
||||
application=`getApplication`
|
||||
|
||||
compileApplication ../../buoyantPisoFoam/hotRoom/setHotRoom
|
||||
runApplication blockMesh
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application="buoyantBoussinesqSimpleFoam"
|
||||
application=`getApplication`
|
||||
|
||||
compileApplication ../../buoyantPisoFoam/hotRoom/setHotRoom
|
||||
runApplication blockMesh
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application="buoyantPisoFoam"
|
||||
# Get application name
|
||||
application=`getApplication`
|
||||
|
||||
compileApplication setHotRoom
|
||||
runApplication blockMesh
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application="buoyantSimpleFoam"
|
||||
application=`getApplication`
|
||||
|
||||
compileApplication ../../buoyantPisoFoam/hotRoom/setHotRoom
|
||||
runApplication blockMesh
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application="MRFSimpleFoam"
|
||||
application=`getApplication`
|
||||
|
||||
./makeMesh
|
||||
runApplication $application
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application directory
|
||||
application="channelFoam"
|
||||
application=`getApplication`
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication $application
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application=${PWD##*/}
|
||||
# Get application name
|
||||
application="icoFoam"
|
||||
|
||||
cavityCases="cavity cavityFine cavityGrade cavityHighRe cavityClipped"
|
||||
|
||||
|
||||
8
tutorials/incompressible/icoFoam/resetFixedWallsScr
Normal file
8
tutorials/incompressible/icoFoam/resetFixedWallsScr
Normal file
@ -0,0 +1,8 @@
|
||||
/fixedWalls/,/}/{
|
||||
/fixedWalls/p
|
||||
/{/p
|
||||
/type fixedValue;/p
|
||||
s/value[ \t]*nonuniform[ \t]*List<vector>[ \t]*/value uniform (0 0 0);/p
|
||||
/}/p
|
||||
d
|
||||
}
|
||||
@ -1,37 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application="pisoFoam"
|
||||
|
||||
rasCases="cavity"
|
||||
lesCases="pitzDaily pitzDailyDirectMapped"
|
||||
|
||||
computeCase()
|
||||
{
|
||||
if [ -f Allrun ] ; then
|
||||
./Allrun
|
||||
else
|
||||
runApplication blockMesh
|
||||
runApplication $application
|
||||
fi
|
||||
}
|
||||
|
||||
cd ras
|
||||
for case in $rasCases
|
||||
do
|
||||
cd $case
|
||||
computeCase
|
||||
cd ..
|
||||
done
|
||||
cd ..
|
||||
|
||||
cd les
|
||||
for case in $lesCases
|
||||
do
|
||||
cd $case
|
||||
computeCase
|
||||
cd ..
|
||||
done
|
||||
cd ..
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application="pisoFoam"
|
||||
# Get application name
|
||||
application=`getApplication`
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication changeDictionary
|
||||
|
||||
@ -3,6 +3,6 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application="simpleFoam"
|
||||
application=`getApplication`
|
||||
|
||||
runApplication $application
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application="porousExplicitSourceReactingParcelFoam"
|
||||
application=`getApplication`
|
||||
|
||||
# create mesh
|
||||
runApplication blockMesh
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Set application name
|
||||
application="cavitatingFoam"
|
||||
|
||||
refineMeshByCellSet()
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application="cavitatingFoam"
|
||||
application=`getApplication`
|
||||
|
||||
refineMeshByCellSet()
|
||||
{
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application="compressibleInterFoam"
|
||||
# Get application name
|
||||
application=`getApplication`
|
||||
|
||||
runApplication blockMesh
|
||||
cp 0/alpha1.org 0/alpha1
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application="compressibleInterFoam"
|
||||
# Get application name
|
||||
application=`getApplication`
|
||||
|
||||
runApplication blockMesh
|
||||
cp 0/alpha1.org 0/alpha1
|
||||
|
||||
@ -1,48 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application="interFoam"
|
||||
|
||||
laminarCases="damBreak"
|
||||
rasCases="damBreak"
|
||||
lesCases="nozzleFlow2D"
|
||||
|
||||
computeCase()
|
||||
{
|
||||
if [ -f Allrun ] ; then
|
||||
./Allrun
|
||||
else
|
||||
runApplication blockMesh
|
||||
runApplication changeDictionary
|
||||
runApplication $application
|
||||
fi
|
||||
}
|
||||
|
||||
cd laminar
|
||||
for case in $laminarCases
|
||||
do
|
||||
cd $case
|
||||
computeCase
|
||||
cd ..
|
||||
done
|
||||
cd ..
|
||||
|
||||
cd ras
|
||||
for case in $rasCases
|
||||
do
|
||||
cd $case
|
||||
computeCase
|
||||
cd ..
|
||||
done
|
||||
cd ..
|
||||
|
||||
cd les
|
||||
for case in $lesCases
|
||||
do
|
||||
cd $case
|
||||
computeCase
|
||||
cd ..
|
||||
done
|
||||
cd ..
|
||||
@ -3,7 +3,7 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application="MRFInterFoam"
|
||||
application=`getApplication`
|
||||
|
||||
./makeMesh
|
||||
runApplication $application
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
# Set application name
|
||||
application="interFoam"
|
||||
|
||||
setDamBreakFine ()
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application="interFoam"
|
||||
# Get application name
|
||||
application=`getApplication`
|
||||
|
||||
runRefineMesh ()
|
||||
{
|
||||
|
||||
@ -2,7 +2,8 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application="rasInterFoam"
|
||||
# Set application name
|
||||
application="interFoam"
|
||||
|
||||
setDamBreakFine ()
|
||||
{
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application="interFoam"
|
||||
# Get application name
|
||||
application=`getApplication`
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication setFields
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application="settlingFoam"
|
||||
application=`getApplication`
|
||||
|
||||
#runApplication blockMesh
|
||||
runApplication $application
|
||||
|
||||
Reference in New Issue
Block a user