diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C index a7990be458e94b1f816841d1b8bafdd60ea87194..71b0d95f790bdc3e5c5093558a8b41b998bc1701 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C @@ -179,10 +179,11 @@ void Foam::KinematicCloud<ParcelType>::updateCellOccupancy() template<class ParcelType> -void Foam::KinematicCloud<ParcelType>::evolveCloud() +void Foam::KinematicCloud<ParcelType>::evolveCloud +( + typename ParcelType::trackData& td +) { - typename ParcelType::trackData td(*this); - label preInjectionSize = this->size(); this->surfaceFilm().inject(td); @@ -195,7 +196,6 @@ void Foam::KinematicCloud<ParcelType>::evolveCloud() preInjectionSize = this->size(); } - this->injection().inject(td); if (solution_.coupled()) @@ -572,9 +572,11 @@ void Foam::KinematicCloud<ParcelType>::evolve() { if (solution_.active()) { + typename ParcelType::trackData td(*this); + preEvolve(); - evolveCloud(); + evolveCloud(td); postEvolve(); diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H index b041c4c2dfc453514243ad387260c5d4f835a114..7b176a59ceb970a9b416fe78509845248e2b2d5a 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H @@ -297,7 +297,7 @@ protected: void updateCellOccupancy(); //- Evolve the cloud - void evolveCloud(); + void evolveCloud(typename ParcelType::trackData& td); //- Particle motion void motion(typename ParcelType::trackData& td); diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C index cf1521e8425331d0ae6485a8532370f3eba187c1..561fc680dacd2cfce4dd7781b1fb53e686a888f9 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C @@ -80,61 +80,6 @@ void Foam::ReactingCloud<ParcelType>::checkSuppliedComposition } -template<class ParcelType> -void Foam::ReactingCloud<ParcelType>::preEvolve() -{ - ThermoCloud<ParcelType>::preEvolve(); -} - - -template<class ParcelType> -void Foam::ReactingCloud<ParcelType>::evolveCloud() -{ - typename ParcelType::trackData td(*this); - - label preInjectionSize = this->size(); - - this->surfaceFilm().inject(td); - - // Update the cellOccupancy if the size of the cloud has changed - // during the injection. - if (preInjectionSize != this->size()) - { - this->updateCellOccupancy(); - - preInjectionSize = this->size(); - } - - this->injection().inject(td); - - if (this->solution().coupled()) - { - resetSourceTerms(); - } - - // Assume that motion will update the cellOccupancy as necessary - // before it is required. - motion(td); -} - - -template<class ParcelType> -void Foam::ReactingCloud<ParcelType>::motion -( - typename ParcelType::trackData& td -) -{ - ThermoCloud<ParcelType>::motion(td); -} - - -template<class ParcelType> -void Foam::ReactingCloud<ParcelType>::postEvolve() -{ - ThermoCloud<ParcelType>::postEvolve(); -} - - template<class ParcelType> void Foam::ReactingCloud<ParcelType>::cloudReset(ReactingCloud<ParcelType>& c) { @@ -319,11 +264,13 @@ void Foam::ReactingCloud<ParcelType>::evolve() { if (this->solution().active()) { - preEvolve(); + typename ParcelType::trackData td(*this); + + this->preEvolve(); - evolveCloud(); + this->evolveCloud(td); - postEvolve(); + this->postEvolve(); info(); Info<< endl; diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H index 4fa3153d6e2de95fc13f4fe7d8aa68c17f87853a..c265117c82d2116c17cb92ef75c383adff0b7365 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H @@ -136,18 +136,6 @@ protected: // Cloud evolution functions - //- Pre-evolve - void preEvolve(); - - //- Evolve the cloud - void evolveCloud(); - - //- Particle motion - void motion(typename ParcelType::trackData& td); - - //- Post-evolve - void postEvolve(); - //- Reset state of cloud void cloudReset(ReactingCloud<ParcelType>& c); diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C index ca41f7457274699e093dcec5357b0813b8d9c424..843aa343ed1d3ec185b160c1b3ca1e9f04ac581d 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C @@ -53,61 +53,6 @@ void Foam::ReactingMultiphaseCloud<ParcelType>::restoreState() // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // -template<class ParcelType> -void Foam::ReactingMultiphaseCloud<ParcelType>::preEvolve() -{ - ReactingCloud<ParcelType>::preEvolve(); -} - - -template<class ParcelType> -void Foam::ReactingMultiphaseCloud<ParcelType>::evolveCloud() -{ - typename ParcelType::trackData td(*this); - - label preInjectionSize = this->size(); - - this->surfaceFilm().inject(td); - - // Update the cellOccupancy if the size of the cloud has changed - // during the injection. - if (preInjectionSize != this->size()) - { - this->updateCellOccupancy(); - - preInjectionSize = this->size(); - } - - this->injection().inject(td); - - if (this->solution().coupled()) - { - resetSourceTerms(); - } - - // Assume that motion will update the cellOccupancy as necessary - // before it is required. - motion(td); -} - - -template<class ParcelType> -void Foam::ReactingMultiphaseCloud<ParcelType>::motion -( - typename ParcelType::trackData& td -) -{ - ReactingCloud<ParcelType>::motion(td); -} - - -template<class ParcelType> -void Foam::ReactingMultiphaseCloud<ParcelType>::postEvolve() -{ - ReactingCloud<ParcelType>::postEvolve(); -} - - template<class ParcelType> void Foam::ReactingMultiphaseCloud<ParcelType>::cloudReset ( @@ -274,11 +219,13 @@ void Foam::ReactingMultiphaseCloud<ParcelType>::evolve() { if (this->solution().active()) { - preEvolve(); + typename ParcelType::trackData td(*this); + + this->preEvolve(); - evolveCloud(); + this->evolveCloud(td); - postEvolve(); + this->postEvolve(); info(); Info<< endl; diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H index 86302703d3792272b697f1eeb105f6d773011d86..b291e74dce48b946f52aedf0e5625e81cf63d65a 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H @@ -127,18 +127,6 @@ protected: // Cloud evolution functions - //- Pre-evolve - void preEvolve(); - - //- Evolve the cloud - void evolveCloud(); - - //- Particle motion - void motion(typename ParcelType::trackData& td); - - //- Post-evolve - void postEvolve(); - //- Reset state of cloud void cloudReset(ReactingMultiphaseCloud<ParcelType>& c); diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C index 52190e52c4b9ef03040a9d1e12c455edb401a087..ebddd47aa9623008cc1258f97934e030baf3f318 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C @@ -54,61 +54,6 @@ void Foam::ThermoCloud<ParcelType>::restoreState() // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // -template<class ParcelType> -void Foam::ThermoCloud<ParcelType>::preEvolve() -{ - KinematicCloud<ParcelType>::preEvolve(); -} - - -template<class ParcelType> -void Foam::ThermoCloud<ParcelType>::evolveCloud() -{ - typename ParcelType::trackData td(*this); - - label preInjectionSize = this->size(); - - // Update the cellOccupancy if the size of the cloud has changed - // during the injection. - this->surfaceFilm().inject(td); - - if (preInjectionSize != this->size()) - { - this->updateCellOccupancy(); - - preInjectionSize = this->size(); - } - - this->injection().inject(td); - - if (this->solution().coupled()) - { - resetSourceTerms(); - } - - // Assume that motion will update the cellOccupancy as necessary - // before it is required. - motion(td); -} - - -template<class ParcelType> -void Foam::ThermoCloud<ParcelType>::motion -( - typename ParcelType::trackData& td -) -{ - KinematicCloud<ParcelType>::motion(td); -} - - -template<class ParcelType> -void Foam::ThermoCloud<ParcelType>::postEvolve() -{ - KinematicCloud<ParcelType>::postEvolve(); -} - - template<class ParcelType> void Foam::ThermoCloud<ParcelType>::cloudReset(ThermoCloud<ParcelType>& c) { @@ -294,11 +239,13 @@ void Foam::ThermoCloud<ParcelType>::evolve() { if (this->solution().active()) { - preEvolve(); + typename ParcelType::trackData td(*this); + + this->preEvolve(); - evolveCloud(); + this->evolveCloud(td); - postEvolve(); + this->postEvolve(); info(); Info<< endl; diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H index d7b9cc7d8ded13f1c0c6a13393671669f6e311ad..05bac41ef5c104204c6d443f8cc1adafdd952a80 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H @@ -133,18 +133,6 @@ protected: // Cloud evolution functions - //- Pre-evolve - void preEvolve(); - - //- Evolve the cloud - void evolveCloud(); - - //- Particle motion - void motion(typename ParcelType::trackData& td); - - //- Post-evolve - void postEvolve(); - //- Reset state of cloud void cloudReset(ThermoCloud<ParcelType>& c);