mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Function1's - added objectRegistry access
This commit is contained in:
committed by
Mark Olesen
parent
889bc171d9
commit
098aec4962
@ -123,7 +123,7 @@ Foam::fv::VoFSolidificationMeltingSource::VoFSolidificationMeltingSource
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fv::cellSetOption(sourceName, modelType, dict, mesh),
|
fv::cellSetOption(sourceName, modelType, dict, mesh),
|
||||||
alphaSolidT_(Function1<scalar>::New("alphaSolidT", coeffs_)),
|
alphaSolidT_(Function1<scalar>::New("alphaSolidT", coeffs_, &mesh)),
|
||||||
L_("L", dimEnergy/dimMass, coeffs_),
|
L_("L", dimEnergy/dimMass, coeffs_),
|
||||||
relax_(coeffs_.getOrDefault("relax", 0.9)),
|
relax_(coeffs_.getOrDefault("relax", 0.9)),
|
||||||
Cu_(coeffs_.getOrDefault<scalar>("Cu", 100000)),
|
Cu_(coeffs_.getOrDefault<scalar>("Cu", 100000)),
|
||||||
|
|||||||
@ -33,7 +33,7 @@ bool Foam::fv::VoFSolidificationMeltingSource::read(const dictionary& dict)
|
|||||||
{
|
{
|
||||||
if (fv::cellSetOption::read(dict))
|
if (fv::cellSetOption::read(dict))
|
||||||
{
|
{
|
||||||
alphaSolidT_ = Function1<scalar>::New("alphaSolidT", coeffs_);
|
alphaSolidT_ = Function1<scalar>::New("alphaSolidT", coeffs_, &mesh_);
|
||||||
coeffs_.readEntry("L", L_);
|
coeffs_.readEntry("L", L_);
|
||||||
coeffs_.readIfPresent("relax", relax_);
|
coeffs_.readIfPresent("relax", relax_);
|
||||||
coeffs_.readIfPresent("Cu", Cu_);
|
coeffs_.readIfPresent("Cu", Cu_);
|
||||||
|
|||||||
@ -343,12 +343,12 @@ Foam::radiation::laserDTRM::laserDTRM(const volScalarField& T)
|
|||||||
|
|
||||||
focalLaserPosition_
|
focalLaserPosition_
|
||||||
(
|
(
|
||||||
Function1<point>::New("focalLaserPosition", *this)
|
Function1<point>::New("focalLaserPosition", *this, &mesh_)
|
||||||
),
|
),
|
||||||
|
|
||||||
laserDirection_
|
laserDirection_
|
||||||
(
|
(
|
||||||
Function1<vector>::New("laserDirection", *this)
|
Function1<vector>::New("laserDirection", *this, &mesh_)
|
||||||
),
|
),
|
||||||
|
|
||||||
focalLaserRadius_(get<scalar>("focalLaserRadius")),
|
focalLaserRadius_(get<scalar>("focalLaserRadius")),
|
||||||
@ -359,7 +359,7 @@ Foam::radiation::laserDTRM::laserDTRM(const volScalarField& T)
|
|||||||
|
|
||||||
sigma_(0),
|
sigma_(0),
|
||||||
I0_(0),
|
I0_(0),
|
||||||
laserPower_(Function1<scalar>::New("laserPower", *this)),
|
laserPower_(Function1<scalar>::New("laserPower", *this, &mesh_)),
|
||||||
powerDistribution_(),
|
powerDistribution_(),
|
||||||
|
|
||||||
reflectionSwitch_(false),
|
reflectionSwitch_(false),
|
||||||
@ -441,11 +441,11 @@ Foam::radiation::laserDTRM::laserDTRM
|
|||||||
|
|
||||||
focalLaserPosition_
|
focalLaserPosition_
|
||||||
(
|
(
|
||||||
Function1<point>::New("focalLaserPosition", *this)
|
Function1<point>::New("focalLaserPosition", *this, &mesh_)
|
||||||
),
|
),
|
||||||
laserDirection_
|
laserDirection_
|
||||||
(
|
(
|
||||||
Function1<vector>::New("laserDirection", *this)
|
Function1<vector>::New("laserDirection", *this, &mesh_)
|
||||||
),
|
),
|
||||||
|
|
||||||
focalLaserRadius_(get<scalar>("focalLaserRadius")),
|
focalLaserRadius_(get<scalar>("focalLaserRadius")),
|
||||||
@ -456,7 +456,7 @@ Foam::radiation::laserDTRM::laserDTRM
|
|||||||
|
|
||||||
sigma_(0),
|
sigma_(0),
|
||||||
I0_(0),
|
I0_(0),
|
||||||
laserPower_(Function1<scalar>::New("laserPower", *this)),
|
laserPower_(Function1<scalar>::New("laserPower", *this, &mesh_)),
|
||||||
powerDistribution_(),
|
powerDistribution_(),
|
||||||
|
|
||||||
reflectionSwitch_(false),
|
reflectionSwitch_(false),
|
||||||
|
|||||||
@ -16,7 +16,7 @@ const vector L(dict.get<vector>("L"));
|
|||||||
const Vector<label> N(dict.get<Vector<label>>("N"));
|
const Vector<label> N(dict.get<Vector<label>>("N"));
|
||||||
|
|
||||||
// Wave number vs energy profile
|
// Wave number vs energy profile
|
||||||
autoPtr<Function1<scalar>> Ek(Function1<scalar>::New("Ek", dict));
|
autoPtr<Function1<scalar>> Ek(Function1<scalar>::New("Ek", dict, &runTime));
|
||||||
|
|
||||||
// Number of modes
|
// Number of modes
|
||||||
const label nModes = dict.get<label>("nModes");
|
const label nModes = dict.get<label>("nModes");
|
||||||
|
|||||||
@ -78,7 +78,7 @@ CONSTRUCT
|
|||||||
scalarData_(dict.get<scalar>("scalarData")),
|
scalarData_(dict.get<scalar>("scalarData")),
|
||||||
data_(dict.get<TYPE>("data")),
|
data_(dict.get<TYPE>("data")),
|
||||||
fieldData_("fieldData", dict, p.size()),
|
fieldData_("fieldData", dict, p.size()),
|
||||||
timeVsData_(Function1<TYPE>::New("timeVsData", dict)),
|
timeVsData_(Function1<TYPE>::New("timeVsData", dict, &this->db())),
|
||||||
wordData_(dict.getOrDefault<word>("wordName", "wordDefault")),
|
wordData_(dict.getOrDefault<word>("wordName", "wordDefault")),
|
||||||
labelData_(-1),
|
labelData_(-1),
|
||||||
boolData_(false)
|
boolData_(false)
|
||||||
|
|||||||
@ -37,7 +37,7 @@ Description
|
|||||||
It accepts primitive or dictionary entries for dispatching to different
|
It accepts primitive or dictionary entries for dispatching to different
|
||||||
function types, but wraps unspecified types as "constant".
|
function types, but wraps unspecified types as "constant".
|
||||||
|
|
||||||
In the dictionary form, the coefficents are the dictionary itself.
|
In the dictionary form, the coefficients are the dictionary itself.
|
||||||
This is arguably the more readable form.
|
This is arguably the more readable form.
|
||||||
For example,
|
For example,
|
||||||
\verbatim
|
\verbatim
|
||||||
@ -49,7 +49,7 @@ Description
|
|||||||
}
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
In the primitive form, the coefficents are provided separately.
|
In the primitive form, the coefficients are provided separately.
|
||||||
For example,
|
For example,
|
||||||
\verbatim
|
\verbatim
|
||||||
<entryName> linearRamp;
|
<entryName> linearRamp;
|
||||||
|
|||||||
@ -34,7 +34,7 @@ void Foam::Function1Types::LimitRange<Type>::read(const dictionary& coeffs)
|
|||||||
{
|
{
|
||||||
min_ = coeffs.get<scalar>("min");
|
min_ = coeffs.get<scalar>("min");
|
||||||
max_ = coeffs.get<scalar>("max");
|
max_ = coeffs.get<scalar>("max");
|
||||||
value_ = Function1<Type>::New("value", coeffs);
|
value_ = Function1<Type>::New("value", coeffs, this->obrPtr_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -33,8 +33,8 @@ License
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::Function1Types::Scale<Type>::read(const dictionary& coeffs)
|
void Foam::Function1Types::Scale<Type>::read(const dictionary& coeffs)
|
||||||
{
|
{
|
||||||
scale_ = Function1<scalar>::New("scale", coeffs);
|
scale_ = Function1<scalar>::New("scale", coeffs, this->obrPtr_);
|
||||||
value_ = Function1<Type>::New("value", coeffs);
|
value_ = Function1<Type>::New("value", coeffs, this->obrPtr_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -40,15 +40,21 @@ Foam::Function1Types::Sine<Type>::Sine
|
|||||||
:
|
:
|
||||||
Function1<Type>(entryName, dict, obrPtr),
|
Function1<Type>(entryName, dict, obrPtr),
|
||||||
t0_(dict.getOrDefault<scalar>("t0", 0)),
|
t0_(dict.getOrDefault<scalar>("t0", 0)),
|
||||||
amplitude_(Function1<scalar>::NewIfPresent("amplitude", dict)),
|
amplitude_
|
||||||
period_(Function1<scalar>::NewIfPresent("period", dict)),
|
(
|
||||||
|
Function1<scalar>::NewIfPresent("amplitude", dict, word::null, obrPtr)
|
||||||
|
),
|
||||||
|
period_
|
||||||
|
(
|
||||||
|
Function1<scalar>::NewIfPresent("period", dict, word::null, obrPtr)
|
||||||
|
),
|
||||||
frequency_(nullptr),
|
frequency_(nullptr),
|
||||||
scale_(Function1<Type>::New("scale", dict)),
|
scale_(Function1<Type>::New("scale", dict, obrPtr)),
|
||||||
level_(Function1<Type>::New("level", dict))
|
level_(Function1<Type>::New("level", dict, obrPtr))
|
||||||
{
|
{
|
||||||
if (!period_)
|
if (!period_)
|
||||||
{
|
{
|
||||||
frequency_ = Function1<scalar>::New("frequency", dict);
|
frequency_ = Function1<scalar>::New("frequency", dict, obrPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -110,7 +110,7 @@ externalWallHeatFluxTemperatureFvPatchScalarField
|
|||||||
{
|
{
|
||||||
case fixedPower:
|
case fixedPower:
|
||||||
{
|
{
|
||||||
Q_ = Function1<scalar>::New("Q", dict);
|
Q_ = Function1<scalar>::New("Q", dict, &db());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case fixedHeatFlux:
|
case fixedHeatFlux:
|
||||||
@ -121,7 +121,7 @@ externalWallHeatFluxTemperatureFvPatchScalarField
|
|||||||
case fixedHeatTransferCoeff:
|
case fixedHeatTransferCoeff:
|
||||||
{
|
{
|
||||||
h_ = PatchFunction1<scalar>::New(patch().patch(), "h", dict);
|
h_ = PatchFunction1<scalar>::New(patch().patch(), "h", dict);
|
||||||
Ta_ = Function1<scalar>::New("Ta", dict);
|
Ta_ = Function1<scalar>::New("Ta", dict, &db());
|
||||||
|
|
||||||
if (dict.readIfPresent("thicknessLayers", thicknessLayers_))
|
if (dict.readIfPresent("thicknessLayers", thicknessLayers_))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -59,8 +59,8 @@ Foam::porousBafflePressureFvPatchField::porousBafflePressureFvPatchField
|
|||||||
fixedJumpFvPatchField<scalar>(p, iF),
|
fixedJumpFvPatchField<scalar>(p, iF),
|
||||||
phiName_(dict.getOrDefault<word>("phi", "phi")),
|
phiName_(dict.getOrDefault<word>("phi", "phi")),
|
||||||
rhoName_(dict.getOrDefault<word>("rho", "rho")),
|
rhoName_(dict.getOrDefault<word>("rho", "rho")),
|
||||||
D_(Function1<scalar>::New("D", dict)),
|
D_(Function1<scalar>::New("D", dict, &db())),
|
||||||
I_(Function1<scalar>::New("I", dict)),
|
I_(Function1<scalar>::New("I", dict, &db())),
|
||||||
length_(dict.get<scalar>("length")),
|
length_(dict.get<scalar>("length")),
|
||||||
uniformJump_(dict.getOrDefault("uniformJump", false))
|
uniformJump_(dict.getOrDefault("uniformJump", false))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -103,7 +103,7 @@ atmTurbulentHeatFluxTemperatureFvPatchScalarField
|
|||||||
)
|
)
|
||||||
),
|
),
|
||||||
alphaEffName_(dict.get<word>("alphaEff")),
|
alphaEffName_(dict.get<word>("alphaEff")),
|
||||||
Cp0_(Function1<scalar>::New("Cp0", dict, &db().time())),
|
Cp0_(Function1<scalar>::New("Cp0", dict, &db())),
|
||||||
q_(PatchFunction1<scalar>::New(p.patch(), "q", dict))
|
q_(PatchFunction1<scalar>::New(p.patch(), "q", dict))
|
||||||
{
|
{
|
||||||
if (dict.found("value") && dict.found("gradient"))
|
if (dict.found("value") && dict.found("gradient"))
|
||||||
|
|||||||
@ -128,7 +128,7 @@ atmAlphatkWallFunctionFvPatchScalarField
|
|||||||
scalarMinMax::ge(SMALL)
|
scalarMinMax::ge(SMALL)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
Pr_(Function1<scalar>::New("Pr", dict, &db().time())),
|
Pr_(Function1<scalar>::New("Pr", dict, &db())),
|
||||||
Prt_(PatchFunction1<scalar>::New(p.patch(), "Prt", dict)),
|
Prt_(PatchFunction1<scalar>::New(p.patch(), "Prt", dict)),
|
||||||
z0_(PatchFunction1<scalar>::New(p.patch(), "z0", dict))
|
z0_(PatchFunction1<scalar>::New(p.patch(), "z0", dict))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -76,7 +76,7 @@ Foam::porosityModels::powerLawLopesdaCostaZone::powerLawLopesdaCostaZone
|
|||||||
// function of the normalized vertical position
|
// function of the normalized vertical position
|
||||||
autoPtr<Function1<scalar>> SigmaFunc
|
autoPtr<Function1<scalar>> SigmaFunc
|
||||||
(
|
(
|
||||||
Function1<scalar>::New("Sigma", dict)
|
Function1<scalar>::New("Sigma", dict, &mesh)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Searchable triSurface for the top of the porous region
|
// Searchable triSurface for the top of the porous region
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -57,7 +57,7 @@ Foam::solidBodyMotionFunctions::rotatingMotion::rotatingMotion
|
|||||||
solidBodyMotionFunction(SBMFCoeffs, runTime),
|
solidBodyMotionFunction(SBMFCoeffs, runTime),
|
||||||
origin_(SBMFCoeffs_.get<vector>("origin")),
|
origin_(SBMFCoeffs_.get<vector>("origin")),
|
||||||
axis_(SBMFCoeffs_.get<vector>("axis")),
|
axis_(SBMFCoeffs_.get<vector>("axis")),
|
||||||
omega_(Function1<scalar>::New("omega", SBMFCoeffs_))
|
omega_(Function1<scalar>::New("omega", SBMFCoeffs_, &runTime))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -89,7 +89,7 @@ bool Foam::solidBodyMotionFunctions::rotatingMotion::read
|
|||||||
|
|
||||||
omega_.reset
|
omega_.reset
|
||||||
(
|
(
|
||||||
Function1<scalar>::New("omega", SBMFCoeffs_)
|
Function1<scalar>::New("omega", SBMFCoeffs_, &time_)
|
||||||
);
|
);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -74,7 +74,7 @@ Foam::fa::externalHeatFluxSource::externalHeatFluxSource
|
|||||||
Q_(0),
|
Q_(0),
|
||||||
q_(0),
|
q_(0),
|
||||||
h_(0),
|
h_(0),
|
||||||
Ta_(),
|
Ta_(nullptr),
|
||||||
emissivity_(dict.getOrDefault<scalar>("emissivity", 0))
|
emissivity_(dict.getOrDefault<scalar>("emissivity", 0))
|
||||||
{
|
{
|
||||||
fieldNames_.resize(1, TName_);
|
fieldNames_.resize(1, TName_);
|
||||||
@ -194,7 +194,7 @@ bool Foam::fa::externalHeatFluxSource::read(const dictionary& dict)
|
|||||||
case fixedHeatTransferCoeff:
|
case fixedHeatTransferCoeff:
|
||||||
{
|
{
|
||||||
dict.readEntry("h", h_);
|
dict.readEntry("h", h_);
|
||||||
Ta_ = Function1<scalar>::New("Ta", dict);
|
Ta_ = Function1<scalar>::New("Ta", dict, &mesh_);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,7 +41,7 @@ void Foam::fa::jouleHeatingSource::initialiseSigma
|
|||||||
if (dict.found("sigma"))
|
if (dict.found("sigma"))
|
||||||
{
|
{
|
||||||
// Sigma to be defined using a Function1 type
|
// Sigma to be defined using a Function1 type
|
||||||
sigmaVsTPtr = Function1<Type>::New("sigma", dict);
|
sigmaVsTPtr = Function1<Type>::New("sigma", dict, &mesh_);
|
||||||
|
|
||||||
auto tsigma = tmp<AreaFieldType>::New
|
auto tsigma = tmp<AreaFieldType>::New
|
||||||
(
|
(
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2018-2020 OpenCFD Ltd.
|
Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -256,7 +256,7 @@ Foam::MRFZone::MRFZone
|
|||||||
),
|
),
|
||||||
origin_(coeffs_.get<vector>("origin")),
|
origin_(coeffs_.get<vector>("origin")),
|
||||||
axis_(coeffs_.get<vector>("axis").normalise()),
|
axis_(coeffs_.get<vector>("axis").normalise()),
|
||||||
omega_(Function1<scalar>::New("omega", coeffs_))
|
omega_(Function1<scalar>::New("omega", coeffs_, &mesh_))
|
||||||
{
|
{
|
||||||
if (cellZoneName_ == word::null)
|
if (cellZoneName_ == word::null)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2017 OpenFOAM Foundation
|
Copyright (C) 2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -58,7 +58,7 @@ Foam::porosityModels::solidification::solidification
|
|||||||
TName_(coeffs_.getOrDefault<word>("T", "T")),
|
TName_(coeffs_.getOrDefault<word>("T", "T")),
|
||||||
alphaName_(coeffs_.getOrDefault<word>("alpha", "none")),
|
alphaName_(coeffs_.getOrDefault<word>("alpha", "none")),
|
||||||
rhoName_(coeffs_.getOrDefault<word>("rho", "rho")),
|
rhoName_(coeffs_.getOrDefault<word>("rho", "rho")),
|
||||||
D_(Function1<scalar>::New("D", coeffs_))
|
D_(Function1<scalar>::New("D", coeffs_, &mesh))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -79,9 +80,12 @@ cylindricalInletVelocityFvPatchVectorField
|
|||||||
fixedValueFvPatchField<vector>(p, iF, dict),
|
fixedValueFvPatchField<vector>(p, iF, dict),
|
||||||
origin_(dict.getCompat<vector>("origin", {{"centre", 1712}})),
|
origin_(dict.getCompat<vector>("origin", {{"centre", 1712}})),
|
||||||
axis_(dict.lookup("axis")),
|
axis_(dict.lookup("axis")),
|
||||||
axialVelocity_(Function1<scalar>::New("axialVelocity", dict)),
|
axialVelocity_(Function1<scalar>::New("axialVelocity", dict, &db())),
|
||||||
radialVelocity_(Function1<scalar>::New("radialVelocity", dict)),
|
radialVelocity_
|
||||||
rpm_(Function1<scalar>::New("rpm", dict))
|
(
|
||||||
|
Function1<scalar>::New("radialVelocity", dict, &db())
|
||||||
|
),
|
||||||
|
rpm_(Function1<scalar>::New("rpm", dict, &db()))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -84,7 +84,7 @@ Foam::fanFvPatchField<Type>::fanFvPatchField
|
|||||||
|
|
||||||
if (this->cyclicPatch().owner())
|
if (this->cyclicPatch().owner())
|
||||||
{
|
{
|
||||||
this->jumpTable_ = Function1<Type>::New("jumpTable", dict);
|
this->jumpTable_ = Function1<Type>::New("jumpTable", dict, &this->db());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dict.found("value"))
|
if (dict.found("value"))
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2017-2020 OpenCFD Ltd
|
Copyright (C) 2017-2021 OpenCFD Ltd
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -103,10 +103,7 @@ Foam::fanPressureFvPatchScalarField::fanPressureFvPatchScalarField
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fanCurve_.reset
|
fanCurve_.reset(Function1<scalar>::New("fanCurve", dict, &db()));
|
||||||
(
|
|
||||||
Function1<scalar>::New("fanCurve", dict)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nonDimensional_)
|
if (nonDimensional_)
|
||||||
|
|||||||
@ -52,7 +52,7 @@ Foam::fixedMeanFvPatchField<Type>::fixedMeanFvPatchField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<Type>(p, iF, dict),
|
fixedValueFvPatchField<Type>(p, iF, dict),
|
||||||
meanValue_(Function1<Type>::New("meanValue", dict))
|
meanValue_(Function1<Type>::New("meanValue", dict, &this->db()))
|
||||||
{
|
{
|
||||||
this->patchType() = dict.getOrDefault<word>("patchType", word::null);
|
this->patchType() = dict.getOrDefault<word>("patchType", word::null);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,7 +53,7 @@ Foam::fixedMeanOutletInletFvPatchField<Type>::fixedMeanOutletInletFvPatchField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
outletInletFvPatchField<Type>(p, iF),
|
outletInletFvPatchField<Type>(p, iF),
|
||||||
meanValue_(Function1<Type>::New("meanValue", dict))
|
meanValue_(Function1<Type>::New("meanValue", dict, &this->db()))
|
||||||
{
|
{
|
||||||
this->phiName_ = dict.getOrDefault<word>("phi", "phi");
|
this->phiName_ = dict.getOrDefault<word>("phi", "phi");
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2015-2016 OpenFOAM Foundation
|
Copyright (C) 2015-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -68,7 +68,7 @@ Foam::fixedProfileFvPatchField<Type>::fixedProfileFvPatchField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<Type>(p, iF, dict, false),
|
fixedValueFvPatchField<Type>(p, iF, dict, false),
|
||||||
profile_(Function1<Type>::New("profile", dict)),
|
profile_(Function1<Type>::New("profile", dict, &this->db())),
|
||||||
dir_(dict.lookup("direction")),
|
dir_(dict.lookup("direction")),
|
||||||
origin_(dict.get<scalar>("origin"))
|
origin_(dict.get<scalar>("origin"))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -70,12 +70,13 @@ flowRateInletVelocityFvPatchVectorField
|
|||||||
if (dict.found("volumetricFlowRate"))
|
if (dict.found("volumetricFlowRate"))
|
||||||
{
|
{
|
||||||
volumetric_ = true;
|
volumetric_ = true;
|
||||||
flowRate_ = Function1<scalar>::New("volumetricFlowRate", dict);
|
flowRate_ =
|
||||||
|
Function1<scalar>::New("volumetricFlowRate", dict, &db());
|
||||||
}
|
}
|
||||||
else if (dict.found("massFlowRate"))
|
else if (dict.found("massFlowRate"))
|
||||||
{
|
{
|
||||||
volumetric_ = false;
|
volumetric_ = false;
|
||||||
flowRate_ = Function1<scalar>::New("massFlowRate", dict);
|
flowRate_ = Function1<scalar>::New("massFlowRate", dict, &db());
|
||||||
rhoName_ = dict.getOrDefault<word>("rho", "rho");
|
rhoName_ = dict.getOrDefault<word>("rho", "rho");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -62,13 +62,14 @@ flowRateOutletVelocityFvPatchVectorField
|
|||||||
if (dict.found("volumetricFlowRate"))
|
if (dict.found("volumetricFlowRate"))
|
||||||
{
|
{
|
||||||
volumetric_ = true;
|
volumetric_ = true;
|
||||||
flowRate_ = Function1<scalar>::New("volumetricFlowRate", dict);
|
flowRate_ =
|
||||||
|
Function1<scalar>::New("volumetricFlowRate", dict, &db());
|
||||||
rhoName_ = "rho";
|
rhoName_ = "rho";
|
||||||
}
|
}
|
||||||
else if (dict.found("massFlowRate"))
|
else if (dict.found("massFlowRate"))
|
||||||
{
|
{
|
||||||
volumetric_ = false;
|
volumetric_ = false;
|
||||||
flowRate_ = Function1<scalar>::New("massFlowRate", dict);
|
flowRate_ = Function1<scalar>::New("massFlowRate", dict, &db());
|
||||||
rhoName_ = dict.getOrDefault<word>("rho", "rho");
|
rhoName_ = dict.getOrDefault<word>("rho", "rho");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2017-2020 OpenCFD Ltd.
|
Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -89,7 +89,7 @@ rotatingPressureInletOutletVelocityFvPatchVectorField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
pressureInletOutletVelocityFvPatchVectorField(p, iF, dict),
|
pressureInletOutletVelocityFvPatchVectorField(p, iF, dict),
|
||||||
omega_(Function1<vector>::New("omega", dict))
|
omega_(Function1<vector>::New("omega", dict, &db()))
|
||||||
{
|
{
|
||||||
patchType() = dict.getOrDefault<word>("patchType", word::null);
|
patchType() = dict.getOrDefault<word>("patchType", word::null);
|
||||||
calcTangentialVelocity();
|
calcTangentialVelocity();
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -68,7 +69,7 @@ rotatingTotalPressureFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
totalPressureFvPatchScalarField(p, iF, dict),
|
totalPressureFvPatchScalarField(p, iF, dict),
|
||||||
omega_(Function1<vector>::New("omega", dict))
|
omega_(Function1<vector>::New("omega", dict, &db()))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -57,7 +58,7 @@ rotatingWallVelocityFvPatchVectorField
|
|||||||
fixedValueFvPatchField<vector>(p, iF, dict, false),
|
fixedValueFvPatchField<vector>(p, iF, dict, false),
|
||||||
origin_(dict.lookup("origin")),
|
origin_(dict.lookup("origin")),
|
||||||
axis_(dict.lookup("axis")),
|
axis_(dict.lookup("axis")),
|
||||||
omega_(Function1<scalar>::New("omega", dict))
|
omega_(Function1<scalar>::New("omega", dict, &db()))
|
||||||
{
|
{
|
||||||
if (dict.found("value"))
|
if (dict.found("value"))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -56,7 +56,7 @@ surfaceNormalFixedValueFvPatchVectorField
|
|||||||
:
|
:
|
||||||
fixedValueFvPatchVectorField(p, iF, dict, false),
|
fixedValueFvPatchVectorField(p, iF, dict, false),
|
||||||
refValue_("refValue", dict, p.size()),
|
refValue_("refValue", dict, p.size()),
|
||||||
ramp_(Function1<scalar>::NewIfPresent("ramp", dict))
|
ramp_(Function1<scalar>::NewIfPresent("ramp", dict, word::null, &db()))
|
||||||
{
|
{
|
||||||
tmp<vectorField> tvalues(refValue_*patch().nf());
|
tmp<vectorField> tvalues(refValue_*patch().nf());
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2018-2020 OpenCFD Ltd.
|
Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -155,7 +155,7 @@ Foam::swirlFanVelocityFvPatchField::swirlFanVelocityFvPatchField
|
|||||||
rpm_
|
rpm_
|
||||||
(
|
(
|
||||||
this->cyclicPatch().owner()
|
this->cyclicPatch().owner()
|
||||||
? Function1<scalar>::New("rpm", dict)
|
? Function1<scalar>::New("rpm", dict, &db())
|
||||||
: nullptr
|
: nullptr
|
||||||
),
|
),
|
||||||
rEff_(dict.getOrDefault<scalar>("rEff", 0)),
|
rEff_(dict.getOrDefault<scalar>("rEff", 0)),
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2018-2020 OpenCFD Ltd.
|
Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -83,8 +83,8 @@ swirlFlowRateInletVelocityFvPatchVectorField
|
|||||||
: Zero
|
: Zero
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
flowRate_(Function1<scalar>::New("flowRate", dict)),
|
flowRate_(Function1<scalar>::New("flowRate", dict, &db())),
|
||||||
rpm_(Function1<scalar>::New("rpm", dict))
|
rpm_(Function1<scalar>::New("rpm", dict, &db()))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2017 OpenFOAM Foundation
|
Copyright (C) 2017 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -75,9 +76,15 @@ swirlInletVelocityFvPatchVectorField
|
|||||||
fixedValueFvPatchField<vector>(p, iF, dict),
|
fixedValueFvPatchField<vector>(p, iF, dict),
|
||||||
origin_(dict.lookup("origin")),
|
origin_(dict.lookup("origin")),
|
||||||
axis_(dict.lookup("axis")),
|
axis_(dict.lookup("axis")),
|
||||||
axialVelocity_(Function1<scalar>::New("axialVelocity", dict)),
|
axialVelocity_(Function1<scalar>::New("axialVelocity", dict, &db())),
|
||||||
radialVelocity_(Function1<scalar>::New("radialVelocity", dict)),
|
radialVelocity_
|
||||||
tangentialVelocity_(Function1<scalar>::New("tangentialVelocity", dict))
|
(
|
||||||
|
Function1<scalar>::New("radialVelocity", dict, &db())
|
||||||
|
),
|
||||||
|
tangentialVelocity_
|
||||||
|
(
|
||||||
|
Function1<scalar>::New("tangentialVelocity", dict, &db())
|
||||||
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -52,7 +53,7 @@ translatingWallVelocityFvPatchVectorField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<vector>(p, iF, dict, false),
|
fixedValueFvPatchField<vector>(p, iF, dict, false),
|
||||||
U_(Function1<vector>::New("U", dict))
|
U_(Function1<vector>::New("U", dict, &db()))
|
||||||
{
|
{
|
||||||
// Evaluate the wall velocity
|
// Evaluate the wall velocity
|
||||||
updateCoeffs();
|
updateCoeffs();
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2013-2017 OpenFOAM Foundation
|
Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2015-2020 OpenCFD Ltd.
|
Copyright (C) 2015-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -56,7 +56,10 @@ Foam::uniformInletOutletFvPatchField<Type>::uniformInletOutletFvPatchField
|
|||||||
:
|
:
|
||||||
mixedFvPatchField<Type>(p, iF),
|
mixedFvPatchField<Type>(p, iF),
|
||||||
phiName_(dict.getOrDefault<word>("phi", "phi")),
|
phiName_(dict.getOrDefault<word>("phi", "phi")),
|
||||||
uniformInletValue_(Function1<Type>::New("uniformInletValue", dict))
|
uniformInletValue_
|
||||||
|
(
|
||||||
|
Function1<Type>::New("uniformInletValue", dict, &this->db())
|
||||||
|
)
|
||||||
{
|
{
|
||||||
this->patchType() = dict.getOrDefault<word>("patchType", word::null);
|
this->patchType() = dict.getOrDefault<word>("patchType", word::null);
|
||||||
this->refValue() =
|
this->refValue() =
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2012-2017 OpenFOAM Foundation
|
Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -71,7 +72,7 @@ Foam::uniformJumpFvPatchField<Type>::uniformJumpFvPatchField
|
|||||||
{
|
{
|
||||||
if (this->cyclicPatch().owner())
|
if (this->cyclicPatch().owner())
|
||||||
{
|
{
|
||||||
jumpTable_ = Function1<Type>::New("jumpTable", dict);
|
jumpTable_ = Function1<Type>::New("jumpTable", dict, &this->db());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dict.found("value"))
|
if (dict.found("value"))
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2012-2017 OpenFOAM Foundation
|
Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -68,7 +69,7 @@ Foam::uniformJumpAMIFvPatchField<Type>::uniformJumpAMIFvPatchField
|
|||||||
{
|
{
|
||||||
if (this->cyclicAMIPatch().owner())
|
if (this->cyclicAMIPatch().owner())
|
||||||
{
|
{
|
||||||
jumpTable_ = Function1<Type>::New("jumpTable", dict);
|
jumpTable_ = Function1<Type>::New("jumpTable", dict, &this->db());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dict.found("value"))
|
if (dict.found("value"))
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -55,7 +55,7 @@ uniformNormalFixedValueFvPatchVectorField
|
|||||||
:
|
:
|
||||||
fixedValueFvPatchVectorField(p, iF, dict, false),
|
fixedValueFvPatchVectorField(p, iF, dict, false),
|
||||||
uniformValue_(PatchFunction1<scalar>::New(p.patch(), "uniformValue", dict)),
|
uniformValue_(PatchFunction1<scalar>::New(p.patch(), "uniformValue", dict)),
|
||||||
ramp_(Function1<scalar>::NewIfPresent("ramp", dict))
|
ramp_(Function1<scalar>::NewIfPresent("ramp", dict, word::null, &db()))
|
||||||
{
|
{
|
||||||
if (dict.found("value"))
|
if (dict.found("value"))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -65,7 +65,7 @@ uniformTotalPressureFvPatchScalarField
|
|||||||
rhoName_(dict.getOrDefault<word>("rho", "rho")),
|
rhoName_(dict.getOrDefault<word>("rho", "rho")),
|
||||||
psiName_(dict.getOrDefault<word>("psi", "none")),
|
psiName_(dict.getOrDefault<word>("psi", "none")),
|
||||||
gamma_(psiName_ != "none" ? dict.get<scalar>("gamma") : 1),
|
gamma_(psiName_ != "none" ? dict.get<scalar>("gamma") : 1),
|
||||||
p0_(Function1<scalar>::New("p0", dict))
|
p0_(Function1<scalar>::New("p0", dict, &db()))
|
||||||
{
|
{
|
||||||
if (dict.found("value"))
|
if (dict.found("value"))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2012-2016 OpenFOAM Foundation
|
Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -53,7 +54,7 @@ Foam::variableHeightFlowRateInletVelocityFvPatchVectorField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<vector>(p, iF, dict),
|
fixedValueFvPatchField<vector>(p, iF, dict),
|
||||||
flowRate_(Function1<scalar>::New("flowRate", dict)),
|
flowRate_(Function1<scalar>::New("flowRate", dict, &db())),
|
||||||
alphaName_(dict.lookup("alpha"))
|
alphaName_(dict.lookup("alpha"))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2018 OpenFOAM Foundation
|
Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -328,7 +328,7 @@ CrankNicolsonDdtScheme<Type>::CrankNicolsonDdtScheme
|
|||||||
{
|
{
|
||||||
is.putBack(firstToken);
|
is.putBack(firstToken);
|
||||||
dictionary dict(is);
|
dictionary dict(is);
|
||||||
ocCoeff_ = Function1<scalar>::New("ocCoeff", dict);
|
ocCoeff_ = Function1<scalar>::New("ocCoeff", dict, &mesh);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure the old-old-time cell volumes are available
|
// Ensure the old-old-time cell volumes are available
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2013-2016 OpenFOAM Foundation
|
Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2017-2020 OpenCFD Ltd.
|
Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -146,7 +146,7 @@ externalCoupledTemperatureMixedFvPatchScalarField
|
|||||||
|
|
||||||
if (refTempType_ == refTemperatureType::USER)
|
if (refTempType_ == refTemperatureType::USER)
|
||||||
{
|
{
|
||||||
Tref_ = Function1<scalar>::New("Tref", dict);
|
Tref_ = Function1<scalar>::New("Tref", dict, &db());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dict.found("refValue"))
|
if (dict.found("refValue"))
|
||||||
|
|||||||
@ -47,7 +47,7 @@ bool Foam::functionObjects::reference::calcType()
|
|||||||
|
|
||||||
autoPtr<Function1<Type>> valuePtr
|
autoPtr<Function1<Type>> valuePtr
|
||||||
(
|
(
|
||||||
Function1<Type>::New("refValue", localDict_, &mesh_)
|
Function1<Type>::New("refValue", localDict_, &this->mesh_)
|
||||||
);
|
);
|
||||||
|
|
||||||
refValue.value() = valuePtr->value(this->time().value());
|
refValue.value() = valuePtr->value(this->time().value());
|
||||||
|
|||||||
@ -155,18 +155,18 @@ bool Foam::functionObjects::setFlow::read(const dictionary& dict)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Scaling is applied across all modes
|
// Scaling is applied across all modes
|
||||||
scalePtr_ = Function1<scalar>::New("scale", dict);
|
scalePtr_ = Function1<scalar>::New("scale", dict, &mesh_);
|
||||||
|
|
||||||
switch (mode_)
|
switch (mode_)
|
||||||
{
|
{
|
||||||
case modeType::FUNCTION:
|
case modeType::FUNCTION:
|
||||||
{
|
{
|
||||||
velocityPtr_ = Function1<vector>::New("velocity", dict);
|
velocityPtr_ = Function1<vector>::New("velocity", dict, &mesh_);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case modeType::ROTATION:
|
case modeType::ROTATION:
|
||||||
{
|
{
|
||||||
omegaPtr_ = Function1<scalar>::New("omega", dict);
|
omegaPtr_ = Function1<scalar>::New("omega", dict, &mesh_);
|
||||||
|
|
||||||
dict.readEntry("origin", origin_);
|
dict.readEntry("origin", origin_);
|
||||||
const vector refDir(dict.get<vector>("refDir").normalise());
|
const vector refDir(dict.get<vector>("refDir").normalise());
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2013-2016 OpenFOAM Foundation
|
Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -92,7 +92,7 @@ bool Foam::functionObjects::setTimeStepFunctionObject::read
|
|||||||
{
|
{
|
||||||
timeFunctionObject::read(dict);
|
timeFunctionObject::read(dict);
|
||||||
|
|
||||||
timeStepPtr_ = Function1<scalar>::New("deltaT", dict);
|
timeStepPtr_ = Function1<scalar>::New("deltaT", dict, &time_);
|
||||||
|
|
||||||
// Ensure that adjustTimeStep is active
|
// Ensure that adjustTimeStep is active
|
||||||
if (!time_.controlDict().getOrDefault("adjustTimeStep", false))
|
if (!time_.controlDict().getOrDefault("adjustTimeStep", false))
|
||||||
|
|||||||
@ -85,7 +85,10 @@ timeVaryingMappedFixedValuePointPatchField
|
|||||||
endSampleTime_(-1),
|
endSampleTime_(-1),
|
||||||
endSampledValues_(0),
|
endSampledValues_(0),
|
||||||
endAverage_(Zero),
|
endAverage_(Zero),
|
||||||
offset_(Function1<Type>::NewIfPresent("offset", dict))
|
offset_
|
||||||
|
(
|
||||||
|
Function1<Type>::NewIfPresent("offset", dict, word::null, &this->db())
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
|
|||||||
@ -80,7 +80,7 @@ Foam::fv::fixedTemperatureConstraint::fixedTemperatureConstraint
|
|||||||
{
|
{
|
||||||
Tuniform_.reset
|
Tuniform_.reset
|
||||||
(
|
(
|
||||||
Function1<scalar>::New("temperature", coeffs_).ptr()
|
Function1<scalar>::New("temperature", coeffs_, &mesh_)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -152,7 +152,7 @@ bool Foam::fv::fixedTemperatureConstraint::read(const dictionary& dict)
|
|||||||
{
|
{
|
||||||
Tuniform_.reset
|
Tuniform_.reset
|
||||||
(
|
(
|
||||||
Function1<scalar>::New(Tuniform_->name(), dict).ptr()
|
Function1<scalar>::New(Tuniform_->name(), dict, &mesh_)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -213,8 +213,8 @@ Foam::fv::actuationDiskSource::actuationDiskSource
|
|||||||
[&](const vector& vec){ return mag(vec) > VSMALL; }
|
[&](const vector& vec){ return mag(vec) > VSMALL; }
|
||||||
).normalise()
|
).normalise()
|
||||||
),
|
),
|
||||||
UvsCpPtr_(Function1<scalar>::New("Cp", coeffs_)),
|
UvsCpPtr_(Function1<scalar>::New("Cp", coeffs_, &mesh)),
|
||||||
UvsCtPtr_(Function1<scalar>::New("Ct", coeffs_)),
|
UvsCtPtr_(Function1<scalar>::New("Ct", coeffs_, &mesh)),
|
||||||
monitorCells_()
|
monitorCells_()
|
||||||
{
|
{
|
||||||
setMonitorCells(coeffs_);
|
setMonitorCells(coeffs_);
|
||||||
|
|||||||
@ -39,7 +39,7 @@ void Foam::fv::jouleHeatingSource::initialiseSigma
|
|||||||
if (dict.found("sigma"))
|
if (dict.found("sigma"))
|
||||||
{
|
{
|
||||||
// Sigma to be defined using a Function1 type
|
// Sigma to be defined using a Function1 type
|
||||||
sigmaVsTPtr = Function1<Type>::New("sigma", dict);
|
sigmaVsTPtr = Function1<Type>::New("sigma", dict, &mesh_);
|
||||||
|
|
||||||
auto tsigma = tmp<VolFieldType>::New
|
auto tsigma = tmp<VolFieldType>::New
|
||||||
(
|
(
|
||||||
|
|||||||
@ -91,8 +91,8 @@ void Foam::fv::SemiImplicitSource<Type>::setFieldData(const dictionary& dict)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
const dictionary& Sdict = dEntry.dict();
|
const dictionary& Sdict = dEntry.dict();
|
||||||
Su_.set(count, Function1<Type>::New("Su", Sdict));
|
Su_.set(count, Function1<Type>::New("Su", Sdict, &mesh_));
|
||||||
Sp_.set(count, Function1<scalar>::New("Sp", Sdict));
|
Sp_.set(count, Function1<scalar>::New("Sp", Sdict, &mesh_));
|
||||||
}
|
}
|
||||||
|
|
||||||
++count;
|
++count;
|
||||||
|
|||||||
@ -59,7 +59,7 @@ Foam::ConeInjection<CloudType>::ConeInjection
|
|||||||
(
|
(
|
||||||
"flowRateProfile",
|
"flowRateProfile",
|
||||||
this->coeffDict(),
|
this->coeffDict(),
|
||||||
&owner.db().time()
|
&owner.mesh()
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
Umag_
|
Umag_
|
||||||
@ -68,7 +68,7 @@ Foam::ConeInjection<CloudType>::ConeInjection
|
|||||||
(
|
(
|
||||||
"Umag",
|
"Umag",
|
||||||
this->coeffDict(),
|
this->coeffDict(),
|
||||||
&owner.db().time()
|
&owner.mesh()
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
thetaInner_
|
thetaInner_
|
||||||
@ -77,7 +77,7 @@ Foam::ConeInjection<CloudType>::ConeInjection
|
|||||||
(
|
(
|
||||||
"thetaInner",
|
"thetaInner",
|
||||||
this->coeffDict(),
|
this->coeffDict(),
|
||||||
&owner.db().time()
|
&owner.mesh()
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
thetaOuter_
|
thetaOuter_
|
||||||
@ -86,7 +86,7 @@ Foam::ConeInjection<CloudType>::ConeInjection
|
|||||||
(
|
(
|
||||||
"thetaOuter",
|
"thetaOuter",
|
||||||
this->coeffDict(),
|
this->coeffDict(),
|
||||||
&owner.db().time()
|
&owner.mesh()
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
sizeDistribution_
|
sizeDistribution_
|
||||||
|
|||||||
@ -80,7 +80,7 @@ void Foam::ConeNozzleInjection<CloudType>::setInjectionMethod()
|
|||||||
(
|
(
|
||||||
"position",
|
"position",
|
||||||
this->coeffDict(),
|
this->coeffDict(),
|
||||||
&this->owner().db().time()
|
&this->owner().mesh()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
@ -114,7 +114,7 @@ void Foam::ConeNozzleInjection<CloudType>::setFlowType()
|
|||||||
(
|
(
|
||||||
"Pinj",
|
"Pinj",
|
||||||
this->coeffDict(),
|
this->coeffDict(),
|
||||||
&this->owner().db().time()
|
&this->owner().mesh()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
@ -127,7 +127,7 @@ void Foam::ConeNozzleInjection<CloudType>::setFlowType()
|
|||||||
(
|
(
|
||||||
"Cd",
|
"Cd",
|
||||||
this->coeffDict(),
|
this->coeffDict(),
|
||||||
&this->owner().db().time()
|
&this->owner().mesh()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
@ -175,7 +175,7 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection
|
|||||||
(
|
(
|
||||||
"flowRateProfile",
|
"flowRateProfile",
|
||||||
this->coeffDict(),
|
this->coeffDict(),
|
||||||
&owner.db().time()
|
&owner.mesh()
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
thetaInner_
|
thetaInner_
|
||||||
@ -184,7 +184,7 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection
|
|||||||
(
|
(
|
||||||
"thetaInner",
|
"thetaInner",
|
||||||
this->coeffDict(),
|
this->coeffDict(),
|
||||||
&owner.db().time()
|
&owner.mesh()
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
thetaOuter_
|
thetaOuter_
|
||||||
@ -193,7 +193,7 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection
|
|||||||
(
|
(
|
||||||
"thetaOuter",
|
"thetaOuter",
|
||||||
this->coeffDict(),
|
this->coeffDict(),
|
||||||
&owner.db().time()
|
&owner.mesh()
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
sizeDistribution_
|
sizeDistribution_
|
||||||
|
|||||||
@ -56,7 +56,7 @@ Foam::InflationInjection<CloudType>::InflationInjection
|
|||||||
(
|
(
|
||||||
"flowRateProfile",
|
"flowRateProfile",
|
||||||
this->coeffDict(),
|
this->coeffDict(),
|
||||||
&owner.db().time()
|
&owner.mesh()
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
growthRate_
|
growthRate_
|
||||||
@ -65,7 +65,7 @@ Foam::InflationInjection<CloudType>::InflationInjection
|
|||||||
(
|
(
|
||||||
"growthRate",
|
"growthRate",
|
||||||
this->coeffDict(),
|
this->coeffDict(),
|
||||||
&owner.db().time()
|
&owner.mesh()
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
newParticles_(),
|
newParticles_(),
|
||||||
|
|||||||
@ -345,7 +345,7 @@ Foam::InjectionModel<CloudType>::InjectionModel
|
|||||||
(
|
(
|
||||||
"massFlowRate",
|
"massFlowRate",
|
||||||
this->coeffDict(),
|
this->coeffDict(),
|
||||||
&owner.db().time()
|
&owner.mesh()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
massTotal_ = massFlowRate_->value(owner.db().time().value());
|
massTotal_ = massFlowRate_->value(owner.db().time().value());
|
||||||
|
|||||||
@ -52,7 +52,7 @@ Foam::PatchFlowRateInjection<CloudType>::PatchFlowRateInjection
|
|||||||
(
|
(
|
||||||
"concentration",
|
"concentration",
|
||||||
this->coeffDict(),
|
this->coeffDict(),
|
||||||
&owner.db().time()
|
&owner.mesh()
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
parcelConcentration_
|
parcelConcentration_
|
||||||
|
|||||||
@ -53,7 +53,7 @@ Foam::PatchInjection<CloudType>::PatchInjection
|
|||||||
(
|
(
|
||||||
"flowRateProfile",
|
"flowRateProfile",
|
||||||
this->coeffDict(),
|
this->coeffDict(),
|
||||||
&owner.db().time()
|
&owner.mesh()
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
sizeDistribution_
|
sizeDistribution_
|
||||||
|
|||||||
@ -72,7 +72,7 @@ adjointRotatingWallVelocityFvPatchVectorField
|
|||||||
adjointWallVelocityFvPatchVectorField(p, iF, dict),
|
adjointWallVelocityFvPatchVectorField(p, iF, dict),
|
||||||
origin_(dict.get<vector>("origin")),
|
origin_(dict.get<vector>("origin")),
|
||||||
axis_(dict.get<vector>("axis")),
|
axis_(dict.get<vector>("axis")),
|
||||||
omega_(Function1<scalar>::New("omega", dict))
|
omega_(Function1<scalar>::New("omega", dict, &db()))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -113,7 +113,7 @@ alphatWallBoilingWallFunctionFvPatchScalarField
|
|||||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(p, iF, dict),
|
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(p, iF, dict),
|
||||||
otherPhaseName_(dict.get<word>("otherPhase")),
|
otherPhaseName_(dict.get<word>("otherPhase")),
|
||||||
phaseType_(phaseTypeNames_.get("phaseType", dict)),
|
phaseType_(phaseTypeNames_.get("phaseType", dict)),
|
||||||
relax_(Function1<scalar>::New("relax", dict)),
|
relax_(Function1<scalar>::New("relax", dict, &db())),
|
||||||
AbyV_(p.size(), 0),
|
AbyV_(p.size(), 0),
|
||||||
alphatConv_(p.size(), 0),
|
alphatConv_(p.size(), 0),
|
||||||
dDep_(p.size(), 1e-5),
|
dDep_(p.size(), 1e-5),
|
||||||
|
|||||||
@ -51,7 +51,7 @@ Foam::saturationModels::function1::function1
|
|||||||
saturationModel(db),
|
saturationModel(db),
|
||||||
function_
|
function_
|
||||||
(
|
(
|
||||||
Function1<scalar>::New("function", dict)
|
Function1<scalar>::New("function", dict, &db)
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -58,7 +58,7 @@ perturbedTemperatureDependentContactAngleForce
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
contactAngleForce(typeName, film, dict),
|
contactAngleForce(typeName, film, dict),
|
||||||
thetaPtr_(Function1<scalar>::New("theta", coeffDict_)),
|
thetaPtr_(Function1<scalar>::New("theta", coeffDict_, &film.primaryMesh())),
|
||||||
rndGen_(label(0)),
|
rndGen_(label(0)),
|
||||||
distribution_
|
distribution_
|
||||||
(
|
(
|
||||||
|
|||||||
@ -78,9 +78,9 @@ inclinedFilmNusseltHeightFvPatchScalarField
|
|||||||
(
|
(
|
||||||
dict.getOrDefault<word>("filmRegion", "surfaceFilmProperties")
|
dict.getOrDefault<word>("filmRegion", "surfaceFilmProperties")
|
||||||
),
|
),
|
||||||
GammaMean_(Function1<scalar>::New("GammaMean", dict)),
|
GammaMean_(Function1<scalar>::New("GammaMean", dict, &db())),
|
||||||
a_(Function1<scalar>::New("a", dict)),
|
a_(Function1<scalar>::New("a", dict, &db())),
|
||||||
omega_(Function1<scalar>::New("omega", dict))
|
omega_(Function1<scalar>::New("omega", dict, &db()))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -78,9 +78,9 @@ inclinedFilmNusseltInletVelocityFvPatchVectorField
|
|||||||
(
|
(
|
||||||
dict.getOrDefault<word>("filmRegion", "surfaceFilmProperties")
|
dict.getOrDefault<word>("filmRegion", "surfaceFilmProperties")
|
||||||
),
|
),
|
||||||
GammaMean_(Function1<scalar>::New("GammaMean", dict)),
|
GammaMean_(Function1<scalar>::New("GammaMean", dict, &db())),
|
||||||
a_(Function1<scalar>::New("a", dict)),
|
a_(Function1<scalar>::New("a", dict, &db())),
|
||||||
omega_(Function1<scalar>::New("omega", dict))
|
omega_(Function1<scalar>::New("omega", dict, &db()))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -58,7 +58,7 @@ perturbedTemperatureDependentContactAngleForce
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
contactAngleForce(typeName, film, dict),
|
contactAngleForce(typeName, film, dict),
|
||||||
thetaPtr_(Function1<scalar>::New("theta", coeffDict_)),
|
thetaPtr_(Function1<scalar>::New("theta", coeffDict_, &film.regionMesh())),
|
||||||
rndGen_(label(0)),
|
rndGen_(label(0)),
|
||||||
distribution_
|
distribution_
|
||||||
(
|
(
|
||||||
|
|||||||
@ -57,7 +57,7 @@ temperatureDependentContactAngleForce::temperatureDependentContactAngleForce
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
contactAngleForce(typeName, film, dict),
|
contactAngleForce(typeName, film, dict),
|
||||||
thetaPtr_(Function1<scalar>::New("theta", coeffDict_))
|
thetaPtr_(Function1<scalar>::New("theta", coeffDict_, &film.regionMesh()))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -62,7 +62,7 @@ function1Viscosity::function1Viscosity
|
|||||||
viscosity_(filmViscosityModel::New(film, coeffDict_, mu)),
|
viscosity_(filmViscosityModel::New(film, coeffDict_, mu)),
|
||||||
function_
|
function_
|
||||||
(
|
(
|
||||||
Function1<scalar>::New("function", coeffDict_)
|
Function1<scalar>::New("function", coeffDict_, &film.regionMesh())
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -133,7 +133,7 @@ waxSolventEvaporation::waxSolventEvaporation
|
|||||||
YInfZero_(coeffDict_.getOrDefault("YInfZero", false)),
|
YInfZero_(coeffDict_.getOrDefault("YInfZero", false)),
|
||||||
activityCoeff_
|
activityCoeff_
|
||||||
(
|
(
|
||||||
Function1<scalar>::New("activityCoeff", coeffDict_)
|
Function1<scalar>::New("activityCoeff", coeffDict_, &film.regionMesh())
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -119,7 +119,10 @@ Foam::rigidBodyMeshMotion::rigidBodyMeshMotion
|
|||||||
test_(coeffDict().getOrDefault("test", false)),
|
test_(coeffDict().getOrDefault("test", false)),
|
||||||
rhoInf_(1.0),
|
rhoInf_(1.0),
|
||||||
rhoName_(coeffDict().getOrDefault<word>("rho", "rho")),
|
rhoName_(coeffDict().getOrDefault<word>("rho", "rho")),
|
||||||
ramp_(Function1<scalar>::NewIfPresent("ramp", coeffDict())),
|
ramp_
|
||||||
|
(
|
||||||
|
Function1<scalar>::NewIfPresent("ramp", coeffDict(), word::null, &mesh)
|
||||||
|
),
|
||||||
curTimeIndex_(-1),
|
curTimeIndex_(-1),
|
||||||
cOfGdisplacement_
|
cOfGdisplacement_
|
||||||
(
|
(
|
||||||
|
|||||||
@ -126,7 +126,7 @@ void Foam::radiation::fvDOM::initialise()
|
|||||||
(
|
(
|
||||||
"spectralDistribution",
|
"spectralDistribution",
|
||||||
coeffs_,
|
coeffs_,
|
||||||
&mesh_.time()
|
&mesh_
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -373,7 +373,7 @@ void Foam::radiation::solarLoad::initialise(const dictionary& coeffs)
|
|||||||
(
|
(
|
||||||
"spectralDistribution",
|
"spectralDistribution",
|
||||||
coeffs,
|
coeffs,
|
||||||
&mesh_.time()
|
&mesh_
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -207,7 +207,7 @@ void Foam::solarCalculator::initialise()
|
|||||||
(
|
(
|
||||||
"directSolarRad",
|
"directSolarRad",
|
||||||
dict_,
|
dict_,
|
||||||
&mesh_.time()
|
&mesh_
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -217,7 +217,7 @@ void Foam::solarCalculator::initialise()
|
|||||||
(
|
(
|
||||||
"diffuseSolarRad",
|
"diffuseSolarRad",
|
||||||
dict_,
|
dict_,
|
||||||
&mesh_.time()
|
&mesh_
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2016-2017 OpenFOAM Foundation
|
Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2017 OpenCFD Ltd.
|
Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -65,7 +65,12 @@ Foam::viscosityModels::strainRateFunction::strainRateFunction
|
|||||||
),
|
),
|
||||||
strainRateFunction_
|
strainRateFunction_
|
||||||
(
|
(
|
||||||
Function1<scalar>::New("function", strainRateFunctionCoeffs_)
|
Function1<scalar>::New
|
||||||
|
(
|
||||||
|
"function",
|
||||||
|
strainRateFunctionCoeffs_,
|
||||||
|
&U_.db()
|
||||||
|
)
|
||||||
),
|
),
|
||||||
nu_
|
nu_
|
||||||
(
|
(
|
||||||
@ -134,7 +139,8 @@ bool Foam::viscosityModels::strainRateFunction::read
|
|||||||
strainRateFunction_ = Function1<scalar>::New
|
strainRateFunction_ = Function1<scalar>::New
|
||||||
(
|
(
|
||||||
"function",
|
"function",
|
||||||
strainRateFunctionCoeffs_
|
strainRateFunctionCoeffs_,
|
||||||
|
&U_.db()
|
||||||
);
|
);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -57,7 +57,7 @@ Foam::surfaceTensionModels::temperatureDependent::temperatureDependent
|
|||||||
:
|
:
|
||||||
surfaceTensionModel(mesh),
|
surfaceTensionModel(mesh),
|
||||||
TName_(dict.getOrDefault<word>("T", "T")),
|
TName_(dict.getOrDefault<word>("T", "T")),
|
||||||
sigma_(Function1<scalar>::New("sigma", dict))
|
sigma_(Function1<scalar>::New("sigma", dict, &mesh))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ bool Foam::surfaceTensionModels::temperatureDependent::readDict
|
|||||||
const dictionary& sigmaDict = surfaceTensionModel::sigmaDict(dict);
|
const dictionary& sigmaDict = surfaceTensionModel::sigmaDict(dict);
|
||||||
|
|
||||||
TName_ = sigmaDict.getOrDefault<word>("T", "T");
|
TName_ = sigmaDict.getOrDefault<word>("T", "T");
|
||||||
sigma_ = Function1<scalar>::New("sigma", sigmaDict);
|
sigma_ = Function1<scalar>::New("sigma", sigmaDict, &mesh_);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -56,7 +56,7 @@ temperatureDependentAlphaContactAngleFvPatchScalarField
|
|||||||
:
|
:
|
||||||
alphaContactAngleTwoPhaseFvPatchScalarField(p, iF, dict),
|
alphaContactAngleTwoPhaseFvPatchScalarField(p, iF, dict),
|
||||||
TName_(dict.getOrDefault<word>("T", "T")),
|
TName_(dict.getOrDefault<word>("T", "T")),
|
||||||
theta0_(Function1<scalar>::New("theta0", dict))
|
theta0_(Function1<scalar>::New("theta0", dict, &db()))
|
||||||
{
|
{
|
||||||
evaluate();
|
evaluate();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user