moved construction of carrier props to reacting cloud constructor

This commit is contained in:
andy
2009-06-03 11:02:43 +01:00
parent cba4af2700
commit 3233ed6428
14 changed files with 38 additions and 134 deletions

View File

@ -35,8 +35,7 @@ Foam::CoalCloud<ThermoType>::CoalCloud
const volScalarField& rho,
const volVectorField& U,
const dimensionedVector& g,
hCombustionThermo& thermo,
PtrList<ThermoType>& carrierSpecies
hCombustionThermo& thermo
)
:
ReactingMultiphaseCloud<CoalParcel<ThermoType> >
@ -45,8 +44,7 @@ Foam::CoalCloud<ThermoType>::CoalCloud
rho,
U,
g,
thermo,
carrierSpecies
thermo
)
{
CoalParcel<ThermoType>::readFields(*this);

View File

@ -44,7 +44,7 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class CoalCloud Declaration
Class CoalCloud Declaration
\*---------------------------------------------------------------------------*/
template<class ThermoType>
@ -76,8 +76,7 @@ public:
const volScalarField& rho,
const volVectorField& U,
const dimensionedVector& g,
hCombustionThermo& thermo,
PtrList<ThermoType>& gases
hCombustionThermo& thermo
);

View File

@ -28,6 +28,7 @@ License
#include "CompositionModel.H"
#include "PhaseChangeModel.H"
#include "multiComponentMixture.H"
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
@ -67,15 +68,14 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud
const volScalarField& rho,
const volVectorField& U,
const dimensionedVector& g,
hCombustionThermo& thermo,
PtrList<thermoType>& carrierSpecies
hCombustionThermo& thermo
)
:
ThermoCloud<ParcelType>(cloudName, rho, U, g, thermo),
reactingCloud(),
constProps_(this->particleProperties()),
carrierThermo_(thermo),
carrierSpecies_(carrierSpecies),
carrierSpecies_(thermo.composition().Y().size()),
compositionModel_
(
CompositionModel<ReactingCloud<ParcelType> >::New
@ -95,6 +95,20 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud
rhoTrans_(thermo.composition().Y().size()),
dMassPhaseChange_(0.0)
{
// Create the carrier species
forAll(carrierSpecies_, specieI)
{
carrierSpecies_.set
(
specieI,
new thermoType
(
dynamic_cast<const multiComponentMixture<thermoType>&>
(thermo).speciesData()[specieI]
)
);
}
// Set storage for mass source fields and initialise to zero
forAll(rhoTrans_, i)
{

View File

@ -98,7 +98,7 @@ protected:
hCombustionThermo& carrierThermo_;
//- Gas phase properties
PtrList<thermoType>& carrierSpecies_;
PtrList<thermoType> carrierSpecies_;
// References to the cloud sub-models
@ -148,8 +148,7 @@ public:
const volScalarField& rho,
const volVectorField& U,
const dimensionedVector& g,
hCombustionThermo& thermo,
PtrList<thermoType>& carrierSpecies
hCombustionThermo& thermo
);

View File

@ -38,11 +38,10 @@ Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud
const volScalarField& rho,
const volVectorField& U,
const dimensionedVector& g,
hCombustionThermo& thermo,
PtrList<typename ReactingCloud<ParcelType>::thermoType>& carrierSpecies
hCombustionThermo& thermo
)
:
ReactingCloud<ParcelType>(cloudName, rho, U, g, thermo, carrierSpecies),
ReactingCloud<ParcelType>(cloudName, rho, U, g, thermo),
reactingMultiphaseCloud(),
constProps_(this->particleProperties()),
devolatilisationModel_

View File

@ -123,9 +123,7 @@ public:
const volScalarField& rho,
const volVectorField& U,
const dimensionedVector& g,
hCombustionThermo& thermo,
PtrList<typename ReactingCloud<ParcelType>::thermoType>&
carrierSpecies
hCombustionThermo& thermo
);

View File

@ -35,8 +35,7 @@ Foam::BasicReactingCloud<ThermoType>::BasicReactingCloud
const volScalarField& rho,
const volVectorField& U,
const dimensionedVector& g,
hCombustionThermo& thermo,
PtrList<ThermoType>& carrierSpecies
hCombustionThermo& thermo
)
:
ReactingCloud<BasicReactingParcel<ThermoType> >
@ -45,8 +44,7 @@ Foam::BasicReactingCloud<ThermoType>::BasicReactingCloud
rho,
U,
g,
thermo,
carrierSpecies
thermo
)
{
BasicReactingParcel<ThermoType>::readFields(*this);

View File

@ -81,8 +81,7 @@ public:
const volScalarField& rho,
const volVectorField& U,
const dimensionedVector& g,
hCombustionThermo& thermo,
PtrList<ThermoType>& carrierSpecies
hCombustionThermo& thermo
);

View File

@ -35,8 +35,7 @@ Foam::BasicTrackedReactingCloud<ThermoType>::BasicTrackedReactingCloud
const volScalarField& rho,
const volVectorField& U,
const dimensionedVector& g,
hCombustionThermo& thermo,
PtrList<ThermoType>& gases
hCombustionThermo& thermo
)
:
ReactingCloud<BasicTrackedReactingParcel<ThermoType> >
@ -45,8 +44,7 @@ Foam::BasicTrackedReactingCloud<ThermoType>::BasicTrackedReactingCloud
rho,
U,
g,
thermo,
gases
thermo
)
{
BasicTrackedReactingParcel<ThermoType>::readFields(*this);

View File

@ -81,8 +81,7 @@ public:
const volScalarField& rho,
const volVectorField& U,
const dimensionedVector& g,
hCombustionThermo& thermo,
PtrList<ThermoType>& gases
hCombustionThermo& thermo
);