diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H index 4b8c87e3cd14a434a8c3521f6be51ed4087d0f62..69c8e0999ddebf89f603cd7cb781fb313ef7bf91 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<ParcelType>::cloudSolution::resetSourcesOnStartup() const // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class ParcelType> -inline const KinematicCloud<ParcelType>& +inline const Foam::KinematicCloud<ParcelType>& Foam::KinematicCloud<ParcelType>::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 f1c931d17c189c86928df8f8e6b178acd3da3c6e..97c32f53386bb5bb8566bbb1e4d2b6a79f11a85a 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<class ParcelType> -inline const ReactingCloud<ParcelType>& +inline const Foam::ReactingCloud<ParcelType>& Foam::ReactingCloud<ParcelType>::cloudCopy() const { return cloudCopyPtr_(); @@ -169,34 +169,9 @@ Foam::ReactingCloud<ParcelType>::Srho(const label i) const { scalarField& rhoi = tRhoi(); rhoi = rhoTrans_[i]/(this->db().time().deltaT()*this->mesh().V()); - - return tRhoi; - } - else - { - return tmp<DimensionedField<scalar, volMesh> > - ( - new DimensionedField<scalar, volMesh> - ( - 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<ParcelType>::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<ParcelType>::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<ParcelType>::Srho(volScalarField& rho) const { if (this->solution().sourceActive()) { - if (this->solution().semiImplicit("rho")) - { - tmp<volScalarField> trhoTrans + tmp<volScalarField> trhoTrans + ( + new volScalarField ( - new volScalarField + IOobject ( - 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) - ) - ); + 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(); - scalarField& sourceField = trhoTrans(); + if (this->solution().semiImplicit("rho")) + { forAll(rhoTrans_, i) { @@ -280,26 +259,6 @@ Foam::ReactingCloud<ParcelType>::Srho(volScalarField& rho) const tmp<fvScalarMatrix> tfvm(new fvScalarMatrix(rho, dimMass/dimTime)); fvScalarMatrix& fvm = tfvm(); - tmp<volScalarField> 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 354f38985c62ae8aa0228d42371d15a7fe4c29e9..e02b49094d43f2b3cc362e27d219870989e7cfad 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<class ParcelType> -inline const ReactingMultiphaseCloud<ParcelType>& +inline const Foam::ReactingMultiphaseCloud<ParcelType>& Foam::ReactingMultiphaseCloud<ParcelType>::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 15d2d775d73742cf20475439456c68831ebdd359..0cd8db5ce15dc6e826754def36f80f4b52f3be3d 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<class ParcelType> -inline const ThermoCloud<ParcelType>& +inline const Foam::ThermoCloud<ParcelType>& Foam::ThermoCloud<ParcelType>::cloudCopy() const { return cloudCopyPtr_();