ThermoCloud new constructor dynamic SLGThermo lookup

This commit is contained in:
ignis 2018-04-18 05:07:25 +09:00
parent 7873f46038
commit b510f145d2
6 changed files with 99 additions and 6 deletions

View file

@ -4,8 +4,8 @@ basicThermoKinematicMPPICCloud parcels
"reactingCloud",
rho,
U,
g,
slgThermo
slgThermo.thermo().mu(),
g
);

View file

@ -35,6 +35,7 @@ EXE_LIBS = \
-lcompressibleTurbulenceModels \
-llagrangian \
-llagrangianIntermediate \
-lcoalCombustion \
-llagrangianTurbulence \
-lspecie \
-lcompressibleTransportModels \

View file

@ -70,12 +70,12 @@ Foam::MPPICCloud<CloudType>::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)

View file

@ -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
);

View file

@ -213,6 +213,88 @@ Foam::ThermoCloud<CloudType>::ThermoCloud
}
template<class CloudType>
Foam::ThermoCloud<CloudType>::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>("SLGThermo")),
T_(thermo_.thermo().T()),
p_(thermo_.thermo().p()),
heatTransferModel_(NULL),
TIntegrator_(NULL),
radiation_(false),
radAreaP_(NULL),
radT4_(NULL),
radAreaPT4_(NULL),
hsTrans_
(
new DimensionedField<scalar, volMesh>
(
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<scalar, volMesh>
(
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<class CloudType>
Foam::ThermoCloud<CloudType>::ThermoCloud
(

View file

@ -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<CloudType>& c, const word& name);