diff --git a/applications/solvers/lagrangian/ThermoMPPICFoam/createClouds.H b/applications/solvers/lagrangian/ThermoMPPICFoam/createClouds.H index 451ff4793..8cc63a0e1 100644 --- a/applications/solvers/lagrangian/ThermoMPPICFoam/createClouds.H +++ b/applications/solvers/lagrangian/ThermoMPPICFoam/createClouds.H @@ -4,8 +4,8 @@ basicThermoKinematicMPPICCloud parcels "reactingCloud", rho, U, - g, - slgThermo + slgThermo.thermo().mu(), + g ); diff --git a/applications/solvers/lagrangian/simpleCoalcombustionFoam/Make/options b/applications/solvers/lagrangian/simpleCoalcombustionFoam/Make/options index f39888db2..f5a48186d 100644 --- a/applications/solvers/lagrangian/simpleCoalcombustionFoam/Make/options +++ b/applications/solvers/lagrangian/simpleCoalcombustionFoam/Make/options @@ -35,6 +35,7 @@ EXE_LIBS = \ -lcompressibleTurbulenceModels \ -llagrangian \ -llagrangianIntermediate \ + -lcoalCombustion \ -llagrangianTurbulence \ -lspecie \ -lcompressibleTransportModels \ diff --git a/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.C b/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.C index f6cc7c950..702d2454b 100644 --- a/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.C @@ -70,12 +70,12 @@ Foam::MPPICCloud::MPPICCloud const word& cloudName, const volScalarField& rho, const volVectorField& U, + const volScalarField& mu, const dimensionedVector& g, - const SLGThermo& thermo, bool readFields ) : - CloudType(cloudName, rho, U, g, thermo, false), + CloudType(cloudName, rho, U, mu, g, false), packingModel_(NULL), dampingModel_(NULL), isotropyModel_(NULL) diff --git a/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.H b/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.H index c49125bd6..1d34b686e 100644 --- a/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.H @@ -43,7 +43,6 @@ SourceFiles #include "fvMesh.H" #include "volFields.H" -#include "ThermoCloud.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam @@ -134,8 +133,8 @@ public: const word& cloudName, const volScalarField& rho, const volVectorField& U, + const volScalarField& mu, const dimensionedVector& g, - const SLGThermo& thermo, bool readFields = true ); diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C index f2aa3eb69..e41f92530 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C @@ -213,6 +213,88 @@ Foam::ThermoCloud::ThermoCloud } +template +Foam::ThermoCloud::ThermoCloud +( + const word& cloudName, + const volScalarField& rho, + const volVectorField& U, + const volScalarField& mu, + const dimensionedVector& g, + bool readFields +) +: + CloudType + ( + cloudName, + rho, + U, + mu, + g, + false + ), + thermoCloud(), + cloudCopyPtr_(NULL), + constProps_(this->particleProperties()), + thermo_(this->mesh().template lookupObject("SLGThermo")), + T_(thermo_.thermo().T()), + p_(thermo_.thermo().p()), + heatTransferModel_(NULL), + TIntegrator_(NULL), + radiation_(false), + radAreaP_(NULL), + radT4_(NULL), + radAreaPT4_(NULL), + hsTrans_ + ( + new DimensionedField + ( + IOobject + ( + this->name() + ":hsTrans", + this->db().time().timeName(), + this->db(), + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + this->mesh(), + dimensionedScalar("zero", dimEnergy, 0.0) + ) + ), + hsCoeff_ + ( + new DimensionedField + ( + IOobject + ( + this->name() + ":hsCoeff", + this->db().time().timeName(), + this->db(), + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + this->mesh(), + dimensionedScalar("zero", dimEnergy/dimTemperature, 0.0) + ) + ) +{ + if (this->solution().active()) + { + setModels(); + + if (readFields) + { + parcelType::readFields(*this); + } + } + + if (this->solution().resetSourcesOnStartup()) + { + resetSourceTerms(); + } +} + + template Foam::ThermoCloud::ThermoCloud ( diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H index 441c6d671..82cb21183 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H @@ -180,6 +180,17 @@ public: bool readFields = true ); + //- Construct given carrier gas fields + ThermoCloud + ( + const word& cloudName, + const volScalarField& rho, + const volVectorField& U, + const volScalarField& mu, + const dimensionedVector& g, + bool readFields = true + ); + //- Copy constructor with new name ThermoCloud(ThermoCloud& c, const word& name);