Commit 114de081 authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: Added copy/clone functionality to coal parcel sub-models

parent e2294e53
......@@ -70,6 +70,24 @@ Foam::COxidationDiffusionLimitedRate<CloudType>::COxidationDiffusionLimitedRate
}
template<class CloudType>
Foam::COxidationDiffusionLimitedRate<CloudType>::COxidationDiffusionLimitedRate
(
const COxidationDiffusionLimitedRate<CloudType>& srm
)
:
SurfaceReactionModel<CloudType>(srm),
Sb_(srm.Sb_),
D_(srm.D_),
CsLocalId_(srm.CsLocalId_),
O2GlobalId_(srm.O2GlobalId_),
CO2GlobalId_(srm.CO2GlobalId_),
WC_(srm.WC_),
WO2_(srm.WO2_),
HcCO2_(srm.HcCO2_)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class CloudType>
......@@ -80,13 +98,6 @@ Foam::COxidationDiffusionLimitedRate<CloudType>::
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class CloudType>
bool Foam::COxidationDiffusionLimitedRate<CloudType>::active() const
{
return true;
}
template<class CloudType>
Foam::scalar Foam::COxidationDiffusionLimitedRate<CloudType>::calculate
(
......
......@@ -105,6 +105,21 @@ public:
CloudType& owner
);
//- Construct copy
COxidationDiffusionLimitedRate
(
const COxidationDiffusionLimitedRate<CloudType>& srm
);
//- Construct and return a clone
virtual autoPtr<SurfaceReactionModel<CloudType> > clone() const
{
return autoPtr<SurfaceReactionModel<CloudType> >
(
new COxidationDiffusionLimitedRate<CloudType>(*this)
);
}
//- Destructor
virtual ~COxidationDiffusionLimitedRate();
......@@ -112,9 +127,6 @@ public:
// Member Functions
//- Flag to indicate whether model activates surface reaction model
virtual bool active() const;
//- Update surface reactions
virtual scalar calculate
(
......
......@@ -78,6 +78,26 @@ COxidationKineticDiffusionLimitedRate
}
template<class CloudType>
Foam::COxidationKineticDiffusionLimitedRate<CloudType>::
COxidationKineticDiffusionLimitedRate
(
const COxidationKineticDiffusionLimitedRate<CloudType>& srm
)
:
SurfaceReactionModel<CloudType>(srm),
Sb_(srm.Sb_),
C1_(srm.C1_),
C2_(srm.C2_),
E_(srm.E_),
CsLocalId_(srm.CsLocalId_),
O2GlobalId_(srm.O2GlobalId_),
CO2GlobalId_(srm.CO2GlobalId_),
WC_(srm.WC_),
WO2_(srm.WO2_)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class CloudType>
......@@ -88,13 +108,6 @@ Foam::COxidationKineticDiffusionLimitedRate<CloudType>::
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class CloudType>
bool Foam::COxidationKineticDiffusionLimitedRate<CloudType>::active() const
{
return true;
}
template<class CloudType>
Foam::scalar Foam::COxidationKineticDiffusionLimitedRate<CloudType>::calculate
(
......
......@@ -113,6 +113,21 @@ public:
CloudType& owner
);
//- Construct copy
COxidationKineticDiffusionLimitedRate
(
const COxidationKineticDiffusionLimitedRate<CloudType>& srm
);
//- Construct and return a clone
virtual autoPtr<SurfaceReactionModel<CloudType> > clone() const
{
return autoPtr<SurfaceReactionModel<CloudType> >
(
new COxidationKineticDiffusionLimitedRate<CloudType>(*this)
);
}
//- Destructor
virtual ~COxidationKineticDiffusionLimitedRate();
......@@ -120,9 +135,6 @@ public:
// Member Functions
//- Flag to indicate whether model activates surface reaction model
virtual bool active() const;
//- Update surface reactions
virtual scalar calculate
(
......
......@@ -75,6 +75,29 @@ Foam::COxidationMurphyShaddix<CloudType>::COxidationMurphyShaddix
}
template<class CloudType>
Foam::COxidationMurphyShaddix<CloudType>::COxidationMurphyShaddix
(
const COxidationMurphyShaddix<CloudType>& srm
)
:
SurfaceReactionModel<CloudType>(srm),
D0_(srm.D0_),
rho0_(srm.rho0_),
T0_(srm.T0_),
Dn_(srm.Dn_),
A_(srm.A_),
E_(srm.E_),
n_(srm.n_),
WVol_(srm.WVol_),
CsLocalId_(srm.CsLocalId_),
O2GlobalId_(srm.O2GlobalId_),
CO2GlobalId_(srm.CO2GlobalId_),
WC_(srm.WC_),
WO2_(srm.WO2_)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class CloudType>
......@@ -84,13 +107,6 @@ Foam::COxidationMurphyShaddix<CloudType>::~COxidationMurphyShaddix()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class CloudType>
bool Foam::COxidationMurphyShaddix<CloudType>::active() const
{
return true;
}
template<class CloudType>
Foam::scalar Foam::COxidationMurphyShaddix<CloudType>::calculate
(
......@@ -206,7 +222,7 @@ Foam::scalar Foam::COxidationMurphyShaddix<CloudType>::calculate
const scalar HC =
this->owner().composition().solids().properties()[CsLocalId_].Hf()
+ this->owner().composition().solids().properties()[CsLocalId_].cp()*T;
+ this->owner().composition().solids().properties()[CsLocalId_].Cp()*T;
const scalar HCO2 = this->owner().thermo().carrier().H(CO2GlobalId_, T);
const scalar HO2 = this->owner().thermo().carrier().H(O2GlobalId_, T);
......
......@@ -131,6 +131,21 @@ public:
CloudType& owner
);
//- Construct copy
COxidationMurphyShaddix
(
const COxidationMurphyShaddix<CloudType>& srm
);
//- Construct and return a clone
virtual autoPtr<SurfaceReactionModel<CloudType> > clone() const
{
return autoPtr<SurfaceReactionModel<CloudType> >
(
new COxidationMurphyShaddix<CloudType>(*this)
);
}
//- Destructor
virtual ~COxidationMurphyShaddix();
......@@ -138,9 +153,6 @@ public:
// Member Functions
//- Flag to indicate whether model activates surface reaction model
virtual bool active() const;
//- Update surface reactions
virtual scalar calculate
(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment