diff --git a/src/lagrangian/intermediate/Make/files b/src/lagrangian/intermediate/Make/files index 13cd69a2a3..4882f36e0a 100644 --- a/src/lagrangian/intermediate/Make/files +++ b/src/lagrangian/intermediate/Make/files @@ -1,44 +1,65 @@ +PARCELS=parcels +DERIVEDPARCELS=$(PARCELS)/derived + /* Parcels */ -parcels/derived/basicKinematicParcel/basicKinematicParcel.C -parcels/derived/basicThermoParcel/basicThermoParcel.C -parcels/derived/basicReactingMultiphaseParcel/basicReactingMultiphaseParcel.C +$(DERIVEDPARCELS)/basicKinematicParcel/basicKinematicParcel.C +$(DERIVEDPARCELS)/basicThermoParcel/basicThermoParcel.C +$(DERIVEDPARCELS)/basicReactingParcel/basicReactingParcel.C +$(DERIVEDPARCELS)/basicReactingMultiphaseParcel/basicReactingMultiphaseParcel.C /* Cloud base classes */ clouds/baseClasses/kinematicCloud/kinematicCloud.C clouds/baseClasses/thermoCloud/thermoCloud.C clouds/baseClasses/reactingCloud/reactingCloud.C +clouds/baseClasses/reactingMultiphaseCloud/reactingMultiphaseCloud.C -/* Injection mechanisms */ +/* Cloud container/injection mechanisms */ clouds/derived/basicKinematicCloud/basicKinematicCloud.C clouds/derived/basicThermoCloud/basicThermoCloud.C clouds/derived/basicReactingCloud/basicReactingCloud.C +clouds/derived/basicReactingMultiphaseCloud/basicReactingMultiphaseCloud.C /* kinematic parcel sub-models */ -parcels/derived/basicKinematicParcel/defineBasicKinematicParcel.C -parcels/derived/basicKinematicParcel/makeBasicKinematicParcelDispersionModels.C -parcels/derived/basicKinematicParcel/makeBasicKinematicParcelDragModels.C -parcels/derived/basicKinematicParcel/makeBasicKinematicParcelInjectionModels.C -parcels/derived/basicKinematicParcel/makeBasicKinematicParcelHeatTransferModels.C -parcels/derived/basicKinematicParcel/makeBasicKinematicParcelWallInteractionModels.C +KINEMATICPARCEL=$(DERIVEDPARCELS)/basicKinematicParcel +$(KINEMATICPARCEL)/defineBasicKinematicParcel.C +$(KINEMATICPARCEL)/makeBasicKinematicParcelDispersionModels.C +$(KINEMATICPARCEL)/makeBasicKinematicParcelDragModels.C +$(KINEMATICPARCEL)/makeBasicKinematicParcelInjectionModels.C +$(KINEMATICPARCEL)/makeBasicKinematicParcelWallInteractionModels.C /* thermo parcel sub-models */ -parcels/derived/basicThermoParcel/defineBasicThermoParcel.C -parcels/derived/basicThermoParcel/makeBasicThermoParcelDispersionModels.C -parcels/derived/basicThermoParcel/makeBasicThermoParcelDragModels.C -parcels/derived/basicThermoParcel/makeBasicThermoParcelInjectionModels.C -parcels/derived/basicThermoParcel/makeBasicThermoParcelHeatTransferModels.C -parcels/derived/basicThermoParcel/makeBasicThermoParcelWallInteractionModels.C +THERMOPARCEL=$(DERIVEDPARCELS)/basicThermoParcel +$(THERMOPARCEL)/defineBasicThermoParcel.C +$(THERMOPARCEL)/makeBasicThermoParcelDispersionModels.C +$(THERMOPARCEL)/makeBasicThermoParcelDragModels.C +$(THERMOPARCEL)/makeBasicThermoParcelHeatTransferModels.C +$(THERMOPARCEL)/makeBasicThermoParcelInjectionModels.C +$(THERMOPARCEL)/makeBasicThermoParcelWallInteractionModels.C /* reacting parcel sub-models */ -parcels/derived/basicReactingMultiphaseParcel/defineBasicReactingMultiphaseParcel.C -parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelCompositionModels.C -parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelDragModels.C -parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelDispersionModels.C -parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelInjectionModels.C -parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelHeatTransferModels.C -parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelDevolatilisationModels.C -parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelSurfaceReactionModels.C -parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelWallInteractionModels.C +REACTINGPARCEL=$(DERIVEDPARCELS)/basicReactingParcel +$(REACTINGPARCEL)/defineBasicReactingParcel.C +$(REACTINGPARCEL)/makeBasicReactingParcelCompositionModels.C +$(REACTINGPARCEL)/makeBasicReactingParcelDispersionModels.C +$(REACTINGPARCEL)/makeBasicReactingParcelDragModels.C +$(REACTINGPARCEL)/makeBasicReactingParcelHeatTransferModels.C +$(REACTINGPARCEL)/makeBasicReactingParcelInjectionModels.C +$(REACTINGPARCEL)/makeBasicReactingParcelPhaseChangeModels.C +$(REACTINGPARCEL)/makeBasicReactingParcelSurfaceReactionModels.C +$(REACTINGPARCEL)/makeBasicReactingParcelWallInteractionModels.C + +/* reacting multiphase parcel sub-models */ +REACTINGMPPARCEL=$(DERIVEDPARCELS)/basicReactingMultiphaseParcel +$(REACTINGMPPARCEL)/defineBasicReactingMultiphaseParcel.C +$(REACTINGMPPARCEL)/makeBasicReactingMultiphaseParcelCompositionModels.C +$(REACTINGMPPARCEL)/makeBasicReactingMultiphaseParcelDevolatilisationModels.C +$(REACTINGMPPARCEL)/makeBasicReactingMultiphaseParcelDispersionModels.C +$(REACTINGMPPARCEL)/makeBasicReactingMultiphaseParcelDragModels.C +$(REACTINGMPPARCEL)/makeBasicReactingMultiphaseParcelHeatTransferModels.C +$(REACTINGMPPARCEL)/makeBasicReactingMultiphaseParcelInjectionModels.C +$(REACTINGMPPARCEL)/makeBasicReactingMultiphaseParcelPhaseChangeModels.C +$(REACTINGMPPARCEL)/makeBasicReactingMultiphaseParcelSurfaceReactionModels.C +$(REACTINGMPPARCEL)/makeBasicReactingMultiphaseParcelWallInteractionModels.C /* bolt-on models */ submodels/addOns/radiation/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.C diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C index 55ad4d3b57..3b92b98f0a 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C @@ -25,12 +25,13 @@ License \*---------------------------------------------------------------------------*/ #include "KinematicCloud.H" +#include "IntegrationScheme.H" +#include "interpolation.H" + #include "DispersionModel.H" #include "DragModel.H" #include "InjectionModel.H" #include "WallInteractionModel.H" -#include "IntegrationScheme.H" -#include "interpolation.H" // * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H index d606b38c3d..d1c542a067 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H @@ -84,9 +84,6 @@ class KinematicCloud public Cloud, public kinematicCloud { - -private: - // Private data //- Cloud type - used to set the name of the parcel properties diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C index 1132bd8f29..a77a843eee 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C @@ -25,8 +25,9 @@ License \*---------------------------------------------------------------------------*/ #include "ReactingCloud.H" + #include "CompositionModel.H" -#include "DevolatilisationModel.H" +#include "PhaseChangeModel.H" #include "SurfaceReactionModel.H" // * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * // @@ -91,9 +92,9 @@ Foam::ReactingCloud::ReactingCloud *this ) ), - devolatilisationModel_ + phaseChangeModel_ ( - DevolatilisationModel >::New + PhaseChangeModel >::New ( this->particleProperties(), *this @@ -161,37 +162,37 @@ void Foam::ReactingCloud::evolve() const volScalarField cp = carrierThermo_.Cp(); const volScalarField& p = carrierThermo_.p(); - autoPtr > rhoInterpolator = interpolation::New + autoPtr > rhoInterp = interpolation::New ( this->interpolationSchemes(), this->rho() ); - autoPtr > UInterpolator = interpolation::New + autoPtr > UInterp = interpolation::New ( this->interpolationSchemes(), this->U() ); - autoPtr > muInterpolator = interpolation::New + autoPtr > muInterp = interpolation::New ( this->interpolationSchemes(), this->mu() ); - autoPtr > TInterpolator = interpolation::New + autoPtr > TInterp = interpolation::New ( this->interpolationSchemes(), T ); - autoPtr > cpInterpolator = interpolation::New + autoPtr > cpInterp = interpolation::New ( this->interpolationSchemes(), cp ); - autoPtr > pInterpolator = interpolation::New + autoPtr > pInterp = interpolation::New ( this->interpolationSchemes(), p @@ -201,12 +202,12 @@ void Foam::ReactingCloud::evolve() ( *this, constProps_, - rhoInterpolator(), - UInterpolator(), - muInterpolator(), - TInterpolator(), - cpInterpolator(), - pInterpolator(), + rhoInterp(), + UInterp(), + muInterp(), + TInterp(), + cpInterp(), + pInterp(), this->g().value() ); diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H index 810b08235a..9d66f9f3b5 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H @@ -26,9 +26,11 @@ Class Foam::ReactingCloud Description - Templated base class for reactive cloud - - Adds to kinematic cloud - - Heat transfer + Templated base class for reacting cloud + - Adds to thermodynamic cloud + - Variable composition (single phase) + - Phase change + - Surface reactions SourceFiles ReactingCloudI.H @@ -58,13 +60,13 @@ template class CompositionModel; template -class DevolatilisationModel; +class PhaseChangeModel; template class SurfaceReactionModel; /*---------------------------------------------------------------------------*\ - Class ReactingCloud Declaration + Class ReactingCloud Declaration \*---------------------------------------------------------------------------*/ template @@ -73,7 +75,6 @@ class ReactingCloud public ThermoCloud, public reactingCloud { - // Private data //- Parcel constant properties @@ -85,23 +86,28 @@ class ReactingCloud //- Gas phase properties PtrList& gases_; + // References to the cloud sub-models //- Reacting composition model autoPtr > > compositionModel_; - //- Devolatilisation model - autoPtr > > - devolatilisationModel_; + //- Reacting phase change model + autoPtr > > + phaseChangeModel_; + + //- Reacting surface reaction model + autoPtr + < + SurfaceReactionModel > + > + surfaceReactionModel_; - //- Surface reaction model - autoPtr > > - surfaceReactionModel_; // Sources - //- Devolatilisation fields - one per carrier phase specie + //- Mass transfer fields - one per carrier phase specie PtrList > rhoTrans_; @@ -116,10 +122,6 @@ class ReactingCloud public: - //- Runtime type information -// TypeName("ReactingCloud"); - - // Constructors //- Construct given carrier gas fields @@ -134,9 +136,8 @@ public: ); - // Destructor - - virtual ~ReactingCloud(); + //- Destructor + virtual ~ReactingCloud(); // Member Functions @@ -159,11 +160,11 @@ public: inline const CompositionModel >& composition() const; - //- Return reference to devolatilisation model - inline const DevolatilisationModel >& - devolatilisation() const; + //- Return reference to reacting phase change model + inline const PhaseChangeModel >& + phaseChange() const; - //- Return reference to surface reaction model + //- Return reference to reacting surface reaction model inline const SurfaceReactionModel >& surfaceReaction() const; diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H index 915196c744..146db083cc 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H @@ -59,10 +59,10 @@ Foam::ReactingCloud::composition() const template -inline const Foam::DevolatilisationModel >& -Foam::ReactingCloud::devolatilisation() const +inline const Foam::PhaseChangeModel >& +Foam::ReactingCloud::phaseChange() const { - return devolatilisationModel_; + return phaseChangeModel_; } @@ -129,4 +129,5 @@ Foam::ReactingCloud::Srho1() const return trhoTrans/(this->db().time().deltaT()*this->mesh().V()); } + // ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C new file mode 100644 index 0000000000..7f32fd7d26 --- /dev/null +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C @@ -0,0 +1,184 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#include "ReactingMultiphaseCloud.H" + +#include "CompositionModel.H" +#include "DevolatilisationModel.H" +#include "SurfaceReactionModel.H" + +// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * // + +template +void Foam::ReactingMultiphaseCloud::addNewParcel +( + const vector& position, + const label cellId, + const scalar d, + const vector& U, + const scalar nParticles, + const scalar lagrangianDt +) +{ + ParcelType* pPtr = new ParcelType + ( + *this, + this->parcelTypeId(), + position, + cellId, + d, + U, + nParticles, + this->composition().YGas0(), + this->composition().YLiquid0(), + this->composition().YSolid0(), + this->composition().YMixture0(), + constProps_ + ); + + scalar continuousDt = this->db().time().deltaT().value(); + pPtr->stepFraction() = (continuousDt - lagrangianDt)/continuousDt; + + addParticle(pPtr); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +Foam::ReactingMultiphaseCloud::ReactingMultiphaseCloud +( + const word& cloudType, + const volScalarField& rho, + const volVectorField& U, + const dimensionedVector& g, + hCombustionThermo& thermo, + PtrList& gases +) +: + ReactingCloud(cloudType, rho, U, g, thermo, gases), + reactingMultiphaseCloud(), + constProps_(this->particleProperties()), + devolatilisationModel_ + ( + DevolatilisationModel >::New + ( + this->particleProperties(), + *this + ) + ) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template +Foam::ReactingMultiphaseCloud::~ReactingMultiphaseCloud() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::ReactingMultiphaseCloud::resetSourceTerms() +{ + ReactingCloud::resetSourceTerms(); +} + + +template +void Foam::ReactingMultiphaseCloud::evolve() +{ + const volScalarField& T = carrierThermo_.T(); + const volScalarField cp = carrierThermo_.Cp(); + const volScalarField& p = carrierThermo_.p(); + + autoPtr > rhoInterp = interpolation::New + ( + this->interpolationSchemes(), + this->rho() + ); + + autoPtr > UInterp = interpolation::New + ( + this->interpolationSchemes(), + this->U() + ); + + autoPtr > muInterp = interpolation::New + ( + this->interpolationSchemes(), + this->mu() + ); + + autoPtr > TInterp = interpolation::New + ( + this->interpolationSchemes(), + T + ); + + autoPtr > cpInterp = interpolation::New + ( + this->interpolationSchemes(), + cp + ); + + autoPtr > pInterp = interpolation::New + ( + this->interpolationSchemes(), + p + ); + + typename ParcelType::trackData td + ( + *this, + constProps_, + rhoInterp(), + UInterp(), + muInterp(), + TInterp(), + cpInterp(), + pInterp(), + this->g().value() + ); + + this->injection().inject(td); + + if (debug) + { + this->dumpParticlePositions(); + } + + if (this->coupled()) + { + resetSourceTerms(); + } + + Cloud::move(td); +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H new file mode 100644 index 0000000000..9409d12a49 --- /dev/null +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H @@ -0,0 +1,210 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Class + Foam::ReactingMultiphaseCloud + +Description + Templated base class for multiphase reacting cloud + - Adds to reacting cloud + - Devolatilisatsion + - multiphase composition + +SourceFiles + ReactingMultiphaseCloudI.H + ReactingMultiphaseCloud.C + +\*---------------------------------------------------------------------------*/ + +#ifndef ReactingMultiphaseCloud_H +#define ReactingMultiphaseCloud_H + +#include "ReactingCloud.H" +#include "reactingMultiphaseCloud.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward declaration of classes + +template +class DevolatilisationModel; + +/*---------------------------------------------------------------------------*\ + Class ReactingMultiphaseCloud Declaration +\*---------------------------------------------------------------------------*/ + +template +class ReactingMultiphaseCloud +: + public ReactingCloud, + public reactingMultiphaseCloud +{ + // Private data + + //- Parcel constant properties + typename ParcelType::constantProperties constProps_; + + //- Thermodynamics package (combustion) + hCombustionThermo& carrierThermo_; + + //- Gas phase properties + PtrList& gases_; + + + // References to the cloud sub-models + + //- Devolatilisation model + autoPtr + < + DevolatilisationModel > + > + devolatilisationModel_; + + + + // Sources + + //- Mass transfer fields - one per carrier phase specie + PtrList > rhoTrans_; + + + // Private Member Functions + + //- Disallow default bitwise copy construct + ReactingMultiphaseCloud(const ReactingMultiphaseCloud&); + + //- Disallow default bitwise assignment + void operator=(const ReactingMultiphaseCloud&); + + +public: + + // Constructors + + //- Construct given carrier gas fields + ReactingMultiphaseCloud + ( + const word& cloudType, + const volScalarField& rho, + const volVectorField& U, + const dimensionedVector& g, + hCombustionThermo& thermo, + PtrList& gases + ); + + + //- Destructor + virtual ~ReactingMultiphaseCloud(); + + + // Member Functions + + // Access + + //- Return const access to carrier phase thermo package + inline const hCombustionThermo& carrierThermo() const; + + //- Return access to carrier phase thermo package + inline hCombustionThermo& carrierThermo(); + + //- Gas phase properties + inline const PtrList& gases() const; + + + // Sub-models + + //- Return reference to devolatilisation model + inline const DevolatilisationModel + < + ReactingMultiphaseCloud + >& + devolatilisation() const; + + + // Sources + + //- Mass + + //- Return reference to mass source for field i + inline DimensionedField& + rhoTrans(const label i); + + //- Return reference to mass source fields + inline PtrList >& + rhoTrans(); + + //- Return tmp mass source for field i + // Fully explicit + inline tmp > + Srho1(const label i) const; + + //- Return tmp total mass source for carrier phase + // Fully explicit + inline tmp > + Srho1() const; + + + // Cloud evolution functions + + //- Add new parcel + void addNewParcel + ( + const vector& position, + const label cellId, + const scalar d, + const vector& U, + const scalar nParticles, + const scalar lagrangianDt + ); + + //- Reset the spray source terms + void resetSourceTerms(); + + //- Evolve the spray (inject, move) + void evolve(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "ReactingMultiphaseCloudI.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "ReactingMultiphaseCloud.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloudI.H b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloudI.H new file mode 100644 index 0000000000..f27fae24ea --- /dev/null +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloudI.H @@ -0,0 +1,40 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +inline const Foam::DevolatilisationModel +< + Foam::ReactingMultiphaseCloud +>& +Foam::ReactingMultiphaseCloud::devolatilisation() const +{ + return devolatilisationModel_; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloudThermoTypes.H b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloudThermoTypes.H new file mode 100644 index 0000000000..2341e65aa0 --- /dev/null +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloudThermoTypes.H @@ -0,0 +1,65 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Typedefs + Foam::cloudThermoTypes + +Description + +\*---------------------------------------------------------------------------*/ + +#ifndef ReactingCloudThermoTypes_H +#define ReactingCloudThermoTypes_H + +#include "sutherlandTransport.H" +#include "multiComponentMixture.H" +#include "specie.H" +#include "constTransport.H" +#include "specieThermo.H" +#include "hConstThermo.H" +#include "janafThermo.H" +#include "perfectGas.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +// typedef multiComponentMixture > > > specieProperties; +// typedef hConstThermo specieProperties; + +// typedef sutherlandTransport > > +// specieProperties; + + typedef sutherlandTransport > > + specieReactingProperties; + + typedef constTransport > > + specieConstProperties; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C index 8a284024ff..05a0b5f2aa 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C @@ -25,11 +25,11 @@ License \*---------------------------------------------------------------------------*/ #include "ThermoCloud.H" -#include "HeatTransferModel.H" - #include "interpolationCellPoint.H" #include "ThermoParcel.H" +#include "HeatTransferModel.H" + // * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * // template @@ -157,31 +157,31 @@ void Foam::ThermoCloud::evolve() const volScalarField& T = carrierThermo_.T(); const volScalarField cp = carrierThermo_.Cp(); - autoPtr > rhoInterpolator = interpolation::New + autoPtr > rhoInterp = interpolation::New ( this->interpolationSchemes(), this->rho() ); - autoPtr > UInterpolator = interpolation::New + autoPtr > UInterp = interpolation::New ( this->interpolationSchemes(), this->U() ); - autoPtr > muInterpolator = interpolation::New + autoPtr > muInterp = interpolation::New ( this->interpolationSchemes(), this->mu() ); - autoPtr > TInterpolator = interpolation::New + autoPtr > TInterp = interpolation::New ( this->interpolationSchemes(), T ); - autoPtr > cpInterpolator = interpolation::New + autoPtr > cpInterp = interpolation::New ( this->interpolationSchemes(), cp @@ -191,11 +191,11 @@ void Foam::ThermoCloud::evolve() ( *this, constProps_, - rhoInterpolator(), - UInterpolator(), - muInterpolator(), - TInterpolator(), - cpInterpolator(), + rhoInterp(), + UInterp(), + muInterp(), + TInterp(), + cpInterp(), this->g().value() ); diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H index 84603dd4ff..dd47da7e01 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H @@ -66,7 +66,6 @@ class ThermoCloud public KinematicCloud, public thermoCloud { - // Private data //- Thermo parcel constant properties @@ -118,10 +117,6 @@ class ThermoCloud public: - //- Runtime type information -// TypeName("ThermoCloud"); - - // Constructors //- Construct given carrier gas fields @@ -135,9 +130,8 @@ public: ); - // Destructor - - virtual ~ThermoCloud(); + //- Destructor + virtual ~ThermoCloud(); // Member Functions diff --git a/src/lagrangian/intermediate/clouds/baseClasses/kinematicCloud/kinematicCloud.H b/src/lagrangian/intermediate/clouds/baseClasses/kinematicCloud/kinematicCloud.H index a8f337d0e9..8c1e273f57 100644 --- a/src/lagrangian/intermediate/clouds/baseClasses/kinematicCloud/kinematicCloud.H +++ b/src/lagrangian/intermediate/clouds/baseClasses/kinematicCloud/kinematicCloud.H @@ -48,7 +48,6 @@ namespace Foam class kinematicCloud { - // Private Member Functions //- Disallow default bitwise copy construct diff --git a/src/lagrangian/intermediate/clouds/baseClasses/reactingCloud/reactingCloud.H b/src/lagrangian/intermediate/clouds/baseClasses/reactingCloud/reactingCloud.H index e92063172e..a27bf4edf1 100644 --- a/src/lagrangian/intermediate/clouds/baseClasses/reactingCloud/reactingCloud.H +++ b/src/lagrangian/intermediate/clouds/baseClasses/reactingCloud/reactingCloud.H @@ -48,7 +48,6 @@ namespace Foam class reactingCloud { - // Private Member Functions //- Disallow default bitwise copy construct diff --git a/src/lagrangian/intermediate/clouds/baseClasses/reactingMultiphaseCloud/reactingMultiphaseCloud.C b/src/lagrangian/intermediate/clouds/baseClasses/reactingMultiphaseCloud/reactingMultiphaseCloud.C new file mode 100644 index 0000000000..2fbe3815c9 --- /dev/null +++ b/src/lagrangian/intermediate/clouds/baseClasses/reactingMultiphaseCloud/reactingMultiphaseCloud.C @@ -0,0 +1,49 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#include "reactingMultiphaseCloud.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(reactingMultiphaseCloud, 0); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::reactingMultiphaseCloud::reactingMultiphaseCloud() +{} + + +// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * // + +Foam::reactingMultiphaseCloud::~reactingMultiphaseCloud() +{} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/baseClasses/reactingMultiphaseCloud/reactingMultiphaseCloud.H b/src/lagrangian/intermediate/clouds/baseClasses/reactingMultiphaseCloud/reactingMultiphaseCloud.H new file mode 100644 index 0000000000..ea2ef0da89 --- /dev/null +++ b/src/lagrangian/intermediate/clouds/baseClasses/reactingMultiphaseCloud/reactingMultiphaseCloud.H @@ -0,0 +1,84 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Class + Foam::reactingMultiphaseCloud + +Description + Virtual abstract base class for templated reactingMultiphaseCloud + +SourceFiles + +\*---------------------------------------------------------------------------*/ + +#ifndef reactingMultiphaseCloud_H +#define reactingMultiphaseCloud_H + +#include "volFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class reactingMultiphaseCloud Declaration +\*---------------------------------------------------------------------------*/ + +class reactingMultiphaseCloud +{ + // Private Member Functions + + //- Disallow default bitwise copy construct + reactingMultiphaseCloud(const reactingMultiphaseCloud&); + + //- Disallow default bitwise assignment + void operator=(const reactingMultiphaseCloud&); + + +public: + + //- Runtime type information + TypeName("reactingMultiphaseCloud"); + + // Constructors + + //- Null constructor + reactingMultiphaseCloud(); + + + //- Destructor + virtual ~reactingMultiphaseCloud(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/baseClasses/thermoCloud/thermoCloud.H b/src/lagrangian/intermediate/clouds/baseClasses/thermoCloud/thermoCloud.H index 116a6c8591..240c2d5ce3 100644 --- a/src/lagrangian/intermediate/clouds/baseClasses/thermoCloud/thermoCloud.H +++ b/src/lagrangian/intermediate/clouds/baseClasses/thermoCloud/thermoCloud.H @@ -48,7 +48,6 @@ namespace Foam class thermoCloud { - // Private Member Functions //- Disallow default bitwise copy construct diff --git a/src/lagrangian/intermediate/clouds/derived/basicKinematicCloud/basicKinematicCloud.H b/src/lagrangian/intermediate/clouds/derived/basicKinematicCloud/basicKinematicCloud.H index d8a4ebc81c..8a32780f35 100644 --- a/src/lagrangian/intermediate/clouds/derived/basicKinematicCloud/basicKinematicCloud.H +++ b/src/lagrangian/intermediate/clouds/derived/basicKinematicCloud/basicKinematicCloud.H @@ -52,7 +52,6 @@ class basicKinematicCloud : public KinematicCloud { - // Private member functions //- Disallow default bitwise copy construct @@ -82,8 +81,7 @@ public: //- Destructor - - ~basicKinematicCloud(); + ~basicKinematicCloud(); // Member functions diff --git a/src/lagrangian/intermediate/clouds/derived/basicReactingCloud/basicReactingCloud.H b/src/lagrangian/intermediate/clouds/derived/basicReactingCloud/basicReactingCloud.H index e95a867432..eb9d86e506 100644 --- a/src/lagrangian/intermediate/clouds/derived/basicReactingCloud/basicReactingCloud.H +++ b/src/lagrangian/intermediate/clouds/derived/basicReactingCloud/basicReactingCloud.H @@ -51,7 +51,6 @@ class basicReactingCloud : public ReactingCloud { - // Private Member Functions //- Disallow default bitwise copy construct @@ -82,8 +81,7 @@ public: //- Destructor - - ~basicReactingCloud(); + ~basicReactingCloud(); // Member Functions diff --git a/src/lagrangian/intermediate/clouds/derived/basicReactingMultiphaseCloud/basicReactingMultiphaseCloud.H b/src/lagrangian/intermediate/clouds/derived/basicReactingMultiphaseCloud/basicReactingMultiphaseCloud.H index 244c98d095..fb1b946e1d 100644 --- a/src/lagrangian/intermediate/clouds/derived/basicReactingMultiphaseCloud/basicReactingMultiphaseCloud.H +++ b/src/lagrangian/intermediate/clouds/derived/basicReactingMultiphaseCloud/basicReactingMultiphaseCloud.H @@ -52,7 +52,6 @@ class basicReactingMultiphaseCloud : public ReactingCloud { - // Private Member Functions //- Disallow default bitwise copy construct diff --git a/src/lagrangian/intermediate/clouds/derived/basicThermoCloud/basicThermoCloud.H b/src/lagrangian/intermediate/clouds/derived/basicThermoCloud/basicThermoCloud.H index c3002c1354..e8ba4c9a8c 100644 --- a/src/lagrangian/intermediate/clouds/derived/basicThermoCloud/basicThermoCloud.H +++ b/src/lagrangian/intermediate/clouds/derived/basicThermoCloud/basicThermoCloud.H @@ -51,7 +51,6 @@ class basicThermoCloud : public ThermoCloud { - // Private Member Functions //- Disallow default bitwise copy construct @@ -84,8 +83,7 @@ public: //- Destructor - - ~basicThermoCloud(); + ~basicThermoCloud(); // Member Functions diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H index 34c66a8933..39ba450cac 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H @@ -79,7 +79,6 @@ class KinematicParcel : public Particle { - public: //- Class to hold kinematic particle constant properties @@ -183,7 +182,7 @@ public: protected: - // Protected member data + // Protected data // Parcel properties @@ -447,8 +446,10 @@ public: // I-O + //- Read static void readFields(KinematicCloud& c); + //- write static void writeFields(const KinematicCloud& c); diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C index 328367601f..c25a24163a 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C @@ -93,6 +93,12 @@ void Foam::ReactingMultiphaseParcel::calcCoupled scalar T1 = calcHeatTransfer(td, dt, celli, htc, dhTrans); + // ~~~~~~~~~~~~~~~~~~~~~~ + // Calculate phase change + // ~~~~~~~~~~~~~~~~~~~~~~ + calcPhaseChange(td, dt, T0, T1, dMassMT); + + // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // Calculate Devolatilisation // ~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -253,6 +259,12 @@ void Foam::ReactingMultiphaseParcel::calcUncoupled scalar T1 = calcHeatTransfer(td, dt, celli, htc, dhTrans); + // ~~~~~~~~~~~~~~~~~~~~~~ + // Calculate phase change + // ~~~~~~~~~~~~~~~~~~~~~~ + calcPhaseChange(td, dt, T0, T1, dMassMT); + + // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // Calculate Devolatilisation // ~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H index 634175290a..6c93a116db 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H @@ -294,8 +294,8 @@ public: //- Read static void readFields(ReactingCloud& c); - //- Write - static void writeFields(const ReactingCloud& c); + //- Write + static void writeFields(const ReactingCloud& c); // Ostream Operator diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C index ee91bda829..a2ae89a504 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C @@ -100,12 +100,6 @@ void Foam::ReactingParcel::calcCoupled calcPhaseChange(td, dt, T0, T1, dMassMT); - // ~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Calculate devolatilisation - // ~~~~~~~~~~~~~~~~~~~~~~~~~~ - calcDevolatilisation(td, dt, T0, T1, dMassMT); - - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Calculate surface reactions // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -238,12 +232,6 @@ void Foam::ReactingParcel::calcUncoupled calcPhaseChange(td, dt, T0, T1, dMassMT); - // ~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Calculate devolatilisation - // ~~~~~~~~~~~~~~~~~~~~~~~~~~ - calcDevolatilisation(td, dt, T0, T1, dMassMT); - - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Calculate surface reactions // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H index 9f0cd7b6c1..92da3160cc 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H @@ -71,7 +71,6 @@ class ReactingParcel : public ThermoParcel { - public: //- Class to hold reacting particle constant properties diff --git a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H index 9d54beba25..0f2b48416d 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H @@ -72,7 +72,6 @@ class ThermoParcel : public KinematicParcel { - public: //- Class to hold thermo particle constant properties @@ -306,8 +305,10 @@ public: // I-O + //- Read static void readFields(ThermoCloud& c); + //- Write static void writeFields(const ThermoCloud& c); diff --git a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelDispersionModels.C b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelDispersionModels.C index 07a256da8b..7a09f02321 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelDispersionModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelDispersionModels.C @@ -26,6 +26,7 @@ License #include "basicKinematicParcel.H" #include "KinematicCloud.H" + #include "NoDispersion.H" #include "GradientDispersionRAS.H" #include "StochasticDispersionRAS.H" diff --git a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelDragModels.C b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelDragModels.C index b21de1c448..e88f4e1d37 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelDragModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelDragModels.C @@ -26,6 +26,7 @@ License #include "basicKinematicParcel.H" #include "KinematicCloud.H" + #include "NoDrag.H" #include "SphereDrag.H" diff --git a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelInjectionModels.C b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelInjectionModels.C index 4d3668bbe4..e5cc927c67 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelInjectionModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelInjectionModels.C @@ -26,6 +26,7 @@ License #include "basicKinematicParcel.H" #include "KinematicCloud.H" + #include "NoInjection.H" #include "ManualInjection.H" #include "ConeInjection.H" diff --git a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelWallInteractionModels.C b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelWallInteractionModels.C index 3ec099a4cf..95335509a6 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelWallInteractionModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelWallInteractionModels.C @@ -26,6 +26,7 @@ License #include "basicKinematicParcel.H" #include "KinematicCloud.H" + #include "Rebound.H" #include "StandardWallInteraction.H" diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/defineBasicReactingMultiphaseParcel.C b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/defineBasicReactingMultiphaseParcel.C index 4097dfa878..487b0f852d 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/defineBasicReactingMultiphaseParcel.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/defineBasicReactingMultiphaseParcel.C @@ -25,7 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "basicReactingMultiphaseParcel.H" -#include "ReactingCloud.H" +#include "ReactingMultiphaseCloud.H" namespace Foam { @@ -69,8 +69,8 @@ namespace Foam ); // defineTemplateTypeNameAndDebug // ( -// KinematicCloud, -// 0 +// KinematicCloud, +// 0 // ); defineParcelTypeNameAndDebug @@ -93,6 +93,17 @@ namespace Foam // ( // ReactingCloud, // 0 +// ); + + defineParcelTypeNameAndDebug + ( + ReactingMultiphaseCloud, + 0 + ); +// defineTemplateTypeNameAndDebug +// ( +// ReactingMultiphaseCloud, +// 0 // ); }; diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelCompositionModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelCompositionModels.C index 9ad0773a17..b598be9939 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelCompositionModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelCompositionModels.C @@ -26,11 +26,15 @@ License #include "basicReactingMultiphaseParcel.H" #include "ReactingCloud.H" + #include "SingleMixtureFraction.H" namespace Foam { - makeCompositionModel(ReactingCloud); + makeCompositionModel + ( + ReactingCloud + ); // Add instances of composition model to the table makeCompositionModelType diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelDevolatilisationModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelDevolatilisationModels.C index dc742aa7b1..71c9d6e7c0 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelDevolatilisationModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelDevolatilisationModels.C @@ -25,32 +25,36 @@ License \*---------------------------------------------------------------------------*/ #include "basicReactingMultiphaseParcel.H" -#include "ReactingCloud.H" +#include "ReactingMultiphaseCloud.H" + #include "NoDevolatilisation.H" #include "ConstantRateDevolatilisation.H" #include "SingleKineticRateDevolatilisation.H" namespace Foam { - makeDevolatilisationModel(ReactingCloud); + makeDevolatilisationModel + ( + ReactingMultiphaseCloud + ); - // Add instances of mass transfer model to the table + // Add instances of devolatilisation model to the table makeDevolatilisationModelType ( NoDevolatilisation, - ReactingCloud, + ReactingMultiphaseCloud, basicReactingMultiphaseParcel ); makeDevolatilisationModelType ( ConstantRateDevolatilisation, - ReactingCloud, + ReactingMultiphaseCloud, basicReactingMultiphaseParcel ); makeDevolatilisationModelType ( SingleKineticRateDevolatilisation, - ReactingCloud, + ReactingMultiphaseCloud, basicReactingMultiphaseParcel ); }; diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelDispersionModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelDispersionModels.C index 1782cd5387..5c96a859a7 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelDispersionModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelDispersionModels.C @@ -26,6 +26,7 @@ License #include "basicReactingMultiphaseParcel.H" #include "KinematicCloud.H" + #include "NoDispersion.H" #include "GradientDispersionRAS.H" #include "StochasticDispersionRAS.H" diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelDragModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelDragModels.C index 1cca5977ad..253d546b7b 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelDragModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelDragModels.C @@ -26,6 +26,7 @@ License #include "basicReactingMultiphaseParcel.H" #include "KinematicCloud.H" + #include "NoDrag.H" #include "SphereDrag.H" @@ -35,7 +36,12 @@ namespace Foam // Add instances of drag model to the table makeDragModelType(NoDrag, KinematicCloud, basicReactingMultiphaseParcel); - makeDragModelType(SphereDrag, KinematicCloud, basicReactingMultiphaseParcel); + makeDragModelType + ( + SphereDrag, + KinematicCloud, + basicReactingMultiphaseParcel + ); }; diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelHeatTransferModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelHeatTransferModels.C index 5cd6b4e0d0..1b6f4e06e1 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelHeatTransferModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelHeatTransferModels.C @@ -26,6 +26,7 @@ License #include "basicReactingMultiphaseParcel.H" #include "ThermoCloud.H" + #include "NoHeatTransfer.H" #include "RanzMarshall.H" diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelInjectionModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelInjectionModels.C index d563de8c93..53bed2ed11 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelInjectionModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelInjectionModels.C @@ -26,6 +26,7 @@ License #include "basicReactingMultiphaseParcel.H" #include "ReactingCloud.H" + #include "NoInjection.H" #include "ManualInjection.H" #include "ConeInjection.H" diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelDevolatilisationModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelPhaseChangeModels.C similarity index 68% rename from src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelDevolatilisationModels.C rename to src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelPhaseChangeModels.C index c13d136a81..76383aaf11 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelDevolatilisationModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelPhaseChangeModels.C @@ -24,34 +24,24 @@ License \*---------------------------------------------------------------------------*/ -#include "basicReactingParcel.H" +#include "basicReactingMultiphaseParcel.H" #include "ReactingCloud.H" -#include "NoDevolatilisation.H" -#include "ConstantRateDevolatilisation.H" -#include "SingleKineticRateDevolatilisation.H" + +#include "NoPhaseChange.H" namespace Foam { - makeDevolatilisationModel(ReactingCloud); + makePhaseChangeModel + ( + ReactingCloud + ); - // Add instances of mass transfer model to the table - makeDevolatilisationModelType + // Add instances of phase change model to the table + makePhaseChangeModelType ( - NoDevolatilisation, + NoPhaseChange, ReactingCloud, - basicReactingParcel - ); - makeDevolatilisationModelType - ( - ConstantRateDevolatilisation, - ReactingCloud, - basicReactingParcel - ); - makeDevolatilisationModelType - ( - SingleKineticRateDevolatilisation, - ReactingCloud, - basicReactingParcel + basicReactingMultiphaseParcel ); }; diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelSurfaceReactionModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelSurfaceReactionModels.C index 4f0ffec9e8..26c983dfac 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelSurfaceReactionModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelSurfaceReactionModels.C @@ -26,11 +26,15 @@ License #include "basicReactingMultiphaseParcel.H" #include "ReactingCloud.H" + #include "NoSurfaceReaction.H" namespace Foam { - makeSurfaceReactionModel(ReactingCloud); + makeSurfaceReactionModel + ( + ReactingCloud + ); // Add instances of surface reaction model to the table makeSurfaceReactionModelType diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelWallInteractionModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelWallInteractionModels.C index 62443b3f0b..19057c485e 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelWallInteractionModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelWallInteractionModels.C @@ -26,13 +26,13 @@ License #include "basicReactingMultiphaseParcel.H" #include "KinematicCloud.H" + #include "Rebound.H" #include "StandardWallInteraction.H" namespace Foam { makeWallInteractionModel(KinematicCloud); -// makeWallInteractionModel(ReactingCloud); // Add instances of wall interaction model to the table makeWallInteractionModelType diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.C b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.C index 31176eb5a4..bb3a5e5da6 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.C @@ -47,9 +47,6 @@ Foam::basicReactingParcel::basicReactingParcel const scalar d0, const vector& U0, const scalar nParticle0, - const scalarField& YGas0, - const scalarField& YLiquid0, - const scalarField& YSolid0, const scalarField& YMixture0, const constantProperties& constProps ) @@ -63,9 +60,6 @@ Foam::basicReactingParcel::basicReactingParcel d0, U0, nParticle0, - YGas0, - YLiquid0, - YSolid0, YMixture0, constProps ) diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.H b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.H index d4e9b93437..5deef5d729 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.H +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.H @@ -45,7 +45,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class basicReactingParcel Declaration + Class basicReactingParcel Declaration \*---------------------------------------------------------------------------*/ class basicReactingParcel @@ -63,18 +63,15 @@ public: //- Construct from components basicReactingParcel ( - ReactingCloud& owner, - const label typeId, - const vector& position, - const label celli, - const scalar d0, - const vector& U0, - const scalar nParticle0, - const scalarField& YGas0, - const scalarField& YLiquid0, - const scalarField& YSolid0, - const scalarField& YMixture0, - const constantProperties& constProps + ReactingCloud& owner, + const label typeId, + const vector& position, + const label celli, + const scalar d0, + const vector& U0, + const scalar nParticle0, + const scalarField& YMixture0, + const constantProperties& constProps ); //- Construct from Istream @@ -88,14 +85,12 @@ public: //- Construct and return a clone autoPtr clone() const { - return autoPtr - (new basicReactingParcel(*this)); + return autoPtr(new basicReactingParcel(*this)); } - // Destructors - - virtual ~basicReactingParcel(); + //- Destructor + virtual ~basicReactingParcel(); }; diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelCompositionModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelCompositionModels.C index f5cdead727..b2f9ae5714 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelCompositionModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelCompositionModels.C @@ -26,6 +26,7 @@ License #include "basicReactingParcel.H" #include "ReactingCloud.H" + #include "SingleMixtureFraction.H" namespace Foam diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelDispersionModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelDispersionModels.C index 79e2149a6a..80a351c7bb 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelDispersionModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelDispersionModels.C @@ -26,6 +26,7 @@ License #include "basicReactingParcel.H" #include "KinematicCloud.H" + #include "NoDispersion.H" #include "GradientDispersionRAS.H" #include "StochasticDispersionRAS.H" diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelDragModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelDragModels.C index 69943e76c3..178569796d 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelDragModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelDragModels.C @@ -26,6 +26,7 @@ License #include "basicReactingParcel.H" #include "KinematicCloud.H" + #include "NoDrag.H" #include "SphereDrag.H" diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelHeatTransferModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelHeatTransferModels.C index 73bf380c82..e78caa71ec 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelHeatTransferModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelHeatTransferModels.C @@ -26,6 +26,7 @@ License #include "basicReactingParcel.H" #include "ThermoCloud.H" + #include "NoHeatTransfer.H" #include "RanzMarshall.H" diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelInjectionModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelInjectionModels.C index ed9f2bd6be..77b71a75ab 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelInjectionModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelInjectionModels.C @@ -26,6 +26,7 @@ License #include "basicReactingParcel.H" #include "ReactingCloud.H" + #include "NoInjection.H" #include "ManualInjection.H" #include "ConeInjection.H" diff --git a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelHeatTransferModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelPhaseChangeModels.C similarity index 80% rename from src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelHeatTransferModels.C rename to src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelPhaseChangeModels.C index 1ae2a21d5f..537ff586fa 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelHeatTransferModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelPhaseChangeModels.C @@ -24,20 +24,21 @@ License \*---------------------------------------------------------------------------*/ -#include "basicKinematicParcel.H" -#include "KinematicCloud.H" -#include "NoHeatTransfer.H" +#include "basicReactingParcel.H" +#include "ReactingCloud.H" + +#include "NoPhaseChange.H" namespace Foam { - makeHeatTransferModel(KinematicCloud); + makePhaseChangeModel(ReactingCloud); - // Add instances of heat transfer model to the table - makeHeatTransferModelType + // Add instances of phase change model to the table + makePhaseChangeModelType ( - NoHeatTransfer, - KinematicCloud, - basicKinematicParcel + NoPhaseChange, + ReactingCloud, + basicReactingParcel ); }; diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelSurfaceReactionModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelSurfaceReactionModels.C index e242d7e2fa..0cb133d8ba 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelSurfaceReactionModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelSurfaceReactionModels.C @@ -26,6 +26,7 @@ License #include "basicReactingParcel.H" #include "ReactingCloud.H" + #include "NoSurfaceReaction.H" namespace Foam diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelWallInteractionModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelWallInteractionModels.C index 6cc346e8d9..364d6f031e 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelWallInteractionModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelWallInteractionModels.C @@ -26,13 +26,13 @@ License #include "basicReactingParcel.H" #include "KinematicCloud.H" + #include "Rebound.H" #include "StandardWallInteraction.H" namespace Foam { makeWallInteractionModel(KinematicCloud); -// makeWallInteractionModel(ReactingCloud); // Add instances of wall interaction model to the table makeWallInteractionModelType diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C index 1f5d5616cd..0dd1b106c9 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C @@ -130,10 +130,10 @@ template Foam::scalar Foam::InjectionModel::setNumberOfParticles ( const label parcels, - const scalar volume + const scalar volume, const scalar volumeFraction, const scalar diameter, - const scalar rho, + const scalar rho ) { scalar nP = 0.0; @@ -330,8 +330,9 @@ void Foam::InjectionModel::inject(TrackData& td) else { WarningIn("Foam::InjectionModel::inject(TrackData& td)") - << "Failed to inject new parcel:" << - << " id = " << iParcel << ", position = " pos << nl << endl; + << "Failed to inject new parcel:" << nl + << " id = " << iParcel << ", position = " << pos + << nl << endl; } } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H index 0c6b9f69a7..9e4c2a4161 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H @@ -160,11 +160,7 @@ protected: //- Find the cell that contains the supplied position // Will modify position slightly towards the owner cell centroid to // ensure that it lies in a cell and not edge/face - virtual void findCellAtPosition - ( - label& cellI, - vector& position - ); + virtual void findCellAtPosition(label& cellI, vector& position); //- Set number of particles to inject given parcel properties scalar setNumberOfParticles diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.C new file mode 100644 index 0000000000..33b328f212 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.C @@ -0,0 +1,71 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#include "NoPhaseChange.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +Foam::NoPhaseChange::NoPhaseChange +( + const dictionary& dict, + CloudType& cloud +) +: + PhaseChangeModel(dict, cloud, typeName) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template +Foam::NoPhaseChange::~NoPhaseChange() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +bool Foam::NoPhaseChange::active() const +{ + return false; +} + + +template +Foam::scalar Foam::NoPhaseChange::calculate +( + const scalar, + const scalarField&, + const scalar +) const +{ + // Nothing to do... + return 0.0; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.H b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.H new file mode 100644 index 0000000000..8c77f1d8f4 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.H @@ -0,0 +1,101 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Class + Foam::NoPhaseChange + +Description + Dummy devolatilisation model for 'no phase change' + +\*---------------------------------------------------------------------------*/ + +#ifndef NoPhaseChange_H +#define NoPhaseChange_H + +#include "PhaseChangeModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +/*---------------------------------------------------------------------------*\ + Class NoPhaseChange Declaration +\*---------------------------------------------------------------------------*/ + +template +class NoPhaseChange +: + public PhaseChangeModel +{ + +public: + + //- Runtime type information + TypeName("NoPhaseChange"); + + + // Constructors + + //- Construct from dictionary + NoPhaseChange + ( + const dictionary& dict, + CloudType& cloud + ); + + + //- Destructor + ~NoPhaseChange(); + + + // Member Functions + + //- Flag to indicate whether model activates phase change model + bool active() const; + + //- Update model + scalar calculate + ( + const scalar, + const scalarField&, + const scalar + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "NoPhaseChange.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/NewPhaseChangeModel.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/NewPhaseChangeModel.C new file mode 100644 index 0000000000..091fd8b810 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/NewPhaseChangeModel.C @@ -0,0 +1,67 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#include "PhaseChangeModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template +Foam::autoPtr > +Foam::PhaseChangeModel::New +( + const dictionary& dict, + CloudType& owner +) +{ + word PhaseChangeModelType(dict.lookup("PhaseChangeModel")); + + Info<< "Selecting PhaseChangeModel " << PhaseChangeModelType << endl; + + typename dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(PhaseChangeModelType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalErrorIn + ( + "PhaseChangeModel::New\n" + "(\n" + " const dictionary&,\n" + " CloudType&\n" + ")" + ) + << "Unknown PhaseChangeModelType type " + << PhaseChangeModelType + << ", constructor not in hash table" << nl << nl + << " Valid PhaseChangeModel types are :" << nl + << dictionaryConstructorTablePtr_->toc() << exit(FatalError); + } + + return autoPtr >(cstrIter()(dict, owner)); +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.C new file mode 100644 index 0000000000..c187165632 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.C @@ -0,0 +1,78 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#include "PhaseChangeModel.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +Foam::PhaseChangeModel::PhaseChangeModel +( + const dictionary& dict, + CloudType& owner, + const word& type +) +: dict_(dict), + owner_(owner), + coeffDict_(dict.subDict(type + "Coeffs")) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template +Foam::PhaseChangeModel::~PhaseChangeModel() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template +const CloudType& Foam::PhaseChangeModel::owner() const +{ + return owner_; +} + + +template +const Foam::dictionary& Foam::PhaseChangeModel::dict() const +{ + return dict_; +} + + +template +const Foam::dictionary& Foam::PhaseChangeModel::coeffDict() const +{ + return coeffDict_; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "NewPhaseChangeModel.C" + +// ************************************************************************* // + diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H new file mode 100644 index 0000000000..e939b96286 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H @@ -0,0 +1,176 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Class + Foam::PhaseChangeModel + +Description + Templated phase change model class + +SourceFiles + PhaseChangeModel.C + NewPhaseChangeModel.C + +\*---------------------------------------------------------------------------*/ + +#ifndef PhaseChangeModel_H +#define PhaseChangeModel_H + +#include "IOdictionary.H" +#include "autoPtr.H" +#include "runTimeSelectionTables.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class PhaseChangeModel Declaration +\*---------------------------------------------------------------------------*/ + +template +class PhaseChangeModel +{ + +protected: + + // Protected data + + //- The cloud dictionary + const dictionary& dict_; + + //- Reference to the owner cloud class + CloudType& owner_; + + //- The coefficient dictionary + const dictionary coeffDict_; + + +public: + + //- Runtime type information + TypeName("PhaseChangeModel"); + + //- Declare runtime constructor selection table + declareRunTimeSelectionTable + ( + autoPtr, + PhaseChangeModel, + dictionary, + ( + const dictionary& dict, + CloudType& owner + ), + (dict, owner) + ); + + + // Constructors + + //- Construct from dictionary + PhaseChangeModel + ( + const dictionary& dict, + CloudType& owner, + const word& type + ); + + + //- Destructor + virtual ~PhaseChangeModel(); + + + //- Selector + static autoPtr > New + ( + const dictionary& dict, + CloudType& owner + ); + + + // Access + + //- Return the owner cloud object + const CloudType& owner() const; + + //- Return the cloud dictionary + const dictionary& dict() const; + + //- Return the coefficient dictionary + const dictionary& coeffDict() const; + + + // Member Functions + + //- Flag to indicate whether model activates phase change model + virtual bool active() const = 0; + + //- Update model + virtual scalar calculate + ( + const scalar dt, + const scalarField& YMixture, + const scalar T + ) const = 0; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makePhaseChangeModel(CloudType) \ + \ + defineNamedTemplateTypeNameAndDebug(PhaseChangeModel, 0); \ + \ + defineTemplateRunTimeSelectionTable \ + ( \ + PhaseChangeModel, \ + dictionary \ + ); + + +#define makePhaseChangeModelType(SS, CloudType, ParcelType) \ + \ + defineNamedTemplateTypeNameAndDebug(SS >, 0); \ + \ + PhaseChangeModel >:: \ + adddictionaryConstructorToTable > > \ + add##SS##CloudType##ParcelType##ConstructorToTable_; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "PhaseChangeModel.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* //