lagrangian: Moved composition modelling into the thermo cloud
The thermo parcel now supports thermophysical property modelling. This
particle does not store phase or specie fractions so it only provides a
single phase with a uniform composition. Additional specification is
required in the cloud subModel configuration in order to select the
specie. For example:
compositionModel singlePhaseMixture;
singlePhaseMixtureCoeffs
{
phases
(
solid
{
CaCO3 1;
}
);
}
This commit is contained in:
@ -32,15 +32,6 @@ License
|
||||
template<class CloudType>
|
||||
void Foam::ReactingCloud<CloudType>::setModels()
|
||||
{
|
||||
compositionModel_.reset
|
||||
(
|
||||
CompositionModel<ReactingCloud<CloudType>>::New
|
||||
(
|
||||
this->subModelProperties(),
|
||||
*this
|
||||
).ptr()
|
||||
);
|
||||
|
||||
phaseChangeModel_.reset
|
||||
(
|
||||
PhaseChangeModel<ReactingCloud<CloudType>>::New
|
||||
@ -77,7 +68,6 @@ void Foam::ReactingCloud<CloudType>::cloudReset(ReactingCloud<CloudType>& c)
|
||||
{
|
||||
CloudType::cloudReset(c);
|
||||
|
||||
compositionModel_.reset(c.compositionModel_.ptr());
|
||||
phaseChangeModel_.reset(c.phaseChangeModel_.ptr());
|
||||
}
|
||||
|
||||
@ -98,12 +88,11 @@ Foam::ReactingCloud<CloudType>::ReactingCloud
|
||||
CloudType(cloudName, rho, U, g, carrierThermo, false),
|
||||
cloudCopyPtr_(nullptr),
|
||||
constProps_(this->particleProperties()),
|
||||
compositionModel_(nullptr),
|
||||
phaseChangeModel_(nullptr)
|
||||
{
|
||||
setModels();
|
||||
|
||||
rhoTrans_.setSize(compositionModel_->carrier().species().size());
|
||||
rhoTrans_.setSize(this->composition().carrier().species().size());
|
||||
|
||||
if (readFields)
|
||||
{
|
||||
@ -114,7 +103,7 @@ Foam::ReactingCloud<CloudType>::ReactingCloud
|
||||
// Set storage for mass source fields and initialise to zero
|
||||
forAll(rhoTrans_, i)
|
||||
{
|
||||
const word& specieName = compositionModel_->carrier().species()[i];
|
||||
const word& specieName = this->composition().carrier().species()[i];
|
||||
rhoTrans_.set
|
||||
(
|
||||
i,
|
||||
@ -151,13 +140,12 @@ Foam::ReactingCloud<CloudType>::ReactingCloud
|
||||
CloudType(c, name),
|
||||
cloudCopyPtr_(nullptr),
|
||||
constProps_(c.constProps_),
|
||||
compositionModel_(c.compositionModel_->clone()),
|
||||
phaseChangeModel_(c.phaseChangeModel_->clone()),
|
||||
rhoTrans_(c.rhoTrans_.size())
|
||||
{
|
||||
forAll(c.rhoTrans_, i)
|
||||
{
|
||||
const word& specieName = compositionModel_->carrier().species()[i];
|
||||
const word& specieName = this->composition().carrier().species()[i];
|
||||
rhoTrans_.set
|
||||
(
|
||||
i,
|
||||
@ -190,7 +178,6 @@ Foam::ReactingCloud<CloudType>::ReactingCloud
|
||||
CloudType(mesh, name, c),
|
||||
cloudCopyPtr_(nullptr),
|
||||
constProps_(),
|
||||
compositionModel_(c.compositionModel_->clone()),
|
||||
phaseChangeModel_(nullptr),
|
||||
rhoTrans_(0)
|
||||
{}
|
||||
@ -214,7 +201,7 @@ void Foam::ReactingCloud<CloudType>::setParcelThermoProperties
|
||||
{
|
||||
CloudType::setParcelThermoProperties(parcel, lagrangianDt);
|
||||
|
||||
parcel.Y() = composition().YMixture0();
|
||||
parcel.Y() = this->composition().YMixture0();
|
||||
}
|
||||
|
||||
|
||||
@ -233,7 +220,7 @@ void Foam::ReactingCloud<CloudType>::checkParcelProperties
|
||||
checkSuppliedComposition
|
||||
(
|
||||
parcel.Y(),
|
||||
composition().YMixture0(),
|
||||
this->composition().YMixture0(),
|
||||
"YMixture"
|
||||
);
|
||||
}
|
||||
@ -339,14 +326,4 @@ void Foam::ReactingCloud<CloudType>::info()
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::ReactingCloud<CloudType>::writeFields() const
|
||||
{
|
||||
if (compositionModel_.valid())
|
||||
{
|
||||
CloudType::particleType::writeFields(*this, this->composition());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -54,9 +54,6 @@ namespace Foam
|
||||
|
||||
// Forward declaration of classes
|
||||
|
||||
template<class CloudType>
|
||||
class CompositionModel;
|
||||
|
||||
template<class CloudType>
|
||||
class PhaseChangeModel;
|
||||
|
||||
@ -111,10 +108,6 @@ protected:
|
||||
|
||||
// References to the cloud sub-models
|
||||
|
||||
//- Reacting composition model
|
||||
autoPtr<CompositionModel<ReactingCloud<CloudType>>>
|
||||
compositionModel_;
|
||||
|
||||
//- Reacting phase change model
|
||||
autoPtr<PhaseChangeModel<ReactingCloud<CloudType>>>
|
||||
phaseChangeModel_;
|
||||
@ -220,10 +213,6 @@ public:
|
||||
|
||||
// Sub-models
|
||||
|
||||
//- Return const access to reacting composition model
|
||||
inline const CompositionModel<ReactingCloud<CloudType>>&
|
||||
composition() const;
|
||||
|
||||
//- Return const access to reacting phase change model
|
||||
inline const PhaseChangeModel<ReactingCloud<CloudType>>&
|
||||
phaseChange() const;
|
||||
@ -316,9 +305,6 @@ public:
|
||||
//- Print cloud information
|
||||
void info();
|
||||
|
||||
//- Write the field data for the cloud
|
||||
virtual void writeFields() const;
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
|
||||
@ -51,14 +51,6 @@ Foam::ReactingCloud<CloudType>::constProps()
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
inline const Foam::CompositionModel<Foam::ReactingCloud<CloudType>>&
|
||||
Foam::ReactingCloud<CloudType>::composition() const
|
||||
{
|
||||
return compositionModel_;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
inline const Foam::PhaseChangeModel<Foam::ReactingCloud<CloudType>>&
|
||||
Foam::ReactingCloud<CloudType>::phaseChange() const
|
||||
|
||||
@ -26,6 +26,7 @@ License
|
||||
#include "ThermoCloud.H"
|
||||
#include "integrationScheme.H"
|
||||
#include "HeatTransferModel.H"
|
||||
#include "CompositionModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||
|
||||
@ -41,6 +42,15 @@ void Foam::ThermoCloud<CloudType>::setModels()
|
||||
).ptr()
|
||||
);
|
||||
|
||||
compositionModel_.reset
|
||||
(
|
||||
CompositionModel<ThermoCloud<CloudType>>::New
|
||||
(
|
||||
this->subModelProperties(),
|
||||
*this
|
||||
).ptr()
|
||||
);
|
||||
|
||||
TIntegrator_.reset
|
||||
(
|
||||
integrationScheme::New
|
||||
@ -117,6 +127,8 @@ void Foam::ThermoCloud<CloudType>::cloudReset(ThermoCloud<CloudType>& c)
|
||||
CloudType::cloudReset(c);
|
||||
|
||||
heatTransferModel_.reset(c.heatTransferModel_.ptr());
|
||||
compositionModel_.reset(c.compositionModel_.ptr());
|
||||
|
||||
TIntegrator_.reset(c.TIntegrator_.ptr());
|
||||
|
||||
radiation_ = c.radiation_;
|
||||
@ -144,6 +156,7 @@ Foam::ThermoCloud<CloudType>::ThermoCloud
|
||||
T_(carrierThermo.T()),
|
||||
p_(carrierThermo.p()),
|
||||
heatTransferModel_(nullptr),
|
||||
compositionModel_(nullptr),
|
||||
TIntegrator_(nullptr),
|
||||
radiation_(false),
|
||||
radAreaP_(nullptr),
|
||||
@ -212,6 +225,7 @@ Foam::ThermoCloud<CloudType>::ThermoCloud
|
||||
T_(c.T()),
|
||||
p_(c.p()),
|
||||
heatTransferModel_(c.heatTransferModel_->clone()),
|
||||
compositionModel_(c.compositionModel_->clone()),
|
||||
TIntegrator_(c.TIntegrator_->clone()),
|
||||
radiation_(c.radiation_),
|
||||
radAreaP_(nullptr),
|
||||
@ -322,6 +336,7 @@ Foam::ThermoCloud<CloudType>::ThermoCloud
|
||||
T_(c.T()),
|
||||
p_(c.p()),
|
||||
heatTransferModel_(nullptr),
|
||||
compositionModel_(nullptr),
|
||||
TIntegrator_(nullptr),
|
||||
radiation_(false),
|
||||
radAreaP_(nullptr),
|
||||
@ -481,4 +496,14 @@ void Foam::ThermoCloud<CloudType>::info()
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::ThermoCloud<CloudType>::writeFields() const
|
||||
{
|
||||
if (compositionModel_.valid())
|
||||
{
|
||||
CloudType::particleType::writeFields(*this, this->composition());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -58,6 +58,9 @@ class integrationScheme;
|
||||
template<class CloudType>
|
||||
class HeatTransferModel;
|
||||
|
||||
template<class CloudType>
|
||||
class CompositionModel;
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class ThermoCloudName Declaration
|
||||
@ -127,6 +130,10 @@ protected:
|
||||
autoPtr<HeatTransferModel<ThermoCloud<CloudType>>>
|
||||
heatTransferModel_;
|
||||
|
||||
//- Reacting composition model
|
||||
autoPtr<CompositionModel<ThermoCloud<CloudType>>>
|
||||
compositionModel_;
|
||||
|
||||
|
||||
// Reference to the particle integration schemes
|
||||
|
||||
@ -257,6 +264,10 @@ public:
|
||||
inline const HeatTransferModel<ThermoCloud<CloudType>>&
|
||||
heatTransfer() const;
|
||||
|
||||
//- Return const access to reacting composition model
|
||||
inline const CompositionModel<ThermoCloud<CloudType>>&
|
||||
composition() const;
|
||||
|
||||
|
||||
// Integration schemes
|
||||
|
||||
@ -385,6 +396,9 @@ public:
|
||||
//- Print cloud information
|
||||
void info();
|
||||
|
||||
//- Write the field data for the cloud
|
||||
virtual void writeFields() const;
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
|
||||
@ -91,6 +91,14 @@ Foam::ThermoCloud<CloudType>::heatTransfer() const
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
inline const Foam::CompositionModel<Foam::ThermoCloud<CloudType>>&
|
||||
Foam::ThermoCloud<CloudType>::composition() const
|
||||
{
|
||||
return compositionModel_;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
inline const Foam::integrationScheme&
|
||||
Foam::ThermoCloud<CloudType>::TIntegrator() const
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -170,8 +170,8 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
const scalar dt
|
||||
)
|
||||
{
|
||||
typedef typename TrackCloudType::reactingCloudType reactingCloudType;
|
||||
const CompositionModel<reactingCloudType>& composition =
|
||||
typedef typename TrackCloudType::thermoCloudType thermoCloudType;
|
||||
const CompositionModel<thermoCloudType>& composition =
|
||||
cloud.composition();
|
||||
|
||||
|
||||
@ -547,8 +547,8 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcDevolatilisation
|
||||
return;
|
||||
}
|
||||
|
||||
typedef typename TrackCloudType::reactingCloudType reactingCloudType;
|
||||
const CompositionModel<reactingCloudType>& composition =
|
||||
typedef typename TrackCloudType::thermoCloudType thermoCloudType;
|
||||
const CompositionModel<thermoCloudType>& composition =
|
||||
cloud.composition();
|
||||
|
||||
|
||||
|
||||
@ -57,9 +57,11 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
|
||||
scalarField& Cs
|
||||
)
|
||||
{
|
||||
typedef typename TrackCloudType::reactingCloudType reactingCloudType;
|
||||
const CompositionModel<reactingCloudType>& composition =
|
||||
typedef typename TrackCloudType::thermoCloudType thermoCloudType;
|
||||
const CompositionModel<thermoCloudType>& composition =
|
||||
cloud.composition();
|
||||
|
||||
typedef typename TrackCloudType::reactingCloudType reactingCloudType;
|
||||
PhaseChangeModel<reactingCloudType>& phaseChange = cloud.phaseChange();
|
||||
|
||||
if (YPhase < small)
|
||||
@ -383,8 +385,8 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
const scalar dt
|
||||
)
|
||||
{
|
||||
typedef typename TrackCloudType::reactingCloudType reactingCloudType;
|
||||
const CompositionModel<reactingCloudType>& composition =
|
||||
typedef typename TrackCloudType::thermoCloudType thermoCloudType;
|
||||
const CompositionModel<thermoCloudType>& composition =
|
||||
cloud.composition();
|
||||
|
||||
|
||||
|
||||
@ -122,47 +122,8 @@ public:
|
||||
};
|
||||
|
||||
|
||||
class trackingData
|
||||
:
|
||||
public ParcelType::trackingData
|
||||
{
|
||||
private:
|
||||
|
||||
// Private Data
|
||||
|
||||
// Interpolators for continuous phase fields
|
||||
|
||||
//- Interpolator for continuous phase pressure field
|
||||
autoPtr<interpolation<scalar>> pInterp_;
|
||||
|
||||
|
||||
// Cached continuous phase properties
|
||||
|
||||
//- Pressure [Pa]
|
||||
scalar pc_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
template<class TrackCloudType>
|
||||
inline trackingData(const TrackCloudType& cloud);
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return const access to the interpolator for continuous phase
|
||||
// pressure field
|
||||
inline const interpolation<scalar>& pInterp() const;
|
||||
|
||||
//- Return the continuous phase pressure
|
||||
inline scalar pc() const;
|
||||
|
||||
//- Access the continuous phase pressure
|
||||
inline scalar& pc();
|
||||
};
|
||||
//- Use base tracking data
|
||||
typedef typename ParcelType::trackingData trackingData;
|
||||
|
||||
|
||||
protected:
|
||||
@ -407,7 +368,6 @@ public:
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "ReactingParcelI.H"
|
||||
#include "ReactingParcelTrackingDataI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -1,68 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\/ 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class ParcelType>
|
||||
template<class TrackCloudType>
|
||||
inline Foam::ReactingParcel<ParcelType>::trackingData::trackingData
|
||||
(
|
||||
const TrackCloudType& cloud
|
||||
)
|
||||
:
|
||||
ParcelType::trackingData(cloud),
|
||||
pInterp_
|
||||
(
|
||||
interpolation<scalar>::New
|
||||
(
|
||||
cloud.solution().interpolationSchemes(),
|
||||
cloud.p()
|
||||
)
|
||||
),
|
||||
pc_(Zero)
|
||||
{}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::interpolation<Foam::scalar>&
|
||||
Foam::ReactingParcel<ParcelType>::trackingData::pInterp() const
|
||||
{
|
||||
return pInterp_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar Foam::ReactingParcel<ParcelType>::trackingData::pc() const
|
||||
{
|
||||
return pc_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar& Foam::ReactingParcel<ParcelType>::trackingData::pc()
|
||||
{
|
||||
return pc_;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -64,8 +64,8 @@ void Foam::SprayParcel<ParcelType>::calc
|
||||
const scalar dt
|
||||
)
|
||||
{
|
||||
typedef typename TrackCloudType::reactingCloudType reactingCloudType;
|
||||
const CompositionModel<reactingCloudType>& composition =
|
||||
typedef typename TrackCloudType::thermoCloudType thermoCloudType;
|
||||
const CompositionModel<thermoCloudType>& composition =
|
||||
cloud.composition();
|
||||
|
||||
// Check if parcel belongs to liquid core
|
||||
@ -153,8 +153,8 @@ void Foam::SprayParcel<ParcelType>::calcAtomization
|
||||
const scalar dt
|
||||
)
|
||||
{
|
||||
typedef typename TrackCloudType::reactingCloudType reactingCloudType;
|
||||
const CompositionModel<reactingCloudType>& composition =
|
||||
typedef typename TrackCloudType::thermoCloudType thermoCloudType;
|
||||
const CompositionModel<thermoCloudType>& composition =
|
||||
cloud.composition();
|
||||
|
||||
typedef typename TrackCloudType::sprayCloudType sprayCloudType;
|
||||
@ -325,8 +325,8 @@ Foam::scalar Foam::SprayParcel<ParcelType>::chi
|
||||
{
|
||||
// Modifications to take account of the flash boiling on primary break-up
|
||||
|
||||
typedef typename TrackCloudType::reactingCloudType reactingCloudType;
|
||||
const CompositionModel<reactingCloudType>& composition =
|
||||
typedef typename TrackCloudType::thermoCloudType thermoCloudType;
|
||||
const CompositionModel<thermoCloudType>& composition =
|
||||
cloud.composition();
|
||||
|
||||
scalar chi = 0.0;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -203,6 +203,10 @@ void Foam::ThermoParcel<ParcelType>::calc
|
||||
Sph
|
||||
);
|
||||
|
||||
// Update the heat capacity
|
||||
static const scalarField Y(1, 1);
|
||||
Cp_ = cloud.composition().Cp(0, Y, td.pc(), T0);
|
||||
|
||||
|
||||
// Motion
|
||||
// ~~~~~~
|
||||
|
||||
@ -174,6 +174,9 @@ public:
|
||||
|
||||
// Interpolators for continuous phase fields
|
||||
|
||||
//- Interpolator for continuous phase pressure field
|
||||
autoPtr<interpolation<scalar>> pInterp_;
|
||||
|
||||
//- Temperature field interpolator
|
||||
autoPtr<interpolation<scalar>> TInterp_;
|
||||
|
||||
@ -189,6 +192,9 @@ public:
|
||||
|
||||
// Cached continuous phase properties
|
||||
|
||||
//- Pressure [Pa]
|
||||
scalar pc_;
|
||||
|
||||
//- Temperature [K]
|
||||
scalar Tc_;
|
||||
|
||||
@ -213,6 +219,10 @@ public:
|
||||
//- Return access to the locally stored carrier kappa field
|
||||
inline const volScalarField& kappa() const;
|
||||
|
||||
//- Return const access to the interpolator for continuous phase
|
||||
// pressure field
|
||||
inline const interpolation<scalar>& pInterp() const;
|
||||
|
||||
//- Return const access to the interpolator for continuous
|
||||
// phase temperature field
|
||||
inline const interpolation<scalar>& TInterp() const;
|
||||
@ -229,6 +239,12 @@ public:
|
||||
// radiation field
|
||||
inline const interpolation<scalar>& GInterp() const;
|
||||
|
||||
//- Return the continuous phase pressure
|
||||
inline scalar pc() const;
|
||||
|
||||
//- Access the continuous phase pressure
|
||||
inline scalar& pc();
|
||||
|
||||
//- Return the continuous phase temperature
|
||||
inline scalar Tc() const;
|
||||
|
||||
@ -428,6 +444,14 @@ public:
|
||||
template<class CloudType>
|
||||
static void writeFields(const CloudType& c);
|
||||
|
||||
//- Write
|
||||
template<class CloudType, class CompositionType>
|
||||
static void writeFields
|
||||
(
|
||||
const CloudType& c,
|
||||
const CompositionType& compModel
|
||||
);
|
||||
|
||||
|
||||
// Ostream Operator
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -128,6 +128,18 @@ void Foam::ThermoParcel<ParcelType>::writeFields(const CloudType& c)
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType, class CompositionType>
|
||||
void Foam::ThermoParcel<ParcelType>::writeFields
|
||||
(
|
||||
const CloudType& c,
|
||||
const CompositionType& compModel
|
||||
)
|
||||
{
|
||||
ThermoParcel<ParcelType>::writeFields(c);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
|
||||
@ -33,6 +33,14 @@ inline Foam::ThermoParcel<ParcelType>::trackingData::trackingData
|
||||
ParcelType::trackingData(cloud),
|
||||
Cp_(cloud.carrierThermo().Cp()),
|
||||
kappa_(cloud.carrierThermo().kappa()),
|
||||
pInterp_
|
||||
(
|
||||
interpolation<scalar>::New
|
||||
(
|
||||
cloud.solution().interpolationSchemes(),
|
||||
cloud.p()
|
||||
)
|
||||
),
|
||||
TInterp_
|
||||
(
|
||||
interpolation<scalar>::New
|
||||
@ -58,6 +66,7 @@ inline Foam::ThermoParcel<ParcelType>::trackingData::trackingData
|
||||
)
|
||||
),
|
||||
GInterp_(nullptr),
|
||||
pc_(Zero),
|
||||
Tc_(Zero),
|
||||
Cpc_(Zero)
|
||||
{
|
||||
@ -92,6 +101,14 @@ Foam::ThermoParcel<ParcelType>::trackingData::kappa() const
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::interpolation<Foam::scalar>&
|
||||
Foam::ThermoParcel<ParcelType>::trackingData::pInterp() const
|
||||
{
|
||||
return pInterp_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::interpolation<Foam::scalar>&
|
||||
Foam::ThermoParcel<ParcelType>::trackingData::TInterp() const
|
||||
@ -131,6 +148,20 @@ Foam::ThermoParcel<ParcelType>::trackingData::GInterp() const
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar Foam::ThermoParcel<ParcelType>::trackingData::pc() const
|
||||
{
|
||||
return pc_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar& Foam::ThermoParcel<ParcelType>::trackingData::pc()
|
||||
{
|
||||
return pc_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar Foam::ThermoParcel<ParcelType>::trackingData::Tc() const
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -37,9 +37,9 @@ License
|
||||
|
||||
// Thermodynamic
|
||||
#include "makeParcelHeatTransferModels.H"
|
||||
#include "makeParcelCompositionModels.H"
|
||||
|
||||
// Reacting
|
||||
#include "makeReactingParcelCompositionModels.H"
|
||||
#include "makeReactingParcelPhaseChangeModels.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -56,9 +56,9 @@ makeReactingParcelSurfaceFilmModels(reactingCloud);
|
||||
|
||||
// Thermo sub-models
|
||||
makeParcelHeatTransferModels(reactingCloud);
|
||||
makeParcelCompositionModels(reactingCloud);
|
||||
|
||||
// Reacting sub-models
|
||||
makeReactingParcelCompositionModels(reactingCloud);
|
||||
makeReactingParcelPhaseChangeModels(reactingCloud);
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -36,9 +36,9 @@ License
|
||||
|
||||
// Thermodynamic
|
||||
#include "makeParcelHeatTransferModels.H"
|
||||
#include "makeParcelCompositionModels.H"
|
||||
|
||||
// Reacting
|
||||
#include "makeReactingParcelCompositionModels.H"
|
||||
#include "makeReactingParcelPhaseChangeModels.H"
|
||||
#include "makeReactingParcelSurfaceFilmModels.H"
|
||||
|
||||
@ -60,9 +60,9 @@ makeSprayParcelStochasticCollisionModels(sprayCloud);
|
||||
|
||||
// Thermo sub-models
|
||||
makeParcelHeatTransferModels(sprayCloud);
|
||||
makeParcelCompositionModels(sprayCloud);
|
||||
|
||||
// Reacting sub-models
|
||||
makeReactingParcelCompositionModels(sprayCloud);
|
||||
makeReactingParcelPhaseChangeModels(sprayCloud);
|
||||
makeReactingParcelSurfaceFilmModels(sprayCloud);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -37,6 +37,10 @@ License
|
||||
|
||||
// Thermodynamic
|
||||
#include "makeParcelHeatTransferModels.H"
|
||||
#include "makeParcelCompositionModels.H"
|
||||
|
||||
#include "NoComposition.H"
|
||||
#include "SinglePhaseMixture.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -52,6 +56,6 @@ makeParcelSurfaceFilmModels(thermoCloud);
|
||||
|
||||
// Thermo sub-models
|
||||
makeParcelHeatTransferModels(thermoCloud);
|
||||
|
||||
makeParcelCompositionModels(thermoCloud);
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,8 +23,8 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef makeReactingParcelCompositionModels_H
|
||||
#define makeReactingParcelCompositionModels_H
|
||||
#ifndef makeParcelCompositionModels_H
|
||||
#define makeParcelCompositionModels_H
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -33,7 +33,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#define makeReactingParcelCompositionModels(CloudType) \
|
||||
#define makeParcelCompositionModels(CloudType) \
|
||||
\
|
||||
makeCompositionModel(CloudType); \
|
||||
makeCompositionModelType(NoComposition, CloudType); \
|
||||
@ -269,17 +269,17 @@ public:
|
||||
|
||||
#define makeCompositionModel(CloudType) \
|
||||
\
|
||||
typedef Foam::CloudType::reactingCloudType reactingCloudType; \
|
||||
typedef Foam::CloudType::thermoCloudType thermoCloudType; \
|
||||
defineNamedTemplateTypeNameAndDebug \
|
||||
( \
|
||||
Foam::CompositionModel<reactingCloudType>, \
|
||||
Foam::CompositionModel<thermoCloudType>, \
|
||||
0 \
|
||||
); \
|
||||
namespace Foam \
|
||||
{ \
|
||||
defineTemplateRunTimeSelectionTable \
|
||||
( \
|
||||
CompositionModel<reactingCloudType>, \
|
||||
CompositionModel<thermoCloudType>, \
|
||||
dictionary \
|
||||
); \
|
||||
}
|
||||
@ -287,12 +287,12 @@ public:
|
||||
|
||||
#define makeCompositionModelType(SS, CloudType) \
|
||||
\
|
||||
typedef Foam::CloudType::reactingCloudType reactingCloudType; \
|
||||
defineNamedTemplateTypeNameAndDebug(Foam::SS<reactingCloudType>, 0); \
|
||||
typedef Foam::CloudType::thermoCloudType thermoCloudType; \
|
||||
defineNamedTemplateTypeNameAndDebug(Foam::SS<thermoCloudType>, 0); \
|
||||
\
|
||||
Foam::CompositionModel<reactingCloudType>:: \
|
||||
adddictionaryConstructorToTable<Foam::SS<reactingCloudType>> \
|
||||
add##SS##CloudType##reactingCloudType##ConstructorToTable_;
|
||||
Foam::CompositionModel<thermoCloudType>:: \
|
||||
adddictionaryConstructorToTable<Foam::SS<thermoCloudType>> \
|
||||
add##SS##CloudType##thermoCloudType##ConstructorToTable_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -41,6 +41,7 @@ solution
|
||||
U cellPoint;
|
||||
Cp cell;
|
||||
kappa cell;
|
||||
p cell;
|
||||
T cell;
|
||||
G cell;
|
||||
}
|
||||
@ -108,6 +109,8 @@ subModels
|
||||
|
||||
radiation on;
|
||||
|
||||
compositionModel singlePhaseMixture;
|
||||
|
||||
standardWallInteractionCoeffs
|
||||
{
|
||||
type rebound;
|
||||
@ -119,6 +122,17 @@ subModels
|
||||
{
|
||||
BirdCorrection false;
|
||||
}
|
||||
|
||||
singlePhaseMixtureCoeffs
|
||||
{
|
||||
phases
|
||||
(
|
||||
solid
|
||||
{
|
||||
CaCO3 1;
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -47,6 +47,8 @@ solids
|
||||
}
|
||||
|
||||
ash;
|
||||
|
||||
CaCO3;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user