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()
{
foamDictionary -entry "deltaT" -set "1e-05" system/controlDict
foamDictionary -entry "endTime" -set "0.015" system/controlDict
foamDictionary -entry "writeInterval" -set "50" system/controlDict
local dict=system/controlDict
foamDictionary $dict -entry deltaT -set 1e-05
foamDictionary $dict -entry endTime -set 0.015
foamDictionary $dict -entry writeInterval -set 50
}
setCombustionProperties()
{
foamDictionary -entry "laminarFlameSpeedCorrelation" \
-set "RaviPetersen" constant/combustionProperties
foamDictionary -entry "fuel" \
-set "HydrogenInAir" constant/combustionProperties
local dict=constant/combustionProperties
foamDictionary $dict -entry laminarFlameSpeedCorrelation -set RaviPetersen
foamDictionary $dict -entry fuel -set HydrogenInAir
}
# Do moriyoshiHomogeneous
( cd moriyoshiHomogeneous && foamRunTutorials )

View File

@ -17,22 +17,20 @@ runApplication setFields
if isTest $@
then
# Test without chemistry
foamDictionary -entry "chemistry" -set "off" constant/chemistryProperties
foamDictionary constant/chemistryProperties -entry chemistry -set off
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 without chemistry until 1500 to let the flow field develop
foamDictionary system/controlDict -entry writeInterval -set 1500
foamDictionary system/controlDict -entry endTime -set 1500
foamDictionary constant/chemistryProperties -entry chemistry -set off
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 reaches its full size
foamDictionary system/controlDict -entry writeInterval -set 100
foamDictionary system/controlDict -entry endTime -set 5000
foamDictionary constant/chemistryProperties -entry chemistry -set on
runApplication -o $application
fi

View File

@ -8,7 +8,7 @@ runApplication $(getApplication)
if notTest $@
then
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)
fi

View File

@ -8,7 +8,7 @@ runApplication $(getApplication)
if notTest $@
then
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)
fi