mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Added `active' switch to clouds
Provides a clean mechanism to run the lagrangian family of solvers without a cloud
This commit is contained in:
@ -34,6 +34,76 @@ License
|
|||||||
#include "PatchInteractionModel.H"
|
#include "PatchInteractionModel.H"
|
||||||
#include "PostProcessingModel.H"
|
#include "PostProcessingModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
void Foam::KinematicCloud<ParcelType>::preEvolve()
|
||||||
|
{
|
||||||
|
this->dispersion().cacheFields(true);
|
||||||
|
forces_.cacheFields(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
void Foam::KinematicCloud<ParcelType>::evolveCloud()
|
||||||
|
{
|
||||||
|
autoPtr<interpolation<scalar> > rhoInterpolator =
|
||||||
|
interpolation<scalar>::New
|
||||||
|
(
|
||||||
|
interpolationSchemes_,
|
||||||
|
rho_
|
||||||
|
);
|
||||||
|
|
||||||
|
autoPtr<interpolation<vector> > UInterpolator =
|
||||||
|
interpolation<vector>::New
|
||||||
|
(
|
||||||
|
interpolationSchemes_,
|
||||||
|
U_
|
||||||
|
);
|
||||||
|
|
||||||
|
autoPtr<interpolation<scalar> > muInterpolator =
|
||||||
|
interpolation<scalar>::New
|
||||||
|
(
|
||||||
|
interpolationSchemes_,
|
||||||
|
mu_
|
||||||
|
);
|
||||||
|
|
||||||
|
typename ParcelType::trackData td
|
||||||
|
(
|
||||||
|
*this,
|
||||||
|
constProps_,
|
||||||
|
rhoInterpolator(),
|
||||||
|
UInterpolator(),
|
||||||
|
muInterpolator(),
|
||||||
|
g_.value()
|
||||||
|
);
|
||||||
|
|
||||||
|
this->injection().inject(td);
|
||||||
|
|
||||||
|
if (coupled_)
|
||||||
|
{
|
||||||
|
resetSourceTerms();
|
||||||
|
}
|
||||||
|
|
||||||
|
Cloud<ParcelType>::move(td);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
void Foam::KinematicCloud<ParcelType>::postEvolve()
|
||||||
|
{
|
||||||
|
if (debug)
|
||||||
|
{
|
||||||
|
this->writePositions();
|
||||||
|
}
|
||||||
|
|
||||||
|
this->dispersion().cacheFields(false);
|
||||||
|
forces_.cacheFields(false);
|
||||||
|
|
||||||
|
this->postProcessing().post();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
@ -62,6 +132,7 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
|
|||||||
)
|
)
|
||||||
),
|
),
|
||||||
constProps_(particleProperties_),
|
constProps_(particleProperties_),
|
||||||
|
active_(particleProperties_.lookup("active")),
|
||||||
parcelTypeId_(readLabel(particleProperties_.lookup("parcelTypeId"))),
|
parcelTypeId_(readLabel(particleProperties_.lookup("parcelTypeId"))),
|
||||||
coupled_(particleProperties_.lookup("coupled")),
|
coupled_(particleProperties_.lookup("coupled")),
|
||||||
cellValueSourceCorrection_
|
cellValueSourceCorrection_
|
||||||
@ -179,75 +250,17 @@ void Foam::KinematicCloud<ParcelType>::resetSourceTerms()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
void Foam::KinematicCloud<ParcelType>::preEvolve()
|
|
||||||
{
|
|
||||||
this->dispersion().cacheFields(true);
|
|
||||||
forces_.cacheFields(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
void Foam::KinematicCloud<ParcelType>::postEvolve()
|
|
||||||
{
|
|
||||||
if (debug)
|
|
||||||
{
|
|
||||||
this->writePositions();
|
|
||||||
}
|
|
||||||
|
|
||||||
this->dispersion().cacheFields(false);
|
|
||||||
forces_.cacheFields(false);
|
|
||||||
|
|
||||||
this->postProcessing().post();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::KinematicCloud<ParcelType>::evolve()
|
void Foam::KinematicCloud<ParcelType>::evolve()
|
||||||
{
|
{
|
||||||
preEvolve();
|
if (active_)
|
||||||
|
|
||||||
autoPtr<interpolation<scalar> > rhoInterpolator =
|
|
||||||
interpolation<scalar>::New
|
|
||||||
(
|
|
||||||
interpolationSchemes_,
|
|
||||||
rho_
|
|
||||||
);
|
|
||||||
|
|
||||||
autoPtr<interpolation<vector> > UInterpolator =
|
|
||||||
interpolation<vector>::New
|
|
||||||
(
|
|
||||||
interpolationSchemes_,
|
|
||||||
U_
|
|
||||||
);
|
|
||||||
|
|
||||||
autoPtr<interpolation<scalar> > muInterpolator =
|
|
||||||
interpolation<scalar>::New
|
|
||||||
(
|
|
||||||
interpolationSchemes_,
|
|
||||||
mu_
|
|
||||||
);
|
|
||||||
|
|
||||||
typename ParcelType::trackData td
|
|
||||||
(
|
|
||||||
*this,
|
|
||||||
constProps_,
|
|
||||||
rhoInterpolator(),
|
|
||||||
UInterpolator(),
|
|
||||||
muInterpolator(),
|
|
||||||
g_.value()
|
|
||||||
);
|
|
||||||
|
|
||||||
this->injection().inject(td);
|
|
||||||
|
|
||||||
if (coupled_)
|
|
||||||
{
|
{
|
||||||
resetSourceTerms();
|
preEvolve();
|
||||||
|
|
||||||
|
evolveCloud();
|
||||||
|
|
||||||
|
postEvolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
Cloud<ParcelType>::move(td);
|
|
||||||
|
|
||||||
postEvolve();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -109,6 +109,9 @@ protected:
|
|||||||
//- Parcel constant properties
|
//- Parcel constant properties
|
||||||
typename ParcelType::constantProperties constProps_;
|
typename ParcelType::constantProperties constProps_;
|
||||||
|
|
||||||
|
//- Cloud active flag
|
||||||
|
const Switch active_;
|
||||||
|
|
||||||
//- Parcel type id - used to flag the type of parcels issued by this
|
//- Parcel type id - used to flag the type of parcels issued by this
|
||||||
// cloud
|
// cloud
|
||||||
const label parcelTypeId_;
|
const label parcelTypeId_;
|
||||||
@ -189,6 +192,9 @@ protected:
|
|||||||
//- Pre-evolve
|
//- Pre-evolve
|
||||||
void preEvolve();
|
void preEvolve();
|
||||||
|
|
||||||
|
//- Evolve the cloud
|
||||||
|
void evolveCloud();
|
||||||
|
|
||||||
//- Post-evolve
|
//- Post-evolve
|
||||||
void postEvolve();
|
void postEvolve();
|
||||||
|
|
||||||
@ -223,9 +229,6 @@ public:
|
|||||||
|
|
||||||
// References to the mesh and databases
|
// References to the mesh and databases
|
||||||
|
|
||||||
//- Return the parcel type id
|
|
||||||
inline label parcelTypeId() const;
|
|
||||||
|
|
||||||
//- Return refernce to the mesh
|
//- Return refernce to the mesh
|
||||||
inline const fvMesh& mesh() const;
|
inline const fvMesh& mesh() const;
|
||||||
|
|
||||||
@ -237,14 +240,22 @@ public:
|
|||||||
constProps() const;
|
constProps() const;
|
||||||
|
|
||||||
|
|
||||||
//- Return coupled flag
|
// Cloud data
|
||||||
inline const Switch coupled() const;
|
|
||||||
|
|
||||||
//- Return cell value correction flag
|
//- Return the active flag
|
||||||
inline const Switch cellValueSourceCorrection() const;
|
inline const Switch active() const;
|
||||||
|
|
||||||
//- Return refernce to the random object
|
//- Return the parcel type id
|
||||||
inline Random& rndGen();
|
inline label parcelTypeId() const;
|
||||||
|
|
||||||
|
//- Return coupled flag
|
||||||
|
inline const Switch coupled() const;
|
||||||
|
|
||||||
|
//- Return cell value correction flag
|
||||||
|
inline const Switch cellValueSourceCorrection() const;
|
||||||
|
|
||||||
|
//- Return refernce to the random object
|
||||||
|
inline Random& rndGen();
|
||||||
|
|
||||||
|
|
||||||
// References to the carrier gas fields
|
// References to the carrier gas fields
|
||||||
|
|||||||
@ -58,6 +58,13 @@ Foam::KinematicCloud<ParcelType>::constProps() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
inline const Foam::Switch Foam::KinematicCloud<ParcelType>::active() const
|
||||||
|
{
|
||||||
|
return active_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const Foam::Switch Foam::KinematicCloud<ParcelType>::coupled() const
|
inline const Foam::Switch Foam::KinematicCloud<ParcelType>::coupled() const
|
||||||
{
|
{
|
||||||
|
|||||||
@ -58,6 +58,87 @@ void Foam::ReactingCloud<ParcelType>::checkSuppliedComposition
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
void Foam::ReactingCloud<ParcelType>::preEvolve()
|
||||||
|
{
|
||||||
|
ThermoCloud<ParcelType>::preEvolve();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
void Foam::ReactingCloud<ParcelType>::evolveCloud()
|
||||||
|
{
|
||||||
|
const volScalarField& T = this->carrierThermo().T();
|
||||||
|
const volScalarField cp = this->carrierThermo().Cp();
|
||||||
|
const volScalarField& p = this->carrierThermo().p();
|
||||||
|
|
||||||
|
autoPtr<interpolation<scalar> > rhoInterp = interpolation<scalar>::New
|
||||||
|
(
|
||||||
|
this->interpolationSchemes(),
|
||||||
|
this->rho()
|
||||||
|
);
|
||||||
|
|
||||||
|
autoPtr<interpolation<vector> > UInterp = interpolation<vector>::New
|
||||||
|
(
|
||||||
|
this->interpolationSchemes(),
|
||||||
|
this->U()
|
||||||
|
);
|
||||||
|
|
||||||
|
autoPtr<interpolation<scalar> > muInterp = interpolation<scalar>::New
|
||||||
|
(
|
||||||
|
this->interpolationSchemes(),
|
||||||
|
this->mu()
|
||||||
|
);
|
||||||
|
|
||||||
|
autoPtr<interpolation<scalar> > TInterp = interpolation<scalar>::New
|
||||||
|
(
|
||||||
|
this->interpolationSchemes(),
|
||||||
|
T
|
||||||
|
);
|
||||||
|
|
||||||
|
autoPtr<interpolation<scalar> > cpInterp = interpolation<scalar>::New
|
||||||
|
(
|
||||||
|
this->interpolationSchemes(),
|
||||||
|
cp
|
||||||
|
);
|
||||||
|
|
||||||
|
autoPtr<interpolation<scalar> > pInterp = interpolation<scalar>::New
|
||||||
|
(
|
||||||
|
this->interpolationSchemes(),
|
||||||
|
p
|
||||||
|
);
|
||||||
|
|
||||||
|
typename ParcelType::trackData td
|
||||||
|
(
|
||||||
|
*this,
|
||||||
|
constProps_,
|
||||||
|
rhoInterp(),
|
||||||
|
UInterp(),
|
||||||
|
muInterp(),
|
||||||
|
TInterp(),
|
||||||
|
cpInterp(),
|
||||||
|
pInterp(),
|
||||||
|
this->g().value()
|
||||||
|
);
|
||||||
|
|
||||||
|
this->injection().inject(td);
|
||||||
|
|
||||||
|
if (this->coupled())
|
||||||
|
{
|
||||||
|
resetSourceTerms();
|
||||||
|
}
|
||||||
|
|
||||||
|
Cloud<ParcelType>::move(td);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
void Foam::ReactingCloud<ParcelType>::postEvolve()
|
||||||
|
{
|
||||||
|
ThermoCloud<ParcelType>::postEvolve();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
@ -181,88 +262,17 @@ void Foam::ReactingCloud<ParcelType>::resetSourceTerms()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
void Foam::ReactingCloud<ParcelType>::preEvolve()
|
|
||||||
{
|
|
||||||
ThermoCloud<ParcelType>::preEvolve();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
void Foam::ReactingCloud<ParcelType>::postEvolve()
|
|
||||||
{
|
|
||||||
ThermoCloud<ParcelType>::postEvolve();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::ReactingCloud<ParcelType>::evolve()
|
void Foam::ReactingCloud<ParcelType>::evolve()
|
||||||
{
|
{
|
||||||
preEvolve();
|
if (this->active())
|
||||||
|
|
||||||
const volScalarField& T = this->carrierThermo().T();
|
|
||||||
const volScalarField cp = this->carrierThermo().Cp();
|
|
||||||
const volScalarField& p = this->carrierThermo().p();
|
|
||||||
|
|
||||||
autoPtr<interpolation<scalar> > rhoInterp = interpolation<scalar>::New
|
|
||||||
(
|
|
||||||
this->interpolationSchemes(),
|
|
||||||
this->rho()
|
|
||||||
);
|
|
||||||
|
|
||||||
autoPtr<interpolation<vector> > UInterp = interpolation<vector>::New
|
|
||||||
(
|
|
||||||
this->interpolationSchemes(),
|
|
||||||
this->U()
|
|
||||||
);
|
|
||||||
|
|
||||||
autoPtr<interpolation<scalar> > muInterp = interpolation<scalar>::New
|
|
||||||
(
|
|
||||||
this->interpolationSchemes(),
|
|
||||||
this->mu()
|
|
||||||
);
|
|
||||||
|
|
||||||
autoPtr<interpolation<scalar> > TInterp = interpolation<scalar>::New
|
|
||||||
(
|
|
||||||
this->interpolationSchemes(),
|
|
||||||
T
|
|
||||||
);
|
|
||||||
|
|
||||||
autoPtr<interpolation<scalar> > cpInterp = interpolation<scalar>::New
|
|
||||||
(
|
|
||||||
this->interpolationSchemes(),
|
|
||||||
cp
|
|
||||||
);
|
|
||||||
|
|
||||||
autoPtr<interpolation<scalar> > pInterp = interpolation<scalar>::New
|
|
||||||
(
|
|
||||||
this->interpolationSchemes(),
|
|
||||||
p
|
|
||||||
);
|
|
||||||
|
|
||||||
typename ParcelType::trackData td
|
|
||||||
(
|
|
||||||
*this,
|
|
||||||
constProps_,
|
|
||||||
rhoInterp(),
|
|
||||||
UInterp(),
|
|
||||||
muInterp(),
|
|
||||||
TInterp(),
|
|
||||||
cpInterp(),
|
|
||||||
pInterp(),
|
|
||||||
this->g().value()
|
|
||||||
);
|
|
||||||
|
|
||||||
this->injection().inject(td);
|
|
||||||
|
|
||||||
if (this->coupled())
|
|
||||||
{
|
{
|
||||||
resetSourceTerms();
|
preEvolve();
|
||||||
|
|
||||||
|
evolveCloud();
|
||||||
|
|
||||||
|
postEvolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
Cloud<ParcelType>::move(td);
|
|
||||||
|
|
||||||
postEvolve();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -137,6 +137,9 @@ protected:
|
|||||||
//- Pre-evolve
|
//- Pre-evolve
|
||||||
void preEvolve();
|
void preEvolve();
|
||||||
|
|
||||||
|
//- Evolve the cloud
|
||||||
|
void evolveCloud();
|
||||||
|
|
||||||
//- Post-evolve
|
//- Post-evolve
|
||||||
void postEvolve();
|
void postEvolve();
|
||||||
|
|
||||||
|
|||||||
@ -29,6 +29,89 @@ License
|
|||||||
#include "DevolatilisationModel.H"
|
#include "DevolatilisationModel.H"
|
||||||
#include "SurfaceReactionModel.H"
|
#include "SurfaceReactionModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
void Foam::ReactingMultiphaseCloud<ParcelType>::preEvolve()
|
||||||
|
{
|
||||||
|
ReactingCloud<ParcelType>::preEvolve();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
void Foam::ReactingMultiphaseCloud<ParcelType>::evolveCloud()
|
||||||
|
{
|
||||||
|
const volScalarField& T = this->carrierThermo().T();
|
||||||
|
const volScalarField cp = this->carrierThermo().Cp();
|
||||||
|
const volScalarField& p = this->carrierThermo().p();
|
||||||
|
|
||||||
|
autoPtr<interpolation<scalar> > rhoInterp = interpolation<scalar>::New
|
||||||
|
(
|
||||||
|
this->interpolationSchemes(),
|
||||||
|
this->rho()
|
||||||
|
);
|
||||||
|
|
||||||
|
autoPtr<interpolation<vector> > UInterp = interpolation<vector>::New
|
||||||
|
(
|
||||||
|
this->interpolationSchemes(),
|
||||||
|
this->U()
|
||||||
|
);
|
||||||
|
|
||||||
|
autoPtr<interpolation<scalar> > muInterp = interpolation<scalar>::New
|
||||||
|
(
|
||||||
|
this->interpolationSchemes(),
|
||||||
|
this->mu()
|
||||||
|
);
|
||||||
|
|
||||||
|
autoPtr<interpolation<scalar> > TInterp = interpolation<scalar>::New
|
||||||
|
(
|
||||||
|
this->interpolationSchemes(),
|
||||||
|
T
|
||||||
|
);
|
||||||
|
|
||||||
|
autoPtr<interpolation<scalar> > cpInterp = interpolation<scalar>::New
|
||||||
|
(
|
||||||
|
this->interpolationSchemes(),
|
||||||
|
cp
|
||||||
|
);
|
||||||
|
|
||||||
|
autoPtr<interpolation<scalar> > pInterp = interpolation<scalar>::New
|
||||||
|
(
|
||||||
|
this->interpolationSchemes(),
|
||||||
|
p
|
||||||
|
);
|
||||||
|
|
||||||
|
typename ParcelType::trackData td
|
||||||
|
(
|
||||||
|
*this,
|
||||||
|
constProps_,
|
||||||
|
rhoInterp(),
|
||||||
|
UInterp(),
|
||||||
|
muInterp(),
|
||||||
|
TInterp(),
|
||||||
|
cpInterp(),
|
||||||
|
pInterp(),
|
||||||
|
this->g().value()
|
||||||
|
);
|
||||||
|
|
||||||
|
this->injection().inject(td);
|
||||||
|
|
||||||
|
if (this->coupled())
|
||||||
|
{
|
||||||
|
resetSourceTerms();
|
||||||
|
}
|
||||||
|
|
||||||
|
Cloud<ParcelType>::move(td);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
void Foam::ReactingMultiphaseCloud<ParcelType>::postEvolve()
|
||||||
|
{
|
||||||
|
ReactingCloud<ParcelType>::postEvolve();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
@ -135,88 +218,17 @@ void Foam::ReactingMultiphaseCloud<ParcelType>::resetSourceTerms()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
void Foam::ReactingMultiphaseCloud<ParcelType>::preEvolve()
|
|
||||||
{
|
|
||||||
ReactingCloud<ParcelType>::preEvolve();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
void Foam::ReactingMultiphaseCloud<ParcelType>::postEvolve()
|
|
||||||
{
|
|
||||||
ReactingCloud<ParcelType>::postEvolve();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::ReactingMultiphaseCloud<ParcelType>::evolve()
|
void Foam::ReactingMultiphaseCloud<ParcelType>::evolve()
|
||||||
{
|
{
|
||||||
preEvolve();
|
if (this->active())
|
||||||
|
|
||||||
const volScalarField& T = this->carrierThermo().T();
|
|
||||||
const volScalarField cp = this->carrierThermo().Cp();
|
|
||||||
const volScalarField& p = this->carrierThermo().p();
|
|
||||||
|
|
||||||
autoPtr<interpolation<scalar> > rhoInterp = interpolation<scalar>::New
|
|
||||||
(
|
|
||||||
this->interpolationSchemes(),
|
|
||||||
this->rho()
|
|
||||||
);
|
|
||||||
|
|
||||||
autoPtr<interpolation<vector> > UInterp = interpolation<vector>::New
|
|
||||||
(
|
|
||||||
this->interpolationSchemes(),
|
|
||||||
this->U()
|
|
||||||
);
|
|
||||||
|
|
||||||
autoPtr<interpolation<scalar> > muInterp = interpolation<scalar>::New
|
|
||||||
(
|
|
||||||
this->interpolationSchemes(),
|
|
||||||
this->mu()
|
|
||||||
);
|
|
||||||
|
|
||||||
autoPtr<interpolation<scalar> > TInterp = interpolation<scalar>::New
|
|
||||||
(
|
|
||||||
this->interpolationSchemes(),
|
|
||||||
T
|
|
||||||
);
|
|
||||||
|
|
||||||
autoPtr<interpolation<scalar> > cpInterp = interpolation<scalar>::New
|
|
||||||
(
|
|
||||||
this->interpolationSchemes(),
|
|
||||||
cp
|
|
||||||
);
|
|
||||||
|
|
||||||
autoPtr<interpolation<scalar> > pInterp = interpolation<scalar>::New
|
|
||||||
(
|
|
||||||
this->interpolationSchemes(),
|
|
||||||
p
|
|
||||||
);
|
|
||||||
|
|
||||||
typename ParcelType::trackData td
|
|
||||||
(
|
|
||||||
*this,
|
|
||||||
constProps_,
|
|
||||||
rhoInterp(),
|
|
||||||
UInterp(),
|
|
||||||
muInterp(),
|
|
||||||
TInterp(),
|
|
||||||
cpInterp(),
|
|
||||||
pInterp(),
|
|
||||||
this->g().value()
|
|
||||||
);
|
|
||||||
|
|
||||||
this->injection().inject(td);
|
|
||||||
|
|
||||||
if (this->coupled())
|
|
||||||
{
|
{
|
||||||
resetSourceTerms();
|
preEvolve();
|
||||||
|
|
||||||
|
evolveCloud();
|
||||||
|
|
||||||
|
postEvolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
Cloud<ParcelType>::move(td);
|
|
||||||
|
|
||||||
postEvolve();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -119,6 +119,9 @@ protected:
|
|||||||
//- Pre-evolve
|
//- Pre-evolve
|
||||||
void preEvolve();
|
void preEvolve();
|
||||||
|
|
||||||
|
//- Evolve the cloud
|
||||||
|
void evolveCloud();
|
||||||
|
|
||||||
//- Post-evolve
|
//- Post-evolve
|
||||||
void postEvolve();
|
void postEvolve();
|
||||||
|
|
||||||
|
|||||||
@ -30,6 +30,81 @@ License
|
|||||||
|
|
||||||
#include "HeatTransferModel.H"
|
#include "HeatTransferModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
void Foam::ThermoCloud<ParcelType>::preEvolve()
|
||||||
|
{
|
||||||
|
KinematicCloud<ParcelType>::preEvolve();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
void Foam::ThermoCloud<ParcelType>::evolveCloud()
|
||||||
|
{
|
||||||
|
const volScalarField& T = carrierThermo_.T();
|
||||||
|
const volScalarField cp = carrierThermo_.Cp();
|
||||||
|
|
||||||
|
autoPtr<interpolation<scalar> > rhoInterp = interpolation<scalar>::New
|
||||||
|
(
|
||||||
|
this->interpolationSchemes(),
|
||||||
|
this->rho()
|
||||||
|
);
|
||||||
|
|
||||||
|
autoPtr<interpolation<vector> > UInterp = interpolation<vector>::New
|
||||||
|
(
|
||||||
|
this->interpolationSchemes(),
|
||||||
|
this->U()
|
||||||
|
);
|
||||||
|
|
||||||
|
autoPtr<interpolation<scalar> > muInterp = interpolation<scalar>::New
|
||||||
|
(
|
||||||
|
this->interpolationSchemes(),
|
||||||
|
this->mu()
|
||||||
|
);
|
||||||
|
|
||||||
|
autoPtr<interpolation<scalar> > TInterp = interpolation<scalar>::New
|
||||||
|
(
|
||||||
|
this->interpolationSchemes(),
|
||||||
|
T
|
||||||
|
);
|
||||||
|
|
||||||
|
autoPtr<interpolation<scalar> > cpInterp = interpolation<scalar>::New
|
||||||
|
(
|
||||||
|
this->interpolationSchemes(),
|
||||||
|
cp
|
||||||
|
);
|
||||||
|
|
||||||
|
typename ParcelType::trackData td
|
||||||
|
(
|
||||||
|
*this,
|
||||||
|
constProps_,
|
||||||
|
rhoInterp(),
|
||||||
|
UInterp(),
|
||||||
|
muInterp(),
|
||||||
|
TInterp(),
|
||||||
|
cpInterp(),
|
||||||
|
this->g().value()
|
||||||
|
);
|
||||||
|
|
||||||
|
this->injection().inject(td);
|
||||||
|
|
||||||
|
if (this->coupled())
|
||||||
|
{
|
||||||
|
resetSourceTerms();
|
||||||
|
}
|
||||||
|
|
||||||
|
Cloud<ParcelType>::move(td);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
void Foam::ThermoCloud<ParcelType>::postEvolve()
|
||||||
|
{
|
||||||
|
KinematicCloud<ParcelType>::postEvolve();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
@ -149,80 +224,17 @@ void Foam::ThermoCloud<ParcelType>::resetSourceTerms()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
void Foam::ThermoCloud<ParcelType>::preEvolve()
|
|
||||||
{
|
|
||||||
KinematicCloud<ParcelType>::preEvolve();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
void Foam::ThermoCloud<ParcelType>::postEvolve()
|
|
||||||
{
|
|
||||||
KinematicCloud<ParcelType>::postEvolve();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::ThermoCloud<ParcelType>::evolve()
|
void Foam::ThermoCloud<ParcelType>::evolve()
|
||||||
{
|
{
|
||||||
preEvolve();
|
if (this->active())
|
||||||
|
|
||||||
const volScalarField& T = carrierThermo_.T();
|
|
||||||
const volScalarField cp = carrierThermo_.Cp();
|
|
||||||
|
|
||||||
autoPtr<interpolation<scalar> > rhoInterp = interpolation<scalar>::New
|
|
||||||
(
|
|
||||||
this->interpolationSchemes(),
|
|
||||||
this->rho()
|
|
||||||
);
|
|
||||||
|
|
||||||
autoPtr<interpolation<vector> > UInterp = interpolation<vector>::New
|
|
||||||
(
|
|
||||||
this->interpolationSchemes(),
|
|
||||||
this->U()
|
|
||||||
);
|
|
||||||
|
|
||||||
autoPtr<interpolation<scalar> > muInterp = interpolation<scalar>::New
|
|
||||||
(
|
|
||||||
this->interpolationSchemes(),
|
|
||||||
this->mu()
|
|
||||||
);
|
|
||||||
|
|
||||||
autoPtr<interpolation<scalar> > TInterp = interpolation<scalar>::New
|
|
||||||
(
|
|
||||||
this->interpolationSchemes(),
|
|
||||||
T
|
|
||||||
);
|
|
||||||
|
|
||||||
autoPtr<interpolation<scalar> > cpInterp = interpolation<scalar>::New
|
|
||||||
(
|
|
||||||
this->interpolationSchemes(),
|
|
||||||
cp
|
|
||||||
);
|
|
||||||
|
|
||||||
typename ParcelType::trackData td
|
|
||||||
(
|
|
||||||
*this,
|
|
||||||
constProps_,
|
|
||||||
rhoInterp(),
|
|
||||||
UInterp(),
|
|
||||||
muInterp(),
|
|
||||||
TInterp(),
|
|
||||||
cpInterp(),
|
|
||||||
this->g().value()
|
|
||||||
);
|
|
||||||
|
|
||||||
this->injection().inject(td);
|
|
||||||
|
|
||||||
if (this->coupled())
|
|
||||||
{
|
{
|
||||||
resetSourceTerms();
|
preEvolve();
|
||||||
|
|
||||||
|
evolveCloud();
|
||||||
|
|
||||||
|
postEvolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
Cloud<ParcelType>::move(td);
|
|
||||||
|
|
||||||
postEvolve();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -125,6 +125,9 @@ protected:
|
|||||||
//- Pre-evolve
|
//- Pre-evolve
|
||||||
void preEvolve();
|
void preEvolve();
|
||||||
|
|
||||||
|
//- Evolve the cloud
|
||||||
|
void evolveCloud();
|
||||||
|
|
||||||
//- Post-evolve
|
//- Post-evolve
|
||||||
void postEvolve();
|
void postEvolve();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user