mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
re-structure of reacting class
- reacting now single phase, multi-component
- new phase change sub-model
- new reactingMultiphase = multi-phase, multi-component
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
/* Parcels */
|
||||
parcels/derived/basicKinematicParcel/basicKinematicParcel.C
|
||||
parcels/derived/basicThermoParcel/basicThermoParcel.C
|
||||
parcels/derived/basicReactingParcel/basicReactingParcel.C
|
||||
parcels/derived/basicReactingMultiphaseParcel/basicReactingMultiphaseParcel.C
|
||||
|
||||
/* Cloud base classes */
|
||||
clouds/baseClasses/kinematicCloud/kinematicCloud.C
|
||||
@ -30,15 +30,15 @@ parcels/derived/basicThermoParcel/makeBasicThermoParcelHeatTransferModels.C
|
||||
parcels/derived/basicThermoParcel/makeBasicThermoParcelWallInteractionModels.C
|
||||
|
||||
/* reacting parcel sub-models */
|
||||
parcels/derived/basicReactingParcel/defineBasicReactingParcel.C
|
||||
parcels/derived/basicReactingParcel/makeBasicReactingParcelCompositionModels.C
|
||||
parcels/derived/basicReactingParcel/makeBasicReactingParcelDragModels.C
|
||||
parcels/derived/basicReactingParcel/makeBasicReactingParcelDispersionModels.C
|
||||
parcels/derived/basicReactingParcel/makeBasicReactingParcelInjectionModels.C
|
||||
parcels/derived/basicReactingParcel/makeBasicReactingParcelHeatTransferModels.C
|
||||
parcels/derived/basicReactingParcel/makeBasicReactingParcelDevolatilisationModels.C
|
||||
parcels/derived/basicReactingParcel/makeBasicReactingParcelSurfaceReactionModels.C
|
||||
parcels/derived/basicReactingParcel/makeBasicReactingParcelWallInteractionModels.C
|
||||
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
|
||||
|
||||
/* bolt-on models */
|
||||
submodels/addOns/radiation/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.C
|
||||
|
||||
@ -0,0 +1,77 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "basicReactingMultiphaseCloud.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(basicReactingMultiphaseCloud, 0);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::basicReactingMultiphaseCloud::basicReactingMultiphaseCloud
|
||||
(
|
||||
const word& cloudType,
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const dimensionedVector& g,
|
||||
hCombustionThermo& thermo,
|
||||
PtrList<specieReactingProperties>& gases
|
||||
)
|
||||
:
|
||||
ReactingCloud<basicReactingMultiphaseParcel>
|
||||
(
|
||||
cloudType,
|
||||
rho,
|
||||
U,
|
||||
g,
|
||||
thermo,
|
||||
gases
|
||||
)
|
||||
{
|
||||
basicReactingMultiphaseParcel::readFields(*this);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::basicReactingMultiphaseCloud::~basicReactingMultiphaseCloud()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::basicReactingMultiphaseCloud::writeFields() const
|
||||
{
|
||||
basicReactingMultiphaseParcel::writeFields(*this);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,104 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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::basicReactingMultiphaseCloud
|
||||
|
||||
Description
|
||||
Reacting cloud templated on the reacting multiphase parcel
|
||||
|
||||
SourceFiles
|
||||
basicReactingMultiphaseCloud.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef basicReactingMultiphaseCloud_H
|
||||
#define basicReactingMultiphaseCloud_H
|
||||
|
||||
#include "ReactingCloud.H"
|
||||
#include "basicReactingMultiphaseParcel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class basicReactingMultiphaseCloud Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class basicReactingMultiphaseCloud
|
||||
:
|
||||
public ReactingCloud<basicReactingMultiphaseParcel>
|
||||
{
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
basicReactingMultiphaseCloud(const basicReactingMultiphaseCloud&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const basicReactingMultiphaseCloud&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("basicReactingMultiphaseCloud");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct given carrier gas fields
|
||||
basicReactingMultiphaseCloud
|
||||
(
|
||||
const word& cloudType,
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const dimensionedVector& g,
|
||||
hCombustionThermo& thermo,
|
||||
PtrList<specieReactingProperties>& gases
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
~basicReactingMultiphaseCloud();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Write fields
|
||||
void writeFields() const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,433 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "ReactingMultiphaseParcel.H"
|
||||
|
||||
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
template<class TrackData>
|
||||
void Foam::ReactingMultiphaseParcel<ParcelType>::updateCellQuantities
|
||||
(
|
||||
TrackData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
)
|
||||
{
|
||||
ReactingParcel<ParcelType>::updateCellQuantities(td, dt, celli);
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class TrackData>
|
||||
void Foam::ReactingMultiphaseParcel<ParcelType>::calcCoupled
|
||||
(
|
||||
TrackData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
)
|
||||
{
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Define local properties at beginning of timestep
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
const vector U0 = this->U_;
|
||||
const scalar mass0 = this->mass();
|
||||
const scalar cp0 = this->cp_;
|
||||
const scalar np0 = this->nParticle_;
|
||||
const scalar T0 = this->T_;
|
||||
scalarList& YMix = this->YMixture_;
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Initialise transfer terms
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
// Momentum transfer from the particle to the carrier phase
|
||||
vector dUTrans = vector::zero;
|
||||
|
||||
// Enthalpy transfer from the particle to the carrier phase
|
||||
scalar dhTrans = 0.0;
|
||||
|
||||
// Mass transfer from particle to carrier phase
|
||||
// - components exist in particle already
|
||||
scalarList dMassMT(td.cloud().gases().size(), 0.0);
|
||||
|
||||
// Mass transfer due to surface reactions from particle to carrier phase
|
||||
// - components do not necessarily exist in particle already
|
||||
scalarList dMassSR(td.cloud().gases().size(), 0.0);
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Calculate velocity - update U
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
scalar Cud = 0.0;
|
||||
const vector U1 = calcVelocity(td, dt, Cud, dUTrans);
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Calculate heat transfer - update T
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
scalar htc = 0.0;
|
||||
scalar T1 = calcHeatTransfer(td, dt, celli, htc, dhTrans);
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Calculate Devolatilisation
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
calcDevolatilisation(td, dt, T0, T1, dMassMT);
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Calculate surface reactions
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
// Initialise enthalpy retention to zero
|
||||
scalar dhRet = 0.0;
|
||||
|
||||
calcSurfaceReactions(td, dt, celli, T0, T1, dMassMT, dMassSR, dhRet);
|
||||
|
||||
// New total mass
|
||||
const scalar mass1 = mass0 - sum(dMassMT) - sum(dMassSR);
|
||||
|
||||
// Correct particle temperature to account for latent heat of
|
||||
// devolatilisation
|
||||
T1 -=
|
||||
td.constProps().Ldevol()
|
||||
*sum(dMassMT)
|
||||
/(0.5*(mass0 + mass1)*cp0);
|
||||
|
||||
// Add retained enthalpy from surface reaction to particle and remove
|
||||
// from gas
|
||||
T1 += dhRet/(0.5*(mass0 + mass1)*cp0);
|
||||
dhTrans -= dhRet;
|
||||
|
||||
// Correct dhTrans to account for enthalpy of evolved volatiles
|
||||
dhTrans +=
|
||||
sum(dMassMT)
|
||||
*td.cloud().composition().HGas(YGas_, 0.5*(T0 + T1));
|
||||
|
||||
// Correct dhTrans to account for enthalpy of consumed solids
|
||||
dhTrans +=
|
||||
sum(dMassSR)
|
||||
*td.cloud().composition().HSolid(YSolid_, 0.5*(T0 + T1));
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Accumulate source terms
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
// Transfer mass lost from particle to carrier mass source
|
||||
forAll(dMassMT, i)
|
||||
{
|
||||
td.cloud().rhoTrans(i)[celli] += np0*(dMassMT[i] + dMassSR[i]);
|
||||
}
|
||||
|
||||
// Update momentum transfer
|
||||
td.cloud().UTrans()[celli] += np0*dUTrans;
|
||||
|
||||
// Accumulate coefficient to be applied in carrier phase momentum coupling
|
||||
td.cloud().UCoeff()[celli] += np0*mass0*Cud;
|
||||
|
||||
// Update enthalpy transfer
|
||||
// - enthalpy of lost solids already accounted for
|
||||
td.cloud().hTrans()[celli] += np0*dhTrans;
|
||||
|
||||
// Accumulate coefficient to be applied in carrier phase enthalpy coupling
|
||||
td.cloud().hCoeff()[celli] += np0*htc*this->areaS();
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Remove the particle when mass falls below minimum threshold
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
if (mass1 < td.constProps().minParticleMass())
|
||||
{
|
||||
td.keepParticle = false;
|
||||
|
||||
// Absorb particle(s) into carrier phase
|
||||
forAll(dMassMT, i)
|
||||
{
|
||||
td.cloud().rhoTrans(i)[celli] += np0*dMassMT[i];
|
||||
}
|
||||
td.cloud().hTrans()[celli] +=
|
||||
np0*mass1
|
||||
*(
|
||||
YMix[0]*td.cloud().composition().HGas(YGas_, T1)
|
||||
+ YMix[2]*td.cloud().composition().HSolid(YSolid_, T1)
|
||||
);
|
||||
td.cloud().UTrans()[celli] += np0*mass1*U1;
|
||||
}
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Set new particle properties
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
else
|
||||
{
|
||||
this->U_ = U1;
|
||||
this->T_ = T1;
|
||||
this->cp_ =
|
||||
YMix[0]*td.cloud().composition().cpGas(YGas_, T1)
|
||||
+ YMix[1]*td.cloud().composition().cpLiquid(YLiquid_, this->pc_, T1)
|
||||
+ YMix[2]*td.cloud().composition().cpSolid(YSolid_);
|
||||
|
||||
// Update particle density or diameter
|
||||
if (td.constProps().constantVolume())
|
||||
{
|
||||
this->rho_ = mass1/this->volume();
|
||||
}
|
||||
else
|
||||
{
|
||||
this->d_ = cbrt(mass1/this->rho_*6.0/mathematicalConstant::pi);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class TrackData>
|
||||
void Foam::ReactingMultiphaseParcel<ParcelType>::calcUncoupled
|
||||
(
|
||||
TrackData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
)
|
||||
{
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Define local properties at beginning of timestep
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
const scalar T0 = this->T_;
|
||||
const scalar mass0 = this->mass();
|
||||
const scalar cp0 = this->cp_;
|
||||
scalarList& YMix = this->YMixture_;
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Initialise transfer terms
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
// Momentum transfer from the particle to the carrier phase
|
||||
vector dUTrans = vector::zero;
|
||||
|
||||
// Enthalpy transfer from the particle to the carrier phase
|
||||
scalar dhTrans = 0.0;
|
||||
|
||||
// Mass transfer from particle to carrier phase
|
||||
// - components exist in particle already
|
||||
scalarList dMassMT(td.cloud().gases().size(), 0.0);
|
||||
|
||||
// Mass transfer due to surface reactions from particle to carrier phase
|
||||
// - components do not necessarily exist in particle already
|
||||
scalarList dMassSR(td.cloud().gases().size(), 0.0);
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Calculate velocity - update U
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
scalar Cud = 0.0;
|
||||
const vector U1 = calcVelocity(td, dt, Cud, dUTrans);
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Calculate heat transfer - update T
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
scalar htc = 0.0;
|
||||
scalar T1 = calcHeatTransfer(td, dt, celli, htc, dhTrans);
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Calculate Devolatilisation
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
calcDevolatilisation(td, dt, T0, T1, dMassMT);
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Calculate surface reactions
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
// Initialise enthalpy retention to zero
|
||||
scalar dhRet = 0.0;
|
||||
|
||||
calcSurfaceReactions(td, dt, celli, T0, T1, dMassMT, dMassSR, dhRet);
|
||||
|
||||
// New total mass
|
||||
const scalar mass1 = mass0 - sum(dMassMT) - sum(dMassSR);
|
||||
|
||||
// New specific heat capacity
|
||||
const scalar cp1 =
|
||||
YMix[0]*td.cloud().composition().cpGas(YGas_, T1)
|
||||
+ YMix[1]*td.cloud().composition().cpLiquid(YLiquid_, this->pc_, T1)
|
||||
+ YMix[2]*td.cloud().composition().cpSolid(YSolid_);
|
||||
|
||||
// Add retained enthalpy to particle
|
||||
T1 += dhRet/(mass0*0.5*(cp0 + cp1));
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Remove the particle when mass falls below minimum threshold
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
if (mass1 < td.constProps().minParticleMass())
|
||||
{
|
||||
td.keepParticle = false;
|
||||
}
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Set new particle properties
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
else
|
||||
{
|
||||
this->U_ = U1;
|
||||
this->T_ = T1;
|
||||
this->cp_ = cp1;
|
||||
|
||||
// Update particle density or diameter
|
||||
if (td.constProps().constantVolume())
|
||||
{
|
||||
this->rho_ = mass1/this->volume();
|
||||
}
|
||||
else
|
||||
{
|
||||
this->d_ = cbrt(mass1/this->rho_*6.0/mathematicalConstant::pi);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class TrackData>
|
||||
void Foam::ReactingMultiphaseParcel<ParcelType>::calcDevolatilisation
|
||||
(
|
||||
TrackData& td,
|
||||
const scalar dt,
|
||||
const scalar T0,
|
||||
const scalar T1,
|
||||
scalarList& dMassMT
|
||||
)
|
||||
{
|
||||
if (td.cloud().composition().YMixture0()[1]>SMALL)
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"void Foam::ReactingMultiphaseParcel<ParcelType>::"
|
||||
"calcDevolatilisation \n"
|
||||
"("
|
||||
" TrackData&,\n"
|
||||
" const scalar,\n"
|
||||
" const scalar,\n"
|
||||
" const scalar,\n"
|
||||
" scalarList&\n"
|
||||
")\n"
|
||||
"no treatment currently available for particles containing "
|
||||
"liquid species"
|
||||
)
|
||||
}
|
||||
|
||||
// Check that model is active, and that the parcel temperature is
|
||||
// within necessary limits for devolatilisation to occur
|
||||
if
|
||||
(
|
||||
!td.cloud().devolatilisation().active()
|
||||
|| this->T_<td.constProps().Tvap()
|
||||
|| this->T_<td.constProps().Tbp()
|
||||
)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Determine mass to add to carrier phase
|
||||
const scalar mass = this->mass();
|
||||
scalarList& YMix = this->YMixture_;
|
||||
const scalar dMassTot = td.cloud().devolatilisation().calculate
|
||||
(
|
||||
dt,
|
||||
this->mass0_,
|
||||
mass,
|
||||
td.cloud().composition().YMixture0(),
|
||||
YMix,
|
||||
T0,
|
||||
canCombust_
|
||||
);
|
||||
|
||||
// Update (total) mass fractions
|
||||
YMix[0] = (YMix[0]*mass - dMassTot)/(mass - dMassTot);
|
||||
YMix[1] = YMix[1]*mass/(mass - dMassTot);
|
||||
YMix[2] = 1.0 - YMix[0] - YMix[1];
|
||||
|
||||
// Add to cummulative mass transfer
|
||||
forAll (YGas_, i)
|
||||
{
|
||||
label id = td.cloud().composition().gasGlobalIds()[i];
|
||||
|
||||
// Volatiles mass transfer
|
||||
scalar volatileMass = YGas_[i]*dMassTot;
|
||||
dMassMT[id] += volatileMass;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class TrackData>
|
||||
void Foam::ReactingMultiphaseParcel<ParcelType>::calcSurfaceReactions
|
||||
(
|
||||
TrackData& td,
|
||||
const scalar dt,
|
||||
const label celli,
|
||||
const scalar T0,
|
||||
const scalar T1,
|
||||
const scalarList& dMassMT,
|
||||
scalarList& dMassSR,
|
||||
scalar& dhRet
|
||||
)
|
||||
{
|
||||
// Check that model is active
|
||||
if (!td.cloud().surfaceReaction().active() || !canCombust_)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Update mass transfer(s)
|
||||
// - Also updates Y()'s
|
||||
td.cloud().surfaceReaction().calculate
|
||||
(
|
||||
dt,
|
||||
celli,
|
||||
this->d_,
|
||||
T0,
|
||||
T1,
|
||||
this->Tc_,
|
||||
this->pc_,
|
||||
this->rhoc_,
|
||||
this->mass(),
|
||||
dMassMT,
|
||||
YGas_,
|
||||
YLiquid_,
|
||||
YSolid_,
|
||||
this->YMixture_,
|
||||
dMassSR,
|
||||
dhRet
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * //
|
||||
|
||||
#include "ReactingMultiphaseParcelIO.C"
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -0,0 +1,330 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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::ReactingMultiphaseParcel
|
||||
|
||||
Description
|
||||
Multiphase variant of the reacting parcel class with one/two-way coupling
|
||||
with the continuous phase.
|
||||
|
||||
SourceFiles
|
||||
ReactingMultiphaseParcelI.H
|
||||
ReactingMultiphaseParcel.C
|
||||
ReactingMultiphaseParcelIO.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef ReactingMultiphaseParcel_H
|
||||
#define ReactingMultiphaseParcel_H
|
||||
|
||||
#include "ReactingParcel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
template<class ParcelType>
|
||||
class ReactingMultiphaseParcel;
|
||||
|
||||
template<class ParcelType>
|
||||
Ostream& operator<<
|
||||
(
|
||||
Ostream&,
|
||||
const ReactingMultiphaseParcel<ParcelType>&
|
||||
);
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class ReactingMultiphaseParcel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class ParcelType>
|
||||
class ReactingMultiphaseParcel
|
||||
:
|
||||
public ReactingParcel<ParcelType>
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Class to hold reacting particle constant properties
|
||||
class constantProperties
|
||||
:
|
||||
public ReactingParcel<ParcelType>::constantProperties
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Vapourisation temperature [K]
|
||||
const scalar Tvap_;
|
||||
|
||||
//- Boiling point [K]
|
||||
const scalar Tbp_;
|
||||
|
||||
//- Latent heat of devolatilisation [J/kg]
|
||||
const scalar Ldevol_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Constructor
|
||||
constantProperties(const dictionary& dict);
|
||||
|
||||
// Access
|
||||
|
||||
//- Return const access to the vapourisation temperature
|
||||
inline scalar Tvap() const;
|
||||
|
||||
//- Return const access to the boiling point
|
||||
inline scalar Tbp() const;
|
||||
|
||||
//- Return const access to the latent heat of devolatilisation
|
||||
inline scalar Ldevol() const;
|
||||
};
|
||||
|
||||
|
||||
//- Class used to pass reacting tracking data to the trackToFace function
|
||||
class trackData
|
||||
:
|
||||
public ReactingParcel<ParcelType>::trackData
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Particle constant properties
|
||||
const constantProperties& constProps_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
inline trackData
|
||||
(
|
||||
ReactingCloud<ParcelType>& cloud,
|
||||
const constantProperties& constProps,
|
||||
const interpolation<scalar>& rhoInterp,
|
||||
const interpolation<vector>& UInterp,
|
||||
const interpolation<scalar>& muInterp,
|
||||
const interpolation<scalar>& TInterp,
|
||||
const interpolation<scalar>& CpInterp,
|
||||
const interpolation<scalar>& pInterp,
|
||||
const vector& g
|
||||
);
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Return const access to the constant properties
|
||||
inline const constantProperties& constProps() const;
|
||||
};
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
// Parcel properties
|
||||
|
||||
//- Mass fractions of gases []
|
||||
scalarField YGas_;
|
||||
|
||||
//- Mass fractions of liquids []
|
||||
scalarField YLiquid_;
|
||||
|
||||
//- Mass fractions of solids []
|
||||
scalarField YSolid_;
|
||||
|
||||
//- Flag to say that the particle is allowed to combust
|
||||
// Only true after volatile content falls below threshold value
|
||||
bool canCombust_;
|
||||
|
||||
|
||||
// Protected member functions
|
||||
|
||||
//- Calculate Devolatilisation
|
||||
template<class TrackData>
|
||||
void calcDevolatilisation
|
||||
(
|
||||
TrackData& td,
|
||||
const scalar dt,
|
||||
const scalar T0,
|
||||
const scalar T1,
|
||||
scalarList& dMassMT
|
||||
);
|
||||
|
||||
//- Calculate surface reactions
|
||||
template<class TrackData>
|
||||
void calcSurfaceReactions
|
||||
(
|
||||
TrackData& td,
|
||||
const scalar dt,
|
||||
const label celli,
|
||||
const scalar T0,
|
||||
const scalar T1,
|
||||
const scalarList& dMassMT,
|
||||
scalarList& dMassSR,
|
||||
scalar& dhRet
|
||||
);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("ReactingMultiphaseParcel");
|
||||
|
||||
friend class Cloud<ParcelType>;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
inline ReactingMultiphaseParcel
|
||||
(
|
||||
ReactingCloud<ParcelType>& 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
|
||||
);
|
||||
|
||||
//- Construct from Istream
|
||||
ReactingMultiphaseParcel
|
||||
(
|
||||
const Cloud<ParcelType>& c,
|
||||
Istream& is,
|
||||
bool readFields = true
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
autoPtr<ParcelType> clone() const
|
||||
{
|
||||
return autoPtr<ParcelType>
|
||||
(
|
||||
new ReactingMultiphaseParcel<ParcelType>(*this)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
|
||||
//- Return const access to mass fractions of gases
|
||||
inline const scalarField& YGas() const;
|
||||
|
||||
//- Return const access to mass fractions of liquids
|
||||
inline const scalarField& YLiquid() const;
|
||||
|
||||
//- Return const access to mass fractions of solids
|
||||
inline const scalarField& YSolid() const;
|
||||
|
||||
|
||||
// Edit
|
||||
|
||||
//- Return access to mass fractions of gases
|
||||
inline scalarField& YGas();
|
||||
|
||||
//- Return access to mass fractions of liquids
|
||||
inline scalarField& YLiquid();
|
||||
|
||||
//- Return access to mass fractions of solids
|
||||
inline scalarField& YSolid();
|
||||
|
||||
|
||||
// Main calculation loop
|
||||
|
||||
//- Update cell based quantities
|
||||
template<class TrackData>
|
||||
void updateCellQuantities
|
||||
(
|
||||
TrackData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
);
|
||||
|
||||
//- Coupled calculation with the continuous phase
|
||||
template<class TrackData>
|
||||
void calcCoupled
|
||||
(
|
||||
TrackData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
);
|
||||
|
||||
//- Uncoupled calculation with the continuous phase
|
||||
template<class TrackData>
|
||||
void calcUncoupled
|
||||
(
|
||||
TrackData& td,
|
||||
const scalar dt,
|
||||
const label
|
||||
);
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
//- Read
|
||||
static void readFields(ReactingCloud<ParcelType>& c);
|
||||
|
||||
//- Write
|
||||
static void writeFields(const ReactingCloud<ParcelType>& c);
|
||||
|
||||
|
||||
// Ostream Operator
|
||||
|
||||
friend Ostream& operator<< <ParcelType>
|
||||
(
|
||||
Ostream&,
|
||||
const ReactingMultiphaseParcel<ParcelType>&
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "ReactingMultiphaseParcelI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "ReactingMultiphaseParcel.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -0,0 +1,191 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::ReactingMultiphaseParcel<ParcelType>::constantProperties::
|
||||
constantProperties
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
ReactingParcel<ParcelType>::constantProperties(dict),
|
||||
Tvap_(dimensionedScalar(dict.lookup("Tvap")).value()),
|
||||
Tbp_(dimensionedScalar(dict.lookup("Tbp")).value()),
|
||||
Ldevol_(dimensionedScalar(dict.lookup("Ldevol")).value())
|
||||
{}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::ReactingMultiphaseParcel<ParcelType>::trackData::trackData
|
||||
(
|
||||
ReactingCloud<ParcelType>& cloud,
|
||||
const constantProperties& constProps,
|
||||
const interpolation<scalar>& rhoInterp,
|
||||
const interpolation<vector>& UInterp,
|
||||
const interpolation<scalar>& muInterp,
|
||||
const interpolation<scalar>& TInterp,
|
||||
const interpolation<scalar>& CpInterp,
|
||||
const interpolation<scalar>& pInterp,
|
||||
const vector& g
|
||||
)
|
||||
:
|
||||
ReactingParcel<ParcelType>::trackData
|
||||
(
|
||||
cloud,
|
||||
constProps,
|
||||
rhoInterp,
|
||||
UInterp,
|
||||
muInterp,
|
||||
TInterp,
|
||||
CpInterp,
|
||||
pInterp,
|
||||
g
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
||||
(
|
||||
ReactingCloud<ParcelType>& 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
|
||||
)
|
||||
:
|
||||
ReactingParcel<ParcelType>
|
||||
(
|
||||
owner,
|
||||
typeId,
|
||||
position,
|
||||
celli,
|
||||
d0,
|
||||
U0,
|
||||
nParticle0,
|
||||
YMixture0,
|
||||
constProps
|
||||
),
|
||||
YGas_(YGas0),
|
||||
YLiquid_(YLiquid0),
|
||||
YSolid_(YSolid0)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar
|
||||
Foam::ReactingMultiphaseParcel<ParcelType>::constantProperties::Tvap() const
|
||||
{
|
||||
return Tvap_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar
|
||||
Foam::ReactingMultiphaseParcel<ParcelType>::constantProperties::Tbp() const
|
||||
{
|
||||
return Tbp_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar
|
||||
Foam::ReactingMultiphaseParcel<ParcelType>::constantProperties::Ldevol() const
|
||||
{
|
||||
return Ldevol_;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * trackData Member Functions * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
inline const typename Foam::ReactingMultiphaseParcel<ParcelType>::
|
||||
constantProperties&
|
||||
Foam::ReactingMultiphaseParcel<ParcelType>::trackData::constProps() const
|
||||
{
|
||||
return constProps_;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * ThermoParcel Member Functions * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::
|
||||
YGas() const
|
||||
{
|
||||
return YGas_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::YGas()
|
||||
{
|
||||
return YGas_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::
|
||||
YLiquid() const
|
||||
{
|
||||
return YLiquid_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::YLiquid()
|
||||
{
|
||||
return YLiquid_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::
|
||||
YSolid() const
|
||||
{
|
||||
return YSolid_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::YSolid()
|
||||
{
|
||||
return YSolid_;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,276 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "ReactingMultiphaseParcel.H"
|
||||
#include "IOstreams.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
||||
(
|
||||
const Cloud<ParcelType>& cloud,
|
||||
Istream& is,
|
||||
bool readFields
|
||||
)
|
||||
:
|
||||
ReactingParcel<ParcelType>(cloud, is, readFields),
|
||||
YGas_(0),
|
||||
YLiquid_(0),
|
||||
YSolid_(0)
|
||||
{
|
||||
if (readFields)
|
||||
{
|
||||
const ReactingCloud<ParcelType>& cR =
|
||||
dynamic_cast<const ReactingCloud<ParcelType>& >(cloud);
|
||||
|
||||
const label nGas = cR.composition().gasNames().size();
|
||||
const label nLiquid = cR.composition().liquidNames().size();
|
||||
const label nSolid = cR.composition().solidNames().size();
|
||||
|
||||
YGas_.setSize(nGas);
|
||||
YLiquid_.setSize(nLiquid);
|
||||
YSolid_.setSize(nSolid);
|
||||
|
||||
const scalarField& YMix = this->YMixture_;
|
||||
if (is.format() == IOstream::ASCII)
|
||||
{
|
||||
is >> YGas_ >> YLiquid_ >> YSolid_;
|
||||
YGas_ /= YMix[0] + VSMALL;
|
||||
YLiquid_ /= YMix[1] + VSMALL;
|
||||
YSolid_ /= YMix[2] + VSMALL;
|
||||
}
|
||||
else
|
||||
{
|
||||
is >> YGas_ >> YLiquid_ >> YSolid_;
|
||||
YGas_ /= YMix[0] + VSMALL;
|
||||
YLiquid_ /= YMix[1] + VSMALL;
|
||||
YSolid_ /= YMix[2] + VSMALL;
|
||||
}
|
||||
}
|
||||
|
||||
// Check state of Istream
|
||||
is.check
|
||||
(
|
||||
"ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel\n"
|
||||
"(\n"
|
||||
" const Cloud<ParcelType>&,\n"
|
||||
" Istream&,\n"
|
||||
" bool\n"
|
||||
")"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
|
||||
(
|
||||
ReactingCloud<ParcelType>& c
|
||||
)
|
||||
{
|
||||
if (!c.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ReactingParcel<ParcelType>::readFields(c);
|
||||
|
||||
// Get names and sizes for each Y...
|
||||
const wordList gasNames = c.composition().gasNames();
|
||||
const wordList liquidNames = c.composition().liquidNames();
|
||||
const wordList solidNames = c.composition().solidNames();
|
||||
const label nGas = gasNames.size();
|
||||
const label nLiquid = liquidNames.size();
|
||||
const label nSolid = solidNames.size();
|
||||
|
||||
// Set storage for each Y... for each parcel
|
||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
||||
{
|
||||
ReactingMultiphaseParcel<ParcelType>& p = iter();
|
||||
p.YGas_.setSize(nGas, 0.0);
|
||||
p.YLiquid_.setSize(nLiquid, 0.0);
|
||||
p.YSolid_.setSize(nSolid, 0.0);
|
||||
}
|
||||
|
||||
// Populate YGas for each parcel
|
||||
forAll(gasNames, j)
|
||||
{
|
||||
IOField<scalar> YGas
|
||||
(
|
||||
c.fieldIOobject("Y" + gasNames[j], IOobject::MUST_READ)
|
||||
);
|
||||
|
||||
label i = 0;
|
||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
||||
{
|
||||
ReactingMultiphaseParcel<ParcelType>& p = iter();
|
||||
p.YGas_[j] = YGas[i++]/p.YMixture()[0];
|
||||
}
|
||||
}
|
||||
// Populate YLiquid for each parcel
|
||||
forAll(liquidNames, j)
|
||||
{
|
||||
IOField<scalar> YLiquid
|
||||
(
|
||||
c.fieldIOobject("Y" + liquidNames[j], IOobject::MUST_READ)
|
||||
);
|
||||
|
||||
label i = 0;
|
||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
||||
{
|
||||
ReactingMultiphaseParcel<ParcelType>& p = iter();
|
||||
p.YLiquid_[j] = YLiquid[i++]/p.YMixture()[1];
|
||||
}
|
||||
}
|
||||
// Populate YSolid for each parcel
|
||||
forAll(solidNames, j)
|
||||
{
|
||||
IOField<scalar> YSolid
|
||||
(
|
||||
c.fieldIOobject("Y" + solidNames[j], IOobject::MUST_READ)
|
||||
);
|
||||
|
||||
label i = 0;
|
||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
||||
{
|
||||
ReactingMultiphaseParcel<ParcelType>& p = iter();
|
||||
p.YSolid_[j] = YSolid[i++]/p.YMixture()[2];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields
|
||||
(
|
||||
const ReactingCloud<ParcelType>& c
|
||||
)
|
||||
{
|
||||
ReactingParcel<ParcelType>::writeFields(c);
|
||||
|
||||
label np = c.size();
|
||||
|
||||
// Write the composition fractions
|
||||
if (np > 0)
|
||||
{
|
||||
const wordList& gasNames = c.composition().gasNames();
|
||||
forAll(gasNames, j)
|
||||
{
|
||||
IOField<scalar> YGas
|
||||
(
|
||||
c.fieldIOobject("Y" + gasNames[j], IOobject::NO_READ),
|
||||
np
|
||||
);
|
||||
|
||||
label i = 0;
|
||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
||||
{
|
||||
const ReactingMultiphaseParcel<ParcelType>& p0 = iter();
|
||||
YGas[i++] = p0.YGas()[j]*p0.YMixture()[0];
|
||||
}
|
||||
|
||||
YGas.write();
|
||||
}
|
||||
const wordList& liquidNames = c.composition().liquidNames();
|
||||
forAll(liquidNames, j)
|
||||
{
|
||||
IOField<scalar> YLiquid
|
||||
(
|
||||
c.fieldIOobject("Y" + liquidNames[j], IOobject::NO_READ),
|
||||
np
|
||||
);
|
||||
|
||||
label i = 0;
|
||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
||||
{
|
||||
const ReactingMultiphaseParcel<ParcelType>& p0 = iter();
|
||||
YLiquid[i++] = p0.YLiquid()[j]*p0.YMixture()[1];
|
||||
}
|
||||
|
||||
YLiquid.write();
|
||||
}
|
||||
const wordList& solidNames = c.composition().solidNames();
|
||||
forAll(solidNames, j)
|
||||
{
|
||||
IOField<scalar> YSolid
|
||||
(
|
||||
c.fieldIOobject("Y" + solidNames[j], IOobject::NO_READ),
|
||||
np
|
||||
);
|
||||
|
||||
label i = 0;
|
||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
||||
{
|
||||
const ReactingMultiphaseParcel<ParcelType>& p0 = iter();
|
||||
YSolid[i++] = p0.YSolid()[j]*p0.YMixture()[2];
|
||||
}
|
||||
|
||||
YSolid.write();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::Ostream& Foam::operator<<
|
||||
(
|
||||
Ostream& os,
|
||||
const ReactingMultiphaseParcel<ParcelType>& p
|
||||
)
|
||||
{
|
||||
scalarField YGasLoc = p.YGas()*p.YMixture()[0];
|
||||
scalarField YLiquidLoc = p.YLiquid()*p.YMixture()[1];
|
||||
scalarField YSolidLoc = p.YSolid()*p.YMixture()[2];
|
||||
if (os.format() == IOstream::ASCII)
|
||||
{
|
||||
os << static_cast<const ReactingParcel<ParcelType>& >(p)
|
||||
<< token::SPACE << YGasLoc
|
||||
<< token::SPACE << YLiquidLoc
|
||||
<< token::SPACE << YSolidLoc;
|
||||
}
|
||||
else
|
||||
{
|
||||
os << static_cast<const ReactingParcel<ParcelType>& >(p);
|
||||
os << YGasLoc << YLiquidLoc << YSolidLoc;
|
||||
}
|
||||
|
||||
// Check state of Ostream
|
||||
os.check
|
||||
(
|
||||
"Ostream& operator<<\n"
|
||||
"(\n"
|
||||
" Ostream&,\n"
|
||||
" const ReactingMultiphaseParcel<ParcelType>&\n"
|
||||
")"
|
||||
);
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -94,8 +94,14 @@ void Foam::ReactingParcel<ParcelType>::calcCoupled
|
||||
scalar T1 = calcHeatTransfer(td, dt, celli, htc, dhTrans);
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Calculate phase change
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~
|
||||
calcPhaseChange(td, dt, T0, T1, dMassMT);
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Calculate Devolatilisation
|
||||
// Calculate devolatilisation
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
calcDevolatilisation(td, dt, T0, T1, dMassMT);
|
||||
|
||||
@ -112,29 +118,11 @@ void Foam::ReactingParcel<ParcelType>::calcCoupled
|
||||
// New total mass
|
||||
const scalar mass1 = mass0 - sum(dMassMT) - sum(dMassSR);
|
||||
|
||||
// Correct particle temperature to account for latent heat of
|
||||
// devolatilisation
|
||||
T1 -=
|
||||
td.constProps().Ldevol()
|
||||
*sum(dMassMT)
|
||||
/(0.5*(mass0 + mass1)*cp0);
|
||||
|
||||
// Add retained enthalpy from surface reaction to particle and remove
|
||||
// from gas
|
||||
T1 += dhRet/(0.5*(mass0 + mass1)*cp0);
|
||||
dhTrans -= dhRet;
|
||||
|
||||
// Correct dhTrans to account for enthalpy of evolved volatiles
|
||||
dhTrans +=
|
||||
sum(dMassMT)
|
||||
*td.cloud().composition().HGas(YGas_, 0.5*(T0 + T1));
|
||||
|
||||
// Correct dhTrans to account for enthalpy of consumed solids
|
||||
dhTrans +=
|
||||
sum(dMassSR)
|
||||
*td.cloud().composition().HSolid(YSolid_, 0.5*(T0 + T1));
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Accumulate source terms
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -171,12 +159,6 @@ void Foam::ReactingParcel<ParcelType>::calcCoupled
|
||||
{
|
||||
td.cloud().rhoTrans(i)[celli] += np0*dMassMT[i];
|
||||
}
|
||||
td.cloud().hTrans()[celli] +=
|
||||
np0*mass1
|
||||
*(
|
||||
YMixture_[0]*td.cloud().composition().HGas(YGas_, T1)
|
||||
+ YMixture_[2]*td.cloud().composition().HSolid(YSolid_, T1)
|
||||
);
|
||||
td.cloud().UTrans()[celli] += np0*mass1*U1;
|
||||
}
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -186,10 +168,7 @@ void Foam::ReactingParcel<ParcelType>::calcCoupled
|
||||
{
|
||||
this->U_ = U1;
|
||||
this->T_ = T1;
|
||||
this->cp_ =
|
||||
YMixture_[0]*td.cloud().composition().cpGas(YGas_, T1)
|
||||
+ YMixture_[1]*td.cloud().composition().cpLiquid(YLiquid_, pc_, T1)
|
||||
+ YMixture_[2]*td.cloud().composition().cpSolid(YSolid_);
|
||||
// this->cp_ = ??? // TODO:
|
||||
|
||||
// Update particle density or diameter
|
||||
if (td.constProps().constantVolume())
|
||||
@ -253,8 +232,14 @@ void Foam::ReactingParcel<ParcelType>::calcUncoupled
|
||||
scalar T1 = calcHeatTransfer(td, dt, celli, htc, dhTrans);
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Calculate phase change
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~
|
||||
calcPhaseChange(td, dt, T0, T1, dMassMT);
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Calculate Devolatilisation
|
||||
// Calculate devolatilisation
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
calcDevolatilisation(td, dt, T0, T1, dMassMT);
|
||||
|
||||
@ -272,10 +257,7 @@ void Foam::ReactingParcel<ParcelType>::calcUncoupled
|
||||
const scalar mass1 = mass0 - sum(dMassMT) - sum(dMassSR);
|
||||
|
||||
// New specific heat capacity
|
||||
const scalar cp1 =
|
||||
YMixture_[0]*td.cloud().composition().cpGas(YGas_, T1)
|
||||
+ YMixture_[1]*td.cloud().composition().cpLiquid(YLiquid_, pc_, T1)
|
||||
+ YMixture_[2]*td.cloud().composition().cpSolid(YSolid_);
|
||||
const scalar cp1 = cp0; // TODO: new cp1
|
||||
|
||||
// Add retained enthalpy to particle
|
||||
T1 += dhRet/(mass0*0.5*(cp0 + cp1));
|
||||
@ -311,7 +293,7 @@ void Foam::ReactingParcel<ParcelType>::calcUncoupled
|
||||
|
||||
template<class ParcelType>
|
||||
template<class TrackData>
|
||||
void Foam::ReactingParcel<ParcelType>::calcDevolatilisation
|
||||
void Foam::ReactingParcel<ParcelType>::calcPhaseChange
|
||||
(
|
||||
TrackData& td,
|
||||
const scalar dt,
|
||||
@ -320,28 +302,12 @@ void Foam::ReactingParcel<ParcelType>::calcDevolatilisation
|
||||
scalarList& dMassMT
|
||||
)
|
||||
{
|
||||
if (td.cloud().composition().YMixture0()[1]>SMALL)
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"void Foam::ReactingParcel<ParcelType>::"
|
||||
"calcDevolatilisation(...): no treatment currently "
|
||||
"available for particles containing liquid species"
|
||||
)
|
||||
}
|
||||
|
||||
// Check that model is active, and that the parcel temperature is
|
||||
// within necessary limits for devolatilisation to occur
|
||||
if
|
||||
(
|
||||
!td.cloud().devolatilisation().active()
|
||||
|| this->T_<td.constProps().Tvap()
|
||||
|| this->T_<td.constProps().Tbp()
|
||||
)
|
||||
// if (!td.cloud().phaseChange().active())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
// Determine mass to add to carrier phase
|
||||
const scalar mass = this->mass();
|
||||
const scalar dMassTot = td.cloud().devolatilisation().calculate
|
||||
@ -369,50 +335,7 @@ void Foam::ReactingParcel<ParcelType>::calcDevolatilisation
|
||||
scalar volatileMass = YGas_[i]*dMassTot;
|
||||
dMassMT[id] += volatileMass;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class TrackData>
|
||||
void Foam::ReactingParcel<ParcelType>::calcSurfaceReactions
|
||||
(
|
||||
TrackData& td,
|
||||
const scalar dt,
|
||||
const label celli,
|
||||
const scalar T0,
|
||||
const scalar T1,
|
||||
const scalarList& dMassMT,
|
||||
scalarList& dMassSR,
|
||||
scalar& dhRet
|
||||
)
|
||||
{
|
||||
// Check that model is active
|
||||
if (!td.cloud().surfaceReaction().active() || !canCombust_)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Update mass transfer(s)
|
||||
// - Also updates Y()'s
|
||||
td.cloud().surfaceReaction().calculate
|
||||
(
|
||||
dt,
|
||||
celli,
|
||||
this->d_,
|
||||
T0,
|
||||
T1,
|
||||
this->Tc_,
|
||||
pc_,
|
||||
this->rhoc_,
|
||||
this->mass(),
|
||||
dMassMT,
|
||||
YGas_,
|
||||
YLiquid_,
|
||||
YSolid_,
|
||||
YMixture_,
|
||||
dMassSR,
|
||||
dhRet
|
||||
);
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -26,9 +26,8 @@ Class
|
||||
Foam::ReactingParcel
|
||||
|
||||
Description
|
||||
Reactinf parcel class with one/two-way coupling with the continuous
|
||||
phase. Includes thermo parcel sub-models, plus:
|
||||
- combustion
|
||||
Reacting parcel class with one/two-way coupling with the continuous
|
||||
phase.
|
||||
|
||||
SourceFiles
|
||||
ReactingParcelI.H
|
||||
@ -80,18 +79,8 @@ public:
|
||||
:
|
||||
public ThermoParcel<ParcelType>::constantProperties
|
||||
{
|
||||
|
||||
// Private data
|
||||
|
||||
//- Vapourisation temperature [K]
|
||||
const scalar Tvap_;
|
||||
|
||||
//- Boiling point [K]
|
||||
const scalar Tbp_;
|
||||
|
||||
//- Latent heat of devolatilisation [J/kg]
|
||||
const scalar Ldevol_;
|
||||
|
||||
//- Constant volume flag - e.g. during mass transfer
|
||||
Switch constantVolume_;
|
||||
|
||||
@ -103,15 +92,6 @@ public:
|
||||
|
||||
// Access
|
||||
|
||||
//- Return const access to the vapourisation temperature
|
||||
inline scalar Tvap() const;
|
||||
|
||||
//- Return const access to the boiling point
|
||||
inline scalar Tbp() const;
|
||||
|
||||
//- Return const access to the latent heat of devolatilisation
|
||||
inline scalar Ldevol() const;
|
||||
|
||||
//- Return const access to the constant volume flag
|
||||
inline Switch constantVolume() const;
|
||||
};
|
||||
@ -180,19 +160,6 @@ protected:
|
||||
//- Mass fractions of mixture []
|
||||
scalarField YMixture_;
|
||||
|
||||
//- Mass fractions of gases []
|
||||
scalarField YGas_;
|
||||
|
||||
//- Mass fractions of liquids []
|
||||
scalarField YLiquid_;
|
||||
|
||||
//- Mass fractions of solids []
|
||||
scalarField YSolid_;
|
||||
|
||||
//- Flag to say that the particle is allowed to combust
|
||||
// Only true after volatile content falls below threshold value
|
||||
bool canCombust_;
|
||||
|
||||
|
||||
// Cell-based quantities
|
||||
|
||||
@ -202,9 +169,9 @@ protected:
|
||||
|
||||
// Protected member functions
|
||||
|
||||
//- Calculate Devolatilisation
|
||||
//- Calculate Phase change
|
||||
template<class TrackData>
|
||||
void calcDevolatilisation
|
||||
void calcPhaseChange
|
||||
(
|
||||
TrackData& td,
|
||||
const scalar dt,
|
||||
@ -213,20 +180,6 @@ protected:
|
||||
scalarList& dMassMT
|
||||
);
|
||||
|
||||
//- Calculate surface reactions
|
||||
template<class TrackData>
|
||||
void calcSurfaceReactions
|
||||
(
|
||||
TrackData& td,
|
||||
const scalar dt,
|
||||
const label celli,
|
||||
const scalar T0,
|
||||
const scalar T1,
|
||||
const scalarList& dMassMT,
|
||||
scalarList& dMassSR,
|
||||
scalar& dhRet
|
||||
);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -248,9 +201,6 @@ public:
|
||||
const scalar d0,
|
||||
const vector& U0,
|
||||
const scalar nParticle0,
|
||||
const scalarField& YGas0,
|
||||
const scalarField& YLiquid0,
|
||||
const scalarField& YSolid0,
|
||||
const scalarField& YMixture0,
|
||||
const constantProperties& constProps
|
||||
);
|
||||
@ -274,39 +224,24 @@ public:
|
||||
|
||||
// Access
|
||||
|
||||
//- Return const access to mass fractions of gases
|
||||
inline const scalarField& YGas() const;
|
||||
|
||||
//- Return const access to mass fractions of liquids
|
||||
inline const scalarField& YLiquid() const;
|
||||
|
||||
//- Return const access to mass fractions of solids
|
||||
inline const scalarField& YSolid() const;
|
||||
//- Return const access to initial mass
|
||||
inline scalar mass0() const;
|
||||
|
||||
//- Return const access to mass fractions of mixture
|
||||
inline const scalarField& YMixture() const;
|
||||
|
||||
//- Return const access to initial mass
|
||||
inline scalar mass0() const;
|
||||
//- Return the owner cell pressure
|
||||
inline scalar pc() const;
|
||||
|
||||
|
||||
// Edit
|
||||
|
||||
//- Return access to mass fractions of gases
|
||||
inline scalarField& YGas();
|
||||
|
||||
//- Return access to mass fractions of liquids
|
||||
inline scalarField& YLiquid();
|
||||
|
||||
//- Return access to mass fractions of solids
|
||||
inline scalarField& YSolid();
|
||||
//- Return access to initial mass
|
||||
inline scalar& mass0();
|
||||
|
||||
//- Return access to mass fractions of mixture
|
||||
inline scalarField& YMixture();
|
||||
|
||||
//- Return access to initial mass
|
||||
inline scalar& mass0();
|
||||
|
||||
|
||||
// Main calculation loop
|
||||
|
||||
@ -340,8 +275,10 @@ public:
|
||||
|
||||
// I-O
|
||||
|
||||
//- Read
|
||||
static void readFields(ReactingCloud<ParcelType>& c);
|
||||
|
||||
//- Write
|
||||
static void writeFields(const ReactingCloud<ParcelType>& c);
|
||||
|
||||
|
||||
|
||||
@ -33,9 +33,6 @@ inline Foam::ReactingParcel<ParcelType>::constantProperties::constantProperties
|
||||
)
|
||||
:
|
||||
ThermoParcel<ParcelType>::constantProperties(dict),
|
||||
Tvap_(dimensionedScalar(dict.lookup("Tvap")).value()),
|
||||
Tbp_(dimensionedScalar(dict.lookup("Tbp")).value()),
|
||||
Ldevol_(dimensionedScalar(dict.lookup("Ldevol")).value()),
|
||||
constantVolume_(dict.lookup("constantVolume"))
|
||||
{}
|
||||
|
||||
@ -81,9 +78,6 @@ inline Foam::ReactingParcel<ParcelType>::ReactingParcel
|
||||
const scalar d0,
|
||||
const vector& U0,
|
||||
const scalar nParticle0,
|
||||
const scalarField& YGas0,
|
||||
const scalarField& YLiquid0,
|
||||
const scalarField& YSolid0,
|
||||
const scalarField& YMixture0,
|
||||
const constantProperties& constProps
|
||||
)
|
||||
@ -101,9 +95,6 @@ inline Foam::ReactingParcel<ParcelType>::ReactingParcel
|
||||
),
|
||||
mass0_(0.0),
|
||||
YMixture_(YMixture0),
|
||||
YGas_(YGas0),
|
||||
YLiquid_(YLiquid0),
|
||||
YSolid_(YSolid0),
|
||||
pc_(0.0)
|
||||
{
|
||||
// Set initial parcel mass
|
||||
@ -113,30 +104,6 @@ inline Foam::ReactingParcel<ParcelType>::ReactingParcel
|
||||
|
||||
// * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar
|
||||
Foam::ReactingParcel<ParcelType>::constantProperties::Tvap() const
|
||||
{
|
||||
return Tvap_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar
|
||||
Foam::ReactingParcel<ParcelType>::constantProperties::Tbp() const
|
||||
{
|
||||
return Tbp_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar
|
||||
Foam::ReactingParcel<ParcelType>::constantProperties::Ldevol() const
|
||||
{
|
||||
return Ldevol_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::Switch
|
||||
Foam::ReactingParcel<ParcelType>::constantProperties::constantVolume() const
|
||||
@ -173,62 +140,6 @@ Foam::ReactingParcel<ParcelType>::trackData::pInterp() const
|
||||
|
||||
// * * * * * * * * * * ThermoParcel Member Functions * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::scalarField& Foam::ReactingParcel<ParcelType>::YGas() const
|
||||
{
|
||||
return YGas_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalarField& Foam::ReactingParcel<ParcelType>::YGas()
|
||||
{
|
||||
return YGas_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::scalarField& Foam::ReactingParcel<ParcelType>::YLiquid() const
|
||||
{
|
||||
return YLiquid_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalarField& Foam::ReactingParcel<ParcelType>::YLiquid()
|
||||
{
|
||||
return YLiquid_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::scalarField& Foam::ReactingParcel<ParcelType>::YSolid() const
|
||||
{
|
||||
return YSolid_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalarField& Foam::ReactingParcel<ParcelType>::YSolid()
|
||||
{
|
||||
return YSolid_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::scalarField& Foam::ReactingParcel<ParcelType>::YMixture() const
|
||||
{
|
||||
return YMixture_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalarField& Foam::ReactingParcel<ParcelType>::YMixture()
|
||||
{
|
||||
return YMixture_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar Foam::ReactingParcel<ParcelType>::mass0() const
|
||||
{
|
||||
@ -236,6 +147,21 @@ inline Foam::scalar Foam::ReactingParcel<ParcelType>::mass0() const
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::scalarField& Foam::ReactingParcel<ParcelType>::
|
||||
YMixture() const
|
||||
{
|
||||
return YMixture_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar Foam::ReactingParcel<ParcelType>::pc() const
|
||||
{
|
||||
return pc_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar& Foam::ReactingParcel<ParcelType>::mass0()
|
||||
{
|
||||
@ -243,4 +169,11 @@ inline Foam::scalar& Foam::ReactingParcel<ParcelType>::mass0()
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalarField& Foam::ReactingParcel<ParcelType>::YMixture()
|
||||
{
|
||||
return YMixture_;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -40,9 +40,6 @@ Foam::ReactingParcel<ParcelType>::ReactingParcel
|
||||
ThermoParcel<ParcelType>(cloud, is, readFields),
|
||||
mass0_(0.0),
|
||||
YMixture_(0),
|
||||
YGas_(0),
|
||||
YLiquid_(0),
|
||||
YSolid_(0),
|
||||
pc_(0.0)
|
||||
{
|
||||
if (readFields)
|
||||
@ -51,21 +48,11 @@ Foam::ReactingParcel<ParcelType>::ReactingParcel
|
||||
dynamic_cast<const ReactingCloud<ParcelType>& >(cloud);
|
||||
|
||||
const label nMixture = cR.composition().compositionNames().size();
|
||||
const label nGas = cR.composition().gasNames().size();
|
||||
const label nLiquid = cR.composition().liquidNames().size();
|
||||
const label nSolid = cR.composition().solidNames().size();
|
||||
|
||||
YMixture_.setSize(nMixture);
|
||||
YGas_.setSize(nGas);
|
||||
YLiquid_.setSize(nLiquid);
|
||||
YSolid_.setSize(nSolid);
|
||||
|
||||
if (is.format() == IOstream::ASCII)
|
||||
{
|
||||
is >> mass0_ >> YMixture_ >> YGas_ >> YLiquid_ >> YSolid_;
|
||||
YGas_ /= YMixture_[0] + VSMALL;
|
||||
YLiquid_ /= YMixture_[1] + VSMALL;
|
||||
YSolid_ /= YMixture_[2] + VSMALL;
|
||||
is >> mass0_ >> YMixture_;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -74,18 +61,19 @@ Foam::ReactingParcel<ParcelType>::ReactingParcel
|
||||
reinterpret_cast<char*>(&mass0_),
|
||||
+ sizeof(mass0_)
|
||||
);
|
||||
is >> YMixture_ >> YGas_ >> YLiquid_ >> YSolid_;
|
||||
YGas_ /= YMixture_[0] + VSMALL;
|
||||
YLiquid_ /= YMixture_[1] + VSMALL;
|
||||
YSolid_ /= YMixture_[2] + VSMALL;
|
||||
is >> YMixture_;
|
||||
}
|
||||
}
|
||||
|
||||
// Check state of Istream
|
||||
is.check
|
||||
(
|
||||
"ReactingParcel<ParcelType>::ReactingParcel"
|
||||
"(const Cloud<ParcelType>&, Istream&, bool)"
|
||||
"ReactingParcel<ParcelType>::ReactingParcel\n"
|
||||
"(\n"
|
||||
" const Cloud<ParcelType>&,\n"
|
||||
" Istream&,\n"
|
||||
" bool\n"
|
||||
")\n"
|
||||
);
|
||||
}
|
||||
|
||||
@ -115,22 +103,13 @@ void Foam::ReactingParcel<ParcelType>::readFields
|
||||
|
||||
// Get names and sizes for each Y...
|
||||
const wordList compositionNames = c.composition().compositionNames();
|
||||
const wordList gasNames = c.composition().gasNames();
|
||||
const wordList liquidNames = c.composition().liquidNames();
|
||||
const wordList solidNames = c.composition().solidNames();
|
||||
const label nComposition = compositionNames.size();
|
||||
const label nGas = gasNames.size();
|
||||
const label nLiquid = liquidNames.size();
|
||||
const label nSolid = solidNames.size();
|
||||
|
||||
// Set storage for each Y... for each parcel
|
||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
||||
{
|
||||
ReactingParcel<ParcelType>& p = iter();
|
||||
p.YMixture_.setSize(nComposition, 0.0);
|
||||
p.YGas_.setSize(nGas, 0.0);
|
||||
p.YLiquid_.setSize(nLiquid, 0.0);
|
||||
p.YSolid_.setSize(nSolid, 0.0);
|
||||
}
|
||||
|
||||
// Populate YMixture for each parcel
|
||||
@ -148,51 +127,6 @@ void Foam::ReactingParcel<ParcelType>::readFields
|
||||
p.YMixture_[j] = YMixture[i++];
|
||||
}
|
||||
}
|
||||
// Populate YGas for each parcel
|
||||
forAll(gasNames, j)
|
||||
{
|
||||
IOField<scalar> YGas
|
||||
(
|
||||
c.fieldIOobject("Y" + gasNames[j], IOobject::MUST_READ)
|
||||
);
|
||||
|
||||
label i = 0;
|
||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
||||
{
|
||||
ReactingParcel<ParcelType>& p = iter();
|
||||
p.YGas_[j] = YGas[i++]/p.YMixture_[0];
|
||||
}
|
||||
}
|
||||
// Populate YLiquid for each parcel
|
||||
forAll(liquidNames, j)
|
||||
{
|
||||
IOField<scalar> YLiquid
|
||||
(
|
||||
c.fieldIOobject("Y" + liquidNames[j], IOobject::MUST_READ)
|
||||
);
|
||||
|
||||
label i = 0;
|
||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
||||
{
|
||||
ReactingParcel<ParcelType>& p = iter();
|
||||
p.YLiquid_[j] = YLiquid[i++]/p.YMixture_[1];
|
||||
}
|
||||
}
|
||||
// Populate YSolid for each parcel
|
||||
forAll(solidNames, j)
|
||||
{
|
||||
IOField<scalar> YSolid
|
||||
(
|
||||
c.fieldIOobject("Y" + solidNames[j], IOobject::MUST_READ)
|
||||
);
|
||||
|
||||
label i = 0;
|
||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
||||
{
|
||||
ReactingParcel<ParcelType>& p = iter();
|
||||
p.YSolid_[j] = YSolid[i++]/p.YMixture_[2];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -238,60 +172,6 @@ void Foam::ReactingParcel<ParcelType>::writeFields
|
||||
|
||||
YMixture.write();
|
||||
}
|
||||
const wordList& gasNames = c.composition().gasNames();
|
||||
forAll(gasNames, j)
|
||||
{
|
||||
IOField<scalar> YGas
|
||||
(
|
||||
c.fieldIOobject("Y" + gasNames[j], IOobject::NO_READ),
|
||||
np
|
||||
);
|
||||
|
||||
label i = 0;
|
||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
||||
{
|
||||
const ReactingParcel<ParcelType>& p0 = iter();
|
||||
YGas[i++] = p0.YGas()[j]*p0.YMixture()[0];
|
||||
}
|
||||
|
||||
YGas.write();
|
||||
}
|
||||
const wordList& liquidNames = c.composition().liquidNames();
|
||||
forAll(liquidNames, j)
|
||||
{
|
||||
IOField<scalar> YLiquid
|
||||
(
|
||||
c.fieldIOobject("Y" + liquidNames[j], IOobject::NO_READ),
|
||||
np
|
||||
);
|
||||
|
||||
label i = 0;
|
||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
||||
{
|
||||
const ReactingParcel<ParcelType>& p0 = iter();
|
||||
YLiquid[i++] = p0.YLiquid()[j]*p0.YMixture()[1];
|
||||
}
|
||||
|
||||
YLiquid.write();
|
||||
}
|
||||
const wordList& solidNames = c.composition().solidNames();
|
||||
forAll(solidNames, j)
|
||||
{
|
||||
IOField<scalar> YSolid
|
||||
(
|
||||
c.fieldIOobject("Y" + solidNames[j], IOobject::NO_READ),
|
||||
np
|
||||
);
|
||||
|
||||
label i = 0;
|
||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
||||
{
|
||||
const ReactingParcel<ParcelType>& p0 = iter();
|
||||
YSolid[i++] = p0.YSolid()[j]*p0.YMixture()[2];
|
||||
}
|
||||
|
||||
YSolid.write();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -305,17 +185,11 @@ Foam::Ostream& Foam::operator<<
|
||||
const ReactingParcel<ParcelType>& p
|
||||
)
|
||||
{
|
||||
scalarField YGasLoc = p.YGas()*p.YMixture()[0];
|
||||
scalarField YLiquidLoc = p.YLiquid()*p.YMixture()[1];
|
||||
scalarField YSolidLoc = p.YSolid()*p.YMixture()[2];
|
||||
if (os.format() == IOstream::ASCII)
|
||||
{
|
||||
os << static_cast<const ThermoParcel<ParcelType>& >(p)
|
||||
<< token::SPACE << p.mass0()
|
||||
<< token::SPACE << p.YMixture()
|
||||
<< token::SPACE << YGasLoc
|
||||
<< token::SPACE << YLiquidLoc
|
||||
<< token::SPACE << YSolidLoc;
|
||||
<< token::SPACE << p.YMixture();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -325,7 +199,7 @@ Foam::Ostream& Foam::operator<<
|
||||
reinterpret_cast<const char*>(&p.mass0_),
|
||||
sizeof(p.mass0())
|
||||
);
|
||||
os << p.YMixture() << YGasLoc << YLiquidLoc << YSolidLoc;
|
||||
os << p.YMixture();
|
||||
}
|
||||
|
||||
// Check state of Ostream
|
||||
|
||||
@ -0,0 +1,97 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "basicReactingMultiphaseParcel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(basicReactingMultiphaseParcel, 0);
|
||||
defineParticleTypeNameAndDebug(basicReactingMultiphaseParcel, 0);
|
||||
defineParcelTypeNameAndDebug(basicReactingMultiphaseParcel, 0);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::basicReactingMultiphaseParcel::basicReactingMultiphaseParcel
|
||||
(
|
||||
ReactingCloud<basicReactingMultiphaseParcel>& 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
|
||||
)
|
||||
:
|
||||
ReactingMultiphaseParcel<basicReactingMultiphaseParcel>
|
||||
(
|
||||
owner,
|
||||
typeId,
|
||||
position,
|
||||
celli,
|
||||
d0,
|
||||
U0,
|
||||
nParticle0,
|
||||
YGas0,
|
||||
YLiquid0,
|
||||
YSolid0,
|
||||
YMixture0,
|
||||
constProps
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
Foam::basicReactingMultiphaseParcel::basicReactingMultiphaseParcel
|
||||
(
|
||||
const Cloud<basicReactingMultiphaseParcel>& cloud,
|
||||
Istream& is,
|
||||
bool readFields
|
||||
)
|
||||
:
|
||||
ReactingMultiphaseParcel<basicReactingMultiphaseParcel>
|
||||
(
|
||||
cloud,
|
||||
is,
|
||||
readFields
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::basicReactingMultiphaseParcel::~basicReactingMultiphaseParcel()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,116 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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::basicReactingMultiphaseParcel
|
||||
|
||||
Description
|
||||
|
||||
|
||||
SourceFiles
|
||||
basicReactingMultiphaseParcel.C
|
||||
basicReactingMultiphaseParcelIO.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef basicReactingMultiphaseParcel_H
|
||||
#define basicReactingMultiphaseParcel_H
|
||||
|
||||
#include "ReactingMultiphaseParcel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class basicReactingMultiphaseParcel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class basicReactingMultiphaseParcel
|
||||
:
|
||||
public ReactingMultiphaseParcel<basicReactingMultiphaseParcel>
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Run-time type information
|
||||
TypeName("basicReactingMultiphaseParcel");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
basicReactingMultiphaseParcel
|
||||
(
|
||||
ReactingCloud<basicReactingMultiphaseParcel>& 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
|
||||
);
|
||||
|
||||
//- Construct from Istream
|
||||
basicReactingMultiphaseParcel
|
||||
(
|
||||
const Cloud<basicReactingMultiphaseParcel>& c,
|
||||
Istream& is,
|
||||
bool readFields = true
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
autoPtr<basicReactingMultiphaseParcel> clone() const
|
||||
{
|
||||
return autoPtr<basicReactingMultiphaseParcel>
|
||||
(new basicReactingMultiphaseParcel(*this));
|
||||
}
|
||||
|
||||
|
||||
// Destructor
|
||||
virtual ~basicReactingMultiphaseParcel();
|
||||
};
|
||||
|
||||
|
||||
template<>
|
||||
inline bool contiguous<basicReactingMultiphaseParcel>()
|
||||
{
|
||||
return false; // Now have scalar lists/fields (mass fractions)
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "basicReactingMultiphaseParcel.H"
|
||||
#include "ReactingCloud.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTemplateTypeNameAndDebug(Cloud<basicReactingMultiphaseParcel>, 0);
|
||||
|
||||
defineParcelTypeNameAndDebug
|
||||
(
|
||||
KinematicParcel<basicReactingMultiphaseParcel>,
|
||||
0
|
||||
);
|
||||
// defineTemplateTypeNameAndDebug
|
||||
// (
|
||||
// KinematicParcel<basicReactingMultiphaseParcel>,
|
||||
// 0
|
||||
// );
|
||||
defineParcelTypeNameAndDebug
|
||||
(
|
||||
ThermoParcel<basicReactingMultiphaseParcel>,
|
||||
0
|
||||
);
|
||||
defineTemplateTypeNameAndDebug
|
||||
(
|
||||
ThermoParcel<basicReactingMultiphaseParcel>,
|
||||
0
|
||||
);
|
||||
defineParcelTypeNameAndDebug
|
||||
(
|
||||
ReactingParcel<basicReactingMultiphaseParcel>,
|
||||
0
|
||||
);
|
||||
defineTemplateTypeNameAndDebug
|
||||
(
|
||||
ReactingParcel<basicReactingMultiphaseParcel>,
|
||||
0
|
||||
);
|
||||
|
||||
defineParcelTypeNameAndDebug
|
||||
(
|
||||
KinematicCloud<basicReactingMultiphaseParcel>,
|
||||
0
|
||||
);
|
||||
// defineTemplateTypeNameAndDebug
|
||||
// (
|
||||
// KinematicCloud<basicReactingMultiphaseParcel>,
|
||||
// 0
|
||||
// );
|
||||
|
||||
defineParcelTypeNameAndDebug
|
||||
(
|
||||
ThermoCloud<basicReactingMultiphaseParcel>,
|
||||
0
|
||||
);
|
||||
// defineTemplateTypeNameAndDebug
|
||||
// (
|
||||
// ThermoCloud<basicReactingMultiphaseParcel>,
|
||||
// 0
|
||||
// );
|
||||
|
||||
defineParcelTypeNameAndDebug
|
||||
(
|
||||
ReactingCloud<basicReactingMultiphaseParcel>,
|
||||
0
|
||||
);
|
||||
// defineTemplateTypeNameAndDebug
|
||||
// (
|
||||
// ReactingCloud<basicReactingMultiphaseParcel>,
|
||||
// 0
|
||||
// );
|
||||
|
||||
};
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,45 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "basicReactingMultiphaseParcel.H"
|
||||
#include "ReactingCloud.H"
|
||||
#include "SingleMixtureFraction.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeCompositionModel(ReactingCloud<basicReactingMultiphaseParcel>);
|
||||
|
||||
// Add instances of composition model to the table
|
||||
makeCompositionModelType
|
||||
(
|
||||
SingleMixtureFraction,
|
||||
ReactingCloud,
|
||||
basicReactingMultiphaseParcel
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,59 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "basicReactingMultiphaseParcel.H"
|
||||
#include "ReactingCloud.H"
|
||||
#include "NoDevolatilisation.H"
|
||||
#include "ConstantRateDevolatilisation.H"
|
||||
#include "SingleKineticRateDevolatilisation.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeDevolatilisationModel(ReactingCloud<basicReactingMultiphaseParcel>);
|
||||
|
||||
// Add instances of mass transfer model to the table
|
||||
makeDevolatilisationModelType
|
||||
(
|
||||
NoDevolatilisation,
|
||||
ReactingCloud,
|
||||
basicReactingMultiphaseParcel
|
||||
);
|
||||
makeDevolatilisationModelType
|
||||
(
|
||||
ConstantRateDevolatilisation,
|
||||
ReactingCloud,
|
||||
basicReactingMultiphaseParcel
|
||||
);
|
||||
makeDevolatilisationModelType
|
||||
(
|
||||
SingleKineticRateDevolatilisation,
|
||||
ReactingCloud,
|
||||
basicReactingMultiphaseParcel
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "basicReactingMultiphaseParcel.H"
|
||||
#include "KinematicCloud.H"
|
||||
#include "NoDispersion.H"
|
||||
#include "GradientDispersionRAS.H"
|
||||
#include "StochasticDispersionRAS.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeDispersionModel(KinematicCloud<basicReactingMultiphaseParcel>);
|
||||
|
||||
defineNamedTemplateTypeNameAndDebug
|
||||
(
|
||||
DispersionRASModel<KinematicCloud<basicReactingMultiphaseParcel> >,
|
||||
0
|
||||
);
|
||||
|
||||
// Add instances of dispersion model to the table
|
||||
makeDispersionModelType
|
||||
(
|
||||
NoDispersion,
|
||||
KinematicCloud,
|
||||
basicReactingMultiphaseParcel
|
||||
);
|
||||
makeDispersionModelType
|
||||
(
|
||||
GradientDispersionRAS,
|
||||
KinematicCloud,
|
||||
basicReactingMultiphaseParcel
|
||||
);
|
||||
makeDispersionModelType
|
||||
(
|
||||
StochasticDispersionRAS,
|
||||
KinematicCloud,
|
||||
basicReactingMultiphaseParcel
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,42 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "basicReactingMultiphaseParcel.H"
|
||||
#include "KinematicCloud.H"
|
||||
#include "NoDrag.H"
|
||||
#include "SphereDrag.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeDragModel(KinematicCloud<basicReactingMultiphaseParcel>);
|
||||
|
||||
// Add instances of drag model to the table
|
||||
makeDragModelType(NoDrag, KinematicCloud, basicReactingMultiphaseParcel);
|
||||
makeDragModelType(SphereDrag, KinematicCloud, basicReactingMultiphaseParcel);
|
||||
};
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,52 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "basicReactingMultiphaseParcel.H"
|
||||
#include "ThermoCloud.H"
|
||||
#include "NoHeatTransfer.H"
|
||||
#include "RanzMarshall.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeHeatTransferModel(ThermoCloud<basicReactingMultiphaseParcel>);
|
||||
|
||||
// Add instances of heat transfer model to the table
|
||||
makeHeatTransferModelType
|
||||
(
|
||||
NoHeatTransfer,
|
||||
ThermoCloud,
|
||||
basicReactingMultiphaseParcel
|
||||
);
|
||||
makeHeatTransferModelType
|
||||
(
|
||||
RanzMarshall,
|
||||
ThermoCloud,
|
||||
basicReactingMultiphaseParcel
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,59 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "basicReactingMultiphaseParcel.H"
|
||||
#include "ReactingCloud.H"
|
||||
#include "NoInjection.H"
|
||||
#include "ManualInjection.H"
|
||||
#include "ConeInjection.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeInjectionModel(KinematicCloud<basicReactingMultiphaseParcel>);
|
||||
|
||||
// Add instances of injection model to the table
|
||||
makeInjectionModelType
|
||||
(
|
||||
NoInjection,
|
||||
KinematicCloud,
|
||||
basicReactingMultiphaseParcel
|
||||
);
|
||||
makeInjectionModelType
|
||||
(
|
||||
ManualInjection,
|
||||
KinematicCloud,
|
||||
basicReactingMultiphaseParcel
|
||||
);
|
||||
makeInjectionModelType
|
||||
(
|
||||
ConeInjection,
|
||||
KinematicCloud,
|
||||
basicReactingMultiphaseParcel
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,45 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "basicReactingMultiphaseParcel.H"
|
||||
#include "ReactingCloud.H"
|
||||
#include "NoSurfaceReaction.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeSurfaceReactionModel(ReactingCloud<basicReactingMultiphaseParcel>);
|
||||
|
||||
// Add instances of surface reaction model to the table
|
||||
makeSurfaceReactionModelType
|
||||
(
|
||||
NoSurfaceReaction,
|
||||
ReactingCloud,
|
||||
basicReactingMultiphaseParcel
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,53 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "basicReactingMultiphaseParcel.H"
|
||||
#include "KinematicCloud.H"
|
||||
#include "Rebound.H"
|
||||
#include "StandardWallInteraction.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeWallInteractionModel(KinematicCloud<basicReactingMultiphaseParcel>);
|
||||
// makeWallInteractionModel(ReactingCloud<basicReactingMultiphaseParcel>);
|
||||
|
||||
// Add instances of wall interaction model to the table
|
||||
makeWallInteractionModelType
|
||||
(
|
||||
Rebound,
|
||||
KinematicCloud,
|
||||
basicReactingMultiphaseParcel
|
||||
);
|
||||
makeWallInteractionModelType
|
||||
(
|
||||
StandardWallInteraction,
|
||||
KinematicCloud,
|
||||
basicReactingMultiphaseParcel
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -25,7 +25,7 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "basicReactingParcel.H"
|
||||
#include "ThermoCloud.H"
|
||||
#include "ReactingCloud.H"
|
||||
#include "NoDevolatilisation.H"
|
||||
#include "ConstantRateDevolatilisation.H"
|
||||
#include "SingleKineticRateDevolatilisation.H"
|
||||
|
||||
Reference in New Issue
Block a user