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