mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Cleaned up usage for submodel coeffDicts and comments in headers
This commit is contained in:
@ -120,6 +120,9 @@ public:
|
||||
//- Return the dictionary
|
||||
const dictionary& dict() const;
|
||||
|
||||
|
||||
// Evaluation
|
||||
|
||||
//- Return value as a function of (scalar) independent variable
|
||||
virtual Type value(const scalar x) const = 0;
|
||||
|
||||
|
||||
@ -80,22 +80,11 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return const access to the turbulence model
|
||||
const compressible::turbulenceModel& turbulence() const
|
||||
{
|
||||
return turbulence_;
|
||||
}
|
||||
|
||||
virtual bool active() const = 0;
|
||||
|
||||
virtual vector update
|
||||
(
|
||||
const scalar dt,
|
||||
const label celli,
|
||||
const vector& U,
|
||||
const vector& Uc,
|
||||
vector& UTurb,
|
||||
scalar& tTurb
|
||||
) = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -75,8 +75,10 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Flag to indicate whether model activates injection model
|
||||
bool active() const;
|
||||
|
||||
//- Update (disperse particles)
|
||||
vector update
|
||||
(
|
||||
const scalar dt,
|
||||
|
||||
@ -73,8 +73,10 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Flag to indicate whether model activates injection model
|
||||
bool active() const;
|
||||
|
||||
//- Update (disperse particles)
|
||||
vector update
|
||||
(
|
||||
const scalar dt,
|
||||
|
||||
@ -75,8 +75,10 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Flag to indicate whether model activates injection model
|
||||
bool active() const;
|
||||
|
||||
//- Update (disperse particles)
|
||||
vector update
|
||||
(
|
||||
const scalar dt,
|
||||
|
||||
@ -72,8 +72,10 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Flag to indicate whether model activates drag model
|
||||
bool active() const;
|
||||
|
||||
//- Return drag coefficient
|
||||
scalar Cd(const scalar) const;
|
||||
};
|
||||
|
||||
|
||||
@ -72,8 +72,10 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Flag to indicate whether model activates drag model
|
||||
bool active() const;
|
||||
|
||||
//- Return drag coefficient
|
||||
scalar Cd(const scalar Re) const;
|
||||
};
|
||||
|
||||
|
||||
@ -24,8 +24,6 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "error.H"
|
||||
|
||||
#include "Rebound.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
@ -37,7 +35,8 @@ Foam::Rebound<CloudType>::Rebound
|
||||
CloudType& cloud
|
||||
)
|
||||
:
|
||||
WallInteractionModel<CloudType>(dict, cloud)
|
||||
WallInteractionModel<CloudType>(dict, cloud, typeName),
|
||||
UFactor_(readScalar(this->coeffDict().lookup("UFactor")))
|
||||
{}
|
||||
|
||||
|
||||
@ -71,9 +70,9 @@ void Foam::Rebound<CloudType>::correct
|
||||
scalar Un = U & nw;
|
||||
vector Ut = U - Un*nw;
|
||||
|
||||
if (Un > 0)
|
||||
if (Un > 0.0)
|
||||
{
|
||||
U -= 2.0*Un*nw;
|
||||
U -= UFactor_*2.0*Un*nw;
|
||||
}
|
||||
|
||||
U -= Ut;
|
||||
|
||||
@ -48,6 +48,12 @@ class Rebound
|
||||
:
|
||||
public WallInteractionModel<CloudType>
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Factor applied to velocity on rebound
|
||||
// Normal rebound = 1
|
||||
scalar UFactor_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -72,8 +78,10 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Flag to indicate whether model activates heat transfer model
|
||||
bool active() const;
|
||||
|
||||
//- Apply wall correction
|
||||
virtual void correct
|
||||
(
|
||||
const wallPolyPatch& wpp,
|
||||
|
||||
@ -37,10 +37,9 @@ Foam::StandardWallInteraction<CloudType>::StandardWallInteraction
|
||||
CloudType& cloud
|
||||
)
|
||||
:
|
||||
WallInteractionModel<CloudType>(dict, cloud),
|
||||
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
||||
e_(dimensionedScalar(coeffDict_.lookup("e")).value()),
|
||||
mu_(dimensionedScalar(coeffDict_.lookup("mu")).value())
|
||||
WallInteractionModel<CloudType>(dict, cloud, typeName),
|
||||
e_(dimensionedScalar(this->coeffDict().lookup("e")).value()),
|
||||
mu_(dimensionedScalar(this->coeffDict().lookup("mu")).value())
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -51,9 +51,6 @@ class StandardWallInteraction
|
||||
|
||||
// Private data
|
||||
|
||||
//- Coefficient dictionary
|
||||
dictionary coeffDict_;
|
||||
|
||||
//- Elasticity
|
||||
const scalar e_;
|
||||
|
||||
@ -84,8 +81,10 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Flag to indicate whether model activates heat transfer model
|
||||
bool active() const;
|
||||
|
||||
//- Apply wall correction
|
||||
virtual void correct
|
||||
(
|
||||
const wallPolyPatch& wpp,
|
||||
|
||||
@ -32,10 +32,12 @@ template<class CloudType>
|
||||
Foam::WallInteractionModel<CloudType>::WallInteractionModel
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& owner
|
||||
CloudType& owner,
|
||||
const word& type
|
||||
)
|
||||
: dict_(dict),
|
||||
owner_(owner)
|
||||
owner_(owner),
|
||||
coeffDict_(dict.subDict(type + "Coeffs"))
|
||||
{}
|
||||
|
||||
|
||||
@ -63,6 +65,14 @@ const Foam::dictionary& Foam::WallInteractionModel<CloudType>::dict() const
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
const Foam::dictionary&
|
||||
Foam::WallInteractionModel<CloudType>::coeffDict() const
|
||||
{
|
||||
return coeffDict_;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "NewWallInteractionModel.C"
|
||||
|
||||
@ -63,6 +63,9 @@ class WallInteractionModel
|
||||
// reference to the owner cloud class
|
||||
CloudType& owner_;
|
||||
|
||||
//- The coefficients dictionary
|
||||
const dictionary coeffDict_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -89,7 +92,8 @@ public:
|
||||
WallInteractionModel
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& owner
|
||||
CloudType& owner,
|
||||
const word& type
|
||||
);
|
||||
|
||||
|
||||
@ -109,11 +113,14 @@ public:
|
||||
|
||||
// Access
|
||||
|
||||
//- Return the owner cloud object
|
||||
const CloudType& owner() const;
|
||||
|
||||
//- Return the dictionary
|
||||
const dictionary& dict() const;
|
||||
|
||||
//- Return the owner cloud object
|
||||
const CloudType& owner() const;
|
||||
//- Return the coefficients dictionary
|
||||
const dictionary& coeffDict() const;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -32,10 +32,12 @@ template<class CloudType>
|
||||
Foam::CompositionModel<CloudType>::CompositionModel
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& owner
|
||||
CloudType& owner,
|
||||
const word& type
|
||||
)
|
||||
: dict_(dict),
|
||||
owner_(owner),
|
||||
coeffDict_(dict.subDict(type + "Coeffs")),
|
||||
carrierThermo_(owner.carrierThermo()),
|
||||
gases_(owner.gases()),
|
||||
liquids_
|
||||
@ -84,6 +86,13 @@ const Foam::dictionary& Foam::CompositionModel<CloudType>::dict() const
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
const Foam::dictionary& Foam::CompositionModel<CloudType>::coeffDict() const
|
||||
{
|
||||
return coeffDict_;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
const Foam::hCombustionThermo&
|
||||
Foam::CompositionModel<CloudType>::carrierThermo() const
|
||||
|
||||
@ -70,6 +70,9 @@ class CompositionModel
|
||||
//- Reference to the owner injection class
|
||||
CloudType& owner_;
|
||||
|
||||
//- The coefficients dictionary
|
||||
const dictionary& coeffDict_;
|
||||
|
||||
//- Reference to the carrier phase thermo package
|
||||
hCombustionThermo& carrierThermo_;
|
||||
|
||||
@ -108,7 +111,8 @@ public:
|
||||
CompositionModel
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& owner
|
||||
CloudType& owner,
|
||||
const word& type
|
||||
);
|
||||
|
||||
|
||||
@ -133,9 +137,12 @@ public:
|
||||
//- Return the cloud object
|
||||
const CloudType& owner() const;
|
||||
|
||||
//- Return the dictionary
|
||||
//- Return the cloud dictionary
|
||||
const dictionary& dict() const;
|
||||
|
||||
//- Return the coefficients dictionary
|
||||
const dictionary& coeffDict() const;
|
||||
|
||||
//- Return the carrier phase thermo package
|
||||
const hCombustionThermo& carrierThermo() const;
|
||||
|
||||
@ -216,6 +223,7 @@ public:
|
||||
const scalar T
|
||||
) const = 0;
|
||||
|
||||
//- Return specific heat caparcity for the liquid mixture
|
||||
virtual const scalar cpLiquid
|
||||
(
|
||||
const scalarField& YLiquid,
|
||||
@ -223,6 +231,7 @@ public:
|
||||
const scalar T
|
||||
) const = 0;
|
||||
|
||||
//- Return specific heat caparcity for the solid mixture
|
||||
virtual const scalar cpSolid
|
||||
(
|
||||
const scalarField& YSolid
|
||||
|
||||
@ -35,23 +35,22 @@ Foam::SingleMixtureFraction<CloudType>::SingleMixtureFraction
|
||||
CloudType& owner
|
||||
)
|
||||
:
|
||||
CompositionModel<CloudType>(dict, owner),
|
||||
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
||||
CompositionModel<CloudType>(dict, owner, typeName),
|
||||
|
||||
gasNames_(coeffDict_.lookup("gasNames")),
|
||||
gasNames_(this->coeffDict().lookup("gasNames")),
|
||||
gasGlobalIds_(gasNames_.size(), -1),
|
||||
YGas0_(coeffDict_.lookup("YGas0")),
|
||||
YGasTot0_(readScalar(coeffDict_.lookup("YGasTot0"))),
|
||||
YGas0_(this->coeffDict().lookup("YGas0")),
|
||||
YGasTot0_(readScalar(this->coeffDict().lookup("YGasTot0"))),
|
||||
|
||||
liquidNames_(coeffDict_.lookup("liquidNames")),
|
||||
liquidNames_(this->coeffDict().lookup("liquidNames")),
|
||||
liquidGlobalIds_(liquidNames_.size(), -1),
|
||||
YLiquid0_(coeffDict_.lookup("YLiquid0")),
|
||||
YLiquidTot0_(readScalar(coeffDict_.lookup("YLiquidTot0"))),
|
||||
YLiquid0_(this->coeffDict().lookup("YLiquid0")),
|
||||
YLiquidTot0_(readScalar(this->coeffDict().lookup("YLiquidTot0"))),
|
||||
|
||||
solidNames_(coeffDict_.lookup("solidNames")),
|
||||
solidNames_(this->coeffDict().lookup("solidNames")),
|
||||
solidGlobalIds_(solidNames_.size(), -1),
|
||||
YSolid0_(coeffDict_.lookup("YSolid0")),
|
||||
YSolidTot0_(readScalar(coeffDict_.lookup("YSolidTot0"))),
|
||||
YSolid0_(this->coeffDict().lookup("YSolid0")),
|
||||
YSolidTot0_(readScalar(this->coeffDict().lookup("YSolidTot0"))),
|
||||
|
||||
YMixture0_(3)
|
||||
{
|
||||
@ -73,7 +72,8 @@ Foam::SingleMixtureFraction<CloudType>::SingleMixtureFraction
|
||||
Info<< "\nThermo package species composition comprises:" << endl;
|
||||
forAll (this->carrierThermo().composition().Y(), k)
|
||||
{
|
||||
Info<< this->carrierThermo().composition().Y()[k].name() << endl;
|
||||
Info<< this->carrierThermo().composition().Y()[k].name()
|
||||
<< endl;
|
||||
}
|
||||
|
||||
FatalErrorIn
|
||||
@ -255,12 +255,14 @@ Foam::SingleMixtureFraction<CloudType>::gasLocalId(const word& gasName) const
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
WarningIn
|
||||
(
|
||||
"Foam::label SingleMixtureFraction<CloudType>::"
|
||||
"gasLocalId(const word& gasName) const"
|
||||
)<< "Gas name " << gasName << " not found in gasNames_"
|
||||
<< endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -276,12 +278,14 @@ Foam::SingleMixtureFraction<CloudType>::gasGlobalId(const word& gasName) const
|
||||
return gasGlobalIds_[i];
|
||||
}
|
||||
}
|
||||
|
||||
WarningIn
|
||||
(
|
||||
"Foam::label SingleMixtureFraction<CloudType>::"
|
||||
"gasGlobalId(const word& gasName) const"
|
||||
)<< "Gas name " << gasName << " not found in gasNames_"
|
||||
<< endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -329,12 +333,14 @@ Foam::SingleMixtureFraction<CloudType>::liquidLocalId(const word& liquidName) co
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
WarningIn
|
||||
(
|
||||
"Foam::label SingleMixtureFraction<CloudType>::"
|
||||
"liquidLocalId(const word& liquidName) const"
|
||||
)<< "Liquid name " << liquidName << " not found in liquidNames_"
|
||||
<< endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -350,12 +356,14 @@ Foam::SingleMixtureFraction<CloudType>::liquidGlobalId(const word& liquidName) c
|
||||
return liquidGlobalIds_[i];
|
||||
}
|
||||
}
|
||||
|
||||
WarningIn
|
||||
(
|
||||
"Foam::label SingleMixtureFraction<CloudType>::"
|
||||
"liquidGlobalId(const word& liquidName) const"
|
||||
)<< "Liquid name " << liquidName << " not found in liquidNames_"
|
||||
<< endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -403,12 +411,14 @@ Foam::SingleMixtureFraction<CloudType>::solidLocalId(const word& solidName) cons
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
WarningIn
|
||||
(
|
||||
"Foam::label SingleMixtureFraction<CloudType>::"
|
||||
"SolididLocalId(const word& solidName) const"
|
||||
)<< "Solid name " << solidName << " not found in solidNames_"
|
||||
<< endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -424,12 +434,14 @@ Foam::SingleMixtureFraction<CloudType>::solidGlobalId(const word& solidName) con
|
||||
return solidGlobalIds_[i];
|
||||
}
|
||||
}
|
||||
|
||||
WarningIn
|
||||
(
|
||||
"Foam::label SingleMixtureFraction<CloudType>::"
|
||||
"solidGlobalId(const word& solidName) const"
|
||||
)<< "Solid name " << solidName << " not found in solidNames_"
|
||||
<< endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -57,9 +57,6 @@ class SingleMixtureFraction
|
||||
|
||||
// Private data
|
||||
|
||||
//- The coefficient dictionary
|
||||
const dictionary& coeffDict_;
|
||||
|
||||
//- Parcel properties
|
||||
|
||||
//- List of gas names
|
||||
@ -146,40 +143,58 @@ public:
|
||||
|
||||
// Access
|
||||
|
||||
//- Return the list of composition names
|
||||
const wordList compositionNames() const;
|
||||
|
||||
//- Return the list of gas names
|
||||
const wordList& gasNames() const;
|
||||
|
||||
//- Return the list indices of gases in global thermo list
|
||||
const labelList& gasGlobalIds() const;
|
||||
|
||||
//- Return the list of gas mass fractions
|
||||
const scalarField& YGas0() const;
|
||||
|
||||
//- Return the total gas mass fraction
|
||||
const scalar YGasTot0() const;
|
||||
|
||||
//- Return the list of liquid names
|
||||
const wordList& liquidNames() const;
|
||||
|
||||
//- Return the list indices of liquid in global thermo list
|
||||
const labelList& liquidGlobalIds() const;
|
||||
|
||||
//- Return the list of liquid mass fractions
|
||||
const scalarField& YLiquid0() const;
|
||||
|
||||
//- Return the total liquid mass fraction
|
||||
const scalar YLiquidTot0() const;
|
||||
|
||||
//- Return the list of solid names
|
||||
const wordList& solidNames() const;
|
||||
|
||||
//- Return the list indices of solids in global thermo list
|
||||
const labelList& solidGlobalIds() const;
|
||||
|
||||
//- Return the list of solid mass fractions
|
||||
const scalarField& YSolid0() const;
|
||||
|
||||
//- Return the total solid mass fraction
|
||||
const scalar YSolidTot0() const;
|
||||
|
||||
//- Return the list of mixture mass fractions
|
||||
const scalarField& YMixture0() const;
|
||||
|
||||
//- Return the gas constant for the gas mixture
|
||||
const scalar RGas(const scalarField& YGas) const;
|
||||
|
||||
//- Return enthalpy for the gas mixture
|
||||
const scalar HGas(const scalarField& YGas, const scalar T) const;
|
||||
|
||||
//- Return specific heat caparcity for the gas mixture
|
||||
const scalar cpGas(const scalarField& YGas, const scalar T) const;
|
||||
|
||||
//- Return specific heat caparcity for the liquid mixture
|
||||
const scalar cpLiquid
|
||||
(
|
||||
const scalarField& YLiquid,
|
||||
@ -187,6 +202,7 @@ public:
|
||||
const scalar T
|
||||
) const;
|
||||
|
||||
//- Return specific heat caparcity for the solid mixture
|
||||
const scalar cpSolid(const scalarField& YSolid) const;
|
||||
};
|
||||
|
||||
|
||||
@ -35,12 +35,11 @@ Foam::ConstantRateDevolatilisation<CloudType>::ConstantRateDevolatilisation
|
||||
CloudType& owner
|
||||
)
|
||||
:
|
||||
MassTransferModel<CloudType>(dict, owner),
|
||||
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
||||
A0_(dimensionedScalar(coeffDict_.lookup("A0")).value()),
|
||||
MassTransferModel<CloudType>(dict, owner, typeName),
|
||||
A0_(dimensionedScalar(this->coeffDict().lookup("A0")).value()),
|
||||
volatileResidualCoeff_
|
||||
(
|
||||
readScalar(coeffDict_.lookup("volatileResidualCoeff"))
|
||||
readScalar(this->coeffDict().lookup("volatileResidualCoeff"))
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
@ -52,10 +52,6 @@ class ConstantRateDevolatilisation
|
||||
|
||||
// Private data
|
||||
|
||||
//- Coefficients dictionary
|
||||
dictionary coeffDict_;
|
||||
|
||||
|
||||
// Model constants
|
||||
|
||||
//- Rate constant (suggested default = 12) [1/s]
|
||||
@ -90,10 +86,13 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Flag to indicate whether model activates mass transfer model
|
||||
bool active() const;
|
||||
|
||||
//- Flag to indicate whether model changes particle volume
|
||||
bool changesVolume() const;
|
||||
|
||||
//- Update model
|
||||
scalar calculate
|
||||
(
|
||||
const scalar dt,
|
||||
|
||||
@ -32,10 +32,12 @@ template<class CloudType>
|
||||
Foam::MassTransferModel<CloudType>::MassTransferModel
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& owner
|
||||
CloudType& owner,
|
||||
const word& type
|
||||
)
|
||||
: dict_(dict),
|
||||
owner_(owner)
|
||||
owner_(owner),
|
||||
coeffDict_(dict.subDict(type + "Coeffs"))
|
||||
{}
|
||||
|
||||
|
||||
@ -61,6 +63,13 @@ const Foam::dictionary& Foam::MassTransferModel<CloudType>::dict() const
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
const Foam::dictionary& Foam::MassTransferModel<CloudType>::coeffDict() const
|
||||
{
|
||||
return coeffDict_;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "NewMassTransferModel.C"
|
||||
|
||||
@ -65,6 +65,9 @@ protected:
|
||||
//- Reference to the owner cloud class
|
||||
CloudType& owner_;
|
||||
|
||||
//- The coefficient dictionary
|
||||
const dictionary coeffDict_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -91,7 +94,8 @@ public:
|
||||
MassTransferModel
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& owner
|
||||
CloudType& owner,
|
||||
const word& type
|
||||
);
|
||||
|
||||
|
||||
@ -114,9 +118,12 @@ public:
|
||||
//- Return the owner cloud object
|
||||
const CloudType& owner() const;
|
||||
|
||||
//- Return the dictionary
|
||||
//- Return the cloud dictionary
|
||||
const dictionary& dict() const;
|
||||
|
||||
//- Return the coefficient dictionary
|
||||
const dictionary& coeffDict() const;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ Foam::NoMassTransfer<CloudType>::NoMassTransfer
|
||||
CloudType& cloud
|
||||
)
|
||||
:
|
||||
MassTransferModel<CloudType>(dict, cloud)
|
||||
MassTransferModel<CloudType>(dict, cloud, typeName)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -72,10 +72,13 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Flag to indicate whether model activates mass transfer model
|
||||
bool active() const;
|
||||
|
||||
//- Flag to indicate whether model changes particle volume
|
||||
bool changesVolume() const;
|
||||
|
||||
//- Update model
|
||||
scalar calculate
|
||||
(
|
||||
const scalar,
|
||||
|
||||
@ -35,13 +35,12 @@ Foam::SingleKineticRateDevolatilisation<CloudType>::SingleKineticRateDevolatilis
|
||||
CloudType& owner
|
||||
)
|
||||
:
|
||||
MassTransferModel<CloudType>(dict, owner),
|
||||
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
||||
A1_(dimensionedScalar(coeffDict_.lookup("A1")).value()),
|
||||
E_(dimensionedScalar(coeffDict_.lookup("E")).value()),
|
||||
MassTransferModel<CloudType>(dict, owner, typeName),
|
||||
A1_(dimensionedScalar(this->coeffDict().lookup("A1")).value()),
|
||||
E_(dimensionedScalar(this->coeffDict().lookup("E")).value()),
|
||||
volatileResidualCoeff_
|
||||
(
|
||||
readScalar(coeffDict_.lookup("volatileResidualCoeff"))
|
||||
readScalar(this->coeffDict().lookup("volatileResidualCoeff"))
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
@ -51,10 +51,6 @@ class SingleKineticRateDevolatilisation
|
||||
|
||||
// Private data
|
||||
|
||||
//- Coefficients dictionary
|
||||
dictionary coeffDict_;
|
||||
|
||||
|
||||
// Model constants
|
||||
|
||||
//- Activation energy
|
||||
@ -92,10 +88,13 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Flag to indicate whether model activates mass transfer model
|
||||
bool active() const;
|
||||
|
||||
//- Flag to indicate whether model changes particle volume
|
||||
bool changesVolume() const;
|
||||
|
||||
//- Update model
|
||||
scalar calculate
|
||||
(
|
||||
const scalar dt,
|
||||
|
||||
@ -35,7 +35,7 @@ Foam::NoSurfaceReaction<CloudType>::NoSurfaceReaction
|
||||
CloudType& owner
|
||||
)
|
||||
:
|
||||
SurfaceReactionModel<CloudType>(dict, owner)
|
||||
SurfaceReactionModel<CloudType>(dict, owner, typeName)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -72,8 +72,10 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Flag to indicate whether model activates devolatisation model
|
||||
bool active() const;
|
||||
|
||||
//- Update surface reactions
|
||||
void calculate
|
||||
(
|
||||
const scalar dt,
|
||||
|
||||
@ -32,10 +32,12 @@ template<class CloudType>
|
||||
Foam::SurfaceReactionModel<CloudType>::SurfaceReactionModel
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& owner
|
||||
CloudType& owner,
|
||||
const word& type
|
||||
)
|
||||
: dict_(dict),
|
||||
owner_(owner)
|
||||
owner_(owner),
|
||||
coeffDict_(dict.subDict(type + "Coeffs"))
|
||||
{}
|
||||
|
||||
|
||||
@ -61,6 +63,13 @@ const Foam::dictionary& Foam::SurfaceReactionModel<CloudType>::dict() const
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
const Foam::dictionary& Foam::SurfaceReactionModel<CloudType>::coeffDict() const
|
||||
{
|
||||
return coeffDict_;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "NewSurfaceReactionModel.C"
|
||||
|
||||
@ -66,6 +66,9 @@ class SurfaceReactionModel
|
||||
// reference to the owner cloud class
|
||||
CloudType& owner_;
|
||||
|
||||
//- The coefficients dictionary
|
||||
const dictionary coeffDict_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -93,7 +96,8 @@ public:
|
||||
SurfaceReactionModel
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& cloud
|
||||
CloudType& cloud,
|
||||
const word& type
|
||||
);
|
||||
|
||||
|
||||
@ -116,15 +120,19 @@ public:
|
||||
//- Return the owner cloud object
|
||||
const CloudType& owner() const;
|
||||
|
||||
//- Return the dictionary
|
||||
//- Return the cloud dictionary
|
||||
const dictionary& dict() const;
|
||||
|
||||
//- Return the coefficients dictionary
|
||||
const dictionary& coeffDict() const;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Flag to indicate whether model activates devolatisation model
|
||||
virtual bool active() const = 0;
|
||||
|
||||
//- Update surface reactions
|
||||
virtual void calculate
|
||||
(
|
||||
const scalar dt,
|
||||
|
||||
@ -32,10 +32,12 @@ template<class CloudType>
|
||||
Foam::HeatTransferModel<CloudType>::HeatTransferModel
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& owner
|
||||
CloudType& owner,
|
||||
const word& type
|
||||
)
|
||||
: dict_(dict),
|
||||
owner_(owner)
|
||||
owner_(owner),
|
||||
coeffDict_(dict.subDict(type + "Coeffs"))
|
||||
{}
|
||||
|
||||
|
||||
@ -62,6 +64,13 @@ const Foam::dictionary& Foam::HeatTransferModel<CloudType>::dict() const
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
const Foam::dictionary& Foam::HeatTransferModel<CloudType>::coeffDict() const
|
||||
{
|
||||
return coeffDict_;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
Foam::scalar Foam::HeatTransferModel<CloudType>::h
|
||||
(
|
||||
|
||||
@ -63,6 +63,9 @@ class HeatTransferModel
|
||||
//- Reference to the owner cloud class
|
||||
CloudType& owner_;
|
||||
|
||||
//- The coefficents dictionary
|
||||
const dictionary coeffDict_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -89,7 +92,8 @@ public:
|
||||
HeatTransferModel
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& owner
|
||||
CloudType& owner,
|
||||
const word& type
|
||||
);
|
||||
|
||||
|
||||
@ -109,9 +113,12 @@ public:
|
||||
|
||||
// Access
|
||||
|
||||
//- Return the dictionary
|
||||
//- Return the cloud dictionary
|
||||
const dictionary& dict() const;
|
||||
|
||||
//- Return the coefficients dictionary
|
||||
const dictionary& coeffDict() const;
|
||||
|
||||
//- Return the owner cloud object
|
||||
const CloudType& owner() const;
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ Foam::NoHeatTransfer<CloudType>::NoHeatTransfer
|
||||
CloudType& cloud
|
||||
)
|
||||
:
|
||||
HeatTransferModel<CloudType>(dict, cloud)
|
||||
HeatTransferModel<CloudType>(dict, cloud, typeName)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -72,14 +72,17 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Flag to indicate whether model activates heat transfer model
|
||||
bool active() const;
|
||||
|
||||
//- Nusselt number
|
||||
scalar Nu
|
||||
(
|
||||
const scalar,
|
||||
const scalar
|
||||
) const;
|
||||
|
||||
//- Prandtl number
|
||||
scalar Pr() const;
|
||||
};
|
||||
|
||||
|
||||
@ -37,9 +37,8 @@ Foam::RanzMarshall<CloudType>::RanzMarshall
|
||||
CloudType& cloud
|
||||
)
|
||||
:
|
||||
HeatTransferModel<CloudType>(dict, cloud),
|
||||
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
||||
Pr_(dimensionedScalar(coeffDict_.lookup("Pr")).value())
|
||||
HeatTransferModel<CloudType>(dict, cloud, typeName),
|
||||
Pr_(dimensionedScalar(this->coeffDict().lookup("Pr")).value())
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -51,9 +51,6 @@ class RanzMarshall
|
||||
|
||||
// Private data
|
||||
|
||||
// Coefficients dictionary
|
||||
dictionary coeffDict_;
|
||||
|
||||
// Prandtl number
|
||||
const scalar Pr_;
|
||||
|
||||
@ -81,14 +78,17 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Flag to indicate whether model activates heat transfer model
|
||||
bool active() const;
|
||||
|
||||
//- Nusselt number
|
||||
scalar Nu
|
||||
(
|
||||
const scalar Re,
|
||||
const scalar Pr
|
||||
) const;
|
||||
|
||||
//- Prandtl number
|
||||
scalar Pr() const;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user