dimensioned<Type>: Added constructor from name, dimensions and dictionary

to simplify construction of dimensionedScalar properties and avoid the
duplication of the name string in the constructor call.
This commit is contained in:
Henry Weller
2015-07-21 12:57:07 +01:00
parent 4c21f24a8c
commit 365f9b0006
103 changed files with 342 additions and 284 deletions

View File

@ -14,5 +14,7 @@
dimensionedScalar nu
(
transportProperties.lookup("nu")
"nu",
dimViscosity,
transportProperties
);

View File

@ -51,8 +51,8 @@ Foam::PDRDragModels::basic::basic
)
:
PDRDragModel(PDRProperties, turbulence, rho, U, phi),
Csu("Csu", dimless, PDRDragModelCoeffs_.lookup("Csu")),
Csk("Csk", dimless, PDRDragModelCoeffs_.lookup("Csk")),
Csu("Csu", dimless, PDRDragModelCoeffs_),
Csk("Csk", dimless, PDRDragModelCoeffs_),
Aw_
(

View File

@ -14,17 +14,23 @@
dimensionedScalar rho0
(
thermodynamicProperties.lookup("rho0")
"rho0",
dimDensity,
thermodynamicProperties
);
dimensionedScalar p0
(
thermodynamicProperties.lookup("p0")
"p0",
dimPressure,
thermodynamicProperties
);
dimensionedScalar psi
(
thermodynamicProperties.lookup("psi")
"psi",
dimCompressibility,
thermodynamicProperties
);
// Density offset, i.e. the constant part of the density

View File

@ -1,18 +1,20 @@
Info<< "Reading transportProperties\n" << endl;
Info<< "Reading transportProperties\n" << endl;
IOdictionary transportProperties
IOdictionary transportProperties
(
IOobject
(
IOobject
(
"transportProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
"transportProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
dimensionedScalar mu
(
transportProperties.lookup("mu")
);
dimensionedScalar mu
(
"mu",
dimDynamicViscosity,
transportProperties
);

View File

@ -14,22 +14,30 @@ IOdictionary transportProperties
dimensionedScalar rho
(
transportProperties.lookup("rho")
"rho",
dimDensity,
transportProperties
);
dimensionedScalar nu
(
transportProperties.lookup("nu")
"nu",
dimViscosity,
transportProperties
);
dimensionedScalar mu
(
transportProperties.lookup("mu")
"mu",
dimensionSet(1, 1, -2, 0, 0, -2, 0),
transportProperties
);
dimensionedScalar sigma
(
transportProperties.lookup("sigma")
"sigma",
dimensionSet(-1, -3, 3, 0, 0, 2, 0),
transportProperties
);
Info<< "Reading field p\n" << endl;

View File

@ -5,14 +5,14 @@ dimensionedScalar beta
(
"beta",
dimless/dimTemperature,
laminarTransport.lookup("beta")
laminarTransport
);
// Reference temperature [K]
dimensionedScalar TRef("TRef", dimTemperature, laminarTransport.lookup("TRef"));
dimensionedScalar TRef("TRef", dimTemperature, laminarTransport);
// Laminar Prandtl number
dimensionedScalar Pr("Pr", dimless, laminarTransport.lookup("Pr"));
dimensionedScalar Pr("Pr", dimless, laminarTransport);
// Turbulent Prandtl number
dimensionedScalar Prt("Prt", dimless, laminarTransport.lookup("Prt"));
dimensionedScalar Prt("Prt", dimless, laminarTransport);

View File

@ -36,7 +36,7 @@ autoPtr<incompressible::RASModel> turbulence
incompressible::RASModel::New(U, phi, laminarTransport)
);
dimensionedVector Ubar("Ubar", dimVelocity, laminarTransport.lookup("Ubar"));
dimensionedVector Ubar("Ubar", dimVelocity, laminarTransport);
vector flowDirection = (Ubar/mag(Ubar)).value();
tensor flowMask = sqr(flowDirection);

View File

@ -14,6 +14,8 @@ IOdictionary transportProperties
dimensionedScalar nu
(
"nu",
dimViscosity,
transportProperties.lookup("nu")
);

View File

@ -20,7 +20,7 @@
(
"rhoInf",
dimDensity,
laminarTransport.lookup("rhoInf")
laminarTransport
);
volScalarField rhoInf

View File

@ -16,28 +16,28 @@ dimensionedScalar psil
(
"psil",
dimCompressibility,
thermodynamicProperties.lookup("psil")
thermodynamicProperties
);
dimensionedScalar rholSat
(
"rholSat",
dimDensity,
thermodynamicProperties.lookup("rholSat")
thermodynamicProperties
);
dimensionedScalar psiv
(
"psiv",
dimCompressibility,
thermodynamicProperties.lookup("psiv")
thermodynamicProperties
);
dimensionedScalar pSat
(
"pSat",
dimPressure,
thermodynamicProperties.lookup("pSat")
thermodynamicProperties
);
dimensionedScalar rhovSat("rhovSat", psiv*pSat);
@ -48,5 +48,5 @@ dimensionedScalar rhoMin
(
"rhoMin",
dimDensity,
thermodynamicProperties.lookup("rhoMin")
thermodynamicProperties
);

View File

@ -61,7 +61,7 @@ dimensionedScalar pMin
(
"pMin",
dimPressure,
mixture.lookup("pMin")
mixture
);
mesh.setFluxRequired(p_rgh.name());

View File

@ -46,7 +46,7 @@ volScalarField rho
mixture.rho()
);
dimensionedScalar pMin("pMin", dimPressure, mixture.lookup("pMin"));
dimensionedScalar pMin("pMin", dimPressure, mixture);
mesh.setFluxRequired(p_rgh.name());

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -80,8 +80,8 @@ incompressibleTwoPhaseInteractingMixture
)
),
rhod_("rho", dimDensity, muModel_->viscosityProperties().lookup("rho")),
rhoc_("rho", dimDensity, nucModel_->viscosityProperties().lookup("rho")),
rhod_("rho", dimDensity, muModel_->viscosityProperties()),
rhoc_("rho", dimDensity, nucModel_->viscosityProperties()),
dd_
(
"d",

View File

@ -60,19 +60,19 @@ Foam::mixtureViscosityModels::BinghamPlastic::BinghamPlastic
(
"BinghamCoeff",
dimensionSet(1, -1, -2, 0, 0),
plasticCoeffs_.lookup("BinghamCoeff")
plasticCoeffs_
),
yieldStressExponent_
(
"BinghamExponent",
dimless,
plasticCoeffs_.lookup("BinghamExponent")
plasticCoeffs_
),
yieldStressOffset_
(
"BinghamOffset",
dimless,
plasticCoeffs_.lookup("BinghamOffset")
plasticCoeffs_
),
U_(U)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -47,9 +47,9 @@ Foam::relativeVelocityModels::general::general
)
:
relativeVelocityModel(dict, mixture),
a_("a", dimless, dict.lookup("a")),
a1_("a1", dimless, dict.lookup("a1")),
V0_("V0", dimVelocity, dict.lookup("V0")),
a_("a", dimless, dict),
a1_("a1", dimless, dict),
V0_("V0", dimVelocity, dict),
residualAlpha_(dict.lookup("residualAlpha"))
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -47,9 +47,9 @@ Foam::relativeVelocityModels::simple::simple
)
:
relativeVelocityModel(dict, mixture),
a_("a", dimless, dict.lookup("a")),
V0_("V0", dimVelocity, dict.lookup("V0")),
residualAlpha_("residualAlpha", dimless, dict.lookup("residualAlpha"))
a_("a", dimless, dict),
V0_("V0", dimVelocity, dict),
residualAlpha_("residualAlpha", dimless, dict)
{}

View File

@ -152,9 +152,9 @@ Foam::incompressibleThreePhaseMixture::incompressibleThreePhaseMixture
)
),
rho1_("rho", dimDensity, nuModel1_->viscosityProperties().lookup("rho")),
rho2_("rho", dimDensity, nuModel2_->viscosityProperties().lookup("rho")),
rho3_("rho", dimDensity, nuModel3_->viscosityProperties().lookup("rho"))
rho1_("rho", dimDensity, nuModel1_->viscosityProperties()),
rho2_("rho", dimDensity, nuModel2_->viscosityProperties()),
rho3_("rho", dimDensity, nuModel3_->viscosityProperties())
{
alpha3_ == 1.0 - alpha1_ - alpha2_;
calcNu();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -53,7 +53,7 @@ Foam::diameterModels::constant::constant
)
:
diameterModel(dict, phase),
d_("d", dimLength, dict.lookup("d"))
d_("d", dimLength, dict)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -53,8 +53,8 @@ Foam::diameterModels::isothermal::isothermal
)
:
diameterModel(dict, phase),
d0_("d0", dimLength, dict.lookup("d0")),
p0_("p0", dimPressure, dict.lookup("p0"))
d0_("d0", dimLength, dict),
p0_("p0", dimPressure, dict)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -57,25 +57,25 @@ Foam::phaseModel::phaseModel
(
"nu",
dimensionSet(0, 2, -1, 0, 0),
phaseDict_.lookup("nu")
phaseDict_
),
kappa_
(
"kappa",
dimensionSet(1, 1, -3, -1, 0),
phaseDict_.lookup("kappa")
phaseDict_
),
Cp_
(
"Cp",
dimensionSet(0, 2, -2, -1, 0),
phaseDict_.lookup("Cp")
phaseDict_
),
rho_
(
"rho",
dimDensity,
phaseDict_.lookup("rho")
phaseDict_
),
U_
(

View File

@ -59,7 +59,7 @@ Foam::phase::phase
phi
)
),
rho_("rho", dimDensity, phaseDict_.lookup("rho"))
rho_("rho", dimDensity, phaseDict_)
{}

View File

@ -31,7 +31,7 @@ dimensionedScalar pMin
(
"pMin",
dimPressure,
fluid.lookup("pMin")
fluid
);
#include "gh.H"

View File

@ -89,7 +89,7 @@ Foam::InterfaceCompositionModel<Thermo, OtherThermo>::InterfaceCompositionModel
IOobject::groupName(basicThermo::dictName, pair.phase2().name())
)
),
Le_("Le", dimless, dict.lookup("Le"))
Le_("Le", dimless, dict)
{}

View File

@ -48,7 +48,7 @@ Foam::massTransferModels::Frossling::Frossling
)
:
massTransferModel(dict, pair),
Le_("Le", dimless, dict.lookup("Le"))
Le_("Le", dimless, dict)
{}

View File

@ -53,7 +53,7 @@ Foam::massTransferModels::sphericalMassTransfer::sphericalMassTransfer
)
:
massTransferModel(dict, pair),
Le_("Le", dimless, dict.lookup("Le"))
Le_("Le", dimless, dict)
{}

View File

@ -43,9 +43,9 @@ namespace saturationModels
Foam::saturationModels::Antoine::Antoine(const dictionary& dict)
:
saturationModel(),
A_("A", dimless, dict.lookup("A")),
B_("B", dimTemperature, dict.lookup("B")),
C_("C", dimTemperature, dict.lookup("C"))
A_("A", dimless, dict),
B_("B", dimTemperature, dict),
C_("C", dimTemperature, dict)
{}

View File

@ -51,9 +51,9 @@ Foam::saturationModels::AntoineExtended::AntoineExtended
)
:
Antoine(dict),
D_("D", dimless, dict.lookup("D")),
F_("F", dimless, dict.lookup("F")),
E_("E", dimless/pow(dimTemperature, F_), dict.lookup("E"))
D_("D", dimless, dict),
F_("F", dimless, dict),
E_("E", dimless/pow(dimTemperature, F_), dict)
{}

View File

@ -49,8 +49,8 @@ Foam::saturationModels::constantSaturationConditions::
constantSaturationConditions(const dictionary& dict)
:
saturationModel(),
pSat_("pSat", dimPressure, dict.lookup("pSat")),
Tsat_("Tsat", dimTemperature, dict.lookup("Tsat"))
pSat_("pSat", dimPressure, dict),
Tsat_("Tsat", dimTemperature, dict)
{}

View File

@ -55,7 +55,7 @@ constantSurfaceTensionCoefficient
)
:
surfaceTensionModel(dict, pair, registerObject),
sigma_("sigma", dimSigma, dict.lookup("sigma"))
sigma_("sigma", dimSigma, dict)
{}

View File

@ -53,7 +53,7 @@ Foam::aspectRatioModels::constantAspectRatio::constantAspectRatio
)
:
aspectRatioModel(dict, pair),
E0_("E0", dimless, dict.lookup("E0"))
E0_("E0", dimless, dict)
{}

View File

@ -49,7 +49,7 @@ Foam::dragModels::GidaspowSchillerNaumann::GidaspowSchillerNaumann
)
:
dragModel(dict, pair, registerObject),
residualRe_("residualRe", dimless, dict.lookup("residualRe"))
residualRe_("residualRe", dimless, dict)
{}

View File

@ -49,7 +49,7 @@ Foam::dragModels::SchillerNaumann::SchillerNaumann
)
:
dragModel(dict, pair, registerObject),
residualRe_("residualRe", dimless, dict.lookup("residualRe"))
residualRe_("residualRe", dimless, dict)
{}

View File

@ -49,9 +49,9 @@ Foam::dragModels::TomiyamaAnalytic::TomiyamaAnalytic
)
:
dragModel(dict, pair, registerObject),
residualRe_("residualRe", dimless, dict.lookup("residualRe")),
residualEo_("residualEo", dimless, dict.lookup("residualEo")),
residualE_("residualE", dimless, dict.lookup("residualE"))
residualRe_("residualRe", dimless, dict),
residualEo_("residualEo", dimless, dict),
residualE_("residualE", dimless, dict)
{}

View File

@ -49,7 +49,7 @@ Foam::dragModels::TomiyamaCorrelated::TomiyamaCorrelated
)
:
dragModel(dict, pair, registerObject),
A_("A", dimless, dict.lookup("A"))
A_("A", dimless, dict)
{}

View File

@ -49,7 +49,7 @@ Foam::dragModels::WenYu::WenYu
)
:
dragModel(dict, pair, registerObject),
residualRe_("residualRe", dimless, dict.lookup("residualRe"))
residualRe_("residualRe", dimless, dict)
{}

View File

@ -51,8 +51,8 @@ Foam::dragModels::segregated::segregated
)
:
dragModel(dict, pair, registerObject),
m_("m", dimless, dict.lookup("m")),
n_("n", dimless, dict.lookup("n"))
m_("m", dimless, dict),
n_("n", dimless, dict)
{}

View File

@ -49,7 +49,7 @@ Foam::liftModels::LegendreMagnaudet::LegendreMagnaudet
)
:
liftModel(dict, pair),
residualRe_("residualRe", dimless, dict.lookup("residualRe"))
residualRe_("residualRe", dimless, dict)
{}

View File

@ -48,7 +48,7 @@ Foam::liftModels::constantLiftCoefficient::constantLiftCoefficient
)
:
liftModel(dict, pair),
Cl_("Cl", dimless, dict.lookup("Cl"))
Cl_("Cl", dimless, dict)
{}

View File

@ -63,7 +63,7 @@ Foam::swarmCorrections::TomiyamaSwarm::TomiyamaSwarm
pair_.dispersed().residualAlpha().value()
)
),
l_("l", dimless, dict.lookup("l"))
l_("l", dimless, dict)
{}

View File

@ -56,7 +56,7 @@ Foam::turbulentDispersionModels::Burns::Burns
)
:
turbulentDispersionModel(dict, pair),
sigma_("sigma", dimless, dict.lookup("sigma")),
sigma_("sigma", dimless, dict),
residualAlpha_
(
"residualAlpha",

View File

@ -56,7 +56,7 @@ Foam::turbulentDispersionModels::Gosman::Gosman
)
:
turbulentDispersionModel(dict, pair),
sigma_("sigma", dimless, dict.lookup("sigma"))
sigma_("sigma", dimless, dict)
{}

View File

@ -54,7 +54,7 @@ Foam::turbulentDispersionModels::LopezDeBertodano::LopezDeBertodano
)
:
turbulentDispersionModel(dict, pair),
Ctd_("Ctd", dimless, dict.lookup("Ctd"))
Ctd_("Ctd", dimless, dict)
{}

View File

@ -55,7 +55,7 @@ constantTurbulentDispersionCoefficient
)
:
turbulentDispersionModel(dict, pair),
Ctd_("Ctd", dimless, dict.lookup("Ctd"))
Ctd_("Ctd", dimless, dict)
{}

View File

@ -55,7 +55,7 @@ constantVirtualMassCoefficient
)
:
virtualMassModel(dict, pair, registerObject),
Cvm_("Cvm", dimless, dict.lookup("Cvm"))
Cvm_("Cvm", dimless, dict)
{}

View File

@ -53,8 +53,8 @@ Foam::wallLubricationModels::Antal::Antal
)
:
wallLubricationModel(dict, pair),
Cw1_("Cw1", dimless, dict.lookup("Cw1")),
Cw2_("Cw2", dimless, dict.lookup("Cw2"))
Cw1_("Cw1", dimless, dict),
Cw2_("Cw2", dimless, dict)
{}

View File

@ -53,8 +53,8 @@ Foam::wallLubricationModels::Frank::Frank
)
:
wallLubricationModel(dict, pair),
Cwd_("Cwd", dimless, dict.lookup("Cwd")),
Cwc_("Cwc", dimless, dict.lookup("Cwc")),
Cwd_("Cwd", dimless, dict),
Cwc_("Cwc", dimless, dict),
p_(readScalar(dict.lookup("p")))
{}

View File

@ -53,7 +53,7 @@ Foam::wallLubricationModels::TomiyamaWallLubrication::TomiyamaWallLubrication
)
:
wallLubricationModel(dict, pair),
D_("Cwd", dimLength, dict.lookup("D"))
D_("Cwd", dimLength, dict)
{}

View File

@ -57,7 +57,7 @@ Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::HrenyaSinclair
:
conductivityModel(dict),
coeffDict_(dict.subDict(typeName + "Coeffs")),
L_("L", dimensionSet(0, 1, 0, 0, 0), coeffDict_.lookup("L"))
L_("L", dimensionSet(0, 1, 0, 0, 0), coeffDict_)
{}

View File

@ -58,11 +58,11 @@ JohnsonJackson
:
frictionalStressModel(dict),
coeffDict_(dict.subDict(typeName + "Coeffs")),
Fr_("Fr", dimensionSet(1, -1, -2, 0, 0), coeffDict_.lookup("Fr")),
eta_("eta", dimless, coeffDict_.lookup("eta")),
p_("p", dimless, coeffDict_.lookup("p")),
phi_("phi", dimless, coeffDict_.lookup("phi")),
alphaDeltaMin_("alphaDeltaMin", dimless, coeffDict_.lookup("alphaDeltaMin"))
Fr_("Fr", dimensionSet(1, -1, -2, 0, 0), coeffDict_),
eta_("eta", dimless, coeffDict_),
p_("p", dimless, coeffDict_),
phi_("phi", dimless, coeffDict_),
alphaDeltaMin_("alphaDeltaMin", dimless, coeffDict_)
{
phi_ *= constant::mathematical::pi/180.0;
}

View File

@ -56,7 +56,7 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::Schaeffer
:
frictionalStressModel(dict),
coeffDict_(dict.subDict(typeName + "Coeffs")),
phi_("phi", dimless, coeffDict_.lookup("phi"))
phi_("phi", dimless, coeffDict_)
{
phi_ *= constant::mathematical::pi/180.0;
}

View File

@ -92,19 +92,19 @@ Foam::RASModels::kineticTheoryModel::kineticTheoryModel
),
equilibrium_(coeffDict_.lookup("equilibrium")),
e_("e", dimless, coeffDict_.lookup("e")),
alphaMax_("alphaMax", dimless, coeffDict_.lookup("alphaMax")),
e_("e", dimless, coeffDict_),
alphaMax_("alphaMax", dimless, coeffDict_),
alphaMinFriction_
(
"alphaMinFriction",
dimless,
coeffDict_.lookup("alphaMinFriction")
coeffDict_
),
residualAlpha_
(
"residualAlpha",
dimless,
coeffDict_.lookup("residualAlpha")
coeffDict_
),
Theta_

View File

@ -57,7 +57,7 @@ Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::HrenyaSinclair
:
viscosityModel(dict),
coeffDict_(dict.subDict(typeName + "Coeffs")),
L_("L", dimensionSet(0, 1, 0, 0, 0), coeffDict_.lookup("L"))
L_("L", dimensionSet(0, 1, 0, 0, 0), coeffDict_)
{}

View File

@ -75,13 +75,13 @@ Foam::diameterModels::IATE::IATE
),
phase_.mesh()
),
dMax_("dMax", dimLength, diameterProperties_.lookup("dMax")),
dMin_("dMin", dimLength, diameterProperties_.lookup("dMin")),
dMax_("dMax", dimLength, diameterProperties_),
dMin_("dMin", dimLength, diameterProperties_),
residualAlpha_
(
"residualAlpha",
dimless,
diameterProperties_.lookup("residualAlpha")
diameterProperties_
),
d_
(

View File

@ -51,9 +51,9 @@ randomCoalescence
)
:
IATEsource(iate),
Crc_("Crc", dimless, dict.lookup("Crc")),
C_("C", dimless, dict.lookup("C")),
alphaMax_("alphaMax", dimless, dict.lookup("alphaMax"))
Crc_("Crc", dimless, dict),
C_("C", dimless, dict),
alphaMax_("alphaMax", dimless, dict)
{}

View File

@ -51,8 +51,8 @@ turbulentBreakUp
)
:
IATEsource(iate),
Cti_("Cti", dimless, dict.lookup("Cti")),
WeCr_("WeCr", dimless, dict.lookup("WeCr"))
Cti_("Cti", dimless, dict),
WeCr_("WeCr", dimless, dict)
{}

View File

@ -56,7 +56,7 @@ wakeEntrainmentCoalescence
)
:
IATEsource(iate),
Cwe_("Cwe", dimless, dict.lookup("Cwe"))
Cwe_("Cwe", dimless, dict)
{}

View File

@ -53,7 +53,7 @@ Foam::diameterModels::constant::constant
)
:
diameterModel(diameterProperties, phase),
d_("d", dimLength, diameterProperties_.lookup("d"))
d_("d", dimLength, diameterProperties_)
{}

View File

@ -53,8 +53,8 @@ Foam::diameterModels::isothermal::isothermal
)
:
diameterModel(diameterProperties, phase),
d0_("d0", dimLength, diameterProperties_.lookup("d0")),
p0_("p0", dimPressure, diameterProperties_.lookup("p0"))
d0_("d0", dimLength, diameterProperties_),
p0_("p0", dimPressure, diameterProperties_)
{}

View File

@ -49,13 +49,13 @@ Foam::MultiComponentPhaseModel<BasePhaseModel>::MultiComponentPhaseModel
(
"Sc",
dimless,
fluid.subDict(phaseName).lookup("Sc")
fluid.subDict(phaseName)
),
residualAlpha_
(
"residualAlpha",
dimless,
fluid.mesh().solverDict("Yi").lookup("residualAlpha")
fluid.mesh().solverDict("Yi")
),
inertIndex_(-1)
{

View File

@ -37,10 +37,10 @@ volScalarField& alpha2(mixture.alpha2());
const dimensionedScalar& rho1 = mixture.rho1();
const dimensionedScalar& rho2 = mixture.rho2();
dimensionedScalar Dab("Dab", dimViscosity, mixture.lookup("Dab"));
dimensionedScalar Dab("Dab", dimViscosity, mixture);
// Read the reciprocal of the turbulent Schmidt number
dimensionedScalar alphatab("alphatab", dimless, mixture.lookup("alphatab"));
dimensionedScalar alphatab("alphatab", dimless, mixture);
// Need to store rho for ddt(rho, U)
volScalarField rho("rho", alpha1*rho1 + alpha2*rho2);

View File

@ -27,7 +27,7 @@ dimensionedScalar pMin
(
"pMin",
dimPressure,
fluid.lookup("pMin")
fluid
);
#include "gh.H"

View File

@ -53,7 +53,7 @@ Foam::aspectRatioModels::constantAspectRatio::constantAspectRatio
)
:
aspectRatioModel(dict, pair),
E0_("E0", dimless, dict.lookup("E0"))
E0_("E0", dimless, dict)
{}

View File

@ -49,7 +49,7 @@ Foam::dragModels::GidaspowSchillerNaumann::GidaspowSchillerNaumann
)
:
dragModel(dict, pair, registerObject),
residualRe_("residualRe", dimless, dict.lookup("residualRe"))
residualRe_("residualRe", dimless, dict)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -49,7 +49,7 @@ Foam::dragModels::SchillerNaumann::SchillerNaumann
)
:
dragModel(dict, pair, registerObject),
residualRe_("residualRe", dimless, dict.lookup("residualRe"))
residualRe_("residualRe", dimless, dict)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -49,9 +49,9 @@ Foam::dragModels::TomiyamaAnalytic::TomiyamaAnalytic
)
:
dragModel(dict, pair, registerObject),
residualRe_("residualRe", dimless, dict.lookup("residualRe")),
residualEo_("residualEo", dimless, dict.lookup("residualEo")),
residualE_("residualE", dimless, dict.lookup("residualE"))
residualRe_("residualRe", dimless, dict),
residualEo_("residualEo", dimless, dict),
residualE_("residualE", dimless, dict)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -49,7 +49,7 @@ Foam::dragModels::TomiyamaCorrelated::TomiyamaCorrelated
)
:
dragModel(dict, pair, registerObject),
A_("A", dimless, dict.lookup("A"))
A_("A", dimless, dict)
{}

View File

@ -49,7 +49,7 @@ Foam::dragModels::WenYu::WenYu
)
:
dragModel(dict, pair, registerObject),
residualRe_("residualRe", dimless, dict.lookup("residualRe"))
residualRe_("residualRe", dimless, dict)
{}

View File

@ -51,8 +51,8 @@ Foam::dragModels::segregated::segregated
)
:
dragModel(dict, pair, registerObject),
m_("m", dimless, dict.lookup("m")),
n_("n", dimless, dict.lookup("n"))
m_("m", dimless, dict),
n_("n", dimless, dict)
{}

View File

@ -49,7 +49,7 @@ Foam::liftModels::LegendreMagnaudet::LegendreMagnaudet
)
:
liftModel(dict, pair),
residualRe_("residualRe", dimless, dict.lookup("residualRe"))
residualRe_("residualRe", dimless, dict)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -48,7 +48,7 @@ Foam::liftModels::constantLiftCoefficient::constantLiftCoefficient
)
:
liftModel(dict, pair),
Cl_("Cl", dimless, dict.lookup("Cl"))
Cl_("Cl", dimless, dict)
{}

View File

@ -63,7 +63,7 @@ Foam::swarmCorrections::TomiyamaSwarm::TomiyamaSwarm
pair_.dispersed().residualAlpha().value()
)
),
l_("l", dimless, dict.lookup("l"))
l_("l", dimless, dict)
{}

View File

@ -56,7 +56,7 @@ Foam::turbulentDispersionModels::Burns::Burns
)
:
turbulentDispersionModel(dict, pair),
sigma_("sigma", dimless, dict.lookup("sigma")),
sigma_("sigma", dimless, dict),
residualAlpha_
(
"residualAlpha",

View File

@ -56,7 +56,7 @@ Foam::turbulentDispersionModels::Gosman::Gosman
)
:
turbulentDispersionModel(dict, pair),
sigma_("sigma", dimless, dict.lookup("sigma"))
sigma_("sigma", dimless, dict)
{}

View File

@ -54,7 +54,7 @@ Foam::turbulentDispersionModels::LopezDeBertodano::LopezDeBertodano
)
:
turbulentDispersionModel(dict, pair),
Ctd_("Ctd", dimless, dict.lookup("Ctd"))
Ctd_("Ctd", dimless, dict)
{}

View File

@ -55,7 +55,7 @@ constantTurbulentDispersionCoefficient
)
:
turbulentDispersionModel(dict, pair),
Ctd_("Ctd", dimless, dict.lookup("Ctd"))
Ctd_("Ctd", dimless, dict)
{}

View File

@ -55,7 +55,7 @@ constantVirtualMassCoefficient
)
:
virtualMassModel(dict, pair, registerObject),
Cvm_("Cvm", dimless, dict.lookup("Cvm"))
Cvm_("Cvm", dimless, dict)
{}

View File

@ -53,8 +53,8 @@ Foam::wallLubricationModels::Antal::Antal
)
:
wallLubricationModel(dict, pair),
Cw1_("Cw1", dimless, dict.lookup("Cw1")),
Cw2_("Cw2", dimless, dict.lookup("Cw2"))
Cw1_("Cw1", dimless, dict),
Cw2_("Cw2", dimless, dict)
{}

View File

@ -53,8 +53,8 @@ Foam::wallLubricationModels::Frank::Frank
)
:
wallLubricationModel(dict, pair),
Cwd_("Cwd", dimless, dict.lookup("Cwd")),
Cwc_("Cwc", dimless, dict.lookup("Cwc")),
Cwd_("Cwd", dimless, dict),
Cwc_("Cwc", dimless, dict),
p_(readScalar(dict.lookup("p")))
{}

View File

@ -53,7 +53,7 @@ Foam::wallLubricationModels::TomiyamaWallLubrication::TomiyamaWallLubrication
)
:
wallLubricationModel(dict, pair),
D_("Cwd", dimLength, dict.lookup("D"))
D_("Cwd", dimLength, dict)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -57,7 +57,7 @@ Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::HrenyaSinclair
:
conductivityModel(dict),
coeffDict_(dict.subDict(typeName + "Coeffs")),
L_("L", dimensionSet(0, 1, 0, 0, 0), coeffDict_.lookup("L"))
L_("L", dimensionSet(0, 1, 0, 0, 0), coeffDict_)
{}

View File

@ -58,11 +58,11 @@ JohnsonJackson
:
frictionalStressModel(dict),
coeffDict_(dict.subDict(typeName + "Coeffs")),
Fr_("Fr", dimensionSet(1, -1, -2, 0, 0), coeffDict_.lookup("Fr")),
eta_("eta", dimless, coeffDict_.lookup("eta")),
p_("p", dimless, coeffDict_.lookup("p")),
phi_("phi", dimless, coeffDict_.lookup("phi")),
alphaDeltaMin_("alphaDeltaMin", dimless, coeffDict_.lookup("alphaDeltaMin"))
Fr_("Fr", dimensionSet(1, -1, -2, 0, 0), coeffDict_),
eta_("eta", dimless, coeffDict_),
p_("p", dimless, coeffDict_),
phi_("phi", dimless, coeffDict_),
alphaDeltaMin_("alphaDeltaMin", dimless, coeffDict_)
{
phi_ *= constant::mathematical::pi/180.0;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,7 +56,7 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::Schaeffer
:
frictionalStressModel(dict),
coeffDict_(dict.subDict(typeName + "Coeffs")),
phi_("phi", dimless, coeffDict_.lookup("phi"))
phi_("phi", dimless, coeffDict_)
{
phi_ *= constant::mathematical::pi/180.0;
}

View File

@ -92,19 +92,19 @@ Foam::RASModels::kineticTheoryModel::kineticTheoryModel
),
equilibrium_(coeffDict_.lookup("equilibrium")),
e_("e", dimless, coeffDict_.lookup("e")),
alphaMax_("alphaMax", dimless, coeffDict_.lookup("alphaMax")),
e_("e", dimless, coeffDict_),
alphaMax_("alphaMax", dimless, coeffDict_),
alphaMinFriction_
(
"alphaMinFriction",
dimless,
coeffDict_.lookup("alphaMinFriction")
coeffDict_
),
residualAlpha_
(
"residualAlpha",
dimless,
coeffDict_.lookup("residualAlpha")
coeffDict_
),
Theta_

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -57,7 +57,7 @@ Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::HrenyaSinclair
:
viscosityModel(dict),
coeffDict_(dict.subDict(typeName + "Coeffs")),
L_("L", dimensionSet(0, 1, 0, 0, 0), coeffDict_.lookup("L"))
L_("L", dimensionSet(0, 1, 0, 0, 0), coeffDict_)
{}

View File

@ -76,13 +76,13 @@ Foam::diameterModels::IATE::IATE
),
phase_.U().mesh()
),
dMax_("dMax", dimLength, diameterProperties_.lookup("dMax")),
dMin_("dMin", dimLength, diameterProperties_.lookup("dMin")),
dMax_("dMax", dimLength, diameterProperties_),
dMin_("dMin", dimLength, diameterProperties_),
residualAlpha_
(
"residualAlpha",
dimless,
diameterProperties_.lookup("residualAlpha")
diameterProperties_
),
d_
(

View File

@ -51,9 +51,9 @@ randomCoalescence
)
:
IATEsource(iate),
Crc_("Crc", dimless, dict.lookup("Crc")),
C_("C", dimless, dict.lookup("C")),
alphaMax_("alphaMax", dimless, dict.lookup("alphaMax"))
Crc_("Crc", dimless, dict),
C_("C", dimless, dict),
alphaMax_("alphaMax", dimless, dict)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -51,8 +51,8 @@ turbulentBreakUp
)
:
IATEsource(iate),
Cti_("Cti", dimless, dict.lookup("Cti")),
WeCr_("WeCr", dimless, dict.lookup("WeCr"))
Cti_("Cti", dimless, dict),
WeCr_("WeCr", dimless, dict)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,7 +56,7 @@ wakeEntrainmentCoalescence
)
:
IATEsource(iate),
Cwe_("Cwe", dimless, dict.lookup("Cwe"))
Cwe_("Cwe", dimless, dict)
{}

View File

@ -53,7 +53,7 @@ Foam::diameterModels::constant::constant
)
:
diameterModel(diameterProperties, phase),
d_("d", dimLength, diameterProperties_.lookup("d"))
d_("d", dimLength, diameterProperties_)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -53,8 +53,8 @@ Foam::diameterModels::isothermal::isothermal
)
:
diameterModel(diameterProperties, phase),
d0_("d0", dimLength, diameterProperties_.lookup("d0")),
p0_("p0", dimPressure, diameterProperties_.lookup("p0"))
d0_("d0", dimLength, diameterProperties_),
p0_("p0", dimPressure, diameterProperties_)
{}

View File

@ -27,39 +27,47 @@ License
#include "pTraits.H"
#include "dictionary.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
Foam::dimensioned<Type> Foam::dimensioned<Type>::lookupOrDefault
(
const word& name,
const dictionary& dict,
const Type& defaultValue,
const dimensionSet& dims
)
void Foam::dimensioned<Type>::initialize(Istream& is)
{
if (dict.found(name))
{
return dimensioned<Type>(name, dims, dict.lookup(name));
}
else
{
return dimensioned<Type>(name, dims, defaultValue);
}
}
token nextToken(is);
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 >> name_;
is >> nextToken;
is.putBack(nextToken);
}
template<class Type>
Foam::dimensioned<Type> Foam::dimensioned<Type>::lookupOrAddToDict
(
const word& name,
dictionary& dict,
const Type& defaultValue,
const dimensionSet& dims
)
{
Type value = dict.lookupOrAddDefault<Type>(name, defaultValue);
return dimensioned<Type>(name, dims, value);
// If the dimensions are provided compare with the argument
scalar multiplier = 1.0;
if (nextToken == token::BEGIN_SQR)
{
dimensionSet dims(dimless);
dims.read(is, multiplier);
if (dims != dimensions_)
{
FatalIOErrorIn
(
"dimensioned<Type>::dimensioned"
"(const word&, const dimensionSet&, Istream&)",
is
) << "The dimensions " << dims
<< " provided do not match the required dimensions "
<< dimensions_
<< abort(FatalIOError);
}
}
is >> value_;
value_ *= multiplier;
}
@ -133,42 +141,23 @@ Foam::dimensioned<Type>::dimensioned
dimensions_(dimSet),
value_(pTraits<Type>::zero)
{
token nextToken(is);
is.putBack(nextToken);
initialize(is);
}
// Check if the original format is used in which the name is provided
// and reset the name to that read
if (nextToken.isWord())
{
is >> name_;
is >> nextToken;
is.putBack(nextToken);
}
// If the dimensions are provided compare with the argument
scalar multiplier = 1.0;
if (nextToken == token::BEGIN_SQR)
{
dimensionSet dims(dimless);
dims.read(is, multiplier);
if (dims != dimensions_)
{
FatalIOErrorIn
(
"dimensioned<Type>::dimensioned"
"(const word&, const dimensionSet&, Istream&)",
is
) << "The dimensions " << dims
<< " provided do not match the required dimensions "
<< dimensions_
<< abort(FatalIOError);
}
}
is >> value_;
value_ *= multiplier;
template<class Type>
Foam::dimensioned<Type>::dimensioned
(
const word& name,
const dimensionSet& dimSet,
const dictionary& dict
)
:
name_(name),
dimensions_(dimSet),
value_(pTraits<Type>::zero)
{
initialize(dict.lookup(name));
}
@ -182,6 +171,42 @@ Foam::dimensioned<Type>::dimensioned
{}
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
template<class Type>
Foam::dimensioned<Type> Foam::dimensioned<Type>::lookupOrDefault
(
const word& name,
const dictionary& dict,
const Type& defaultValue,
const dimensionSet& dims
)
{
if (dict.found(name))
{
return dimensioned<Type>(name, dims, dict.lookup(name));
}
else
{
return dimensioned<Type>(name, dims, defaultValue);
}
}
template<class Type>
Foam::dimensioned<Type> Foam::dimensioned<Type>::lookupOrAddToDict
(
const word& name,
dictionary& dict,
const Type& defaultValue,
const dimensionSet& dims
)
{
Type value = dict.lookupOrAddDefault<Type>(name, defaultValue);
return dimensioned<Type>(name, dims, value);
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -64,7 +64,7 @@ class dictionary;
template<class Type>
class dimensioned
{
// private data
// Private data
//- Variable name
word name_;
@ -76,6 +76,13 @@ class dimensioned
Type value_;
// Private member functions
//- Initialize from Istream
// Helper-function for constructors
void initialize(Istream& is);
public:
//- Component type
@ -107,9 +114,15 @@ public:
//- Construct from an Istream with a given name and dimensions
dimensioned(const word&, const dimensionSet&, Istream&);
//- Construct from dictionary lookup with a given name and dimensions
dimensioned(const word&, const dimensionSet&, const dictionary&);
//- Null constructor
dimensioned();
// Static member functions
//- Construct from dictionary, with default value.
static dimensioned<Type> lookupOrDefault
(

View File

@ -58,9 +58,9 @@ ArrheniusViscosity::ArrheniusViscosity
:
filmViscosityModel(typeName, owner, dict, mu),
viscosity_(filmViscosityModel::New(owner, coeffDict_, mu)),
k1_("k1", dimTemperature, coeffDict_.lookup("k1")),
k2_("k2", dimTemperature, coeffDict_.lookup("k2")),
Tref_("Tref", dimTemperature, coeffDict_.lookup("Tref"))
k1_("k1", dimTemperature, coeffDict_),
k2_("k2", dimTemperature, coeffDict_),
Tref_("Tref", dimTemperature, coeffDict_)
{}

View File

@ -56,7 +56,7 @@ constantViscosity::constantViscosity
)
:
filmViscosityModel(typeName, owner, dict, mu),
mu0_("mu0", dimDynamicViscosity, coeffDict_.lookup("mu0"))
mu0_("mu0", dimDynamicViscosity, coeffDict_)
{
mu_ == mu0_;
}

View File

@ -63,12 +63,12 @@ thixotropicViscosity::thixotropicViscosity
)
:
filmViscosityModel(typeName, owner, dict, mu),
a_("a", dimless/dimTime, coeffDict_.lookup("a")),
b_("b", dimless, coeffDict_.lookup("b")),
d_("d", dimless, coeffDict_.lookup("d")),
c_("c", pow(dimTime, d_.value() - scalar(1)), coeffDict_.lookup("c")),
mu0_("mu0", dimPressure*dimTime, coeffDict_.lookup("mu0")),
muInf_("muInf", mu0_.dimensions(), coeffDict_.lookup("muInf")),
a_("a", dimless/dimTime, coeffDict_),
b_("b", dimless, coeffDict_),
d_("d", dimless, coeffDict_),
c_("c", pow(dimTime, d_.value() - scalar(1)), coeffDict_),
mu0_("mu0", dimPressure*dimTime, coeffDict_),
muInf_("muInf", mu0_.dimensions(), coeffDict_),
K_(1.0 - Foam::sqrt(muInf_/mu0_)),
lambda_
(

View File

@ -97,8 +97,8 @@ Foam::incompressibleTwoPhaseMixture::incompressibleTwoPhaseMixture
)
),
rho1_("rho", dimDensity, nuModel1_->viscosityProperties().lookup("rho")),
rho2_("rho", dimDensity, nuModel2_->viscosityProperties().lookup("rho")),
rho1_("rho", dimDensity, nuModel1_->viscosityProperties()),
rho2_("rho", dimDensity, nuModel2_->viscosityProperties()),
U_(U),
phi_(phi),

View File

@ -68,10 +68,10 @@ Foam::viscosityModels::BirdCarreau::BirdCarreau
:
viscosityModel(name, viscosityProperties, U, phi),
BirdCarreauCoeffs_(viscosityProperties.subDict(typeName + "Coeffs")),
nu0_("nu0", dimViscosity, BirdCarreauCoeffs_.lookup("nu0")),
nuInf_("nuInf", dimViscosity, BirdCarreauCoeffs_.lookup("nuInf")),
k_("k", dimTime, BirdCarreauCoeffs_.lookup("k")),
n_("n", dimless, BirdCarreauCoeffs_.lookup("n")),
nu0_("nu0", dimViscosity, BirdCarreauCoeffs_),
nuInf_("nuInf", dimViscosity, BirdCarreauCoeffs_),
k_("k", dimTime, BirdCarreauCoeffs_),
n_("n", dimless, BirdCarreauCoeffs_),
a_
(
BirdCarreauCoeffs_.lookupOrDefault

View File

@ -66,10 +66,10 @@ Foam::viscosityModels::CrossPowerLaw::CrossPowerLaw
:
viscosityModel(name, viscosityProperties, U, phi),
CrossPowerLawCoeffs_(viscosityProperties.subDict(typeName + "Coeffs")),
nu0_("nu0", dimViscosity, CrossPowerLawCoeffs_.lookup("nu0")),
nuInf_("nuInf", dimViscosity, CrossPowerLawCoeffs_.lookup("nuInf")),
m_("m", dimTime, CrossPowerLawCoeffs_.lookup("m")),
n_("n", dimless, CrossPowerLawCoeffs_.lookup("n")),
nu0_("nu0", dimViscosity, CrossPowerLawCoeffs_),
nuInf_("nuInf", dimViscosity, CrossPowerLawCoeffs_),
m_("m", dimTime, CrossPowerLawCoeffs_),
n_("n", dimless, CrossPowerLawCoeffs_),
nu_
(
IOobject

View File

@ -79,10 +79,10 @@ Foam::viscosityModels::HerschelBulkley::HerschelBulkley
:
viscosityModel(name, viscosityProperties, U, phi),
HerschelBulkleyCoeffs_(viscosityProperties.subDict(typeName + "Coeffs")),
k_("k", dimViscosity, HerschelBulkleyCoeffs_.lookup("k")),
n_("n", dimless, HerschelBulkleyCoeffs_.lookup("n")),
tau0_("tau0", dimViscosity/dimTime, HerschelBulkleyCoeffs_.lookup("tau0")),
nu0_("nu0", dimViscosity, HerschelBulkleyCoeffs_.lookup("nu0")),
k_("k", dimViscosity, HerschelBulkleyCoeffs_),
n_("n", dimless, HerschelBulkleyCoeffs_),
tau0_("tau0", dimViscosity/dimTime, HerschelBulkleyCoeffs_),
nu0_("nu0", dimViscosity, HerschelBulkleyCoeffs_),
nu_
(
IOobject

View File

@ -50,7 +50,7 @@ Foam::viscosityModels::Newtonian::Newtonian
)
:
viscosityModel(name, viscosityProperties, U, phi),
nu0_("nu", dimViscosity, viscosityProperties_.lookup("nu")),
nu0_("nu", dimViscosity, viscosityProperties_),
nu_
(
IOobject

Some files were not shown because too many files have changed in this diff Show More