ENH: additional text expansion shortcuts (issue #792)

Support the following expansions when they occur at the start of a
string:

    Short-form       Equivalent
    =========       ===========
      <etc>/          ~OpenFOAM/   (as per foamEtcFile)
      <case>/         $FOAM_CASE/
      <constant>/     $FOAM_CASE/constant/
      <system>/       $FOAM_CASE/system/

These can be used in fileName expansions to improve clarity and reduce
some typing

     "<constant>/reactions"   vs  "$FOAM_CASE/constant/reactions"
This commit is contained in:
Mark Olesen
2018-04-10 13:41:41 +02:00
parent d814bce3ee
commit a9741cea79
67 changed files with 259 additions and 170 deletions

View File

@ -30,6 +30,7 @@ Description
#include "stringOps.H"
#include "dictionary.H"
#include "IOstreams.H"
#include "OSspecific.H"
#include "int.H"
#include "uint.H"
@ -53,6 +54,8 @@ int main(int argc, char *argv[])
" or with '${__UNKNOWN:+unknown}' empty"
);
setEnv("FOAM_CASE", cwd(), true);
dictionary dict;
dict.add("HOME", "myHome");
@ -62,6 +65,38 @@ int main(int argc, char *argv[])
dict.add("FOAM_RUN", subDict);
// basic expansions
{
for
(
const auto& cstr
:
{
"~OpenFOAM/controlDict",
"<etc>/controlDict",
"$FOAM_CASE/test",
"<case>/test",
"$FOAM_CASE/constant/test",
"<case>/constant/test",
"<constant>/test",
"$FOAM_CASE/system/test",
"<case>/system/test",
"<system>/test",
}
)
{
string input(cstr);
string output(stringOps::expand(input));
Info<<"input: " << input << nl
<< "expand: " << output << nl << nl;
}
}
// Test Foam::name with formatting string
{
word formatted = word::printf("formatted=<%X>", 0xdeadbeef);

View File

@ -34,15 +34,93 @@ License
namespace Foam
{
// Standard handling of "~/", "./" etc.
static void standardExpansions(std::string& s)
// Expand a leading <tag>/
// Convenient for frequently used directories
//
// <etc>/ => user/group/other OpenFOAM directory
// <case>/ => FOAM_CASE directory
// <constant>/ => FOAM_CASE/constant directory
// <system>/ => FOAM_CASE/system directory
static void expandLeadingTag(std::string& s, const char b, const char e)
{
if (s[0] != b)
{
return;
}
auto delim = s.find(e);
if (delim == std::string::npos || s[++delim] != '/')
{
return; // Ignore if there is no '/' after <tag>
}
const std::string tag(s, 1, delim-2);
fileName file(s.substr(delim + 1));
if (tag == "etc")
{
s = findEtcFile(file);
}
else if (tag == "case")
{
s = fileName(getEnv("FOAM_CASE"))/file;
}
else if (tag == "constant" || tag == "system")
{
s = fileName(Foam::getEnv("FOAM_CASE"))/tag/file;
}
}
// Expand a leading tilde
// ~/ => home directory
// ~OpenFOAM => user/group/other OpenFOAM directory
// ~user => home directory for specified user
static void expandLeadingTilde(std::string& s)
{
if (s[0] != '~')
{
return;
}
std::string user;
fileName file;
const auto slash = s.find('/');
if (slash == std::string::npos)
{
user = s.substr(1);
}
else
{
user = s.substr(1, slash - 1);
file = s.substr(slash + 1);
}
// NB: be a bit lazy and expand ~unknownUser as an
// empty string rather than leaving it untouched.
// otherwise add extra test
if (user == "OpenFOAM")
{
s = findEtcFile(file);
}
else
{
s = home(user)/file;
}
}
// Expand leading contents: "./", "~..", "<tag>/"
static void expandLeading(std::string& s)
{
if (s.empty())
{
return;
}
if (s[0] == '.')
else if (s[0] == '.')
{
// Expand a lone '.' and an initial './' into cwd
if (s.size() == 1)
@ -54,42 +132,17 @@ static void standardExpansions(std::string& s)
s.std::string::replace(0, 1, cwd());
}
}
else if (s[0] == '<')
{
expandLeadingTag(s, '<', '>');
}
else if (s[0] == '~')
{
// Expand initial ~
// ~/ => home directory
// ~OpenFOAM => site/user OpenFOAM configuration directory
// ~user => home directory for specified user
string user;
fileName file;
const auto slash = s.find('/');
if (slash == std::string::npos)
{
user = s.substr(1);
}
else
{
user = s.substr(1, slash - 1);
file = s.substr(slash + 1);
}
// NB: be a bit lazy and expand ~unknownUser as an
// empty string rather than leaving it untouched.
// otherwise add extra test
if (user == "OpenFOAM")
{
s = findEtcFile(file);
}
else
{
s = home(user)/file;
}
expandLeadingTilde(s);
}
}
}
} // end of namespace Foam
//! \cond fileScope
@ -571,8 +624,7 @@ void Foam::stringOps::inplaceExpand
}
}
// Standard handling of "~/", "./" etc.
standardExpansions(s);
expandLeading(s);
}
@ -869,8 +921,7 @@ void Foam::stringOps::inplaceExpand
}
}
// Standard handling of "~/", "./" etc.
standardExpansions(s);
expandLeading(s);
}

View File

@ -217,10 +217,15 @@ namespace stringOps
// - "$VAR", "${VAR}"
// -# current directory
// - leading "./" : the current directory
// -# leading tag expansion for commonly used directories
// - <etc>/ : user/group/other OpenFOAM directory
// - <case>/ : FOAM_CASE directory
// - <constant>/ : FOAM_CASE/constant directory
// - <system>/ : FOAM_CASE/system directory
// -# tilde expansion
// - leading "~/" : home directory
// - leading "~user" : home directory for specified user
// - leading "~OpenFOAM" : site/user OpenFOAM configuration directory
// - leading "~OpenFOAM" : user/group/other OpenFOAM directory
//
// Supports default and alternative values as per the POSIX shell.
// \code
@ -252,10 +257,15 @@ namespace stringOps
// - "$VAR", "${VAR}"
// -# current directory
// - leading "./" : the current directory
// -# leading tag expansion for commonly used directories
// - <etc>/ : user/group/other OpenFOAM directory
// - <case>/ : FOAM_CASE directory
// - <constant>/ : FOAM_CASE/constant directory
// - <system>/ : FOAM_CASE/system directory
// -# tilde expansion
// - leading "~/" : home directory
// - leading "~user" : home directory for specified user
// - leading "~OpenFOAM" : site/user OpenFOAM configuration directory
// - leading "~OpenFOAM" : user/group/other OpenFOAM directory
//
// Supports default and alternative values as per the POSIX shell.
// \code

View File

@ -118,10 +118,10 @@ sigmaRadialCoeffs
offsetSurfaceCoeffs
{
// Surface that mesh has been meshed to
baseSurface "$FOAM_CASE/constant/triSurface/DTC-scaled-inflated.obj";
baseSurface "<constant>/triSurface/DTC-scaled-inflated.obj";
// Surface to fill in to
offsetSurface "$FOAM_CASE/constant/triSurface/DTC-scaled.obj";
offsetSurface "<constant>/triSurface/DTC-scaled.obj";
}

View File

@ -27,7 +27,7 @@ thermoType
}
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo";
foamChemistryFile "<constant>/reactions";
foamChemistryThermoFile "<constant>/thermo";
// ************************************************************************* //

View File

@ -26,8 +26,8 @@ thermoType
specie specie;
}
CHEMKINFile "$FOAM_CASE/chemkin/chem.inp";
CHEMKINThermoFile "$FOAM_CASE/chemkin/therm.dat";
CHEMKINTransportFile "$FOAM_CASE/chemkin/transportProperties";
CHEMKINFile "<case>/chemkin/chem.inp";
CHEMKINThermoFile "<case>/chemkin/therm.dat";
CHEMKINTransportFile "<case>/chemkin/transportProperties";
// ************************************************************************* //

View File

@ -26,8 +26,8 @@ thermoType
specie specie;
}
CHEMKINFile "$FOAM_CASE/chemkin/chem.inp";
CHEMKINThermoFile "$FOAM_CASE/chemkin/therm.dat";
CHEMKINTransportFile "$FOAM_CASE/chemkin/transportProperties";
CHEMKINFile "<case>/chemkin/chem.inp";
CHEMKINThermoFile "<case>/chemkin/therm.dat";
CHEMKINTransportFile "<case>/chemkin/transportProperties";
// ************************************************************************* //

View File

@ -26,8 +26,8 @@ thermoType
specie specie;
}
CHEMKINFile "$FOAM_CASE/chemkin/chem.inp";
CHEMKINThermoFile "$FOAM_CASE/chemkin/therm.dat";
CHEMKINTransportFile "$FOAM_CASE/chemkin/transportProperties";
CHEMKINFile "<case>/chemkin/chem.inp";
CHEMKINThermoFile "<case>/chemkin/therm.dat";
CHEMKINTransportFile "<case>/chemkin/transportProperties";
// ************************************************************************* //

View File

@ -26,8 +26,8 @@ thermoType
specie specie;
}
CHEMKINFile "$FOAM_CASE/chemkin/chem.inp";
CHEMKINThermoFile "$FOAM_CASE/chemkin/therm.dat";
CHEMKINTransportFile "$FOAM_CASE/chemkin/transportProperties";
CHEMKINFile "<case>/chemkin/chem.inp";
CHEMKINThermoFile "<case>/chemkin/therm.dat";
CHEMKINTransportFile "<case>/chemkin/transportProperties";
// ************************************************************************* //

View File

@ -27,7 +27,7 @@ boundaryField
massFlowRate tableFile;
massFlowRateCoeffs
{
file "$FOAM_CASE/constant/massLossRate";
file "<constant>/massLossRate";
}
value uniform (0 0 0);
}

View File

@ -33,9 +33,9 @@ fuel C7H16;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions";
foamChemistryFile "<constant>/reactions";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGas";
foamChemistryThermoFile "<constant>/thermo.compressibleGas";
dpdt no;

View File

@ -28,9 +28,9 @@ thermoType
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/pyrolysisRegion/reactions";
foamChemistryFile "<constant>/pyrolysisRegion/reactions";
foamChemistryThermoFile "$FOAM_CASE/constant/pyrolysisRegion/thermo.solid";
foamChemistryThermoFile "<constant>/pyrolysisRegion/thermo.solid";
gasThermoType
{

View File

@ -32,9 +32,9 @@ fuel C3H8;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions";
foamChemistryFile "<constant>/reactions";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGas";
foamChemistryThermoFile "<constant>/thermo.compressibleGas";
liquids
{

View File

@ -28,9 +28,9 @@ thermoType
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/panelRegion/reactions";
foamChemistryFile "<constant>/panelRegion/reactions";
foamChemistryThermoFile "$FOAM_CASE/constant/panelRegion/thermo.solid";
foamChemistryThermoFile "<constant>/panelRegion/thermo.solid";
gasThermoType
{

View File

@ -32,9 +32,9 @@ fuel C3H8;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions";
foamChemistryFile "<constant>/reactions";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGas";
foamChemistryThermoFile "<constant>/thermo.compressibleGas";
// ************************************************************************* //

View File

@ -28,9 +28,9 @@ thermoType
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/panelRegion/reactions";
foamChemistryFile "<constant>/panelRegion/reactions";
foamChemistryThermoFile "$FOAM_CASE/constant/panelRegion/thermo.solid";
foamChemistryThermoFile "<constant>/panelRegion/thermo.solid";
gasThermoType
{

View File

@ -33,8 +33,8 @@ fuel CH4;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions";
foamChemistryFile "<constant>/reactions";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGas";
foamChemistryThermoFile "<constant>/thermo.compressibleGas";
// ************************************************************************* //

View File

@ -32,9 +32,9 @@ fuel CH4;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions";
foamChemistryFile "<constant>/reactions";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGas";
foamChemistryThermoFile "<constant>/thermo.compressibleGas";
// ************************************************************************* //

View File

@ -32,9 +32,9 @@ fuel CH4;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions";
foamChemistryFile "<constant>/reactions";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGas";
foamChemistryThermoFile "<constant>/thermo.compressibleGas";
// ************************************************************************* //

View File

@ -32,9 +32,9 @@ fuel CH4;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions";
foamChemistryFile "<constant>/reactions";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGas";
foamChemistryThermoFile "<constant>/thermo.compressibleGas";
// ************************************************************************* //

View File

@ -30,7 +30,7 @@ thermoType
inertSpecie N2;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactionsGRI";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGasGRI";
foamChemistryFile "<constant>/reactionsGRI";
foamChemistryThermoFile "<constant>/thermo.compressibleGasGRI";
// ************************************************************************* //

View File

@ -29,7 +29,7 @@ thermoType
inertSpecie N2;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactionsGRI";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGasGRI";
foamChemistryFile "<constant>/reactionsGRI";
foamChemistryThermoFile "<constant>/thermo.compressibleGasGRI";
// ************************************************************************* //

View File

@ -31,7 +31,7 @@ boundaryField
componentColumns ( 2 );
separator ",";
mergeSeparators no;
file "$FOAM_CASE/constant/inlet.csv";
file "<constant>/inlet.csv";
}
}
outlet

View File

@ -30,7 +30,7 @@ boundaryField
componentColumns ( 1 );
separator ",";
mergeSeparators no;
file "$FOAM_CASE/constant/inlet.csv";
file "<constant>/inlet.csv";
}

View File

@ -30,8 +30,8 @@ thermoType
inertSpecie N2;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactionsGRI";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGasGRI";
foamChemistryFile "<constant>/reactionsGRI";
foamChemistryThermoFile "<constant>/thermo.compressibleGasGRI";
dpdt false;

View File

@ -30,9 +30,9 @@ inertSpecie N2;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions";
foamChemistryFile "<constant>/reactions";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGas";
foamChemistryThermoFile "<constant>/thermo.compressibleGas";
// ************************************************************************* //

View File

@ -30,9 +30,9 @@ inertSpecie N2;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions";
foamChemistryFile "<constant>/reactions";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGas";
foamChemistryThermoFile "<constant>/thermo.compressibleGas";
// ************************************************************************* //

View File

@ -29,8 +29,8 @@ thermoType
inertSpecie N2;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactionsGRI";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGasGRI";
foamChemistryFile "<constant>/reactionsGRI";
foamChemistryThermoFile "<constant>/thermo.compressibleGasGRI";
// ************************************************************************* //

View File

@ -29,8 +29,8 @@ thermoType
inertSpecie N2;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactionsGRI";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGasGRI";
foamChemistryFile "<constant>/reactionsGRI";
foamChemistryThermoFile "<constant>/thermo.compressibleGasGRI";
// ************************************************************************* //

View File

@ -29,8 +29,8 @@ thermoType
inertSpecie N2;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactionsGRI";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGasGRI";
foamChemistryFile "<constant>/reactionsGRI";
foamChemistryThermoFile "<constant>/thermo.compressibleGasGRI";
// ************************************************************************* //

View File

@ -91,10 +91,10 @@ sigmaRadialCoeffs
offsetSurfaceCoeffs
{
// Surface that mesh has been meshed to
baseSurface "$FOAM_CASE/constant/triSurface/DTC-scaled-inflated.obj";
baseSurface "<constant>/triSurface/DTC-scaled-inflated.obj";
// Surface to fill in to
offsetSurface "$FOAM_CASE/constant/triSurface/DTC-scaled.obj";
offsetSurface "<constant>/triSurface/DTC-scaled.obj";
}

View File

@ -14,7 +14,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "${FOAM_CASE}/constant/caseSettings"
#include "<constant>/caseSettings"
dimensions [0 0 0 1 0 0 0];

View File

@ -15,7 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "${FOAM_CASE}/constant/caseSettings"
#include "<constant>/caseSettings"
dimensions [0 1 -1 0 0 0 0];

View File

@ -15,7 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "${FOAM_CASE}/constant/caseSettings"
#include "<constant>/caseSettings"
dimensions [1 -1 -1 0 0 0 0];

View File

@ -15,7 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "${FOAM_CASE}/constant/caseSettings"
#include "<constant>/caseSettings"
dimensions [0 2 -3 0 0 0 0];

View File

@ -15,7 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "${FOAM_CASE}/constant/caseSettings"
#include "<constant>/caseSettings"
dimensions [0 2 -2 0 0 0 0];

View File

@ -15,7 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "${FOAM_CASE}/constant/caseSettings"
#include "<constant>/caseSettings"
dimensions [0 2 -1 0 0 0 0];

View File

@ -15,7 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "${FOAM_CASE}/constant/caseSettings"
#include "<constant>/caseSettings"
dimensions [1 -1 -2 0 0 0 0];

View File

@ -36,6 +36,6 @@ meshMotionProperties
omega 25; // rad/s
}
#include "${FOAM_CASE}/constant/boundaryConditions"
#include "<constant>/boundaryConditions"
// ************************************************************************* //

View File

@ -15,7 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "${FOAM_CASE}/constant/caseSettings"
#include "<constant>/caseSettings"
dynamicFvMesh dynamicMotionSolverFvMesh;

View File

@ -4,7 +4,7 @@ ABORT
{
type abort;
libs ("libutilityFunctionObjects.so");
//file "$FOAM_CASE/ABORT"; // default name
//file "<case>/ABORT"; // default name
// action writeNow;
action nextWrite;
}

View File

@ -1,22 +1,18 @@
// -*- C++ -*-
// control for external coupled simulation
// Control for external coupled simulation
externalCoupled
{
// Where to load it from (if not already in solver)
libs ("libfieldFunctionObjects.so");
type externalCoupled;
type externalCoupled;
libs ("libfieldFunctionObjects.so");
log true;
// Directory to use for communication
commsDir "${FOAM_CASE}/comms";
commsDir "<case>/comms";
// Does external process start first
initByExternal true;
// Additional output
log true;
regions
{
// Region name (wildcards allowed)

View File

@ -73,14 +73,14 @@ functions
writeControl timeStep;
writeInterval 1;
region cabin;
fileToUpdate "$FOAM_CASE/system/solverControls";
fileToUpdate "<system>/solverControls";
timeVsFile
(
( 1 "$FOAM_CASE/system/solverControls.0" )
( 5 "$FOAM_CASE/system/solverControls.5")
( 20 "$FOAM_CASE/system/solverControls.20")
( 60 "$FOAM_CASE/system/solverControls.60")
( 1 "<system>/solverControls.0" )
( 5 "<system>/solverControls.5" )
( 20 "<system>/solverControls.20")
( 60 "<system>/solverControls.60")
);
}
}

View File

@ -1,14 +1,14 @@
// -*- C++ -*-
// control for external coupled simulation
// Control for external coupled simulation
externalCoupled
{
libs ("libfieldFunctionObjects.so");
type externalCoupled;
libs ("libfieldFunctionObjects.so");
log true;
// Directory to use for communication
commsDir "${FOAM_CASE}/comms";
commsDir "<case>/comms";
// Does external process start first
initByExternal true;
@ -16,9 +16,6 @@ externalCoupled
// Frequency of coupling
calcFrequency 4;
// Additional output
log true;
regions
{
// Region name (wildcards allowed)

View File

@ -69,7 +69,7 @@ communication
inputFormat dictionary;
outputFormat dictionary;
debugTable "$FOAM_CASE/output.txt";
debugTable "<case>/output.txt";
}
// ************************************************************************* //

View File

@ -118,10 +118,10 @@ sigmaRadialCoeffs
offsetSurfaceCoeffs
{
// Surface that mesh has been meshed to
baseSurface "$FOAM_CASE/constant/triSurface/DTC-scaled-inflated.obj";
baseSurface "<constant>/triSurface/DTC-scaled-inflated.obj";
// Surface to fill in to
offsetSurface "$FOAM_CASE/constant/triSurface/DTC-scaled.obj";
offsetSurface "<constant>/triSurface/DTC-scaled.obj";
}

View File

@ -28,7 +28,7 @@ boundaryField
direction in;
readerType openFoam;
hasHeaderLine true;
file "$FOAM_CASE/constant/FluxVsdP.dat";
file "<constant>/FluxVsdP.dat";
//nonDimensional true;
//rpm 300;
//dm 2e-2;

View File

@ -73,7 +73,7 @@ postPro1
surface1
{
type geometry;
files ("$FOAM_CASE/constant/triSurface/motorBike.obj.gz");
files ("<constant>/triSurface/motorBike.obj.gz");
renderMode phong;
representation surface;
edgeColour (0 0 0);

View File

@ -28,9 +28,9 @@ thermoType
chemistryReader foamChemistryReader;
foamChemistryThermoFile "$FOAM_CASE/constant/foam.dat";
foamChemistryThermoFile "<constant>/foam.dat";
foamChemistryFile "$FOAM_CASE/constant/foam.inp";
foamChemistryFile "<constant>/foam.inp";
inertSpecie N2;

View File

@ -30,9 +30,9 @@ inertSpecie N2;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions";
foamChemistryFile "<constant>/reactions";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGas";
foamChemistryThermoFile "<constant>/thermo.compressibleGas";
// ************************************************************************* //

View File

@ -28,9 +28,9 @@ thermoType
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/foam.inp";
foamChemistryFile "<constant>/foam.inp";
foamChemistryThermoFile "$FOAM_CASE/constant/foam.dat";
foamChemistryThermoFile "<constant>/foam.dat";
inertSpecie N2;

View File

@ -30,9 +30,9 @@ dpdt no;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions";
foamChemistryFile "<constant>/reactions";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.incompressiblePoly";
foamChemistryThermoFile "<constant>/thermo.incompressiblePoly";
liquids
{

View File

@ -28,9 +28,9 @@ thermoType
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/foam.inp";
foamChemistryFile "<constant>/foam.inp";
foamChemistryThermoFile "$FOAM_CASE/constant/foam.dat";
foamChemistryThermoFile "<constant>/foam.dat";
inertSpecie N2;

View File

@ -30,9 +30,9 @@ dpdt no;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions";
foamChemistryFile "<constant>/reactions";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.incompressiblePoly";
foamChemistryThermoFile "<constant>/thermo.incompressiblePoly";
inertSpecie air;

View File

@ -28,9 +28,9 @@ thermoType
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/foam.inp";
foamChemistryFile "<constant>/foam.inp";
foamChemistryThermoFile "$FOAM_CASE/constant/foam.dat";
foamChemistryThermoFile "<constant>/foam.dat";
inertSpecie N2;

View File

@ -28,9 +28,9 @@ thermoType
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/foam.inp";
foamChemistryFile "<constant>/foam.inp";
foamChemistryThermoFile "$FOAM_CASE/constant/foam.dat";
foamChemistryThermoFile "<constant>/foam.dat";
inertSpecie N2;

View File

@ -30,9 +30,9 @@ dpdt no;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions";
foamChemistryFile "<constant>/reactions";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.incompressiblePoly";
foamChemistryThermoFile "<constant>/thermo.incompressiblePoly";
inertSpecie air;

View File

@ -28,9 +28,9 @@ thermoType
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions";
foamChemistryFile "<constant>/reactions";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.incompressiblePoly";
foamChemistryThermoFile "<constant>/thermo.incompressiblePoly";
inertSpecie air;

View File

@ -28,9 +28,9 @@ thermoType
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions";
foamChemistryFile "<constant>/reactions";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.incompressiblePoly";
foamChemistryThermoFile "<constant>/thermo.incompressiblePoly";
inertSpecie air;

View File

@ -26,9 +26,9 @@ thermoType
specie specie;
}
CHEMKINFile "$FOAM_CASE/chemkin/chem.inp";
CHEMKINThermoFile "$FOAM_CASE/chemkin/therm.dat";
CHEMKINTransportFile "$FOAM_CASE/chemkin/transportProperties";
CHEMKINFile "<case>/chemkin/chem.inp";
CHEMKINThermoFile "<case>/chemkin/therm.dat";
CHEMKINTransportFile "<case>/chemkin/transportProperties";
newFormat yes;

View File

@ -30,9 +30,9 @@ dpdt no;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions";
foamChemistryFile "<constant>/reactions";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.incompressiblePoly";
foamChemistryThermoFile "<constant>/thermo.incompressiblePoly";
liquids
{

View File

@ -15,8 +15,8 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "$FOAM_CASE/constant/dynamicMeshDict"
#include "$FOAM_CASE/system/blockMeshDict"
#include "<constant>/dynamicMeshDict"
#include "<system>/blockMeshDict"
dimensions [0 1 0 0 0 0 0];

View File

@ -20,7 +20,7 @@ FoamFile
pointSync false;
// Patches to create. An empty patch list just removes patches with zero
// faces from $FOAM_CASE/constant/polyMesh/boundary.
// faces from <constant>/polyMesh/boundary.
patches
(
);

View File

@ -22,7 +22,7 @@ motionSolver solidBody;
solidBodyMotionFunction tabulated6DoFMotion;
CofG (0 0 0);
timeDataFileName "$FOAM_CASE/constant/6DoF.dat";
timeDataFileName "<constant>/6DoF.dat";
// ************************************************************************* //

View File

@ -30,9 +30,9 @@ inertSpecie AIR;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions.gas";
foamChemistryFile "<constant>/reactions.gas";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.gas";
foamChemistryThermoFile "<constant>/thermo.gas";
// ************************************************************************* //

View File

@ -37,7 +37,7 @@ inertSpecie water;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions.gas";
foamChemistryFile "<constant>/reactions.gas";
water
{

View File

@ -37,7 +37,7 @@ inertSpecie water;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions.gas";
foamChemistryFile "<constant>/reactions.gas";
water
{