STYLE: use slash-scoping for foamDictionary usage

Eg, -entry boundaryField/wall2/q  vs. boundaryField.wall2.q

- remove unneeded quoting when calling foamDictionary
This commit is contained in:
Mark Olesen 2018-02-20 13:13:34 +01:00
parent fe140cd6c5
commit 0d3d895d4d
4 changed files with 21 additions and 20 deletions

View File

@ -4,19 +4,22 @@ cd ${0%/*} || exit 1 # Run from this directory
setControlDict() setControlDict()
{ {
foamDictionary -entry "deltaT" -set "1e-05" system/controlDict local dict=system/controlDict
foamDictionary -entry "endTime" -set "0.015" system/controlDict
foamDictionary -entry "writeInterval" -set "50" system/controlDict foamDictionary $dict -entry deltaT -set 1e-05
foamDictionary $dict -entry endTime -set 0.015
foamDictionary $dict -entry writeInterval -set 50
} }
setCombustionProperties() setCombustionProperties()
{ {
foamDictionary -entry "laminarFlameSpeedCorrelation" \ local dict=constant/combustionProperties
-set "RaviPetersen" constant/combustionProperties
foamDictionary -entry "fuel" \ foamDictionary $dict -entry laminarFlameSpeedCorrelation -set RaviPetersen
-set "HydrogenInAir" constant/combustionProperties foamDictionary $dict -entry fuel -set HydrogenInAir
} }
# Do moriyoshiHomogeneous # Do moriyoshiHomogeneous
( cd moriyoshiHomogeneous && foamRunTutorials ) ( cd moriyoshiHomogeneous && foamRunTutorials )

View File

@ -17,22 +17,20 @@ runApplication setFields
if isTest $@ if isTest $@
then then
# Test without chemistry # Test without chemistry
foamDictionary -entry "chemistry" -set "off" constant/chemistryProperties foamDictionary constant/chemistryProperties -entry chemistry -set off
runApplication $application runApplication $application
else else
# Run the application without chemistry until 1500 to let the flow field # Run without chemistry until 1500 to let the flow field develop
# develop foamDictionary system/controlDict -entry writeInterval -set 1500
foamDictionary -entry "writeInterval" -set "1500" system/controlDict foamDictionary system/controlDict -entry endTime -set 1500
foamDictionary -entry "endTime" -set "1500" system/controlDict foamDictionary constant/chemistryProperties -entry chemistry -set off
foamDictionary -entry "chemistry" -set "off" constant/chemistryProperties
runApplication $application runApplication $application
# Run with chemistry until flame reaches its full size
# Run with chemistry until flame reach its full size foamDictionary system/controlDict -entry writeInterval -set 100
foamDictionary -entry "writeInterval" -set "100" system/controlDict foamDictionary system/controlDict -entry endTime -set 5000
foamDictionary -entry "endTime" -set "5000" system/controlDict foamDictionary constant/chemistryProperties -entry chemistry -set on
foamDictionary -entry "chemistry" -set "on" constant/chemistryProperties
runApplication -o $application runApplication -o $application
fi fi

View File

@ -8,7 +8,7 @@ runApplication $(getApplication)
if notTest $@ if notTest $@
then then
foamDictionary system/controlDict -entry endTime -set 5 foamDictionary system/controlDict -entry endTime -set 5
foamDictionary 2/T.liquid -entry boundaryField.wall2.q -set 'uniform 1e5' foamDictionary 2/T.liquid -entry boundaryField/wall2/q -set 'uniform 1e5'
runApplication -a $(getApplication) runApplication -a $(getApplication)
fi fi

View File

@ -8,7 +8,7 @@ runApplication $(getApplication)
if notTest $@ if notTest $@
then then
foamDictionary system/controlDict -entry endTime -set 5 foamDictionary system/controlDict -entry endTime -set 5
foamDictionary 2/T.liquid -entry boundaryField.wall2.q -set 'uniform 1e5' foamDictionary 2/T.liquid -entry boundaryField/wall2/q -set 'uniform 1e5'
runApplication -a $(getApplication) runApplication -a $(getApplication)
fi fi