mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add read guard for dimensionedType constructors (#762)
- deprecate dimensionedType constructors using an Istream in favour of
versions accepting a keyword and a dictionary.
Dictionary entries are almost the exclusive means of read
constructing a dimensionedType. By construct from the dictionary
entry instead of doing a lookup() first, we can detect possible
input errors such as too many tokens as a result of a input syntax
error.
Constructing a dimensionedType from a dictionary entry now has
two forms.
1. dimensionedType(key, dims, dict);
This is the constructor that will normally be used.
It accepts entries with optional leading names and/or
dimensions. If the entry contains dimensions, they are
verified against the expected dimensions and an IOError is
raised if they do not correspond. On conclusion, checks the
token stream for any trailing rubbish.
2. dimensionedType(key, dict);
This constructor is used less frequently.
Similar to the previous description, except that it is initially
dimensionless. If entry contains dimensions, they are used
without further verification. The constructor also includes a
token stream check.
This constructor is useful when the dimensions are entirely
defined from the dictionary input, but also when handling
transition code where the input dimensions are not obvious from
the source.
This constructor can also be handy when obtaining values from
a dictionary without needing to worry about the input dimensions.
For example,
Info<< "rho: " << dimensionedScalar("rho", dict).value() << nl;
This will accept a large range of inputs without hassle.
ENH: consistent handling of dimensionedType for inputs (#1083)
BUG: incorrect Omega dimensions (fixes #2084)
This commit is contained in:
@ -31,11 +31,6 @@ IOdictionary transportProperties
|
|||||||
|
|
||||||
Info<< "Reading diffusivity DT\n" << endl;
|
Info<< "Reading diffusivity DT\n" << endl;
|
||||||
|
|
||||||
dimensionedScalar DT
|
dimensionedScalar DT("DT", dimViscosity, transportProperties);
|
||||||
(
|
|
||||||
"DT",
|
|
||||||
dimArea/dimTime,
|
|
||||||
transportProperties
|
|
||||||
);
|
|
||||||
|
|
||||||
#include "createFvOptions.H"
|
#include "createFvOptions.H"
|
||||||
|
|||||||
@ -47,7 +47,4 @@
|
|||||||
|
|
||||||
Info<< "Reading diffusivity DT\n" << endl;
|
Info<< "Reading diffusivity DT\n" << endl;
|
||||||
|
|
||||||
dimensionedScalar DT
|
dimensionedScalar DT("DT", dimViscosity, transportProperties);
|
||||||
(
|
|
||||||
transportProperties.lookup("DT")
|
|
||||||
);
|
|
||||||
|
|||||||
@ -47,12 +47,7 @@ IOdictionary transportProperties
|
|||||||
|
|
||||||
Info<< "Reading diffusivity DT\n" << endl;
|
Info<< "Reading diffusivity DT\n" << endl;
|
||||||
|
|
||||||
dimensionedScalar DT
|
dimensionedScalar DT("DT", dimViscosity, transportProperties);
|
||||||
(
|
|
||||||
"DT",
|
|
||||||
dimArea/dimTime,
|
|
||||||
transportProperties
|
|
||||||
);
|
|
||||||
|
|
||||||
#include "createPhi.H"
|
#include "createPhi.H"
|
||||||
|
|
||||||
|
|||||||
@ -49,8 +49,8 @@ Foam::XiGModels::instabilityG::instabilityG
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
XiGModel(XiGProperties, thermo, turbulence, Su),
|
XiGModel(XiGProperties, thermo, turbulence, Su),
|
||||||
GIn_(XiGModelCoeffs_.lookup("GIn")),
|
GIn_("GIn", dimless/dimTime, XiGModelCoeffs_),
|
||||||
lambdaIn_(XiGModelCoeffs_.lookup("lambdaIn")),
|
lambdaIn_("lambdaIn", dimLength, XiGModelCoeffs_),
|
||||||
XiGModel_(XiGModel::New(XiGModelCoeffs_, thermo, turbulence, Su))
|
XiGModel_(XiGModel::New(XiGModelCoeffs_, thermo, turbulence, Su))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -408,7 +408,7 @@ Foam::laminarFlameSpeedModels::SCOPE::Ma() const
|
|||||||
(
|
(
|
||||||
dimensionedScalar
|
dimensionedScalar
|
||||||
(
|
(
|
||||||
psiuReactionThermo_.lookup("stoichiometricAirFuelMassRatio")
|
"stoichiometricAirFuelMassRatio", dimless, psiuReactionThermo_
|
||||||
)*ft/(scalar(1) - ft)
|
)*ft/(scalar(1) - ft)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -449,7 +449,7 @@ Foam::laminarFlameSpeedModels::SCOPE::operator()() const
|
|||||||
psiuReactionThermo_.Tu(),
|
psiuReactionThermo_.Tu(),
|
||||||
dimensionedScalar
|
dimensionedScalar
|
||||||
(
|
(
|
||||||
psiuReactionThermo_.lookup("stoichiometricAirFuelMassRatio")
|
"stoichiometricAirFuelMassRatio", dimless, psiuReactionThermo_
|
||||||
)*ft/(scalar(1) - ft)
|
)*ft/(scalar(1) - ft)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,34 +12,34 @@
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
word SuModel
|
const word SuModel
|
||||||
(
|
(
|
||||||
combustionProperties.lookup("SuModel")
|
combustionProperties.get<word>("SuModel")
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar sigmaExt
|
dimensionedScalar sigmaExt
|
||||||
(
|
(
|
||||||
combustionProperties.lookup("sigmaExt")
|
"sigmaExt", dimless/dimTime, combustionProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
word XiModel
|
const word XiModel
|
||||||
(
|
(
|
||||||
combustionProperties.lookup("XiModel")
|
combustionProperties.get<word>("XiModel")
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar XiCoef
|
dimensionedScalar XiCoef
|
||||||
(
|
(
|
||||||
combustionProperties.lookup("XiCoef")
|
"XiCoef", dimless, combustionProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar XiShapeCoef
|
dimensionedScalar XiShapeCoef
|
||||||
(
|
(
|
||||||
combustionProperties.lookup("XiShapeCoef")
|
"XiShapeCoef", dimless, combustionProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar uPrimeCoef
|
dimensionedScalar uPrimeCoef
|
||||||
(
|
(
|
||||||
combustionProperties.lookup("uPrimeCoef")
|
"uPrimeCoef", dimless, combustionProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
ignition ign(combustionProperties, runTime, mesh);
|
ignition ign(combustionProperties, runTime, mesh);
|
||||||
|
|||||||
@ -14,12 +14,16 @@
|
|||||||
|
|
||||||
dimensionedScalar epsilon0
|
dimensionedScalar epsilon0
|
||||||
(
|
(
|
||||||
physicalProperties.lookup("epsilon0")
|
"epsilon0",
|
||||||
|
dimensionSet(-1, -3, 4, 0, 0, 2, 0),
|
||||||
|
physicalProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar k
|
dimensionedScalar k
|
||||||
(
|
(
|
||||||
physicalProperties.lookup("k")
|
"k",
|
||||||
|
dimensionSet(-1, 0, 2, 0, 0, 1, 0),
|
||||||
|
physicalProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -16,21 +16,21 @@ dimensionedScalar strike
|
|||||||
(
|
(
|
||||||
"strike",
|
"strike",
|
||||||
dimLength,
|
dimLength,
|
||||||
financialProperties.lookup("strike")
|
financialProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar r
|
dimensionedScalar r
|
||||||
(
|
(
|
||||||
"r",
|
"r",
|
||||||
dimless/dimTime,
|
dimless/dimTime,
|
||||||
financialProperties.lookup("r")
|
financialProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar sigma
|
dimensionedScalar sigma
|
||||||
(
|
(
|
||||||
"sigma",
|
"sigma",
|
||||||
dimensionSet(0, 0, -0.5, 0, 0),
|
dimensionSet(0, 0, -0.5, 0, 0),
|
||||||
financialProperties.lookup("sigma")
|
financialProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar sigmaSqr = sqr(sigma);
|
dimensionedScalar sigmaSqr = sqr(sigma);
|
||||||
|
|||||||
@ -10,32 +10,12 @@ IOdictionary transportProperties
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar mug
|
dimensionedScalar mug("mug", dimViscosity, transportProperties);
|
||||||
(
|
dimensionedScalar mul("mul", dimViscosity, transportProperties);
|
||||||
transportProperties.lookup("mug")
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar mul
|
dimensionedScalar rhog("rhog", dimDensity, transportProperties);
|
||||||
(
|
dimensionedScalar rhol("rhol", dimDensity, transportProperties);
|
||||||
transportProperties.lookup("mul")
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar sigma
|
dimensionedScalar sigma("sigma", dimMass/sqr(dimTime), transportProperties);
|
||||||
(
|
|
||||||
transportProperties.lookup("sigma")
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar rhol
|
dimensionedScalar h0("h0", dimLength, transportProperties);
|
||||||
(
|
|
||||||
transportProperties.lookup("rhol")
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar rhog
|
|
||||||
(
|
|
||||||
transportProperties.lookup("rhog")
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar h0
|
|
||||||
(
|
|
||||||
transportProperties.lookup("h0")
|
|
||||||
);
|
|
||||||
|
|||||||
@ -12,25 +12,13 @@ areaScalarField Cs
|
|||||||
aMesh
|
aMesh
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensioned<scalar> Cs0
|
dimensionedScalar Cs0("Cs0", dimMass/dimArea, 1.0);
|
||||||
(
|
|
||||||
"Cs0",
|
|
||||||
dimensionSet(1, -2, 0, 0, 0, 0, 0),
|
|
||||||
1.0
|
|
||||||
);
|
|
||||||
|
|
||||||
const areaVectorField& R = aMesh.areaCentres();
|
const areaVectorField& R = aMesh.areaCentres();
|
||||||
|
|
||||||
Cs = Cs0*(1.0 + R.component(vector::X)/mag(R));
|
Cs = Cs0*(1.0 + R.component(vector::X)/mag(R));
|
||||||
|
|
||||||
|
dimensionedScalar Ds("Ds", dimViscosity, 1.0);
|
||||||
dimensioned<scalar> Ds
|
|
||||||
(
|
|
||||||
"Ds",
|
|
||||||
dimensionSet(0, 2, -1, 0, 0, 0, 0),
|
|
||||||
1.0
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
areaVectorField Us
|
areaVectorField Us
|
||||||
(
|
(
|
||||||
|
|||||||
@ -29,10 +29,7 @@ IOdictionary transportProperties
|
|||||||
|
|
||||||
Info<< "Reading diffusivity D\n" << endl;
|
Info<< "Reading diffusivity D\n" << endl;
|
||||||
|
|
||||||
dimensionedScalar Ds
|
dimensionedScalar Ds("Ds", dimViscosity, transportProperties);
|
||||||
(
|
|
||||||
transportProperties.lookup("Ds")
|
|
||||||
);
|
|
||||||
|
|
||||||
areaVectorField Us
|
areaVectorField Us
|
||||||
(
|
(
|
||||||
|
|||||||
@ -16,7 +16,7 @@ dimensionedScalar nu
|
|||||||
(
|
(
|
||||||
"nu",
|
"nu",
|
||||||
dimViscosity,
|
dimViscosity,
|
||||||
transportProperties.lookup("nu")
|
transportProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Reading field p\n" << endl;
|
Info<< "Reading field p\n" << endl;
|
||||||
|
|||||||
@ -12,12 +12,13 @@ IOdictionary gravitationalProperties
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
const dimensionedVector g(gravitationalProperties.lookup("g"));
|
const dimensionedVector g("g", dimAcceleration, gravitationalProperties);
|
||||||
const bool rotating(gravitationalProperties.get<bool>("rotating"));
|
const bool rotating(gravitationalProperties.get<bool>("rotating"));
|
||||||
const dimensionedVector Omega =
|
const dimensionedVector Omega =
|
||||||
(
|
(
|
||||||
rotating ? gravitationalProperties.lookup("Omega")
|
rotating
|
||||||
: dimensionedVector("Omega", -dimTime, vector(0,0,0))
|
? dimensionedVector("Omega", dimless/dimTime, gravitationalProperties)
|
||||||
|
: dimensionedVector("Omega", dimless/dimTime, Zero)
|
||||||
);
|
);
|
||||||
const dimensionedScalar magg = mag(g);
|
const dimensionedScalar magg = mag(g);
|
||||||
const dimensionedVector gHat = g/magg;
|
const dimensionedVector gHat = g/magg;
|
||||||
|
|||||||
@ -72,10 +72,7 @@ dimensionedScalar rhocValue
|
|||||||
(
|
(
|
||||||
IOobject::groupName("rho", continuousPhaseName),
|
IOobject::groupName("rho", continuousPhaseName),
|
||||||
dimDensity,
|
dimDensity,
|
||||||
continuousPhaseTransport.lookup
|
continuousPhaseTransport
|
||||||
(
|
|
||||||
IOobject::groupName("rho", continuousPhaseName)
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
volScalarField rhoc
|
volScalarField rhoc
|
||||||
|
|||||||
@ -55,7 +55,7 @@ constantSurfaceTensionCoefficient
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
surfaceTensionModel(dict, pair, registerObject),
|
surfaceTensionModel(dict, pair, registerObject),
|
||||||
sigma_("sigma", dimensionSet(1, 0, -2, 0, 0), dict.lookup("sigma"))
|
sigma_("sigma", dimMass/sqr(dimTime), dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -53,10 +53,15 @@ Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::constant
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
temperaturePhaseChangeTwoPhaseMixture(mixture, mesh),
|
temperaturePhaseChangeTwoPhaseMixture(mixture, mesh),
|
||||||
coeffC_(subDict(type() + "Coeffs").lookup("coeffC")),
|
coeffC_
|
||||||
coeffE_(subDict(type() + "Coeffs").lookup("coeffE"))
|
(
|
||||||
{
|
"coeffC", dimless/dimTime/dimTemperature, subDict(type() + "Coeffs")
|
||||||
}
|
),
|
||||||
|
coeffE_
|
||||||
|
(
|
||||||
|
"coeffE", dimless/dimTime/dimTemperature, subDict(type() + "Coeffs")
|
||||||
|
)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
@ -163,10 +168,8 @@ bool Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::read()
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
return false;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -160,8 +160,8 @@ Foam::threePhaseInterfaceProperties::threePhaseInterfaceProperties
|
|||||||
mixture_.alpha1().name()
|
mixture_.alpha1().name()
|
||||||
).get<scalar>("cAlpha")
|
).get<scalar>("cAlpha")
|
||||||
),
|
),
|
||||||
sigma12_("sigma12", dimensionSet(1, 0, -2, 0, 0), mixture),
|
sigma12_("sigma12", dimMass/sqr(dimTime), mixture),
|
||||||
sigma13_("sigma13", dimensionSet(1, 0, -2, 0, 0), mixture),
|
sigma13_("sigma13", dimMass/sqr(dimTime), mixture),
|
||||||
|
|
||||||
deltaN_
|
deltaN_
|
||||||
(
|
(
|
||||||
|
|||||||
@ -47,7 +47,4 @@
|
|||||||
|
|
||||||
Info<< "Reading diffusivity DT\n" << endl;
|
Info<< "Reading diffusivity DT\n" << endl;
|
||||||
|
|
||||||
dimensionedScalar DT
|
dimensionedScalar DT("DT", dimViscosity, transportProperties);
|
||||||
(
|
|
||||||
transportProperties.lookup("DT")
|
|
||||||
);
|
|
||||||
|
|||||||
@ -57,7 +57,7 @@ y.correctBoundaryConditions();
|
|||||||
|
|
||||||
|
|
||||||
// Set the mean boundary-layer thickness
|
// Set the mean boundary-layer thickness
|
||||||
dimensionedScalar ybl("ybl", dimLength, 0);
|
dimensionedScalar ybl("ybl", dimLength, Zero);
|
||||||
|
|
||||||
if (args.found("ybl"))
|
if (args.found("ybl"))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -12,35 +12,17 @@ IOdictionary engineGeometry
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
vector swirlAxis
|
vector swirlAxis(engineGeometry.get<vector>("swirlAxis"));
|
||||||
(
|
|
||||||
engineGeometry.lookup("swirlAxis")
|
|
||||||
);
|
|
||||||
|
|
||||||
vector swirlCenter
|
vector swirlCenter(engineGeometry.get<vector>("swirlCenter"));
|
||||||
(
|
|
||||||
engineGeometry.lookup("swirlCenter")
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar swirlRPMRatio
|
dimensionedScalar swirlRPMRatio("swirlRPMRatio", engineGeometry);
|
||||||
(
|
|
||||||
engineGeometry.lookup("swirlRPMRatio")
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar swirlProfile
|
dimensionedScalar swirlProfile("swirlProfile", engineGeometry);
|
||||||
(
|
|
||||||
engineGeometry.lookup("swirlProfile")
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar bore
|
dimensionedScalar bore("bore", dimLength, engineGeometry);
|
||||||
(
|
|
||||||
engineGeometry.lookup("bore")
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar rpm
|
dimensionedScalar rpm("rpm", dimless/dimTime, engineGeometry);
|
||||||
(
|
|
||||||
engineGeometry.lookup("rpm")
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
Info<< "Reading field U\n" << endl;
|
Info<< "Reading field U\n" << endl;
|
||||||
|
|||||||
@ -25,19 +25,25 @@ License
|
|||||||
|
|
||||||
#include "dimensionSet.H"
|
#include "dimensionSet.H"
|
||||||
#include "dimensionedScalar.H"
|
#include "dimensionedScalar.H"
|
||||||
#include "StringStream.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(dimensionSet, 1);
|
defineTypeNameAndDebug(dimensionSet, 1);
|
||||||
const scalar dimensionSet::smallExponent = SMALL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const Foam::scalar Foam::dimensionSet::smallExponent = SMALL;
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::dimensionSet::dimensionSet()
|
||||||
|
:
|
||||||
|
exponents_(Zero)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::dimensionSet::dimensionSet
|
Foam::dimensionSet::dimensionSet
|
||||||
(
|
(
|
||||||
const scalar mass,
|
const scalar mass,
|
||||||
@ -48,6 +54,8 @@ Foam::dimensionSet::dimensionSet
|
|||||||
const scalar current,
|
const scalar current,
|
||||||
const scalar luminousIntensity
|
const scalar luminousIntensity
|
||||||
)
|
)
|
||||||
|
:
|
||||||
|
exponents_()
|
||||||
{
|
{
|
||||||
exponents_[MASS] = mass;
|
exponents_[MASS] = mass;
|
||||||
exponents_[LENGTH] = length;
|
exponents_[LENGTH] = length;
|
||||||
@ -66,9 +74,9 @@ Foam::dimensionSet::dimensionSet(const FixedList<scalar,7>& dims)
|
|||||||
|
|
||||||
|
|
||||||
Foam::dimensionSet::dimensionSet(const dimensionSet& ds)
|
Foam::dimensionSet::dimensionSet(const dimensionSet& ds)
|
||||||
{
|
:
|
||||||
reset(ds);
|
exponents_(ds.exponents_)
|
||||||
}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -229,6 +229,9 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct null (dimensionless).
|
||||||
|
dimensionSet();
|
||||||
|
|
||||||
//- Construct from exponents for the first five or all seven dimensions
|
//- Construct from exponents for the first five or all seven dimensions
|
||||||
dimensionSet
|
dimensionSet
|
||||||
(
|
(
|
||||||
@ -254,7 +257,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
//- Construct from Istream
|
//- Construct from Istream
|
||||||
dimensionSet(Istream& is);
|
explicit dimensionSet(Istream& is);
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
@ -377,48 +380,48 @@ public:
|
|||||||
|
|
||||||
// Friend operators
|
// Friend operators
|
||||||
|
|
||||||
friend dimensionSet operator-(const dimensionSet&);
|
friend dimensionSet operator-(const dimensionSet& ds);
|
||||||
|
|
||||||
friend dimensionSet operator+
|
friend dimensionSet operator+
|
||||||
(
|
(
|
||||||
const dimensionSet&,
|
const dimensionSet& ds1,
|
||||||
const dimensionSet&
|
const dimensionSet& ds2
|
||||||
);
|
);
|
||||||
|
|
||||||
friend dimensionSet operator-
|
friend dimensionSet operator-
|
||||||
(
|
(
|
||||||
const dimensionSet&,
|
const dimensionSet& ds1,
|
||||||
const dimensionSet&
|
const dimensionSet& ds2
|
||||||
);
|
);
|
||||||
|
|
||||||
friend dimensionSet operator*
|
friend dimensionSet operator*
|
||||||
(
|
(
|
||||||
const dimensionSet&,
|
const dimensionSet& ds1,
|
||||||
const dimensionSet&
|
const dimensionSet& ds2
|
||||||
);
|
);
|
||||||
|
|
||||||
friend dimensionSet operator/
|
friend dimensionSet operator/
|
||||||
(
|
(
|
||||||
const dimensionSet&,
|
const dimensionSet& ds1,
|
||||||
const dimensionSet&
|
const dimensionSet& ds2
|
||||||
);
|
);
|
||||||
|
|
||||||
friend dimensionSet operator&
|
friend dimensionSet operator&
|
||||||
(
|
(
|
||||||
const dimensionSet&,
|
const dimensionSet& ds1,
|
||||||
const dimensionSet&
|
const dimensionSet& ds2
|
||||||
);
|
);
|
||||||
|
|
||||||
friend dimensionSet operator^
|
friend dimensionSet operator^
|
||||||
(
|
(
|
||||||
const dimensionSet&,
|
const dimensionSet& ds1,
|
||||||
const dimensionSet&
|
const dimensionSet& ds2
|
||||||
);
|
);
|
||||||
|
|
||||||
friend dimensionSet operator&&
|
friend dimensionSet operator&&
|
||||||
(
|
(
|
||||||
const dimensionSet&,
|
const dimensionSet& ds1,
|
||||||
const dimensionSet&
|
const dimensionSet& ds2
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -119,7 +119,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
//- (if valid) obtain set of coefficients of unitNames
|
//- (if valid) obtain set of coefficients of unitNames
|
||||||
void coefficients(scalarField&) const;
|
void coefficients(scalarField& exponents) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -30,13 +30,12 @@ License
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::dimensioned<Type>::initialize(Istream& is)
|
void Foam::dimensioned<Type>::initialize(Istream& is, bool checkDims)
|
||||||
{
|
{
|
||||||
token nextToken(is);
|
token nextToken(is);
|
||||||
is.putBack(nextToken);
|
is.putBack(nextToken);
|
||||||
|
|
||||||
// Check if the original format is used in which the name is provided
|
// Optional name found - use it
|
||||||
// and reset the name to that read
|
|
||||||
if (nextToken.isWord())
|
if (nextToken.isWord())
|
||||||
{
|
{
|
||||||
is >> name_;
|
is >> name_;
|
||||||
@ -44,26 +43,27 @@ void Foam::dimensioned<Type>::initialize(Istream& is)
|
|||||||
is.putBack(nextToken);
|
is.putBack(nextToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the dimensions are provided compare with the argument
|
scalar mult(1.0);
|
||||||
scalar multiplier = 1.0;
|
|
||||||
|
|
||||||
if (nextToken == token::BEGIN_SQR)
|
if (nextToken == token::BEGIN_SQR)
|
||||||
{
|
{
|
||||||
dimensionSet dims(dimless);
|
// Optional dimensions found - use them
|
||||||
dims.read(is, multiplier);
|
const dimensionSet curr(dimensions_);
|
||||||
|
dimensions_.read(is, mult);
|
||||||
|
|
||||||
if (dims != dimensions_)
|
if (checkDims && curr != dimensions_)
|
||||||
{
|
{
|
||||||
FatalIOErrorInFunction(is)
|
FatalIOErrorInFunction(is)
|
||||||
<< "The dimensions " << dims
|
<< "The dimensions " << dimensions_
|
||||||
<< " provided do not match the required dimensions "
|
<< " provided do not match the expected dimensions "
|
||||||
<< dimensions_
|
<< curr << endl
|
||||||
<< abort(FatalIOError);
|
<< abort(FatalIOError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Read value
|
||||||
is >> value_;
|
is >> value_;
|
||||||
value_ *= multiplier;
|
value_ *= mult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -124,10 +124,7 @@ Foam::dimensioned<Type>::dimensioned
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::dimensioned<Type>::dimensioned
|
Foam::dimensioned<Type>::dimensioned(Istream& is)
|
||||||
(
|
|
||||||
Istream& is
|
|
||||||
)
|
|
||||||
:
|
:
|
||||||
dimensions_(dimless)
|
dimensions_(dimless)
|
||||||
{
|
{
|
||||||
@ -145,10 +142,13 @@ Foam::dimensioned<Type>::dimensioned
|
|||||||
name_(name),
|
name_(name),
|
||||||
dimensions_(dimless)
|
dimensions_(dimless)
|
||||||
{
|
{
|
||||||
scalar multiplier;
|
// Read dimensionSet + multiplier
|
||||||
dimensions_.read(is, multiplier);
|
scalar mult(1.0);
|
||||||
|
dimensions_.read(is, mult);
|
||||||
|
|
||||||
|
// Read value
|
||||||
is >> value_;
|
is >> value_;
|
||||||
value_ *= multiplier;
|
value_ *= mult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -164,7 +164,7 @@ Foam::dimensioned<Type>::dimensioned
|
|||||||
dimensions_(dims),
|
dimensions_(dims),
|
||||||
value_(Zero)
|
value_(Zero)
|
||||||
{
|
{
|
||||||
initialize(is);
|
initialize(is, true); // checkDims
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -172,15 +172,32 @@ template<class Type>
|
|||||||
Foam::dimensioned<Type>::dimensioned
|
Foam::dimensioned<Type>::dimensioned
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const dimensionSet& dims,
|
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
|
:
|
||||||
|
dimensioned<Type>(name, dimless, dict, false) // no checkDims
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::dimensioned<Type>::dimensioned
|
||||||
|
(
|
||||||
|
const word& name,
|
||||||
|
const dimensionSet& dims,
|
||||||
|
const dictionary& dict,
|
||||||
|
const bool checkDims
|
||||||
|
)
|
||||||
:
|
:
|
||||||
name_(name),
|
name_(name),
|
||||||
dimensions_(dims),
|
dimensions_(dims),
|
||||||
value_(Zero)
|
value_(Zero)
|
||||||
{
|
{
|
||||||
initialize(dict.lookup(name));
|
// Like dictionary::lookup(), but in two stages to detect input errors
|
||||||
|
const entry& e = dict.lookupEntry(name, keyType::REGEX);
|
||||||
|
ITstream& is = e.stream();
|
||||||
|
|
||||||
|
initialize(is, checkDims);
|
||||||
|
e.checkITstream(is);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -195,12 +212,13 @@ Foam::dimensioned<Type> Foam::dimensioned<Type>::lookupOrDefault
|
|||||||
const Type& defaultValue
|
const Type& defaultValue
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (dict.found(name))
|
return
|
||||||
{
|
dimensioned<Type>
|
||||||
return dimensioned<Type>(name, dims, dict.get<Type>(name));
|
(
|
||||||
}
|
name,
|
||||||
|
dims,
|
||||||
return dimensioned<Type>(name, dims, defaultValue);
|
dict.lookupOrDefault<Type>(name, defaultValue)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -325,6 +343,25 @@ bool Foam::dimensioned<Type>::readIfPresent(const dictionary& dict)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::Istream& Foam::dimensioned<Type>::read(Istream& is)
|
||||||
|
{
|
||||||
|
// Read name
|
||||||
|
is >> name_;
|
||||||
|
|
||||||
|
// Read dimensionSet + multiplier
|
||||||
|
scalar mult(1.0);
|
||||||
|
dimensions_.read(is, mult);
|
||||||
|
|
||||||
|
// Read value
|
||||||
|
is >> value_;
|
||||||
|
value_ *= mult;
|
||||||
|
|
||||||
|
is.check(FUNCTION_NAME);
|
||||||
|
return is;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::Istream&
|
Foam::Istream&
|
||||||
Foam::dimensioned<Type>::read(Istream& is, const dictionary& readSet)
|
Foam::dimensioned<Type>::read(Istream& is, const dictionary& readSet)
|
||||||
@ -333,7 +370,7 @@ Foam::dimensioned<Type>::read(Istream& is, const dictionary& readSet)
|
|||||||
is >> name_;
|
is >> name_;
|
||||||
|
|
||||||
// Read dimensionSet + multiplier
|
// Read dimensionSet + multiplier
|
||||||
scalar mult;
|
scalar mult(1.0);
|
||||||
dimensions_.read(is, mult, readSet);
|
dimensions_.read(is, mult, readSet);
|
||||||
|
|
||||||
// Read value
|
// Read value
|
||||||
@ -356,7 +393,7 @@ Foam::Istream& Foam::dimensioned<Type>::read
|
|||||||
is >> name_;
|
is >> name_;
|
||||||
|
|
||||||
// Read dimensionSet + multiplier
|
// Read dimensionSet + multiplier
|
||||||
scalar mult;
|
scalar mult(1.0);
|
||||||
dimensions_.read(is, mult, readSet);
|
dimensions_.read(is, mult, readSet);
|
||||||
|
|
||||||
// Read value
|
// Read value
|
||||||
@ -368,25 +405,6 @@ Foam::Istream& Foam::dimensioned<Type>::read
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
Foam::Istream& Foam::dimensioned<Type>::read(Istream& is)
|
|
||||||
{
|
|
||||||
// Read name
|
|
||||||
is >> name_;
|
|
||||||
|
|
||||||
// Read dimensionSet + multiplier
|
|
||||||
scalar mult;
|
|
||||||
dimensions_.read(is, mult);
|
|
||||||
|
|
||||||
// Read value
|
|
||||||
is >> value_;
|
|
||||||
value_ *= mult;
|
|
||||||
|
|
||||||
is.check(FUNCTION_NAME);
|
|
||||||
return is;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -574,29 +592,7 @@ Foam::dimensioned<Type> Foam::min
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::Istream& Foam::operator>>(Istream& is, dimensioned<Type>& dt)
|
Foam::Istream& Foam::operator>>(Istream& is, dimensioned<Type>& dt)
|
||||||
{
|
{
|
||||||
token nextToken(is);
|
dt.initialize(is, false); // no checkDims
|
||||||
is.putBack(nextToken);
|
|
||||||
|
|
||||||
// Check if the original format is used in which the name is provided
|
|
||||||
// and reset the name to that read
|
|
||||||
if (nextToken.isWord())
|
|
||||||
{
|
|
||||||
is >> dt.name_;
|
|
||||||
is >> nextToken;
|
|
||||||
is.putBack(nextToken);
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the dimensions are provided reset the dimensions to those read
|
|
||||||
scalar multiplier = 1.0;
|
|
||||||
if (nextToken == token::BEGIN_SQR)
|
|
||||||
{
|
|
||||||
dt.dimensions_.read(is, multiplier);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Read the value
|
|
||||||
is >> dt.value_;
|
|
||||||
dt.value_ *= multiplier;
|
|
||||||
|
|
||||||
is.check(FUNCTION_NAME);
|
is.check(FUNCTION_NAME);
|
||||||
return is;
|
return is;
|
||||||
}
|
}
|
||||||
@ -609,7 +605,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const dimensioned<Type>& dt)
|
|||||||
os << dt.name() << token::SPACE;
|
os << dt.name() << token::SPACE;
|
||||||
|
|
||||||
// Write the dimensions
|
// Write the dimensions
|
||||||
scalar mult;
|
scalar mult(1.0);
|
||||||
dt.dimensions().write(os, mult);
|
dt.dimensions().write(os, mult);
|
||||||
|
|
||||||
os << token::SPACE;
|
os << token::SPACE;
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -79,9 +79,16 @@ class dimensioned
|
|||||||
|
|
||||||
// Private member functions
|
// Private member functions
|
||||||
|
|
||||||
//- Initialize from Istream
|
//- Constructor helper.
|
||||||
// Helper-function for constructors
|
// Requires a value, optional preceded with name and/or dimensions.
|
||||||
void initialize(Istream& is);
|
// \verbatim
|
||||||
|
// [name] [dims] value
|
||||||
|
// \endverbatim
|
||||||
|
// If the name is present, it is used to rename.
|
||||||
|
// If dimensions are present, they are read.
|
||||||
|
// With checkDims = true, the dimensions read are verified
|
||||||
|
// against the current (expected) dimensions.
|
||||||
|
void initialize(Istream& is, bool checkDims);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -92,7 +99,7 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Null constructor: a dimensionless Zero, named "0"
|
//- Construct null: a dimensionless Zero, named "0"
|
||||||
dimensioned();
|
dimensioned();
|
||||||
|
|
||||||
//- A dimensioned Zero, named "0"
|
//- A dimensioned Zero, named "0"
|
||||||
@ -101,7 +108,7 @@ public:
|
|||||||
//- A dimensioned Zero, named "0"
|
//- A dimensioned Zero, named "0"
|
||||||
explicit dimensioned(const dimensionSet& dims, const zero);
|
explicit dimensioned(const dimensionSet& dims, const zero);
|
||||||
|
|
||||||
//- Construct dimensionless from given value.
|
//- Implicit construct dimensionless from given value.
|
||||||
dimensioned(const Type& val)
|
dimensioned(const Type& val)
|
||||||
:
|
:
|
||||||
name_(::Foam::name(val)),
|
name_(::Foam::name(val)),
|
||||||
@ -109,7 +116,7 @@ public:
|
|||||||
value_(val)
|
value_(val)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//- Copy construct a dimensioned Type with a new name
|
//- Copy construct dimensioned Type with a new name
|
||||||
dimensioned(const word& name, const dimensioned<Type>& dt);
|
dimensioned(const word& name, const dimensioned<Type>& dt);
|
||||||
|
|
||||||
//- Construct from components: name, dimensionSet and a value.
|
//- Construct from components: name, dimensionSet and a value.
|
||||||
@ -120,21 +127,31 @@ public:
|
|||||||
const Type& val
|
const Type& val
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from Istream.
|
//- Construct from dictionary lookup with a given name.
|
||||||
dimensioned(Istream& is);
|
// The dictionary entry may contain optional name and dimensions.
|
||||||
|
// \verbatim
|
||||||
|
// [name] [dims] value
|
||||||
|
// \endverbatim
|
||||||
|
// If the optional name is found, it is used for renaming.
|
||||||
|
// If the optional dimensions are present, they are read and
|
||||||
|
// used without further verification.
|
||||||
|
// If no dimensions are found, the quantity is dimensionless.
|
||||||
|
dimensioned(const word& name, const dictionary& dict);
|
||||||
|
|
||||||
//- Construct from Istream with a given name
|
//- Construct from dictionary lookup with a given name and dimensions.
|
||||||
dimensioned(const word& name, Istream& is);
|
// The dictionary entry may contain optional name and dimensions.
|
||||||
|
// \verbatim
|
||||||
//- Construct from Istream with a given name and dimensions
|
// [name] [dims] value
|
||||||
dimensioned(const word& name, const dimensionSet& dims, Istream& is);
|
// \endverbatim
|
||||||
|
// If the optional name is found, it is used for renaming.
|
||||||
//- Construct from dictionary lookup with a given name and dimensions
|
// If the optional dimensions are present, they are read and
|
||||||
|
// normally verified against the expected dimensions.
|
||||||
dimensioned
|
dimensioned
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const dimensionSet& dims,
|
const dimensionSet& dims,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const bool checkDims = true //!< verify dimensions read
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -181,7 +198,7 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member Functions
|
||||||
|
|
||||||
//- Return const reference to name.
|
//- Return const reference to name.
|
||||||
const word& name() const;
|
const word& name() const;
|
||||||
@ -210,26 +227,29 @@ public:
|
|||||||
//- Return transpose.
|
//- Return transpose.
|
||||||
dimensioned<Type> T() const;
|
dimensioned<Type> T() const;
|
||||||
|
|
||||||
//- Update the value of dimensioned<Type>
|
//- Update the value of dimensioned\<Type\>
|
||||||
void read(const dictionary& dict);
|
void read(const dictionary& dict);
|
||||||
|
|
||||||
//- Update the value of dimensioned<Type> if found in the dictionary.
|
//- Update the value of dimensioned\<Type\> if found in the dictionary.
|
||||||
bool readIfPresent(const dictionary& dict);
|
bool readIfPresent(const dictionary& dict);
|
||||||
|
|
||||||
|
|
||||||
// I/O
|
// IO
|
||||||
|
|
||||||
//- Read value from stream and units from dictionary
|
//- Read name, dimensions, value from stream,
|
||||||
Istream& read(Istream& is, const dictionary& readSet);
|
//- using units from system table
|
||||||
|
|
||||||
//- Read value from stream and units from table
|
|
||||||
Istream& read(Istream& is, const HashTable<dimensionedScalar>& readSet);
|
|
||||||
|
|
||||||
//- Read value from stream and units from system table
|
|
||||||
Istream& read(Istream& is);
|
Istream& read(Istream& is);
|
||||||
|
|
||||||
|
//- Read name, dimensions, value from stream,
|
||||||
|
//- using units from dictionary
|
||||||
|
Istream& read(Istream& is, const dictionary& readSet);
|
||||||
|
|
||||||
// Member operators
|
//- Read name, dimensions, value from stream,
|
||||||
|
//- using units from table
|
||||||
|
Istream& read(Istream& is, const HashTable<dimensionedScalar>& readSet);
|
||||||
|
|
||||||
|
|
||||||
|
// Member Operators
|
||||||
|
|
||||||
//- Return a component as a dimensioned<cmptType>
|
//- Return a component as a dimensioned<cmptType>
|
||||||
dimensioned<cmptType> operator[](const direction d) const;
|
dimensioned<cmptType> operator[](const direction d) const;
|
||||||
@ -242,6 +262,9 @@ public:
|
|||||||
|
|
||||||
// IOstream operators
|
// IOstream operators
|
||||||
|
|
||||||
|
//- Read from stream. The name and dimensions are optional.
|
||||||
|
// If the optional dimensions are present, they are used
|
||||||
|
// used without further verification.
|
||||||
friend Istream& operator>> <Type>
|
friend Istream& operator>> <Type>
|
||||||
(
|
(
|
||||||
Istream& is,
|
Istream& is,
|
||||||
@ -253,6 +276,33 @@ public:
|
|||||||
Ostream& os,
|
Ostream& os,
|
||||||
const dimensioned<Type>& dt
|
const dimensioned<Type>& dt
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Housekeeping
|
||||||
|
|
||||||
|
//- Deprecated(2018-11) Construct from Istream
|
||||||
|
//- (expects name, dimensions, value)
|
||||||
|
// \deprecated(2018-11) - should generally use one of the construct
|
||||||
|
// from dictionary constructors instead. They provide additional
|
||||||
|
// checks on the input stream.
|
||||||
|
explicit dimensioned(Istream& is);
|
||||||
|
|
||||||
|
//- Deprecated(2018-11) Construct from Istream with given name
|
||||||
|
//- (expects dimensions, value)
|
||||||
|
// \deprecated(2018-11) - should generally use one of the construct
|
||||||
|
// from dictionary constructors instead. They provide additional
|
||||||
|
// checks on the input stream.
|
||||||
|
dimensioned(const word& name, Istream& is);
|
||||||
|
|
||||||
|
//- Deprecated(2018-11) Construct from Istream with given name
|
||||||
|
//- and expected dimensions.
|
||||||
|
// Expects value, but supports optional name and dimensions.
|
||||||
|
// If the optional dimensions are present, they are read and
|
||||||
|
// verified against the expected dimensions.
|
||||||
|
// \deprecated(2018-11) - should generally use one of the construct
|
||||||
|
// from dictionary constructors instead. They provide additional
|
||||||
|
// checks on the input stream.
|
||||||
|
dimensioned(const word& name, const dimensionSet& dims, Istream& is);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -25,16 +25,17 @@ License
|
|||||||
|
|
||||||
#include "dimensionedConstants.H"
|
#include "dimensionedConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
dictionary* dimensionedConstantsPtr_(nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
dictionary* dimensionedConstantsPtr_(nullptr);
|
Foam::dictionary& Foam::dimensionedConstants()
|
||||||
|
|
||||||
dictionary& dimensionedConstants()
|
|
||||||
{
|
{
|
||||||
return debug::switchSet
|
return debug::switchSet
|
||||||
(
|
(
|
||||||
@ -44,7 +45,7 @@ dictionary& dimensionedConstants()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dimensionedScalar dimensionedConstant
|
Foam::dimensionedScalar Foam::dimensionedConstant
|
||||||
(
|
(
|
||||||
const word& group,
|
const word& group,
|
||||||
const word& varName
|
const word& varName
|
||||||
@ -57,28 +58,24 @@ dimensionedScalar dimensionedConstant
|
|||||||
|
|
||||||
if (!dict.found("unitSet"))
|
if (!dict.found("unitSet"))
|
||||||
{
|
{
|
||||||
std::cerr<< "Cannot find unitSet in dictionary " << dict.name()
|
std::cerr
|
||||||
|
<< "Cannot find unitSet in dictionary " << dict.name()
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
const word unitSetCoeffs(dict.get<word>("unitSet") + "Coeffs");
|
const word unitSetCoeffs(dict.get<word>("unitSet") + "Coeffs");
|
||||||
|
|
||||||
if (!dict.found(unitSetCoeffs))
|
const dictionary* unitDictPtr = dict.findDict(unitSetCoeffs);
|
||||||
|
|
||||||
|
if (!unitDictPtr)
|
||||||
{
|
{
|
||||||
std::cerr<< "Cannot find " << unitSetCoeffs << " in dictionary "
|
std::cerr
|
||||||
|
<< "Cannot find " << unitSetCoeffs << " in dictionary "
|
||||||
<< dict.name() << std::endl;
|
<< dict.name() << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
dictionary& unitDict = dict.subDict(unitSetCoeffs);
|
return dimensionedScalar(varName, unitDictPtr->subDict(group));
|
||||||
|
|
||||||
dictionary& groupDict = unitDict.subDict(group);
|
|
||||||
|
|
||||||
return dimensionedScalar(groupDict.lookup(varName));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -74,11 +74,11 @@ Foam::crankConRod::crankConRod
|
|||||||
systemName,
|
systemName,
|
||||||
constantName
|
constantName
|
||||||
),
|
),
|
||||||
rpm_(dict_.lookup("rpm")),
|
rpm_("rpm", dimless/dimTime, dict_),
|
||||||
conRodLength_(dimensionedScalar("conRodLength", dimLength, 0)),
|
conRodLength_("conRodLength", dimLength, Zero),
|
||||||
bore_(dimensionedScalar("bore", dimLength, 0)),
|
bore_("bore", dimLength, Zero),
|
||||||
stroke_(dimensionedScalar("stroke", dimLength, 0)),
|
stroke_("stroke", dimLength, Zero),
|
||||||
clearance_(dimensionedScalar("clearance", dimLength, 0))
|
clearance_("clearance", dimLength, Zero)
|
||||||
{
|
{
|
||||||
// geometric parameters are not strictly required for Time
|
// geometric parameters are not strictly required for Time
|
||||||
dict_.readIfPresent("conRodLength", conRodLength_);
|
dict_.readIfPresent("conRodLength", conRodLength_);
|
||||||
@ -112,10 +112,8 @@ bool Foam::crankConRod::read()
|
|||||||
timeAdjustment();
|
timeAdjustment();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
return false;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
{
|
{
|
||||||
// Calculate volume of ignition kernel
|
// Calculate volume of ignition kernel
|
||||||
dimensionedScalar Vk("Vk", dimVolume, gSum(c*mesh.V().field()));
|
dimensionedScalar Vk("Vk", dimVolume, gSum(c*mesh.V().field()));
|
||||||
dimensionedScalar Ak("Ak", dimArea, 0.0);
|
dimensionedScalar Ak("Ak", dimArea, Zero);
|
||||||
|
|
||||||
if (Vk.value() > SMALL)
|
if (Vk.value() > SMALL)
|
||||||
{
|
{
|
||||||
@ -39,7 +39,7 @@
|
|||||||
// Assume it is part-circular
|
// Assume it is part-circular
|
||||||
dimensionedScalar thickness
|
dimensionedScalar thickness
|
||||||
(
|
(
|
||||||
combustionProperties.lookup("ignitionThickness")
|
"ignitionThickness", dimLength, combustionProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
scalar circleFraction
|
scalar circleFraction
|
||||||
@ -67,7 +67,7 @@
|
|||||||
// Assume it is plane or two planes
|
// Assume it is plane or two planes
|
||||||
Ak = dimensionedScalar
|
Ak = dimensionedScalar
|
||||||
(
|
(
|
||||||
combustionProperties.lookup("ignitionKernelArea")
|
"ignitionKernelArea", dimArea, combustionProperties
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -108,13 +108,11 @@ void Foam::fixedPressureCompressibleDensityFvPatchScalarField::updateCoeffs()
|
|||||||
const dictionary& thermoProps =
|
const dictionary& thermoProps =
|
||||||
db().lookupObject<IOdictionary>("thermodynamicProperties");
|
db().lookupObject<IOdictionary>("thermodynamicProperties");
|
||||||
|
|
||||||
const scalar rholSat =
|
const scalar rholSat = dimensionedScalar("rholSat", thermoProps).value();
|
||||||
dimensionedScalar(thermoProps.lookup("rholSat")).value();
|
|
||||||
|
|
||||||
const scalar pSat =
|
const scalar pSat = dimensionedScalar("pSat", thermoProps).value();
|
||||||
dimensionedScalar(thermoProps.lookup("pSat")).value();
|
|
||||||
|
|
||||||
const scalar psil = dimensionedScalar(thermoProps.lookup("psil")).value();
|
const scalar psil = dimensionedScalar("psil", thermoProps).value();
|
||||||
|
|
||||||
operator==(rholSat + psil*(pp - pSat));
|
operator==(rholSat + psil*(pp - pSat));
|
||||||
|
|
||||||
|
|||||||
@ -93,7 +93,7 @@ bool Foam::functionObjects::PecletNo::calc()
|
|||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
mesh_,
|
mesh_,
|
||||||
dimensionedScalar(model.lookup("nu"))
|
dimensionedScalar("nu", dimViscosity, model)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -141,7 +141,7 @@ Foam::heatTransferCoeffModels::ReynoldsAnalogy::devReff() const
|
|||||||
const dictionary& transportProperties =
|
const dictionary& transportProperties =
|
||||||
mesh_.lookupObject<dictionary>("transportProperties");
|
mesh_.lookupObject<dictionary>("transportProperties");
|
||||||
|
|
||||||
dimensionedScalar nu(transportProperties.lookup("nu"));
|
dimensionedScalar nu("nu", dimViscosity, transportProperties);
|
||||||
|
|
||||||
const volVectorField& U = mesh_.lookupObject<volVectorField>(UName_);
|
const volVectorField& U = mesh_.lookupObject<volVectorField>(UName_);
|
||||||
|
|
||||||
|
|||||||
@ -50,9 +50,9 @@ Foam::solidParticleCloud::solidParticleCloud
|
|||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
rhop_(dimensionedScalar(particleProperties_.lookup("rhop")).value()),
|
rhop_(dimensionedScalar("rhop", particleProperties_).value()),
|
||||||
e_(dimensionedScalar(particleProperties_.lookup("e")).value()),
|
e_(dimensionedScalar("e", particleProperties_).value()),
|
||||||
mu_(dimensionedScalar(particleProperties_.lookup("mu")).value())
|
mu_(dimensionedScalar("mu", particleProperties_).value())
|
||||||
{
|
{
|
||||||
if (readFields)
|
if (readFields)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -222,7 +222,7 @@ Foam::laminarFlameSpeedModels::Gulders::operator()() const
|
|||||||
psiuReactionThermo_.Tu(),
|
psiuReactionThermo_.Tu(),
|
||||||
dimensionedScalar
|
dimensionedScalar
|
||||||
(
|
(
|
||||||
psiuReactionThermo_.lookup("stoichiometricAirFuelMassRatio")
|
"stoichiometricAirFuelMassRatio", dimless, psiuReactionThermo_
|
||||||
)*ft/max(1 - ft, SMALL)
|
)*ft/max(1 - ft, SMALL)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -226,7 +226,7 @@ Foam::laminarFlameSpeedModels::GuldersEGR::operator()() const
|
|||||||
psiuReactionThermo_.Tu(),
|
psiuReactionThermo_.Tu(),
|
||||||
dimensionedScalar
|
dimensionedScalar
|
||||||
(
|
(
|
||||||
psiuReactionThermo_.lookup("stoichiometricAirFuelMassRatio")
|
"stoichiometricAirFuelMassRatio", dimless, psiuReactionThermo_
|
||||||
)/
|
)/
|
||||||
(
|
(
|
||||||
scalar(1)/psiuReactionThermo_.composition().Y("ft")
|
scalar(1)/psiuReactionThermo_.composition().Y("ft")
|
||||||
|
|||||||
@ -313,7 +313,7 @@ Foam::laminarFlameSpeedModels::RaviPetersen::operator()() const
|
|||||||
EqR =
|
EqR =
|
||||||
dimensionedScalar
|
dimensionedScalar
|
||||||
(
|
(
|
||||||
psiuReactionThermo_.lookup("stoichiometricAirFuelMassRatio")
|
"stoichiometricAirFuelMassRatio", dimless, psiuReactionThermo_
|
||||||
)*ft/max(1 - ft, SMALL);
|
)*ft/max(1 - ft, SMALL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -54,7 +54,7 @@ Foam::laminarFlameSpeedModels::constant::constant
|
|||||||
:
|
:
|
||||||
laminarFlameSpeed(dict, ct),
|
laminarFlameSpeed(dict, ct),
|
||||||
|
|
||||||
Su_(dict.lookup("Su"))
|
Su_("Su", dimVelocity, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -50,7 +50,7 @@ Foam::laminarFlameSpeed::laminarFlameSpeed
|
|||||||
if (!psiuReactionThermo_.composition().contains("ft"))
|
if (!psiuReactionThermo_.composition().contains("ft"))
|
||||||
{
|
{
|
||||||
equivalenceRatio_ =
|
equivalenceRatio_ =
|
||||||
dimensionedScalar(dict.lookup("equivalenceRatio")).value();
|
dimensionedScalar("equivalenceRatio", dimless, dict).value();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -54,15 +54,9 @@ Foam::radiation::constantAbsorptionEmission::constantAbsorptionEmission
|
|||||||
:
|
:
|
||||||
absorptionEmissionModel(dict, mesh),
|
absorptionEmissionModel(dict, mesh),
|
||||||
coeffsDict_(dict.optionalSubDict(typeName + "Coeffs")),
|
coeffsDict_(dict.optionalSubDict(typeName + "Coeffs")),
|
||||||
a_(coeffsDict_.lookup("absorptivity")),
|
a_("absorptivity", coeffsDict_),
|
||||||
e_(coeffsDict_.lookup("emissivity")),
|
e_("emissivity", coeffsDict_),
|
||||||
E_(coeffsDict_.lookup("E"))
|
E_("E", coeffsDict_)
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::radiation::constantAbsorptionEmission::~constantAbsorptionEmission()
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -84,7 +84,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~constantAbsorptionEmission();
|
virtual ~constantAbsorptionEmission() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -54,14 +54,8 @@ Foam::radiation::constantScatter::constantScatter
|
|||||||
:
|
:
|
||||||
scatterModel(dict, mesh),
|
scatterModel(dict, mesh),
|
||||||
coeffsDict_(dict.optionalSubDict(typeName + "Coeffs")),
|
coeffsDict_(dict.optionalSubDict(typeName + "Coeffs")),
|
||||||
sigma_(coeffsDict_.lookup("sigma")),
|
sigma_("sigma", dimless/dimLength, coeffsDict_),
|
||||||
C_(coeffsDict_.lookup("C"))
|
C_("C", dimless, coeffsDict_)
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::radiation::constantScatter::~constantScatter()
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -85,7 +85,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~constantScatter();
|
virtual ~constantScatter() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -50,12 +50,6 @@ Foam::radiation::noScatter::noScatter
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::radiation::noScatter::~noScatter()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::radiation::noScatter::sigmaEff() const
|
Foam::tmp<Foam::volScalarField> Foam::radiation::noScatter::sigmaEff() const
|
||||||
|
|||||||
@ -69,7 +69,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~noScatter();
|
virtual ~noScatter() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -50,7 +50,7 @@ Foam::egrMixture<ThermoType>::egrMixture
|
|||||||
phaseName
|
phaseName
|
||||||
),
|
),
|
||||||
|
|
||||||
stoicRatio_(thermoDict.lookup("stoichiometricAirFuelMassRatio")),
|
stoicRatio_("stoichiometricAirFuelMassRatio", dimless, thermoDict),
|
||||||
|
|
||||||
fuel_(thermoDict.subDict("fuel")),
|
fuel_(thermoDict.subDict("fuel")),
|
||||||
oxidant_(thermoDict.subDict("oxidant")),
|
oxidant_(thermoDict.subDict("oxidant")),
|
||||||
@ -101,7 +101,7 @@ const ThermoType& Foam::egrMixture<ThermoType>::mixture
|
|||||||
template<class ThermoType>
|
template<class ThermoType>
|
||||||
void Foam::egrMixture<ThermoType>::read(const dictionary& thermoDict)
|
void Foam::egrMixture<ThermoType>::read(const dictionary& thermoDict)
|
||||||
{
|
{
|
||||||
stoicRatio_ = thermoDict.lookup("stoichiometricAirFuelMassRatio");
|
thermoDict.readEntry("stoichiometricAirFuelMassRatio", stoicRatio_);
|
||||||
|
|
||||||
fuel_ = ThermoType(thermoDict.subDict("fuel"));
|
fuel_ = ThermoType(thermoDict.subDict("fuel"));
|
||||||
oxidant_ = ThermoType(thermoDict.subDict("oxidant"));
|
oxidant_ = ThermoType(thermoDict.subDict("oxidant"));
|
||||||
|
|||||||
@ -93,8 +93,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~egrMixture()
|
virtual ~egrMixture() = default;
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|||||||
@ -54,7 +54,7 @@ Foam::inhomogeneousMixture<ThermoType>::inhomogeneousMixture
|
|||||||
phaseName
|
phaseName
|
||||||
),
|
),
|
||||||
|
|
||||||
stoicRatio_(thermoDict.lookup("stoichiometricAirFuelMassRatio")),
|
stoicRatio_("stoichiometricAirFuelMassRatio", dimless, thermoDict),
|
||||||
|
|
||||||
fuel_(thermoDict.subDict("fuel")),
|
fuel_(thermoDict.subDict("fuel")),
|
||||||
oxidant_(thermoDict.subDict("oxidant")),
|
oxidant_(thermoDict.subDict("oxidant")),
|
||||||
@ -98,7 +98,7 @@ const ThermoType& Foam::inhomogeneousMixture<ThermoType>::mixture
|
|||||||
template<class ThermoType>
|
template<class ThermoType>
|
||||||
void Foam::inhomogeneousMixture<ThermoType>::read(const dictionary& thermoDict)
|
void Foam::inhomogeneousMixture<ThermoType>::read(const dictionary& thermoDict)
|
||||||
{
|
{
|
||||||
stoicRatio_ = thermoDict.lookup("stoichiometricAirFuelMassRatio");
|
thermoDict.readEntry("stoichiometricAirFuelMassRatio", stoicRatio_);
|
||||||
|
|
||||||
fuel_ = ThermoType(thermoDict.subDict("fuel"));
|
fuel_ = ThermoType(thermoDict.subDict("fuel"));
|
||||||
oxidant_ = ThermoType(thermoDict.subDict("oxidant"));
|
oxidant_ = ThermoType(thermoDict.subDict("oxidant"));
|
||||||
|
|||||||
@ -90,8 +90,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~inhomogeneousMixture()
|
virtual ~inhomogeneousMixture() = default;
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|||||||
@ -129,8 +129,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~singleStepReactingMixture()
|
virtual ~singleStepReactingMixture() = default;
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|||||||
@ -55,7 +55,7 @@ Foam::veryInhomogeneousMixture<ThermoType>::veryInhomogeneousMixture
|
|||||||
phaseName
|
phaseName
|
||||||
),
|
),
|
||||||
|
|
||||||
stoicRatio_(thermoDict.lookup("stoichiometricAirFuelMassRatio")),
|
stoicRatio_("stoichiometricAirFuelMassRatio", dimless, thermoDict),
|
||||||
|
|
||||||
fuel_(thermoDict.subDict("fuel")),
|
fuel_(thermoDict.subDict("fuel")),
|
||||||
oxidant_(thermoDict.subDict("oxidant")),
|
oxidant_(thermoDict.subDict("oxidant")),
|
||||||
|
|||||||
@ -98,8 +98,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~veryInhomogeneousMixture()
|
virtual ~veryInhomogeneousMixture() = default;
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|||||||
@ -48,7 +48,7 @@ Foam::surfaceTensionModels::constant::constant
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
surfaceTensionModel(mesh),
|
surfaceTensionModel(mesh),
|
||||||
sigma_("sigma", dimensionSet(1, 0, -2, 0, 0), dict)
|
sigma_("sigma", dimMass/sqr(dimTime), dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@ const scalar nu2 =
|
|||||||
(
|
(
|
||||||
"nu",
|
"nu",
|
||||||
dimViscosity,
|
dimViscosity,
|
||||||
transportProperties.lookup("nu")
|
transportProperties
|
||||||
).value();
|
).value();
|
||||||
|
|
||||||
Info<< "Reading viscoelastic properties\n" << endl;
|
Info<< "Reading viscoelastic properties\n" << endl;
|
||||||
|
|||||||
Reference in New Issue
Block a user