mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' into develop
This commit is contained in:
@ -2,6 +2,17 @@
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
|
||||
|
||||
if isTest $@
|
||||
then
|
||||
# Reset the controlDict
|
||||
if [ -f system/controlDict.orig ]
|
||||
then
|
||||
echo "$0: restoring the controlDict from controlDict.orig"
|
||||
mv system/controlDict.orig system/controlDict
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
application=$(getApplication)
|
||||
|
||||
@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
|
||||
|
||||
# Reset the controlDict
|
||||
if [ -f system/controlDict.orig ]
|
||||
then
|
||||
echo "$0: restoring the controlDict from controlDict.orig"
|
||||
mv system/controlDict.orig system/controlDict
|
||||
fi
|
||||
|
||||
./Allrun
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -5,4 +5,4 @@
|
||||
(cd cylinderMesh && ./Allrun.pre)
|
||||
|
||||
# Add background mesh
|
||||
(cd cylinderAndBackground && ./Allrun)
|
||||
(cd cylinderAndBackground && ./Allrun $*)
|
||||
|
||||
@ -4,55 +4,56 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
setControlDict()
|
||||
{
|
||||
sed \
|
||||
-e "s/\(deltaT[ \t]*\) 5e-06;/\1 1e-05;/g" \
|
||||
-e "s/\(endTime[ \t]*\) 0.005;/\1 0.015;/g" \
|
||||
-e "s/\(writeInterval[ \t]*\) 10;/\1 50;/g" \
|
||||
-i system/controlDict
|
||||
foamDictionary -entry "deltaT" -set "1e-05" system/controlDict
|
||||
foamDictionary -entry "endTime" -set "0.015" system/controlDict
|
||||
foamDictionary -entry "writeInterval" -set "50" system/controlDict
|
||||
}
|
||||
|
||||
setCombustionProperties()
|
||||
{
|
||||
sed \
|
||||
-e "s/\(laminarFlameSpeedCorrelation[ \t]*\) Gulders;/\1 RaviPetersen;/g" \
|
||||
-e "s/\(fuel[ \t]*\) Propane;/\1 HydrogenInAir;/g" \
|
||||
-i constant/combustionProperties
|
||||
foamDictionary -entry "laminarFlameSpeedCorrelation" \
|
||||
-set "RaviPetersen" constant/combustionProperties
|
||||
foamDictionary -entry "fuel" \
|
||||
-set "HydrogenInAir" constant/combustionProperties
|
||||
}
|
||||
|
||||
# Do moriyoshiHomogeneous
|
||||
( cd moriyoshiHomogeneous && foamRunTutorials )
|
||||
|
||||
# Clone case for second phase
|
||||
cloneCase moriyoshiHomogeneous moriyoshiHomogeneousPart2
|
||||
if ! isTest $@
|
||||
then
|
||||
# Clone case for second phase
|
||||
cloneCase moriyoshiHomogeneous moriyoshiHomogeneousPart2
|
||||
|
||||
# Modify and execute
|
||||
(
|
||||
cd moriyoshiHomogeneousPart2 || exit
|
||||
# Modify and execute
|
||||
(
|
||||
cd moriyoshiHomogeneousPart2 || exit
|
||||
|
||||
# The following 2 command lines are a generic implementation of the
|
||||
# following command:
|
||||
# cp -r ../moriyoshiHomogeneous/0.005 .
|
||||
# The following 2 command lines are a generic implementation of the
|
||||
# following command:
|
||||
# cp -r ../moriyoshiHomogeneous/0.005 .
|
||||
|
||||
lastTimeStep=$(foamListTimes -case ../moriyoshiHomogeneous -latestTime)
|
||||
cp -r ../moriyoshiHomogeneous/$lastTimeStep .
|
||||
lastTimeStep=$(foamListTimes -case ../moriyoshiHomogeneous -latestTime)
|
||||
cp -r ../moriyoshiHomogeneous/$lastTimeStep .
|
||||
|
||||
setControlDict
|
||||
runApplication $(getApplication)
|
||||
)
|
||||
setControlDict
|
||||
runApplication $(getApplication)
|
||||
)
|
||||
|
||||
# Clone case for hydrogen
|
||||
cloneCase moriyoshiHomogeneous moriyoshiHomogeneousHydrogen
|
||||
# Clone case for hydrogen
|
||||
cloneCase moriyoshiHomogeneous moriyoshiHomogeneousHydrogen
|
||||
|
||||
# Modify and execute
|
||||
(
|
||||
cd moriyoshiHomogeneousHydrogen || exit
|
||||
# Modify and execute
|
||||
(
|
||||
cd moriyoshiHomogeneousHydrogen || exit
|
||||
|
||||
setCombustionProperties
|
||||
mv constant/thermophysicalProperties \
|
||||
constant/thermophysicalProperties.propane
|
||||
mv constant/thermophysicalProperties.hydrogen \
|
||||
constant/thermophysicalProperties
|
||||
runApplication $(getApplication)
|
||||
)
|
||||
setCombustionProperties
|
||||
mv constant/thermophysicalProperties \
|
||||
constant/thermophysicalProperties.propane
|
||||
mv constant/thermophysicalProperties.hydrogen \
|
||||
constant/thermophysicalProperties
|
||||
runApplication $(getApplication)
|
||||
)
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -9,6 +9,9 @@ runApplication chemkinToFoam \
|
||||
|
||||
runApplication $(getApplication)
|
||||
|
||||
(cd validation && ./Allrun $*)
|
||||
if ! isTest $@
|
||||
then
|
||||
(cd validation && ./Allrun $*)
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -4,6 +4,9 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
runApplication $(getApplication)
|
||||
|
||||
(cd validation && ./Allrun $*)
|
||||
if ! isTest $@
|
||||
then
|
||||
(cd validation && ./Allrun $*)
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -4,6 +4,9 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
runApplication $(getApplication)
|
||||
|
||||
(cd validation && ./Allrun $*)
|
||||
if ! isTest $@
|
||||
then
|
||||
(cd validation && ./Allrun $*)
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -4,6 +4,9 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
runApplication $(getApplication)
|
||||
|
||||
(cd validation && ./Allrun $*)
|
||||
if ! isTest $@
|
||||
then
|
||||
(cd validation && ./Allrun $*)
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -4,6 +4,9 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
runApplication $(getApplication)
|
||||
|
||||
(cd validation && ./Allrun $*)
|
||||
if ! isTest $@
|
||||
then
|
||||
(cd validation && ./Allrun $*)
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -21,6 +21,9 @@ runParallel $(getApplication)
|
||||
paraFoam -touch
|
||||
paraFoam -touch -region panelRegion
|
||||
|
||||
(cd validation && ./createGraphs)
|
||||
if ! isTest $@
|
||||
then
|
||||
(cd validation && ./createGraphs)
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -5,8 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
# Application name
|
||||
application=$(getApplication)
|
||||
|
||||
rm -f 0
|
||||
cp -r 0.orig 0
|
||||
restore0Dir
|
||||
|
||||
runApplication chemkinToFoam \
|
||||
chemkin/grimech30.dat chemkin/thermo30.dat chemkin/transportProperties \
|
||||
@ -15,20 +14,27 @@ runApplication chemkinToFoam \
|
||||
runApplication blockMesh
|
||||
runApplication setFields
|
||||
|
||||
if isTest $@
|
||||
then
|
||||
# Test without chemistry
|
||||
foamDictionary -entry "chemistry" -set "off" constant/chemistryProperties
|
||||
runApplication $application
|
||||
else
|
||||
# Run the application without chemistry until 1500 to let the flow field
|
||||
# develop
|
||||
foamDictionary -entry "writeInterval" -set "1500" system/controlDict
|
||||
foamDictionary -entry "endTime" -set "1500" system/controlDict
|
||||
foamDictionary -entry "chemistry" -set "off" constant/chemistryProperties
|
||||
|
||||
# Run the application without chemistry until 1500 to let the flow field develop
|
||||
foamDictionary -entry "writeInterval" -set "1500" system/controlDict
|
||||
foamDictionary -entry "endTime" -set "1500" system/controlDict
|
||||
foamDictionary -entry "chemistry" -set "off" constant/chemistryProperties
|
||||
|
||||
runApplication $application
|
||||
runApplication $application
|
||||
|
||||
|
||||
# Run with chemistry until flame reach its full size
|
||||
foamDictionary -entry "writeInterval" -set "100" system/controlDict
|
||||
foamDictionary -entry "endTime" -set "5000" system/controlDict
|
||||
foamDictionary -entry "chemistry" -set "on" constant/chemistryProperties
|
||||
# Run with chemistry until flame reach its full size
|
||||
foamDictionary -entry "writeInterval" -set "100" system/controlDict
|
||||
foamDictionary -entry "endTime" -set "5000" system/controlDict
|
||||
foamDictionary -entry "chemistry" -set "on" constant/chemistryProperties
|
||||
|
||||
runApplication -o $application
|
||||
runApplication -o $application
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -5,4 +5,4 @@
|
||||
(cd cylinderMesh && ./Allrun.pre)
|
||||
|
||||
# Add background mesh
|
||||
(cd cylinderAndBackground && ./Allrun)
|
||||
(cd cylinderAndBackground && ./Allrun $*)
|
||||
|
||||
@ -29,20 +29,23 @@ run resolved
|
||||
# Run with the plenum modelled by a boundary condition
|
||||
run modelled
|
||||
|
||||
# Plot a comparison of the pressure in the neck
|
||||
cat << EOF | gnuplot -persist
|
||||
if ! isTest $@
|
||||
then
|
||||
# Plot a comparison of the pressure in the neck
|
||||
cat << EOF | gnuplot -persist
|
||||
|
||||
set terminal postscript eps size 5,4 enhanced color
|
||||
set terminal postscript eps size 5,4 enhanced color
|
||||
|
||||
set xlabel "Time (s)"
|
||||
set ylabel "Guage pressure in the neck (Pa)"
|
||||
set xlabel "Time (s)"
|
||||
set ylabel "Guage pressure in the neck (Pa)"
|
||||
|
||||
set output "pressure.eps"
|
||||
set output "pressure.eps"
|
||||
|
||||
plot \
|
||||
"resolved/postProcessing/probes/0/p" us 1:(\$4-1e5) t "Resolved Plenum" w l, \
|
||||
"modelled/postProcessing/probes/0/p" us 1:(\$4-1e5) t "Modelled Plenum" w l
|
||||
plot \
|
||||
"resolved/postProcessing/probes/0/p" us 1:(\$4-1e5) t "Resolved Plenum" w l, \
|
||||
"modelled/postProcessing/probes/0/p" us 1:(\$4-1e5) t "Modelled Plenum" w l
|
||||
|
||||
EOF
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -26,18 +26,21 @@ setDecompressionTankFine()
|
||||
# Do decompressionTank
|
||||
( cd decompressionTank && foamRunTutorials )
|
||||
|
||||
# Clone case
|
||||
cloneCase decompressionTank decompressionTankFine
|
||||
if ! isTest $@
|
||||
then
|
||||
# Clone case
|
||||
cloneCase decompressionTank decompressionTankFine
|
||||
|
||||
(
|
||||
cd decompressionTankFine || exit
|
||||
(
|
||||
cd decompressionTankFine || exit
|
||||
|
||||
# Modify case
|
||||
setDecompressionTankFine
|
||||
# Modify case
|
||||
setDecompressionTankFine
|
||||
|
||||
# And execute
|
||||
runApplication blockMesh
|
||||
runApplication $(getApplication)
|
||||
)
|
||||
# And execute
|
||||
runApplication blockMesh
|
||||
runApplication $(getApplication)
|
||||
)
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -6,6 +6,9 @@ runApplication blockMesh
|
||||
runApplication $(getApplication)
|
||||
runApplication -s sample postProcess -latestTime -func sample
|
||||
|
||||
runApplication validation/createGraphs
|
||||
if ! istest $@
|
||||
then
|
||||
runApplication validation/createGraphs
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -32,37 +32,39 @@ do
|
||||
rm -rf logs
|
||||
done
|
||||
|
||||
if ! isTest $@
|
||||
then
|
||||
# create validation plot
|
||||
# Test if gnuplot exists on the system
|
||||
command -v gnuplot >/dev/null 2>&1 || {
|
||||
echo "gnuplot not found - skipping graph creation" 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
# create validation plot
|
||||
# Test if gnuplot exists on the system
|
||||
command -v gnuplot >/dev/null 2>&1 || {
|
||||
echo "gnuplot not found - skipping graph creation" 1>&2
|
||||
exit 1
|
||||
}
|
||||
graphName="OF_vs_ANALYTICAL.eps"
|
||||
|
||||
graphName="OF_vs_ANALYTICAL.eps"
|
||||
|
||||
echo "Creating graph of u+ vs y+ to $graphName"
|
||||
gnuplot<<EOF
|
||||
set terminal postscript eps color enhanced
|
||||
set output "$graphName"
|
||||
set grid
|
||||
set xlabel "y+"
|
||||
set ylabel "u+"
|
||||
set key top left
|
||||
set size 0.75, 0.75
|
||||
set parametric
|
||||
# u+ range
|
||||
set trange [0:35]
|
||||
# Spaldings law
|
||||
k=0.41
|
||||
E=9.8
|
||||
f(t) = t + 1/E*(exp(k*t) - 1 - k*t*(1 + 0.5*k*t) - 1/6*k*t**3)
|
||||
set logscale x
|
||||
set format x "10^{%T}"
|
||||
plot f(t),t title "Spalding" with lines linetype -1, \
|
||||
"yPlus_vs_uPlus" title "OpenFOAM" with points lt 1 pt 6
|
||||
echo "Creating graph of u+ vs y+ to $graphName"
|
||||
gnuplot<<EOF
|
||||
set terminal postscript eps color enhanced
|
||||
set output "$graphName"
|
||||
set grid
|
||||
set xlabel "y+"
|
||||
set ylabel "u+"
|
||||
set key top left
|
||||
set size 0.75, 0.75
|
||||
set parametric
|
||||
# u+ range
|
||||
set trange [0:35]
|
||||
# Spaldings law
|
||||
k=0.41
|
||||
E=9.8
|
||||
f(t) = t + 1/E*(exp(k*t) - 1 - k*t*(1 + 0.5*k*t) - 1/6*k*t**3)
|
||||
set logscale x
|
||||
set format x "10^{%T}"
|
||||
plot f(t),t title "Spalding" with lines linetype -1, \
|
||||
"yPlus_vs_uPlus" title "OpenFOAM" with points lt 1 pt 6
|
||||
EOF
|
||||
fi
|
||||
|
||||
echo Done
|
||||
|
||||
|
||||
@ -6,6 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
(cd cylinderMesh && ./Allrun.pre)
|
||||
|
||||
# Add background mesh
|
||||
(cd cylinderAndBackground && ./Allrun)
|
||||
(cd cylinderAndBackground && ./Allrun $*)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -15,7 +15,12 @@ runParallel $(getApplication)
|
||||
|
||||
# Run noise tool for both point and surface
|
||||
|
||||
runParallel -s point noise -dict system/noiseDict-point
|
||||
if ! isTest $@
|
||||
then
|
||||
runParallel -s point noise -dict system/noiseDict-point
|
||||
|
||||
runParallel -s surface noise -dict system/noiseDict-surface
|
||||
fi
|
||||
|
||||
|
||||
runParallel -s surface noise -dict system/noiseDict-surface
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -1,18 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
|
||||
|
||||
rm -f system/blockMeshDict
|
||||
m4 system/blockMeshDict.m4 > system/blockMeshDict
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
restore0Dir
|
||||
|
||||
runApplication decomposePar
|
||||
|
||||
runParallel $(getApplication)
|
||||
|
||||
# Note: not running the noise utility since no pressure data will be generated
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -24,21 +24,25 @@ setDamBreakFine ()
|
||||
# Do damBreak
|
||||
(cd damBreak && foamRunTutorials)
|
||||
|
||||
# Clone case
|
||||
cloneCase damBreak damBreakFine
|
||||
|
||||
(
|
||||
cd damBreakFine || exit
|
||||
if ! isTest $@
|
||||
then
|
||||
# Clone case
|
||||
cloneCase damBreak damBreakFine
|
||||
|
||||
# Modify case
|
||||
setDamBreakFine
|
||||
\cp ../damBreak/0/alpha.water.orig 0/alpha.water
|
||||
# And execute
|
||||
runApplication blockMesh
|
||||
runApplication setFields
|
||||
runApplication decomposePar
|
||||
runParallel $(getApplication)
|
||||
runApplication reconstructPar
|
||||
)
|
||||
(
|
||||
cd damBreakFine || exit
|
||||
|
||||
# Modify case
|
||||
setDamBreakFine
|
||||
\cp ../damBreak/0/alpha.water.orig 0/alpha.water
|
||||
# And execute
|
||||
runApplication blockMesh
|
||||
runApplication setFields
|
||||
runApplication decomposePar
|
||||
runParallel $(getApplication)
|
||||
runApplication reconstructPar
|
||||
)
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -24,21 +24,24 @@ setDamBreakFine ()
|
||||
# Do damBreak
|
||||
(cd damBreak && foamRunTutorials)
|
||||
|
||||
# Clone case
|
||||
cloneCase damBreak damBreakFine
|
||||
if ! isTest $@
|
||||
then
|
||||
# Clone case
|
||||
cloneCase damBreak damBreakFine
|
||||
|
||||
(
|
||||
cd damBreakFine || exit
|
||||
(
|
||||
cd damBreakFine || exit
|
||||
|
||||
# Modify case
|
||||
setDamBreakFine
|
||||
\cp ../damBreak/0/alpha.water.orig 0/alpha.water
|
||||
# And execute
|
||||
runApplication blockMesh
|
||||
runApplication setFields
|
||||
runApplication decomposePar
|
||||
runParallel $(getApplication)
|
||||
runApplication reconstructPar
|
||||
)
|
||||
# Modify case
|
||||
setDamBreakFine
|
||||
\cp ../damBreak/0/alpha.water.orig 0/alpha.water
|
||||
# And execute
|
||||
runApplication blockMesh
|
||||
runApplication setFields
|
||||
runApplication decomposePar
|
||||
runParallel $(getApplication)
|
||||
runApplication reconstructPar
|
||||
)
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -2,8 +2,13 @@
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
|
||||
|
||||
(cd eulerianInjection && ./Allrun)
|
||||
(cd lagrangianParticleInjection && ./Allrun)
|
||||
(cd lagrangianDistributionInjection && ./Allrun)
|
||||
(cd eulerianInjection && ./Allrun $*)
|
||||
|
||||
if ! isTest $@
|
||||
then
|
||||
# Note: particle data only available if running complete case
|
||||
(cd lagrangianParticleInjection && ./Allrun $*)
|
||||
(cd lagrangianDistributionInjection && ./Allrun $*)
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
|
||||
|
||||
(cd eulerianInjection && ./Allrun)
|
||||
|
||||
# Note: only running the Eulerian test - particle data not yet available
|
||||
# (after 1 iter) for subsequent Lagrangian cases
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -4,6 +4,8 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
params=$@
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
cat system/schemesToTest | while read scheme
|
||||
@ -16,6 +18,9 @@ do
|
||||
|
||||
runApplication -s ${schemeTag} scalarTransportFoam
|
||||
|
||||
# Save the line plot
|
||||
mv postProcessing/sample1/100/line1_T.xy line1_T_${schemeTag}.xy
|
||||
if ! isTest $params
|
||||
then
|
||||
# Save the line plot
|
||||
mv postProcessing/sample1/100/line1_T.xy line1_T_${schemeTag}.xy
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user