mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -14,5 +14,7 @@
|
|||||||
|
|
||||||
dimensionedScalar nu
|
dimensionedScalar nu
|
||||||
(
|
(
|
||||||
transportProperties.lookup("nu")
|
"nu",
|
||||||
|
dimViscosity,
|
||||||
|
transportProperties
|
||||||
);
|
);
|
||||||
|
|||||||
@ -51,8 +51,8 @@ Foam::PDRDragModels::basic::basic
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
PDRDragModel(PDRProperties, turbulence, rho, U, phi),
|
PDRDragModel(PDRProperties, turbulence, rho, U, phi),
|
||||||
Csu("Csu", dimless, PDRDragModelCoeffs_.lookup("Csu")),
|
Csu("Csu", dimless, PDRDragModelCoeffs_),
|
||||||
Csk("Csk", dimless, PDRDragModelCoeffs_.lookup("Csk")),
|
Csk("Csk", dimless, PDRDragModelCoeffs_),
|
||||||
|
|
||||||
Aw_
|
Aw_
|
||||||
(
|
(
|
||||||
|
|||||||
@ -14,17 +14,23 @@
|
|||||||
|
|
||||||
dimensionedScalar rho0
|
dimensionedScalar rho0
|
||||||
(
|
(
|
||||||
thermodynamicProperties.lookup("rho0")
|
"rho0",
|
||||||
|
dimDensity,
|
||||||
|
thermodynamicProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar p0
|
dimensionedScalar p0
|
||||||
(
|
(
|
||||||
thermodynamicProperties.lookup("p0")
|
"p0",
|
||||||
|
dimPressure,
|
||||||
|
thermodynamicProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar psi
|
dimensionedScalar psi
|
||||||
(
|
(
|
||||||
thermodynamicProperties.lookup("psi")
|
"psi",
|
||||||
|
dimCompressibility,
|
||||||
|
thermodynamicProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
// Density offset, i.e. the constant part of the density
|
// Density offset, i.e. the constant part of the density
|
||||||
|
|||||||
@ -1,18 +1,20 @@
|
|||||||
Info<< "Reading transportProperties\n" << endl;
|
Info<< "Reading transportProperties\n" << endl;
|
||||||
|
|
||||||
IOdictionary transportProperties
|
IOdictionary transportProperties
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
(
|
(
|
||||||
IOobject
|
"transportProperties",
|
||||||
(
|
runTime.constant(),
|
||||||
"transportProperties",
|
mesh,
|
||||||
runTime.constant(),
|
IOobject::MUST_READ_IF_MODIFIED,
|
||||||
mesh,
|
IOobject::NO_WRITE
|
||||||
IOobject::MUST_READ_IF_MODIFIED,
|
)
|
||||||
IOobject::NO_WRITE
|
);
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar mu
|
dimensionedScalar mu
|
||||||
(
|
(
|
||||||
transportProperties.lookup("mu")
|
"mu",
|
||||||
);
|
dimDynamicViscosity,
|
||||||
|
transportProperties
|
||||||
|
);
|
||||||
|
|||||||
@ -14,22 +14,30 @@ IOdictionary transportProperties
|
|||||||
|
|
||||||
dimensionedScalar rho
|
dimensionedScalar rho
|
||||||
(
|
(
|
||||||
transportProperties.lookup("rho")
|
"rho",
|
||||||
|
dimDensity,
|
||||||
|
transportProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar nu
|
dimensionedScalar nu
|
||||||
(
|
(
|
||||||
transportProperties.lookup("nu")
|
"nu",
|
||||||
|
dimViscosity,
|
||||||
|
transportProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar mu
|
dimensionedScalar mu
|
||||||
(
|
(
|
||||||
transportProperties.lookup("mu")
|
"mu",
|
||||||
|
dimensionSet(1, 1, -2, 0, 0, -2, 0),
|
||||||
|
transportProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar sigma
|
dimensionedScalar sigma
|
||||||
(
|
(
|
||||||
transportProperties.lookup("sigma")
|
"sigma",
|
||||||
|
dimensionSet(-1, -3, 3, 0, 0, 2, 0),
|
||||||
|
transportProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Reading field p\n" << endl;
|
Info<< "Reading field p\n" << endl;
|
||||||
|
|||||||
@ -5,14 +5,14 @@ dimensionedScalar beta
|
|||||||
(
|
(
|
||||||
"beta",
|
"beta",
|
||||||
dimless/dimTemperature,
|
dimless/dimTemperature,
|
||||||
laminarTransport.lookup("beta")
|
laminarTransport
|
||||||
);
|
);
|
||||||
|
|
||||||
// Reference temperature [K]
|
// Reference temperature [K]
|
||||||
dimensionedScalar TRef("TRef", dimTemperature, laminarTransport.lookup("TRef"));
|
dimensionedScalar TRef("TRef", dimTemperature, laminarTransport);
|
||||||
|
|
||||||
// Laminar Prandtl number
|
// Laminar Prandtl number
|
||||||
dimensionedScalar Pr("Pr", dimless, laminarTransport.lookup("Pr"));
|
dimensionedScalar Pr("Pr", dimless, laminarTransport);
|
||||||
|
|
||||||
// Turbulent Prandtl number
|
// Turbulent Prandtl number
|
||||||
dimensionedScalar Prt("Prt", dimless, laminarTransport.lookup("Prt"));
|
dimensionedScalar Prt("Prt", dimless, laminarTransport);
|
||||||
|
|||||||
@ -36,7 +36,7 @@ autoPtr<incompressible::RASModel> turbulence
|
|||||||
incompressible::RASModel::New(U, phi, laminarTransport)
|
incompressible::RASModel::New(U, phi, laminarTransport)
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedVector Ubar("Ubar", dimVelocity, laminarTransport.lookup("Ubar"));
|
dimensionedVector Ubar("Ubar", dimVelocity, laminarTransport);
|
||||||
|
|
||||||
vector flowDirection = (Ubar/mag(Ubar)).value();
|
vector flowDirection = (Ubar/mag(Ubar)).value();
|
||||||
tensor flowMask = sqr(flowDirection);
|
tensor flowMask = sqr(flowDirection);
|
||||||
|
|||||||
@ -14,6 +14,8 @@ IOdictionary transportProperties
|
|||||||
|
|
||||||
dimensionedScalar nu
|
dimensionedScalar nu
|
||||||
(
|
(
|
||||||
|
"nu",
|
||||||
|
dimViscosity,
|
||||||
transportProperties.lookup("nu")
|
transportProperties.lookup("nu")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
(
|
(
|
||||||
"rhoInf",
|
"rhoInf",
|
||||||
dimDensity,
|
dimDensity,
|
||||||
laminarTransport.lookup("rhoInf")
|
laminarTransport
|
||||||
);
|
);
|
||||||
|
|
||||||
volScalarField rhoInf
|
volScalarField rhoInf
|
||||||
|
|||||||
@ -16,28 +16,28 @@ dimensionedScalar psil
|
|||||||
(
|
(
|
||||||
"psil",
|
"psil",
|
||||||
dimCompressibility,
|
dimCompressibility,
|
||||||
thermodynamicProperties.lookup("psil")
|
thermodynamicProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar rholSat
|
dimensionedScalar rholSat
|
||||||
(
|
(
|
||||||
"rholSat",
|
"rholSat",
|
||||||
dimDensity,
|
dimDensity,
|
||||||
thermodynamicProperties.lookup("rholSat")
|
thermodynamicProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar psiv
|
dimensionedScalar psiv
|
||||||
(
|
(
|
||||||
"psiv",
|
"psiv",
|
||||||
dimCompressibility,
|
dimCompressibility,
|
||||||
thermodynamicProperties.lookup("psiv")
|
thermodynamicProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar pSat
|
dimensionedScalar pSat
|
||||||
(
|
(
|
||||||
"pSat",
|
"pSat",
|
||||||
dimPressure,
|
dimPressure,
|
||||||
thermodynamicProperties.lookup("pSat")
|
thermodynamicProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar rhovSat("rhovSat", psiv*pSat);
|
dimensionedScalar rhovSat("rhovSat", psiv*pSat);
|
||||||
@ -48,5 +48,5 @@ dimensionedScalar rhoMin
|
|||||||
(
|
(
|
||||||
"rhoMin",
|
"rhoMin",
|
||||||
dimDensity,
|
dimDensity,
|
||||||
thermodynamicProperties.lookup("rhoMin")
|
thermodynamicProperties
|
||||||
);
|
);
|
||||||
|
|||||||
@ -61,7 +61,7 @@ dimensionedScalar pMin
|
|||||||
(
|
(
|
||||||
"pMin",
|
"pMin",
|
||||||
dimPressure,
|
dimPressure,
|
||||||
mixture.lookup("pMin")
|
mixture
|
||||||
);
|
);
|
||||||
|
|
||||||
mesh.setFluxRequired(p_rgh.name());
|
mesh.setFluxRequired(p_rgh.name());
|
||||||
|
|||||||
@ -46,7 +46,7 @@ volScalarField rho
|
|||||||
mixture.rho()
|
mixture.rho()
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar pMin("pMin", dimPressure, mixture.lookup("pMin"));
|
dimensionedScalar pMin("pMin", dimPressure, mixture);
|
||||||
|
|
||||||
mesh.setFluxRequired(p_rgh.name());
|
mesh.setFluxRequired(p_rgh.name());
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,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) 2014 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -80,8 +80,8 @@ incompressibleTwoPhaseInteractingMixture
|
|||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|
||||||
rhod_("rho", dimDensity, muModel_->viscosityProperties().lookup("rho")),
|
rhod_("rho", dimDensity, muModel_->viscosityProperties()),
|
||||||
rhoc_("rho", dimDensity, nucModel_->viscosityProperties().lookup("rho")),
|
rhoc_("rho", dimDensity, nucModel_->viscosityProperties()),
|
||||||
dd_
|
dd_
|
||||||
(
|
(
|
||||||
"d",
|
"d",
|
||||||
|
|||||||
@ -60,19 +60,19 @@ Foam::mixtureViscosityModels::BinghamPlastic::BinghamPlastic
|
|||||||
(
|
(
|
||||||
"BinghamCoeff",
|
"BinghamCoeff",
|
||||||
dimensionSet(1, -1, -2, 0, 0),
|
dimensionSet(1, -1, -2, 0, 0),
|
||||||
plasticCoeffs_.lookup("BinghamCoeff")
|
plasticCoeffs_
|
||||||
),
|
),
|
||||||
yieldStressExponent_
|
yieldStressExponent_
|
||||||
(
|
(
|
||||||
"BinghamExponent",
|
"BinghamExponent",
|
||||||
dimless,
|
dimless,
|
||||||
plasticCoeffs_.lookup("BinghamExponent")
|
plasticCoeffs_
|
||||||
),
|
),
|
||||||
yieldStressOffset_
|
yieldStressOffset_
|
||||||
(
|
(
|
||||||
"BinghamOffset",
|
"BinghamOffset",
|
||||||
dimless,
|
dimless,
|
||||||
plasticCoeffs_.lookup("BinghamOffset")
|
plasticCoeffs_
|
||||||
),
|
),
|
||||||
U_(U)
|
U_(U)
|
||||||
{}
|
{}
|
||||||
|
|||||||
@ -2,7 +2,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) 2014 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -47,9 +47,9 @@ Foam::relativeVelocityModels::general::general
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
relativeVelocityModel(dict, mixture),
|
relativeVelocityModel(dict, mixture),
|
||||||
a_("a", dimless, dict.lookup("a")),
|
a_("a", dimless, dict),
|
||||||
a1_("a1", dimless, dict.lookup("a1")),
|
a1_("a1", dimless, dict),
|
||||||
V0_("V0", dimVelocity, dict.lookup("V0")),
|
V0_("V0", dimVelocity, dict),
|
||||||
residualAlpha_(dict.lookup("residualAlpha"))
|
residualAlpha_(dict.lookup("residualAlpha"))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,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) 2014 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -47,9 +47,9 @@ Foam::relativeVelocityModels::simple::simple
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
relativeVelocityModel(dict, mixture),
|
relativeVelocityModel(dict, mixture),
|
||||||
a_("a", dimless, dict.lookup("a")),
|
a_("a", dimless, dict),
|
||||||
V0_("V0", dimVelocity, dict.lookup("V0")),
|
V0_("V0", dimVelocity, dict),
|
||||||
residualAlpha_("residualAlpha", dimless, dict.lookup("residualAlpha"))
|
residualAlpha_("residualAlpha", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -152,9 +152,9 @@ Foam::incompressibleThreePhaseMixture::incompressibleThreePhaseMixture
|
|||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|
||||||
rho1_("rho", dimDensity, nuModel1_->viscosityProperties().lookup("rho")),
|
rho1_("rho", dimDensity, nuModel1_->viscosityProperties()),
|
||||||
rho2_("rho", dimDensity, nuModel2_->viscosityProperties().lookup("rho")),
|
rho2_("rho", dimDensity, nuModel2_->viscosityProperties()),
|
||||||
rho3_("rho", dimDensity, nuModel3_->viscosityProperties().lookup("rho"))
|
rho3_("rho", dimDensity, nuModel3_->viscosityProperties())
|
||||||
{
|
{
|
||||||
alpha3_ == 1.0 - alpha1_ - alpha2_;
|
alpha3_ == 1.0 - alpha1_ - alpha2_;
|
||||||
calcNu();
|
calcNu();
|
||||||
|
|||||||
@ -2,7 +2,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-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -53,7 +53,7 @@ Foam::diameterModels::constant::constant
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
diameterModel(dict, phase),
|
diameterModel(dict, phase),
|
||||||
d_("d", dimLength, dict.lookup("d"))
|
d_("d", dimLength, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,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-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -53,8 +53,8 @@ Foam::diameterModels::isothermal::isothermal
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
diameterModel(dict, phase),
|
diameterModel(dict, phase),
|
||||||
d0_("d0", dimLength, dict.lookup("d0")),
|
d0_("d0", dimLength, dict),
|
||||||
p0_("p0", dimPressure, dict.lookup("p0"))
|
p0_("p0", dimPressure, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,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-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -57,25 +57,25 @@ Foam::phaseModel::phaseModel
|
|||||||
(
|
(
|
||||||
"nu",
|
"nu",
|
||||||
dimensionSet(0, 2, -1, 0, 0),
|
dimensionSet(0, 2, -1, 0, 0),
|
||||||
phaseDict_.lookup("nu")
|
phaseDict_
|
||||||
),
|
),
|
||||||
kappa_
|
kappa_
|
||||||
(
|
(
|
||||||
"kappa",
|
"kappa",
|
||||||
dimensionSet(1, 1, -3, -1, 0),
|
dimensionSet(1, 1, -3, -1, 0),
|
||||||
phaseDict_.lookup("kappa")
|
phaseDict_
|
||||||
),
|
),
|
||||||
Cp_
|
Cp_
|
||||||
(
|
(
|
||||||
"Cp",
|
"Cp",
|
||||||
dimensionSet(0, 2, -2, -1, 0),
|
dimensionSet(0, 2, -2, -1, 0),
|
||||||
phaseDict_.lookup("Cp")
|
phaseDict_
|
||||||
),
|
),
|
||||||
rho_
|
rho_
|
||||||
(
|
(
|
||||||
"rho",
|
"rho",
|
||||||
dimDensity,
|
dimDensity,
|
||||||
phaseDict_.lookup("rho")
|
phaseDict_
|
||||||
),
|
),
|
||||||
U_
|
U_
|
||||||
(
|
(
|
||||||
|
|||||||
@ -59,7 +59,7 @@ Foam::phase::phase
|
|||||||
phi
|
phi
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
rho_("rho", dimDensity, phaseDict_.lookup("rho"))
|
rho_("rho", dimDensity, phaseDict_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,7 @@ dimensionedScalar pMin
|
|||||||
(
|
(
|
||||||
"pMin",
|
"pMin",
|
||||||
dimPressure,
|
dimPressure,
|
||||||
fluid.lookup("pMin")
|
fluid
|
||||||
);
|
);
|
||||||
|
|
||||||
#include "gh.H"
|
#include "gh.H"
|
||||||
|
|||||||
@ -89,7 +89,7 @@ Foam::InterfaceCompositionModel<Thermo, OtherThermo>::InterfaceCompositionModel
|
|||||||
IOobject::groupName(basicThermo::dictName, pair.phase2().name())
|
IOobject::groupName(basicThermo::dictName, pair.phase2().name())
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
Le_("Le", dimless, dict.lookup("Le"))
|
Le_("Le", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -48,7 +48,7 @@ Foam::massTransferModels::Frossling::Frossling
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
massTransferModel(dict, pair),
|
massTransferModel(dict, pair),
|
||||||
Le_("Le", dimless, dict.lookup("Le"))
|
Le_("Le", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -53,7 +53,7 @@ Foam::massTransferModels::sphericalMassTransfer::sphericalMassTransfer
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
massTransferModel(dict, pair),
|
massTransferModel(dict, pair),
|
||||||
Le_("Le", dimless, dict.lookup("Le"))
|
Le_("Le", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -43,9 +43,9 @@ namespace saturationModels
|
|||||||
Foam::saturationModels::Antoine::Antoine(const dictionary& dict)
|
Foam::saturationModels::Antoine::Antoine(const dictionary& dict)
|
||||||
:
|
:
|
||||||
saturationModel(),
|
saturationModel(),
|
||||||
A_("A", dimless, dict.lookup("A")),
|
A_("A", dimless, dict),
|
||||||
B_("B", dimTemperature, dict.lookup("B")),
|
B_("B", dimTemperature, dict),
|
||||||
C_("C", dimTemperature, dict.lookup("C"))
|
C_("C", dimTemperature, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -51,9 +51,9 @@ Foam::saturationModels::AntoineExtended::AntoineExtended
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
Antoine(dict),
|
Antoine(dict),
|
||||||
D_("D", dimless, dict.lookup("D")),
|
D_("D", dimless, dict),
|
||||||
F_("F", dimless, dict.lookup("F")),
|
F_("F", dimless, dict),
|
||||||
E_("E", dimless/pow(dimTemperature, F_), dict.lookup("E"))
|
E_("E", dimless/pow(dimTemperature, F_), dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -49,8 +49,8 @@ Foam::saturationModels::constantSaturationConditions::
|
|||||||
constantSaturationConditions(const dictionary& dict)
|
constantSaturationConditions(const dictionary& dict)
|
||||||
:
|
:
|
||||||
saturationModel(),
|
saturationModel(),
|
||||||
pSat_("pSat", dimPressure, dict.lookup("pSat")),
|
pSat_("pSat", dimPressure, dict),
|
||||||
Tsat_("Tsat", dimTemperature, dict.lookup("Tsat"))
|
Tsat_("Tsat", dimTemperature, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -55,7 +55,7 @@ constantSurfaceTensionCoefficient
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
surfaceTensionModel(dict, pair, registerObject),
|
surfaceTensionModel(dict, pair, registerObject),
|
||||||
sigma_("sigma", dimSigma, dict.lookup("sigma"))
|
sigma_("sigma", dimSigma, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -53,7 +53,7 @@ Foam::aspectRatioModels::constantAspectRatio::constantAspectRatio
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
aspectRatioModel(dict, pair),
|
aspectRatioModel(dict, pair),
|
||||||
E0_("E0", dimless, dict.lookup("E0"))
|
E0_("E0", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,7 @@ Foam::dragModels::GidaspowSchillerNaumann::GidaspowSchillerNaumann
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
dragModel(dict, pair, registerObject),
|
dragModel(dict, pair, registerObject),
|
||||||
residualRe_("residualRe", dimless, dict.lookup("residualRe"))
|
residualRe_("residualRe", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,7 @@ Foam::dragModels::SchillerNaumann::SchillerNaumann
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
dragModel(dict, pair, registerObject),
|
dragModel(dict, pair, registerObject),
|
||||||
residualRe_("residualRe", dimless, dict.lookup("residualRe"))
|
residualRe_("residualRe", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -49,9 +49,9 @@ Foam::dragModels::TomiyamaAnalytic::TomiyamaAnalytic
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
dragModel(dict, pair, registerObject),
|
dragModel(dict, pair, registerObject),
|
||||||
residualRe_("residualRe", dimless, dict.lookup("residualRe")),
|
residualRe_("residualRe", dimless, dict),
|
||||||
residualEo_("residualEo", dimless, dict.lookup("residualEo")),
|
residualEo_("residualEo", dimless, dict),
|
||||||
residualE_("residualE", dimless, dict.lookup("residualE"))
|
residualE_("residualE", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,7 @@ Foam::dragModels::TomiyamaCorrelated::TomiyamaCorrelated
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
dragModel(dict, pair, registerObject),
|
dragModel(dict, pair, registerObject),
|
||||||
A_("A", dimless, dict.lookup("A"))
|
A_("A", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,7 @@ Foam::dragModels::WenYu::WenYu
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
dragModel(dict, pair, registerObject),
|
dragModel(dict, pair, registerObject),
|
||||||
residualRe_("residualRe", dimless, dict.lookup("residualRe"))
|
residualRe_("residualRe", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -51,8 +51,8 @@ Foam::dragModels::segregated::segregated
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
dragModel(dict, pair, registerObject),
|
dragModel(dict, pair, registerObject),
|
||||||
m_("m", dimless, dict.lookup("m")),
|
m_("m", dimless, dict),
|
||||||
n_("n", dimless, dict.lookup("n"))
|
n_("n", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,7 @@ Foam::liftModels::LegendreMagnaudet::LegendreMagnaudet
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
liftModel(dict, pair),
|
liftModel(dict, pair),
|
||||||
residualRe_("residualRe", dimless, dict.lookup("residualRe"))
|
residualRe_("residualRe", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -48,7 +48,7 @@ Foam::liftModels::constantLiftCoefficient::constantLiftCoefficient
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
liftModel(dict, pair),
|
liftModel(dict, pair),
|
||||||
Cl_("Cl", dimless, dict.lookup("Cl"))
|
Cl_("Cl", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -63,7 +63,7 @@ Foam::swarmCorrections::TomiyamaSwarm::TomiyamaSwarm
|
|||||||
pair_.dispersed().residualAlpha().value()
|
pair_.dispersed().residualAlpha().value()
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
l_("l", dimless, dict.lookup("l"))
|
l_("l", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -56,7 +56,7 @@ Foam::turbulentDispersionModels::Burns::Burns
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
turbulentDispersionModel(dict, pair),
|
turbulentDispersionModel(dict, pair),
|
||||||
sigma_("sigma", dimless, dict.lookup("sigma")),
|
sigma_("sigma", dimless, dict),
|
||||||
residualAlpha_
|
residualAlpha_
|
||||||
(
|
(
|
||||||
"residualAlpha",
|
"residualAlpha",
|
||||||
|
|||||||
@ -56,7 +56,7 @@ Foam::turbulentDispersionModels::Gosman::Gosman
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
turbulentDispersionModel(dict, pair),
|
turbulentDispersionModel(dict, pair),
|
||||||
sigma_("sigma", dimless, dict.lookup("sigma"))
|
sigma_("sigma", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -54,7 +54,7 @@ Foam::turbulentDispersionModels::LopezDeBertodano::LopezDeBertodano
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
turbulentDispersionModel(dict, pair),
|
turbulentDispersionModel(dict, pair),
|
||||||
Ctd_("Ctd", dimless, dict.lookup("Ctd"))
|
Ctd_("Ctd", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -55,7 +55,7 @@ constantTurbulentDispersionCoefficient
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
turbulentDispersionModel(dict, pair),
|
turbulentDispersionModel(dict, pair),
|
||||||
Ctd_("Ctd", dimless, dict.lookup("Ctd"))
|
Ctd_("Ctd", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -55,7 +55,7 @@ constantVirtualMassCoefficient
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
virtualMassModel(dict, pair, registerObject),
|
virtualMassModel(dict, pair, registerObject),
|
||||||
Cvm_("Cvm", dimless, dict.lookup("Cvm"))
|
Cvm_("Cvm", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -53,8 +53,8 @@ Foam::wallLubricationModels::Antal::Antal
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
wallLubricationModel(dict, pair),
|
wallLubricationModel(dict, pair),
|
||||||
Cw1_("Cw1", dimless, dict.lookup("Cw1")),
|
Cw1_("Cw1", dimless, dict),
|
||||||
Cw2_("Cw2", dimless, dict.lookup("Cw2"))
|
Cw2_("Cw2", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -53,8 +53,8 @@ Foam::wallLubricationModels::Frank::Frank
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
wallLubricationModel(dict, pair),
|
wallLubricationModel(dict, pair),
|
||||||
Cwd_("Cwd", dimless, dict.lookup("Cwd")),
|
Cwd_("Cwd", dimless, dict),
|
||||||
Cwc_("Cwc", dimless, dict.lookup("Cwc")),
|
Cwc_("Cwc", dimless, dict),
|
||||||
p_(readScalar(dict.lookup("p")))
|
p_(readScalar(dict.lookup("p")))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -53,7 +53,7 @@ Foam::wallLubricationModels::TomiyamaWallLubrication::TomiyamaWallLubrication
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
wallLubricationModel(dict, pair),
|
wallLubricationModel(dict, pair),
|
||||||
D_("Cwd", dimLength, dict.lookup("D"))
|
D_("Cwd", dimLength, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -57,7 +57,7 @@ Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::HrenyaSinclair
|
|||||||
:
|
:
|
||||||
conductivityModel(dict),
|
conductivityModel(dict),
|
||||||
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
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_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -58,11 +58,11 @@ JohnsonJackson
|
|||||||
:
|
:
|
||||||
frictionalStressModel(dict),
|
frictionalStressModel(dict),
|
||||||
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
||||||
Fr_("Fr", dimensionSet(1, -1, -2, 0, 0), coeffDict_.lookup("Fr")),
|
Fr_("Fr", dimensionSet(1, -1, -2, 0, 0), coeffDict_),
|
||||||
eta_("eta", dimless, coeffDict_.lookup("eta")),
|
eta_("eta", dimless, coeffDict_),
|
||||||
p_("p", dimless, coeffDict_.lookup("p")),
|
p_("p", dimless, coeffDict_),
|
||||||
phi_("phi", dimless, coeffDict_.lookup("phi")),
|
phi_("phi", dimless, coeffDict_),
|
||||||
alphaDeltaMin_("alphaDeltaMin", dimless, coeffDict_.lookup("alphaDeltaMin"))
|
alphaDeltaMin_("alphaDeltaMin", dimless, coeffDict_)
|
||||||
{
|
{
|
||||||
phi_ *= constant::mathematical::pi/180.0;
|
phi_ *= constant::mathematical::pi/180.0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -56,7 +56,7 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::Schaeffer
|
|||||||
:
|
:
|
||||||
frictionalStressModel(dict),
|
frictionalStressModel(dict),
|
||||||
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
||||||
phi_("phi", dimless, coeffDict_.lookup("phi"))
|
phi_("phi", dimless, coeffDict_)
|
||||||
{
|
{
|
||||||
phi_ *= constant::mathematical::pi/180.0;
|
phi_ *= constant::mathematical::pi/180.0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -92,19 +92,19 @@ Foam::RASModels::kineticTheoryModel::kineticTheoryModel
|
|||||||
),
|
),
|
||||||
|
|
||||||
equilibrium_(coeffDict_.lookup("equilibrium")),
|
equilibrium_(coeffDict_.lookup("equilibrium")),
|
||||||
e_("e", dimless, coeffDict_.lookup("e")),
|
e_("e", dimless, coeffDict_),
|
||||||
alphaMax_("alphaMax", dimless, coeffDict_.lookup("alphaMax")),
|
alphaMax_("alphaMax", dimless, coeffDict_),
|
||||||
alphaMinFriction_
|
alphaMinFriction_
|
||||||
(
|
(
|
||||||
"alphaMinFriction",
|
"alphaMinFriction",
|
||||||
dimless,
|
dimless,
|
||||||
coeffDict_.lookup("alphaMinFriction")
|
coeffDict_
|
||||||
),
|
),
|
||||||
residualAlpha_
|
residualAlpha_
|
||||||
(
|
(
|
||||||
"residualAlpha",
|
"residualAlpha",
|
||||||
dimless,
|
dimless,
|
||||||
coeffDict_.lookup("residualAlpha")
|
coeffDict_
|
||||||
),
|
),
|
||||||
|
|
||||||
Theta_
|
Theta_
|
||||||
|
|||||||
@ -57,7 +57,7 @@ Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::HrenyaSinclair
|
|||||||
:
|
:
|
||||||
viscosityModel(dict),
|
viscosityModel(dict),
|
||||||
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
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_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -75,13 +75,13 @@ Foam::diameterModels::IATE::IATE
|
|||||||
),
|
),
|
||||||
phase_.mesh()
|
phase_.mesh()
|
||||||
),
|
),
|
||||||
dMax_("dMax", dimLength, diameterProperties_.lookup("dMax")),
|
dMax_("dMax", dimLength, diameterProperties_),
|
||||||
dMin_("dMin", dimLength, diameterProperties_.lookup("dMin")),
|
dMin_("dMin", dimLength, diameterProperties_),
|
||||||
residualAlpha_
|
residualAlpha_
|
||||||
(
|
(
|
||||||
"residualAlpha",
|
"residualAlpha",
|
||||||
dimless,
|
dimless,
|
||||||
diameterProperties_.lookup("residualAlpha")
|
diameterProperties_
|
||||||
),
|
),
|
||||||
d_
|
d_
|
||||||
(
|
(
|
||||||
|
|||||||
@ -51,9 +51,9 @@ randomCoalescence
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
IATEsource(iate),
|
IATEsource(iate),
|
||||||
Crc_("Crc", dimless, dict.lookup("Crc")),
|
Crc_("Crc", dimless, dict),
|
||||||
C_("C", dimless, dict.lookup("C")),
|
C_("C", dimless, dict),
|
||||||
alphaMax_("alphaMax", dimless, dict.lookup("alphaMax"))
|
alphaMax_("alphaMax", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -51,8 +51,8 @@ turbulentBreakUp
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
IATEsource(iate),
|
IATEsource(iate),
|
||||||
Cti_("Cti", dimless, dict.lookup("Cti")),
|
Cti_("Cti", dimless, dict),
|
||||||
WeCr_("WeCr", dimless, dict.lookup("WeCr"))
|
WeCr_("WeCr", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -56,7 +56,7 @@ wakeEntrainmentCoalescence
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
IATEsource(iate),
|
IATEsource(iate),
|
||||||
Cwe_("Cwe", dimless, dict.lookup("Cwe"))
|
Cwe_("Cwe", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -53,7 +53,7 @@ Foam::diameterModels::constant::constant
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
diameterModel(diameterProperties, phase),
|
diameterModel(diameterProperties, phase),
|
||||||
d_("d", dimLength, diameterProperties_.lookup("d"))
|
d_("d", dimLength, diameterProperties_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -53,8 +53,8 @@ Foam::diameterModels::isothermal::isothermal
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
diameterModel(diameterProperties, phase),
|
diameterModel(diameterProperties, phase),
|
||||||
d0_("d0", dimLength, diameterProperties_.lookup("d0")),
|
d0_("d0", dimLength, diameterProperties_),
|
||||||
p0_("p0", dimPressure, diameterProperties_.lookup("p0"))
|
p0_("p0", dimPressure, diameterProperties_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -49,13 +49,13 @@ Foam::MultiComponentPhaseModel<BasePhaseModel>::MultiComponentPhaseModel
|
|||||||
(
|
(
|
||||||
"Sc",
|
"Sc",
|
||||||
dimless,
|
dimless,
|
||||||
fluid.subDict(phaseName).lookup("Sc")
|
fluid.subDict(phaseName)
|
||||||
),
|
),
|
||||||
residualAlpha_
|
residualAlpha_
|
||||||
(
|
(
|
||||||
"residualAlpha",
|
"residualAlpha",
|
||||||
dimless,
|
dimless,
|
||||||
fluid.mesh().solverDict("Yi").lookup("residualAlpha")
|
fluid.mesh().solverDict("Yi")
|
||||||
),
|
),
|
||||||
inertIndex_(-1)
|
inertIndex_(-1)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -37,10 +37,10 @@ volScalarField& alpha2(mixture.alpha2());
|
|||||||
const dimensionedScalar& rho1 = mixture.rho1();
|
const dimensionedScalar& rho1 = mixture.rho1();
|
||||||
const dimensionedScalar& rho2 = mixture.rho2();
|
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
|
// 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)
|
// Need to store rho for ddt(rho, U)
|
||||||
volScalarField rho("rho", alpha1*rho1 + alpha2*rho2);
|
volScalarField rho("rho", alpha1*rho1 + alpha2*rho2);
|
||||||
|
|||||||
@ -27,7 +27,7 @@ dimensionedScalar pMin
|
|||||||
(
|
(
|
||||||
"pMin",
|
"pMin",
|
||||||
dimPressure,
|
dimPressure,
|
||||||
fluid.lookup("pMin")
|
fluid
|
||||||
);
|
);
|
||||||
|
|
||||||
#include "gh.H"
|
#include "gh.H"
|
||||||
|
|||||||
@ -53,7 +53,7 @@ Foam::aspectRatioModels::constantAspectRatio::constantAspectRatio
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
aspectRatioModel(dict, pair),
|
aspectRatioModel(dict, pair),
|
||||||
E0_("E0", dimless, dict.lookup("E0"))
|
E0_("E0", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,7 @@ Foam::dragModels::GidaspowSchillerNaumann::GidaspowSchillerNaumann
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
dragModel(dict, pair, registerObject),
|
dragModel(dict, pair, registerObject),
|
||||||
residualRe_("residualRe", dimless, dict.lookup("residualRe"))
|
residualRe_("residualRe", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,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-2014 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -49,7 +49,7 @@ Foam::dragModels::SchillerNaumann::SchillerNaumann
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
dragModel(dict, pair, registerObject),
|
dragModel(dict, pair, registerObject),
|
||||||
residualRe_("residualRe", dimless, dict.lookup("residualRe"))
|
residualRe_("residualRe", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,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) 2014 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -49,9 +49,9 @@ Foam::dragModels::TomiyamaAnalytic::TomiyamaAnalytic
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
dragModel(dict, pair, registerObject),
|
dragModel(dict, pair, registerObject),
|
||||||
residualRe_("residualRe", dimless, dict.lookup("residualRe")),
|
residualRe_("residualRe", dimless, dict),
|
||||||
residualEo_("residualEo", dimless, dict.lookup("residualEo")),
|
residualEo_("residualEo", dimless, dict),
|
||||||
residualE_("residualE", dimless, dict.lookup("residualE"))
|
residualE_("residualE", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,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) 2014 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -49,7 +49,7 @@ Foam::dragModels::TomiyamaCorrelated::TomiyamaCorrelated
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
dragModel(dict, pair, registerObject),
|
dragModel(dict, pair, registerObject),
|
||||||
A_("A", dimless, dict.lookup("A"))
|
A_("A", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,7 @@ Foam::dragModels::WenYu::WenYu
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
dragModel(dict, pair, registerObject),
|
dragModel(dict, pair, registerObject),
|
||||||
residualRe_("residualRe", dimless, dict.lookup("residualRe"))
|
residualRe_("residualRe", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -51,8 +51,8 @@ Foam::dragModels::segregated::segregated
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
dragModel(dict, pair, registerObject),
|
dragModel(dict, pair, registerObject),
|
||||||
m_("m", dimless, dict.lookup("m")),
|
m_("m", dimless, dict),
|
||||||
n_("n", dimless, dict.lookup("n"))
|
n_("n", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,7 @@ Foam::liftModels::LegendreMagnaudet::LegendreMagnaudet
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
liftModel(dict, pair),
|
liftModel(dict, pair),
|
||||||
residualRe_("residualRe", dimless, dict.lookup("residualRe"))
|
residualRe_("residualRe", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,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) 2014 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -48,7 +48,7 @@ Foam::liftModels::constantLiftCoefficient::constantLiftCoefficient
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
liftModel(dict, pair),
|
liftModel(dict, pair),
|
||||||
Cl_("Cl", dimless, dict.lookup("Cl"))
|
Cl_("Cl", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -63,7 +63,7 @@ Foam::swarmCorrections::TomiyamaSwarm::TomiyamaSwarm
|
|||||||
pair_.dispersed().residualAlpha().value()
|
pair_.dispersed().residualAlpha().value()
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
l_("l", dimless, dict.lookup("l"))
|
l_("l", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -56,7 +56,7 @@ Foam::turbulentDispersionModels::Burns::Burns
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
turbulentDispersionModel(dict, pair),
|
turbulentDispersionModel(dict, pair),
|
||||||
sigma_("sigma", dimless, dict.lookup("sigma")),
|
sigma_("sigma", dimless, dict),
|
||||||
residualAlpha_
|
residualAlpha_
|
||||||
(
|
(
|
||||||
"residualAlpha",
|
"residualAlpha",
|
||||||
|
|||||||
@ -56,7 +56,7 @@ Foam::turbulentDispersionModels::Gosman::Gosman
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
turbulentDispersionModel(dict, pair),
|
turbulentDispersionModel(dict, pair),
|
||||||
sigma_("sigma", dimless, dict.lookup("sigma"))
|
sigma_("sigma", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -54,7 +54,7 @@ Foam::turbulentDispersionModels::LopezDeBertodano::LopezDeBertodano
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
turbulentDispersionModel(dict, pair),
|
turbulentDispersionModel(dict, pair),
|
||||||
Ctd_("Ctd", dimless, dict.lookup("Ctd"))
|
Ctd_("Ctd", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -55,7 +55,7 @@ constantTurbulentDispersionCoefficient
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
turbulentDispersionModel(dict, pair),
|
turbulentDispersionModel(dict, pair),
|
||||||
Ctd_("Ctd", dimless, dict.lookup("Ctd"))
|
Ctd_("Ctd", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -55,7 +55,7 @@ constantVirtualMassCoefficient
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
virtualMassModel(dict, pair, registerObject),
|
virtualMassModel(dict, pair, registerObject),
|
||||||
Cvm_("Cvm", dimless, dict.lookup("Cvm"))
|
Cvm_("Cvm", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -53,8 +53,8 @@ Foam::wallLubricationModels::Antal::Antal
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
wallLubricationModel(dict, pair),
|
wallLubricationModel(dict, pair),
|
||||||
Cw1_("Cw1", dimless, dict.lookup("Cw1")),
|
Cw1_("Cw1", dimless, dict),
|
||||||
Cw2_("Cw2", dimless, dict.lookup("Cw2"))
|
Cw2_("Cw2", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -53,8 +53,8 @@ Foam::wallLubricationModels::Frank::Frank
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
wallLubricationModel(dict, pair),
|
wallLubricationModel(dict, pair),
|
||||||
Cwd_("Cwd", dimless, dict.lookup("Cwd")),
|
Cwd_("Cwd", dimless, dict),
|
||||||
Cwc_("Cwc", dimless, dict.lookup("Cwc")),
|
Cwc_("Cwc", dimless, dict),
|
||||||
p_(readScalar(dict.lookup("p")))
|
p_(readScalar(dict.lookup("p")))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -53,7 +53,7 @@ Foam::wallLubricationModels::TomiyamaWallLubrication::TomiyamaWallLubrication
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
wallLubricationModel(dict, pair),
|
wallLubricationModel(dict, pair),
|
||||||
D_("Cwd", dimLength, dict.lookup("D"))
|
D_("Cwd", dimLength, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,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-2014 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -57,7 +57,7 @@ Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::HrenyaSinclair
|
|||||||
:
|
:
|
||||||
conductivityModel(dict),
|
conductivityModel(dict),
|
||||||
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
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_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -58,11 +58,11 @@ JohnsonJackson
|
|||||||
:
|
:
|
||||||
frictionalStressModel(dict),
|
frictionalStressModel(dict),
|
||||||
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
||||||
Fr_("Fr", dimensionSet(1, -1, -2, 0, 0), coeffDict_.lookup("Fr")),
|
Fr_("Fr", dimensionSet(1, -1, -2, 0, 0), coeffDict_),
|
||||||
eta_("eta", dimless, coeffDict_.lookup("eta")),
|
eta_("eta", dimless, coeffDict_),
|
||||||
p_("p", dimless, coeffDict_.lookup("p")),
|
p_("p", dimless, coeffDict_),
|
||||||
phi_("phi", dimless, coeffDict_.lookup("phi")),
|
phi_("phi", dimless, coeffDict_),
|
||||||
alphaDeltaMin_("alphaDeltaMin", dimless, coeffDict_.lookup("alphaDeltaMin"))
|
alphaDeltaMin_("alphaDeltaMin", dimless, coeffDict_)
|
||||||
{
|
{
|
||||||
phi_ *= constant::mathematical::pi/180.0;
|
phi_ *= constant::mathematical::pi/180.0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,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-2014 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -56,7 +56,7 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::Schaeffer
|
|||||||
:
|
:
|
||||||
frictionalStressModel(dict),
|
frictionalStressModel(dict),
|
||||||
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
||||||
phi_("phi", dimless, coeffDict_.lookup("phi"))
|
phi_("phi", dimless, coeffDict_)
|
||||||
{
|
{
|
||||||
phi_ *= constant::mathematical::pi/180.0;
|
phi_ *= constant::mathematical::pi/180.0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -92,19 +92,19 @@ Foam::RASModels::kineticTheoryModel::kineticTheoryModel
|
|||||||
),
|
),
|
||||||
|
|
||||||
equilibrium_(coeffDict_.lookup("equilibrium")),
|
equilibrium_(coeffDict_.lookup("equilibrium")),
|
||||||
e_("e", dimless, coeffDict_.lookup("e")),
|
e_("e", dimless, coeffDict_),
|
||||||
alphaMax_("alphaMax", dimless, coeffDict_.lookup("alphaMax")),
|
alphaMax_("alphaMax", dimless, coeffDict_),
|
||||||
alphaMinFriction_
|
alphaMinFriction_
|
||||||
(
|
(
|
||||||
"alphaMinFriction",
|
"alphaMinFriction",
|
||||||
dimless,
|
dimless,
|
||||||
coeffDict_.lookup("alphaMinFriction")
|
coeffDict_
|
||||||
),
|
),
|
||||||
residualAlpha_
|
residualAlpha_
|
||||||
(
|
(
|
||||||
"residualAlpha",
|
"residualAlpha",
|
||||||
dimless,
|
dimless,
|
||||||
coeffDict_.lookup("residualAlpha")
|
coeffDict_
|
||||||
),
|
),
|
||||||
|
|
||||||
Theta_
|
Theta_
|
||||||
|
|||||||
@ -2,7 +2,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-2014 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -57,7 +57,7 @@ Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::HrenyaSinclair
|
|||||||
:
|
:
|
||||||
viscosityModel(dict),
|
viscosityModel(dict),
|
||||||
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
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_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -76,13 +76,13 @@ Foam::diameterModels::IATE::IATE
|
|||||||
),
|
),
|
||||||
phase_.U().mesh()
|
phase_.U().mesh()
|
||||||
),
|
),
|
||||||
dMax_("dMax", dimLength, diameterProperties_.lookup("dMax")),
|
dMax_("dMax", dimLength, diameterProperties_),
|
||||||
dMin_("dMin", dimLength, diameterProperties_.lookup("dMin")),
|
dMin_("dMin", dimLength, diameterProperties_),
|
||||||
residualAlpha_
|
residualAlpha_
|
||||||
(
|
(
|
||||||
"residualAlpha",
|
"residualAlpha",
|
||||||
dimless,
|
dimless,
|
||||||
diameterProperties_.lookup("residualAlpha")
|
diameterProperties_
|
||||||
),
|
),
|
||||||
d_
|
d_
|
||||||
(
|
(
|
||||||
|
|||||||
@ -51,9 +51,9 @@ randomCoalescence
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
IATEsource(iate),
|
IATEsource(iate),
|
||||||
Crc_("Crc", dimless, dict.lookup("Crc")),
|
Crc_("Crc", dimless, dict),
|
||||||
C_("C", dimless, dict.lookup("C")),
|
C_("C", dimless, dict),
|
||||||
alphaMax_("alphaMax", dimless, dict.lookup("alphaMax"))
|
alphaMax_("alphaMax", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,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) 2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -51,8 +51,8 @@ turbulentBreakUp
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
IATEsource(iate),
|
IATEsource(iate),
|
||||||
Cti_("Cti", dimless, dict.lookup("Cti")),
|
Cti_("Cti", dimless, dict),
|
||||||
WeCr_("WeCr", dimless, dict.lookup("WeCr"))
|
WeCr_("WeCr", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,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) 2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -56,7 +56,7 @@ wakeEntrainmentCoalescence
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
IATEsource(iate),
|
IATEsource(iate),
|
||||||
Cwe_("Cwe", dimless, dict.lookup("Cwe"))
|
Cwe_("Cwe", dimless, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -53,7 +53,7 @@ Foam::diameterModels::constant::constant
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
diameterModel(diameterProperties, phase),
|
diameterModel(diameterProperties, phase),
|
||||||
d_("d", dimLength, diameterProperties_.lookup("d"))
|
d_("d", dimLength, diameterProperties_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,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-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -53,8 +53,8 @@ Foam::diameterModels::isothermal::isothermal
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
diameterModel(diameterProperties, phase),
|
diameterModel(diameterProperties, phase),
|
||||||
d0_("d0", dimLength, diameterProperties_.lookup("d0")),
|
d0_("d0", dimLength, diameterProperties_),
|
||||||
p0_("p0", dimPressure, diameterProperties_.lookup("p0"))
|
p0_("p0", dimPressure, diameterProperties_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -27,39 +27,47 @@ License
|
|||||||
#include "pTraits.H"
|
#include "pTraits.H"
|
||||||
#include "dictionary.H"
|
#include "dictionary.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::dimensioned<Type> Foam::dimensioned<Type>::lookupOrDefault
|
void Foam::dimensioned<Type>::initialize(Istream& is)
|
||||||
(
|
|
||||||
const word& name,
|
|
||||||
const dictionary& dict,
|
|
||||||
const Type& defaultValue,
|
|
||||||
const dimensionSet& dims
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if (dict.found(name))
|
token nextToken(is);
|
||||||
{
|
is.putBack(nextToken);
|
||||||
return dimensioned<Type>(name, dims, dict.lookup(name));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return dimensioned<Type>(name, dims, defaultValue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// 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>
|
// If the dimensions are provided compare with the argument
|
||||||
Foam::dimensioned<Type> Foam::dimensioned<Type>::lookupOrAddToDict
|
scalar multiplier = 1.0;
|
||||||
(
|
|
||||||
const word& name,
|
if (nextToken == token::BEGIN_SQR)
|
||||||
dictionary& dict,
|
{
|
||||||
const Type& defaultValue,
|
dimensionSet dims(dimless);
|
||||||
const dimensionSet& dims
|
dims.read(is, multiplier);
|
||||||
)
|
|
||||||
{
|
if (dims != dimensions_)
|
||||||
Type value = dict.lookupOrAddDefault<Type>(name, defaultValue);
|
{
|
||||||
return dimensioned<Type>(name, dims, value);
|
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),
|
dimensions_(dimSet),
|
||||||
value_(pTraits<Type>::zero)
|
value_(pTraits<Type>::zero)
|
||||||
{
|
{
|
||||||
token nextToken(is);
|
initialize(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);
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the dimensions are provided compare with the argument
|
template<class Type>
|
||||||
scalar multiplier = 1.0;
|
Foam::dimensioned<Type>::dimensioned
|
||||||
|
(
|
||||||
if (nextToken == token::BEGIN_SQR)
|
const word& name,
|
||||||
{
|
const dimensionSet& dimSet,
|
||||||
dimensionSet dims(dimless);
|
const dictionary& dict
|
||||||
dims.read(is, multiplier);
|
)
|
||||||
|
:
|
||||||
if (dims != dimensions_)
|
name_(name),
|
||||||
{
|
dimensions_(dimSet),
|
||||||
FatalIOErrorIn
|
value_(pTraits<Type>::zero)
|
||||||
(
|
{
|
||||||
"dimensioned<Type>::dimensioned"
|
initialize(dict.lookup(name));
|
||||||
"(const word&, const dimensionSet&, Istream&)",
|
|
||||||
is
|
|
||||||
) << "The dimensions " << dims
|
|
||||||
<< " provided do not match the required dimensions "
|
|
||||||
<< dimensions_
|
|
||||||
<< abort(FatalIOError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
is >> value_;
|
|
||||||
value_ *= multiplier;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -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 * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -2,7 +2,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-2014 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -64,7 +64,7 @@ class dictionary;
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
class dimensioned
|
class dimensioned
|
||||||
{
|
{
|
||||||
// private data
|
// Private data
|
||||||
|
|
||||||
//- Variable name
|
//- Variable name
|
||||||
word name_;
|
word name_;
|
||||||
@ -76,6 +76,13 @@ class dimensioned
|
|||||||
Type value_;
|
Type value_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private member functions
|
||||||
|
|
||||||
|
//- Initialize from Istream
|
||||||
|
// Helper-function for constructors
|
||||||
|
void initialize(Istream& is);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Component type
|
//- Component type
|
||||||
@ -107,9 +114,15 @@ public:
|
|||||||
//- Construct from an Istream with a given name and dimensions
|
//- Construct from an Istream with a given name and dimensions
|
||||||
dimensioned(const word&, const dimensionSet&, Istream&);
|
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
|
//- Null constructor
|
||||||
dimensioned();
|
dimensioned();
|
||||||
|
|
||||||
|
|
||||||
|
// Static member functions
|
||||||
|
|
||||||
//- Construct from dictionary, with default value.
|
//- Construct from dictionary, with default value.
|
||||||
static dimensioned<Type> lookupOrDefault
|
static dimensioned<Type> lookupOrDefault
|
||||||
(
|
(
|
||||||
|
|||||||
@ -58,9 +58,9 @@ ArrheniusViscosity::ArrheniusViscosity
|
|||||||
:
|
:
|
||||||
filmViscosityModel(typeName, owner, dict, mu),
|
filmViscosityModel(typeName, owner, dict, mu),
|
||||||
viscosity_(filmViscosityModel::New(owner, coeffDict_, mu)),
|
viscosity_(filmViscosityModel::New(owner, coeffDict_, mu)),
|
||||||
k1_("k1", dimTemperature, coeffDict_.lookup("k1")),
|
k1_("k1", dimTemperature, coeffDict_),
|
||||||
k2_("k2", dimTemperature, coeffDict_.lookup("k2")),
|
k2_("k2", dimTemperature, coeffDict_),
|
||||||
Tref_("Tref", dimTemperature, coeffDict_.lookup("Tref"))
|
Tref_("Tref", dimTemperature, coeffDict_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -56,7 +56,7 @@ constantViscosity::constantViscosity
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
filmViscosityModel(typeName, owner, dict, mu),
|
filmViscosityModel(typeName, owner, dict, mu),
|
||||||
mu0_("mu0", dimDynamicViscosity, coeffDict_.lookup("mu0"))
|
mu0_("mu0", dimDynamicViscosity, coeffDict_)
|
||||||
{
|
{
|
||||||
mu_ == mu0_;
|
mu_ == mu0_;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -63,12 +63,12 @@ thixotropicViscosity::thixotropicViscosity
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
filmViscosityModel(typeName, owner, dict, mu),
|
filmViscosityModel(typeName, owner, dict, mu),
|
||||||
a_("a", dimless/dimTime, coeffDict_.lookup("a")),
|
a_("a", dimless/dimTime, coeffDict_),
|
||||||
b_("b", dimless, coeffDict_.lookup("b")),
|
b_("b", dimless, coeffDict_),
|
||||||
d_("d", dimless, coeffDict_.lookup("d")),
|
d_("d", dimless, coeffDict_),
|
||||||
c_("c", pow(dimTime, d_.value() - scalar(1)), coeffDict_.lookup("c")),
|
c_("c", pow(dimTime, d_.value() - scalar(1)), coeffDict_),
|
||||||
mu0_("mu0", dimPressure*dimTime, coeffDict_.lookup("mu0")),
|
mu0_("mu0", dimPressure*dimTime, coeffDict_),
|
||||||
muInf_("muInf", mu0_.dimensions(), coeffDict_.lookup("muInf")),
|
muInf_("muInf", mu0_.dimensions(), coeffDict_),
|
||||||
K_(1.0 - Foam::sqrt(muInf_/mu0_)),
|
K_(1.0 - Foam::sqrt(muInf_/mu0_)),
|
||||||
lambda_
|
lambda_
|
||||||
(
|
(
|
||||||
|
|||||||
@ -97,8 +97,8 @@ Foam::incompressibleTwoPhaseMixture::incompressibleTwoPhaseMixture
|
|||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|
||||||
rho1_("rho", dimDensity, nuModel1_->viscosityProperties().lookup("rho")),
|
rho1_("rho", dimDensity, nuModel1_->viscosityProperties()),
|
||||||
rho2_("rho", dimDensity, nuModel2_->viscosityProperties().lookup("rho")),
|
rho2_("rho", dimDensity, nuModel2_->viscosityProperties()),
|
||||||
|
|
||||||
U_(U),
|
U_(U),
|
||||||
phi_(phi),
|
phi_(phi),
|
||||||
|
|||||||
@ -68,10 +68,10 @@ Foam::viscosityModels::BirdCarreau::BirdCarreau
|
|||||||
:
|
:
|
||||||
viscosityModel(name, viscosityProperties, U, phi),
|
viscosityModel(name, viscosityProperties, U, phi),
|
||||||
BirdCarreauCoeffs_(viscosityProperties.subDict(typeName + "Coeffs")),
|
BirdCarreauCoeffs_(viscosityProperties.subDict(typeName + "Coeffs")),
|
||||||
nu0_("nu0", dimViscosity, BirdCarreauCoeffs_.lookup("nu0")),
|
nu0_("nu0", dimViscosity, BirdCarreauCoeffs_),
|
||||||
nuInf_("nuInf", dimViscosity, BirdCarreauCoeffs_.lookup("nuInf")),
|
nuInf_("nuInf", dimViscosity, BirdCarreauCoeffs_),
|
||||||
k_("k", dimTime, BirdCarreauCoeffs_.lookup("k")),
|
k_("k", dimTime, BirdCarreauCoeffs_),
|
||||||
n_("n", dimless, BirdCarreauCoeffs_.lookup("n")),
|
n_("n", dimless, BirdCarreauCoeffs_),
|
||||||
a_
|
a_
|
||||||
(
|
(
|
||||||
BirdCarreauCoeffs_.lookupOrDefault
|
BirdCarreauCoeffs_.lookupOrDefault
|
||||||
|
|||||||
@ -66,10 +66,10 @@ Foam::viscosityModels::CrossPowerLaw::CrossPowerLaw
|
|||||||
:
|
:
|
||||||
viscosityModel(name, viscosityProperties, U, phi),
|
viscosityModel(name, viscosityProperties, U, phi),
|
||||||
CrossPowerLawCoeffs_(viscosityProperties.subDict(typeName + "Coeffs")),
|
CrossPowerLawCoeffs_(viscosityProperties.subDict(typeName + "Coeffs")),
|
||||||
nu0_("nu0", dimViscosity, CrossPowerLawCoeffs_.lookup("nu0")),
|
nu0_("nu0", dimViscosity, CrossPowerLawCoeffs_),
|
||||||
nuInf_("nuInf", dimViscosity, CrossPowerLawCoeffs_.lookup("nuInf")),
|
nuInf_("nuInf", dimViscosity, CrossPowerLawCoeffs_),
|
||||||
m_("m", dimTime, CrossPowerLawCoeffs_.lookup("m")),
|
m_("m", dimTime, CrossPowerLawCoeffs_),
|
||||||
n_("n", dimless, CrossPowerLawCoeffs_.lookup("n")),
|
n_("n", dimless, CrossPowerLawCoeffs_),
|
||||||
nu_
|
nu_
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
|
|||||||
@ -79,10 +79,10 @@ Foam::viscosityModels::HerschelBulkley::HerschelBulkley
|
|||||||
:
|
:
|
||||||
viscosityModel(name, viscosityProperties, U, phi),
|
viscosityModel(name, viscosityProperties, U, phi),
|
||||||
HerschelBulkleyCoeffs_(viscosityProperties.subDict(typeName + "Coeffs")),
|
HerschelBulkleyCoeffs_(viscosityProperties.subDict(typeName + "Coeffs")),
|
||||||
k_("k", dimViscosity, HerschelBulkleyCoeffs_.lookup("k")),
|
k_("k", dimViscosity, HerschelBulkleyCoeffs_),
|
||||||
n_("n", dimless, HerschelBulkleyCoeffs_.lookup("n")),
|
n_("n", dimless, HerschelBulkleyCoeffs_),
|
||||||
tau0_("tau0", dimViscosity/dimTime, HerschelBulkleyCoeffs_.lookup("tau0")),
|
tau0_("tau0", dimViscosity/dimTime, HerschelBulkleyCoeffs_),
|
||||||
nu0_("nu0", dimViscosity, HerschelBulkleyCoeffs_.lookup("nu0")),
|
nu0_("nu0", dimViscosity, HerschelBulkleyCoeffs_),
|
||||||
nu_
|
nu_
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
|
|||||||
@ -50,7 +50,7 @@ Foam::viscosityModels::Newtonian::Newtonian
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
viscosityModel(name, viscosityProperties, U, phi),
|
viscosityModel(name, viscosityProperties, U, phi),
|
||||||
nu0_("nu", dimViscosity, viscosityProperties_.lookup("nu")),
|
nu0_("nu", dimViscosity, viscosityProperties_),
|
||||||
nu_
|
nu_
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user