diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H index 4b8c87e3cd..69c8e0999d 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H @@ -127,7 +127,7 @@ Foam::KinematicCloud::cloudSolution::resetSourcesOnStartup() const // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template -inline const KinematicCloud& +inline const Foam::KinematicCloud& Foam::KinematicCloud::cloudCopy() const { return cloudCopyPtr_(); diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H index f1c931d17c..97c32f5338 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H @@ -26,7 +26,7 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template -inline const ReactingCloud& +inline const Foam::ReactingCloud& Foam::ReactingCloud::cloudCopy() const { return cloudCopyPtr_(); @@ -169,34 +169,9 @@ Foam::ReactingCloud::Srho(const label i) const { scalarField& rhoi = tRhoi(); rhoi = rhoTrans_[i]/(this->db().time().deltaT()*this->mesh().V()); + } - return tRhoi; - } - else - { - return tmp > - ( - new DimensionedField - ( - IOobject - ( - this->name() + "rhoTrans", - this->db().time().timeName(), - this->db(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - this->mesh(), - dimensionedScalar - ( - "zero", - rhoTrans_[0].dimensions()/dimTime/dimVolume, - 0.0 - ) - ) - ); - } + return tRhoi; } @@ -218,7 +193,12 @@ Foam::ReactingCloud::Srho() const false ), this->mesh(), - dimensionedScalar("zero", rhoTrans_[0].dimensions(), 0.0) + dimensionedScalar + ( + "zero", + rhoTrans_[0].dimensions()/dimTime/dimVolume, + 0.0 + ) ) ); @@ -230,12 +210,10 @@ Foam::ReactingCloud::Srho() const sourceField += rhoTrans_[i]; } - return trhoTrans/(this->db().time().deltaT()*this->mesh().V()); - } - else - { - return trhoTrans; + sourceField /= this->db().time().deltaT()*this->mesh().V(); } + + return trhoTrans; } @@ -245,27 +223,28 @@ Foam::ReactingCloud::Srho(volScalarField& rho) const { if (this->solution().sourceActive()) { + tmp trhoTrans + ( + new volScalarField + ( + IOobject + ( + this->name() + "rhoTrans", + this->db().time().timeName(), + this->db(), + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh(), + dimensionedScalar("zero", dimMass/dimTime/dimVolume, 0.0) + ) + ); + + scalarField& sourceField = trhoTrans(); + if (this->solution().semiImplicit("rho")) { - tmp trhoTrans - ( - new volScalarField - ( - IOobject - ( - this->name() + "rhoTrans", - this->db().time().timeName(), - this->db(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - this->mesh(), - dimensionedScalar("zero", dimMass/dimTime/dimVolume, 0.0) - ) - ); - - scalarField& sourceField = trhoTrans(); forAll(rhoTrans_, i) { @@ -280,26 +259,6 @@ Foam::ReactingCloud::Srho(volScalarField& rho) const tmp tfvm(new fvScalarMatrix(rho, dimMass/dimTime)); fvScalarMatrix& fvm = tfvm(); - tmp trhoTrans - ( - new volScalarField - ( - IOobject - ( - this->name() + "rhoTrans", - this->db().time().timeName(), - this->db(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - this->mesh(), - dimensionedScalar("zero", dimMass, 0.0) - ) - ); - - scalarField& sourceField = trhoTrans(); - forAll(rhoTrans_, i) { sourceField += rhoTrans_[i]; diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloudI.H b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloudI.H index 354f38985c..e02b49094d 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloudI.H @@ -26,7 +26,7 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template -inline const ReactingMultiphaseCloud& +inline const Foam::ReactingMultiphaseCloud& Foam::ReactingMultiphaseCloud::cloudCopy() const { return cloudCopyPtr_(); diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H index 15d2d775d7..0cd8db5ce1 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H @@ -30,7 +30,7 @@ using namespace Foam::constant; // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template -inline const ThermoCloud& +inline const Foam::ThermoCloud& Foam::ThermoCloud::cloudCopy() const { return cloudCopyPtr_();