mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Re-worked lagrangian/intermediate
This commit is contained in:
@ -7,10 +7,6 @@ BASECLOUDS=$(CLOUDS)/baseClasses
|
||||
DERIVEDCLOUDS=$(CLOUDS)/derived
|
||||
|
||||
|
||||
/* Parcels */
|
||||
$(BASEPARCELS)/reactingParcel/reactingParcel.C
|
||||
|
||||
|
||||
/* Cloud base classes */
|
||||
$(BASECLOUDS)/kinematicCloud/kinematicCloud.C
|
||||
$(BASECLOUDS)/thermoCloud/thermoCloud.C
|
||||
@ -20,28 +16,24 @@ $(BASECLOUDS)/reactingMultiphaseCloud/reactingMultiphaseCloud.C
|
||||
|
||||
/* kinematic parcel sub-models */
|
||||
KINEMATICPARCEL=$(DERIVEDPARCELS)/basicKinematicParcel
|
||||
$(KINEMATICPARCEL)/basicKinematicParcel.C
|
||||
$(KINEMATICPARCEL)/defineBasicKinematicParcel.C
|
||||
$(KINEMATICPARCEL)/makeBasicKinematicParcelSubmodels.C
|
||||
|
||||
|
||||
/* thermo parcel sub-models */
|
||||
THERMOPARCEL=$(DERIVEDPARCELS)/basicThermoParcel
|
||||
$(THERMOPARCEL)/basicThermoParcel.C
|
||||
$(THERMOPARCEL)/defineBasicThermoParcel.C
|
||||
$(THERMOPARCEL)/makeBasicThermoParcelSubmodels.C
|
||||
|
||||
|
||||
/* reacting parcel sub-models */
|
||||
REACTINGPARCEL=$(DERIVEDPARCELS)/basicReactingParcel
|
||||
$(REACTINGPARCEL)/basicReactingParcel.C
|
||||
$(REACTINGPARCEL)/defineBasicReactingParcel.C
|
||||
$(REACTINGPARCEL)/makeBasicReactingParcelSubmodels.C
|
||||
|
||||
|
||||
/* reacting multiphase parcel sub-models */
|
||||
REACTINGMPPARCEL=$(DERIVEDPARCELS)/basicReactingMultiphaseParcel
|
||||
$(REACTINGMPPARCEL)/basicReactingMultiphaseParcel.C
|
||||
$(REACTINGMPPARCEL)/defineBasicReactingMultiphaseParcel.C
|
||||
$(REACTINGMPPARCEL)/makeBasicReactingMultiphaseParcelSubmodels.C
|
||||
|
||||
|
||||
70
src/lagrangian/intermediate/Make/files.old
Normal file
70
src/lagrangian/intermediate/Make/files.old
Normal file
@ -0,0 +1,70 @@
|
||||
PARCELS=parcels
|
||||
BASEPARCELS=$(PARCELS)/baseClasses
|
||||
DERIVEDPARCELS=$(PARCELS)/derived
|
||||
|
||||
|
||||
CLOUDS=clouds
|
||||
BASECLOUDS=$(CLOUDS)/baseClasses
|
||||
DERIVEDCLOUDS=$(CLOUDS)/derived
|
||||
|
||||
|
||||
/* Parcels */
|
||||
$(BASEPARCELS)/reactingParcel/reactingParcel.C
|
||||
|
||||
|
||||
/* Cloud base classes */
|
||||
$(BASECLOUDS)/kinematicCloud/kinematicCloud.C
|
||||
$(BASECLOUDS)/thermoCloud/thermoCloud.C
|
||||
$(BASECLOUDS)/reactingCloud/reactingCloud.C
|
||||
|
||||
|
||||
/* kinematic parcel sub-models */
|
||||
KINEMATICPARCEL=$(DERIVEDPARCELS)/basicKinematicParcel
|
||||
$(KINEMATICPARCEL)/basicKinematicParcel.C
|
||||
$(KINEMATICPARCEL)/defineBasicKinematicParcel.C
|
||||
$(KINEMATICPARCEL)/makeBasicKinematicParcelSubmodels.C
|
||||
|
||||
/* thermo parcel sub-models */
|
||||
THERMOPARCEL=$(DERIVEDPARCELS)/basicThermoParcel
|
||||
$(THERMOPARCEL)/basicThermoParcel.C
|
||||
$(THERMOPARCEL)/defineBasicThermoParcel.C
|
||||
$(THERMOPARCEL)/makeBasicThermoParcelSubmodels.C
|
||||
|
||||
/* reacting parcel sub-models */
|
||||
REACTINGPARCEL=$(DERIVEDPARCELS)/basicReactingParcel
|
||||
$(REACTINGPARCEL)/basicReactingParcel.C
|
||||
$(REACTINGPARCEL)/defineBasicReactingParcel.C
|
||||
$(REACTINGPARCEL)/makeBasicReactingParcelSubmodels.C
|
||||
|
||||
|
||||
/* bolt-on models */
|
||||
|
||||
submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionData.C
|
||||
|
||||
KINEMATICINJECTION=submodels/Kinematic/InjectionModel
|
||||
$(KINEMATICINJECTION)/KinematicLookupTableInjection/kinematicParcelInjectionData.C
|
||||
$(KINEMATICINJECTION)/KinematicLookupTableInjection/kinematicParcelInjectionDataIO.C
|
||||
$(KINEMATICINJECTION)/KinematicLookupTableInjection/kinematicParcelInjectionDataIOList.C
|
||||
|
||||
THERMOINJECTION=submodels/Thermodynamic/InjectionModel
|
||||
$(THERMOINJECTION)/ThermoLookupTableInjection/thermoParcelInjectionData.C
|
||||
$(THERMOINJECTION)/ThermoLookupTableInjection/thermoParcelInjectionDataIO.C
|
||||
$(THERMOINJECTION)/ThermoLookupTableInjection/thermoParcelInjectionDataIOList.C
|
||||
|
||||
REACTINGINJECTION=submodels/Reacting/InjectionModel
|
||||
$(REACTINGINJECTION)/ReactingLookupTableInjection/reactingParcelInjectionData.C
|
||||
$(REACTINGINJECTION)/ReactingLookupTableInjection/reactingParcelInjectionDataIO.C
|
||||
$(REACTINGINJECTION)/ReactingLookupTableInjection/reactingParcelInjectionDataIOList.C
|
||||
|
||||
|
||||
/* integration schemes */
|
||||
IntegrationScheme/makeIntegrationSchemes.C
|
||||
|
||||
|
||||
/* phase properties */
|
||||
phaseProperties/phaseProperties/phaseProperties.C
|
||||
phaseProperties/phaseProperties/phasePropertiesIO.C
|
||||
phaseProperties/phasePropertiesList/phasePropertiesList.C
|
||||
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/liblagrangianIntermediate
|
||||
@ -37,8 +37,8 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * cloudSolution * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::KinematicCloud<ParcelType>::cloudSolution::read()
|
||||
template<class CloudType>
|
||||
void Foam::KinematicCloud<CloudType>::cloudSolution::read()
|
||||
{
|
||||
dict_.lookup("transient") >> transient_;
|
||||
dict_.lookup("coupled") >> coupled_;
|
||||
@ -55,8 +55,8 @@ void Foam::KinematicCloud<ParcelType>::cloudSolution::read()
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::KinematicCloud<ParcelType>::cloudSolution::cloudSolution
|
||||
template<class CloudType>
|
||||
Foam::KinematicCloud<CloudType>::cloudSolution::cloudSolution
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
@ -82,8 +82,8 @@ Foam::KinematicCloud<ParcelType>::cloudSolution::cloudSolution
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::KinematicCloud<ParcelType>::cloudSolution::cloudSolution
|
||||
template<class CloudType>
|
||||
Foam::KinematicCloud<CloudType>::cloudSolution::cloudSolution
|
||||
(
|
||||
const cloudSolution& cs
|
||||
)
|
||||
@ -103,8 +103,8 @@ Foam::KinematicCloud<ParcelType>::cloudSolution::cloudSolution
|
||||
{}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::KinematicCloud<ParcelType>::cloudSolution::cloudSolution
|
||||
template<class CloudType>
|
||||
Foam::KinematicCloud<CloudType>::cloudSolution::cloudSolution
|
||||
(
|
||||
const fvMesh& mesh
|
||||
)
|
||||
@ -124,13 +124,13 @@ Foam::KinematicCloud<ParcelType>::cloudSolution::cloudSolution
|
||||
{}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::KinematicCloud<ParcelType>::cloudSolution::~cloudSolution()
|
||||
template<class CloudType>
|
||||
Foam::KinematicCloud<CloudType>::cloudSolution::~cloudSolution()
|
||||
{}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::scalar Foam::KinematicCloud<ParcelType>::cloudSolution::relaxCoeff
|
||||
template<class CloudType>
|
||||
Foam::scalar Foam::KinematicCloud<CloudType>::cloudSolution::relaxCoeff
|
||||
(
|
||||
const word& fieldName
|
||||
) const
|
||||
@ -139,8 +139,8 @@ Foam::scalar Foam::KinematicCloud<ParcelType>::cloudSolution::relaxCoeff
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
bool Foam::KinematicCloud<ParcelType>::cloudSolution::semiImplicit
|
||||
template<class CloudType>
|
||||
bool Foam::KinematicCloud<CloudType>::cloudSolution::semiImplicit
|
||||
(
|
||||
const word& fieldName
|
||||
) const
|
||||
@ -149,8 +149,8 @@ bool Foam::KinematicCloud<ParcelType>::cloudSolution::semiImplicit
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
bool Foam::KinematicCloud<ParcelType>::cloudSolution::solveThisStep() const
|
||||
template<class CloudType>
|
||||
bool Foam::KinematicCloud<CloudType>::cloudSolution::solveThisStep() const
|
||||
{
|
||||
return
|
||||
active_
|
||||
@ -161,8 +161,8 @@ bool Foam::KinematicCloud<ParcelType>::cloudSolution::solveThisStep() const
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
bool Foam::KinematicCloud<ParcelType>::cloudSolution::canEvolve()
|
||||
template<class CloudType>
|
||||
bool Foam::KinematicCloud<CloudType>::cloudSolution::canEvolve()
|
||||
{
|
||||
// Set the calculation time step
|
||||
if (transient_)
|
||||
@ -178,8 +178,8 @@ bool Foam::KinematicCloud<ParcelType>::cloudSolution::canEvolve()
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
bool Foam::KinematicCloud<ParcelType>::cloudSolution::output() const
|
||||
template<class CloudType>
|
||||
bool Foam::KinematicCloud<CloudType>::cloudSolution::output() const
|
||||
{
|
||||
return active_ && mesh_.time().outputTime();
|
||||
}
|
||||
@ -187,12 +187,12 @@ bool Foam::KinematicCloud<ParcelType>::cloudSolution::output() const
|
||||
|
||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::KinematicCloud<ParcelType>::setModels()
|
||||
template<class CloudType>
|
||||
void Foam::KinematicCloud<CloudType>::setModels()
|
||||
{
|
||||
collisionModel_.reset
|
||||
(
|
||||
CollisionModel<KinematicCloud<ParcelType> >::New
|
||||
CollisionModel<KinematicCloud<CloudType> >::New
|
||||
(
|
||||
subModelProperties_,
|
||||
*this
|
||||
@ -201,7 +201,7 @@ void Foam::KinematicCloud<ParcelType>::setModels()
|
||||
|
||||
dispersionModel_.reset
|
||||
(
|
||||
DispersionModel<KinematicCloud<ParcelType> >::New
|
||||
DispersionModel<KinematicCloud<CloudType> >::New
|
||||
(
|
||||
subModelProperties_,
|
||||
*this
|
||||
@ -210,7 +210,7 @@ void Foam::KinematicCloud<ParcelType>::setModels()
|
||||
|
||||
injectionModel_.reset
|
||||
(
|
||||
InjectionModel<KinematicCloud<ParcelType> >::New
|
||||
InjectionModel<KinematicCloud<CloudType> >::New
|
||||
(
|
||||
subModelProperties_,
|
||||
*this
|
||||
@ -219,7 +219,7 @@ void Foam::KinematicCloud<ParcelType>::setModels()
|
||||
|
||||
patchInteractionModel_.reset
|
||||
(
|
||||
PatchInteractionModel<KinematicCloud<ParcelType> >::New
|
||||
PatchInteractionModel<KinematicCloud<CloudType> >::New
|
||||
(
|
||||
subModelProperties_,
|
||||
*this
|
||||
@ -228,7 +228,7 @@ void Foam::KinematicCloud<ParcelType>::setModels()
|
||||
|
||||
postProcessingModel_.reset
|
||||
(
|
||||
PostProcessingModel<KinematicCloud<ParcelType> >::New
|
||||
PostProcessingModel<KinematicCloud<CloudType> >::New
|
||||
(
|
||||
subModelProperties_,
|
||||
*this
|
||||
@ -237,7 +237,7 @@ void Foam::KinematicCloud<ParcelType>::setModels()
|
||||
|
||||
surfaceFilmModel_.reset
|
||||
(
|
||||
SurfaceFilmModel<KinematicCloud<ParcelType> >::New
|
||||
SurfaceFilmModel<KinematicCloud<CloudType> >::New
|
||||
(
|
||||
subModelProperties_,
|
||||
*this,
|
||||
@ -256,11 +256,9 @@ void Foam::KinematicCloud<ParcelType>::setModels()
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::KinematicCloud<ParcelType>::solve
|
||||
(
|
||||
typename ParcelType::trackData& td
|
||||
)
|
||||
template<class CloudType>
|
||||
template<class TrackData>
|
||||
void Foam::KinematicCloud<CloudType>::solve(TrackData& td)
|
||||
{
|
||||
if (solution_.transient())
|
||||
{
|
||||
@ -290,8 +288,8 @@ void Foam::KinematicCloud<ParcelType>::solve
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::KinematicCloud<ParcelType>::preEvolve()
|
||||
template<class CloudType>
|
||||
void Foam::KinematicCloud<CloudType>::preEvolve()
|
||||
{
|
||||
Info<< "\nSolving cloud " << this->name() << endl;
|
||||
|
||||
@ -301,14 +299,14 @@ void Foam::KinematicCloud<ParcelType>::preEvolve()
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::KinematicCloud<ParcelType>::buildCellOccupancy()
|
||||
template<class CloudType>
|
||||
void Foam::KinematicCloud<CloudType>::buildCellOccupancy()
|
||||
{
|
||||
if (cellOccupancyPtr_.empty())
|
||||
{
|
||||
cellOccupancyPtr_.reset
|
||||
(
|
||||
new List<DynamicList<ParcelType*> >(mesh_.nCells())
|
||||
new List<DynamicList<parcelType*> >(mesh_.nCells())
|
||||
);
|
||||
}
|
||||
else if (cellOccupancyPtr_().size() != mesh_.nCells())
|
||||
@ -319,22 +317,22 @@ void Foam::KinematicCloud<ParcelType>::buildCellOccupancy()
|
||||
cellOccupancyPtr_().setSize(mesh_.nCells());
|
||||
}
|
||||
|
||||
List<DynamicList<ParcelType*> >& cellOccupancy = cellOccupancyPtr_();
|
||||
List<DynamicList<parcelType*> >& cellOccupancy = cellOccupancyPtr_();
|
||||
|
||||
forAll(cellOccupancy, cO)
|
||||
{
|
||||
cellOccupancy[cO].clear();
|
||||
}
|
||||
|
||||
forAllIter(typename KinematicCloud<ParcelType>, *this, iter)
|
||||
forAllIter(typename KinematicCloud<CloudType>, *this, iter)
|
||||
{
|
||||
cellOccupancy[iter().cell()].append(&iter());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::KinematicCloud<ParcelType>::updateCellOccupancy()
|
||||
template<class CloudType>
|
||||
void Foam::KinematicCloud<CloudType>::updateCellOccupancy()
|
||||
{
|
||||
// Only build the cellOccupancy if the pointer is set, i.e. it has
|
||||
// been requested before.
|
||||
@ -346,11 +344,9 @@ void Foam::KinematicCloud<ParcelType>::updateCellOccupancy()
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::KinematicCloud<ParcelType>::evolveCloud
|
||||
(
|
||||
typename ParcelType::trackData& td
|
||||
)
|
||||
template<class CloudType>
|
||||
template<class TrackData>
|
||||
void Foam::KinematicCloud<CloudType>::evolveCloud(TrackData& td)
|
||||
{
|
||||
if (solution_.coupled())
|
||||
{
|
||||
@ -384,17 +380,15 @@ void Foam::KinematicCloud<ParcelType>::evolveCloud
|
||||
|
||||
this->injection().injectSteadyState(td, solution_.deltaT());
|
||||
|
||||
td.part() = ParcelType::trackData::tpLinearTrack;
|
||||
Cloud<ParcelType>::move(td, solution_.deltaT());
|
||||
td.part() = TrackData::tpLinearTrack;
|
||||
CloudType::move(td, solution_.deltaT());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::KinematicCloud<ParcelType>::motion
|
||||
(
|
||||
typename ParcelType::trackData& td
|
||||
)
|
||||
template<class CloudType>
|
||||
template<class TrackData>
|
||||
void Foam::KinematicCloud<CloudType>::motion(TrackData& td)
|
||||
{
|
||||
// Sympletic leapfrog integration of particle forces:
|
||||
// + apply half deltaV with stored force
|
||||
@ -428,32 +422,30 @@ void Foam::KinematicCloud<ParcelType>::motion
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::KinematicCloud<ParcelType>::moveCollide
|
||||
(
|
||||
typename ParcelType::trackData& td
|
||||
)
|
||||
template<class CloudType>
|
||||
template<class TrackData>
|
||||
void Foam::KinematicCloud<CloudType>::moveCollide(TrackData& td)
|
||||
{
|
||||
td.part() = ParcelType::trackData::tpVelocityHalfStep;
|
||||
Cloud<ParcelType>::move(td, solution_.deltaT());
|
||||
td.part() = TrackData::tpVelocityHalfStep;
|
||||
CloudType::move(td, solution_.deltaT());
|
||||
|
||||
td.part() = ParcelType::trackData::tpLinearTrack;
|
||||
Cloud<ParcelType>::move(td, solution_.deltaT());
|
||||
td.part() = TrackData::tpLinearTrack;
|
||||
CloudType::move(td, solution_.deltaT());
|
||||
|
||||
// td.part() = ParcelType::trackData::tpRotationalTrack;
|
||||
// Cloud<ParcelType>::move(td);
|
||||
// td.part() = TrackData::tpRotationalTrack;
|
||||
// CloudType::move(td);
|
||||
|
||||
updateCellOccupancy();
|
||||
|
||||
this->collision().collide();
|
||||
|
||||
td.part() = ParcelType::trackData::tpVelocityHalfStep;
|
||||
Cloud<ParcelType>::move(td, solution_.deltaT());
|
||||
td.part() = TrackData::tpVelocityHalfStep;
|
||||
CloudType::move(td, solution_.deltaT());
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::KinematicCloud<ParcelType>::postEvolve()
|
||||
template<class CloudType>
|
||||
void Foam::KinematicCloud<CloudType>::postEvolve()
|
||||
{
|
||||
Info<< endl;
|
||||
|
||||
@ -471,10 +463,10 @@ void Foam::KinematicCloud<ParcelType>::postEvolve()
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::KinematicCloud<ParcelType>::cloudReset(KinematicCloud<ParcelType>& c)
|
||||
template<class CloudType>
|
||||
void Foam::KinematicCloud<CloudType>::cloudReset(KinematicCloud<CloudType>& c)
|
||||
{
|
||||
Cloud<ParcelType>::cloudReset(c);
|
||||
CloudType::cloudReset(c);
|
||||
|
||||
rndGen_ = c.rndGen_;
|
||||
|
||||
@ -492,8 +484,8 @@ void Foam::KinematicCloud<ParcelType>::cloudReset(KinematicCloud<ParcelType>& c)
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::KinematicCloud<ParcelType>::KinematicCloud
|
||||
template<class CloudType>
|
||||
Foam::KinematicCloud<CloudType>::KinematicCloud
|
||||
(
|
||||
const word& cloudName,
|
||||
const volScalarField& rho,
|
||||
@ -503,7 +495,7 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
|
||||
bool readFields
|
||||
)
|
||||
:
|
||||
Cloud<ParcelType>(rho.mesh(), cloudName, false),
|
||||
CloudType(rho.mesh(), cloudName, false),
|
||||
kinematicCloud(),
|
||||
cloudCopyPtr_(NULL),
|
||||
mesh_(rho.mesh()),
|
||||
@ -592,7 +584,7 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
|
||||
|
||||
if (readFields)
|
||||
{
|
||||
ParcelType::readFields(*this);
|
||||
parcelType::readFields(*this);
|
||||
}
|
||||
|
||||
if (solution_.resetSourcesOnStartup())
|
||||
@ -602,14 +594,14 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::KinematicCloud<ParcelType>::KinematicCloud
|
||||
template<class CloudType>
|
||||
Foam::KinematicCloud<CloudType>::KinematicCloud
|
||||
(
|
||||
KinematicCloud<ParcelType>& c,
|
||||
KinematicCloud<CloudType>& c,
|
||||
const word& name
|
||||
)
|
||||
:
|
||||
Cloud<ParcelType>(c.mesh_, name, c),
|
||||
CloudType(c.mesh_, name, c),
|
||||
kinematicCloud(),
|
||||
cloudCopyPtr_(NULL),
|
||||
mesh_(c.mesh_),
|
||||
@ -666,15 +658,15 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
|
||||
{}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::KinematicCloud<ParcelType>::KinematicCloud
|
||||
template<class CloudType>
|
||||
Foam::KinematicCloud<CloudType>::KinematicCloud
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& name,
|
||||
const KinematicCloud<ParcelType>& c
|
||||
const KinematicCloud<CloudType>& c
|
||||
)
|
||||
:
|
||||
Cloud<ParcelType>(mesh, name, IDLList<ParcelType>()),
|
||||
CloudType(mesh, name, IDLList<parcelType>()),
|
||||
kinematicCloud(),
|
||||
cloudCopyPtr_(NULL),
|
||||
mesh_(mesh),
|
||||
@ -714,17 +706,17 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::KinematicCloud<ParcelType>::~KinematicCloud()
|
||||
template<class CloudType>
|
||||
Foam::KinematicCloud<CloudType>::~KinematicCloud()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::KinematicCloud<ParcelType>::checkParcelProperties
|
||||
template<class CloudType>
|
||||
void Foam::KinematicCloud<CloudType>::checkParcelProperties
|
||||
(
|
||||
ParcelType& parcel,
|
||||
parcelType& parcel,
|
||||
const scalar lagrangianDt,
|
||||
const bool fullyDescribed
|
||||
)
|
||||
@ -739,12 +731,12 @@ void Foam::KinematicCloud<ParcelType>::checkParcelProperties
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::KinematicCloud<ParcelType>::storeState()
|
||||
template<class CloudType>
|
||||
void Foam::KinematicCloud<CloudType>::storeState()
|
||||
{
|
||||
cloudCopyPtr_.reset
|
||||
(
|
||||
static_cast<KinematicCloud<ParcelType>*>
|
||||
static_cast<KinematicCloud<CloudType>*>
|
||||
(
|
||||
clone(this->name() + "Copy").ptr()
|
||||
)
|
||||
@ -752,25 +744,25 @@ void Foam::KinematicCloud<ParcelType>::storeState()
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::KinematicCloud<ParcelType>::restoreState()
|
||||
template<class CloudType>
|
||||
void Foam::KinematicCloud<CloudType>::restoreState()
|
||||
{
|
||||
cloudReset(cloudCopyPtr_());
|
||||
cloudCopyPtr_.clear();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::KinematicCloud<ParcelType>::resetSourceTerms()
|
||||
template<class CloudType>
|
||||
void Foam::KinematicCloud<CloudType>::resetSourceTerms()
|
||||
{
|
||||
UTrans().field() = vector::zero;
|
||||
UCoeff().field() = 0.0;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
template<class Type>
|
||||
void Foam::KinematicCloud<ParcelType>::relax
|
||||
void Foam::KinematicCloud<CloudType>::relax
|
||||
(
|
||||
DimensionedField<Type, volMesh>& field,
|
||||
const DimensionedField<Type, volMesh>& field0,
|
||||
@ -783,30 +775,31 @@ void Foam::KinematicCloud<ParcelType>::relax
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::KinematicCloud<ParcelType>::relaxSources
|
||||
template<class CloudType>
|
||||
void Foam::KinematicCloud<CloudType>::relaxSources
|
||||
(
|
||||
const KinematicCloud<ParcelType>& cloudOldTime
|
||||
const KinematicCloud<CloudType>& cloudOldTime
|
||||
)
|
||||
{
|
||||
this->relax(UTrans_(), cloudOldTime.UTrans(), "U");
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::KinematicCloud<ParcelType>::evolve()
|
||||
template<class CloudType>
|
||||
void Foam::KinematicCloud<CloudType>::evolve()
|
||||
{
|
||||
if (solution_.canEvolve())
|
||||
{
|
||||
typename ParcelType::trackData td(*this);
|
||||
typename parcelType::template
|
||||
TrackingData<KinematicCloud<CloudType> > td(*this);
|
||||
|
||||
solve(td);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::KinematicCloud<ParcelType>::info() const
|
||||
template<class CloudType>
|
||||
void Foam::KinematicCloud<CloudType>::info() const
|
||||
{
|
||||
vector linearMomentum = linearMomentumOfSystem();
|
||||
reduce(linearMomentum, sumOp<vector>());
|
||||
|
||||
@ -51,6 +51,7 @@ SourceFiles
|
||||
#ifndef KinematicCloud_H
|
||||
#define KinematicCloud_H
|
||||
|
||||
#include "particle.H"
|
||||
#include "Cloud.H"
|
||||
#include "kinematicCloud.H"
|
||||
#include "IOdictionary.H"
|
||||
@ -62,6 +63,9 @@ SourceFiles
|
||||
|
||||
#include "IntegrationSchemesFwd.H"
|
||||
|
||||
|
||||
#include "ParticleForceList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
@ -92,16 +96,21 @@ class SurfaceFilmModel;
|
||||
Class KinematicCloud Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
class KinematicCloud
|
||||
:
|
||||
public Cloud<ParcelType>,
|
||||
public CloudType,
|
||||
public kinematicCloud
|
||||
{
|
||||
public:
|
||||
|
||||
//- Type of parcel the cloud was instantiated for
|
||||
typedef ParcelType parcelType;
|
||||
// Public typedefs
|
||||
|
||||
//- Redefine particle type as parcel type
|
||||
typedef typename CloudType::particleType parcelType;
|
||||
|
||||
//- Force type
|
||||
typedef ParticleForceList<KinematicCloud<CloudType> > forceType;
|
||||
|
||||
|
||||
private:
|
||||
@ -109,7 +118,7 @@ private:
|
||||
// Private data
|
||||
|
||||
//- Cloud copy pointer
|
||||
autoPtr<KinematicCloud<ParcelType> > cloudCopyPtr_;
|
||||
autoPtr<KinematicCloud<CloudType> > cloudCopyPtr_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
@ -293,7 +302,7 @@ protected:
|
||||
cloudSolution solution_;
|
||||
|
||||
//- Parcel constant properties
|
||||
typename ParcelType::constantProperties constProps_;
|
||||
typename parcelType::constantProperties constProps_;
|
||||
|
||||
//- Sub-models dictionary
|
||||
const dictionary subModelProperties_;
|
||||
@ -302,7 +311,7 @@ protected:
|
||||
cachedRandom rndGen_;
|
||||
|
||||
//- Cell occupancy information for each parcel, (demand driven)
|
||||
autoPtr<List<DynamicList<ParcelType*> > > cellOccupancyPtr_;
|
||||
autoPtr<List<DynamicList<parcelType*> > > cellOccupancyPtr_;
|
||||
|
||||
|
||||
// References to the carrier gas fields
|
||||
@ -324,33 +333,33 @@ protected:
|
||||
|
||||
|
||||
//- Optional particle forces
|
||||
typename ParcelType::forceType forces_;
|
||||
forceType forces_;
|
||||
|
||||
|
||||
// References to the cloud sub-models
|
||||
|
||||
//- Collision model
|
||||
autoPtr<CollisionModel<KinematicCloud<ParcelType> > >
|
||||
autoPtr<CollisionModel<KinematicCloud<CloudType> > >
|
||||
collisionModel_;
|
||||
|
||||
//- Dispersion model
|
||||
autoPtr<DispersionModel<KinematicCloud<ParcelType> > >
|
||||
autoPtr<DispersionModel<KinematicCloud<CloudType> > >
|
||||
dispersionModel_;
|
||||
|
||||
//- Injector model
|
||||
autoPtr<InjectionModel<KinematicCloud<ParcelType> > >
|
||||
autoPtr<InjectionModel<KinematicCloud<CloudType> > >
|
||||
injectionModel_;
|
||||
|
||||
//- Patch interaction model
|
||||
autoPtr<PatchInteractionModel<KinematicCloud<ParcelType> > >
|
||||
autoPtr<PatchInteractionModel<KinematicCloud<CloudType> > >
|
||||
patchInteractionModel_;
|
||||
|
||||
//- Post-processing model
|
||||
autoPtr<PostProcessingModel<KinematicCloud<ParcelType> > >
|
||||
autoPtr<PostProcessingModel<KinematicCloud<CloudType> > >
|
||||
postProcessingModel_;
|
||||
|
||||
//- Surface film model
|
||||
autoPtr<SurfaceFilmModel<KinematicCloud<ParcelType> > >
|
||||
autoPtr<SurfaceFilmModel<KinematicCloud<CloudType> > >
|
||||
surfaceFilmModel_;
|
||||
|
||||
|
||||
@ -378,7 +387,8 @@ protected:
|
||||
// Cloud evolution functions
|
||||
|
||||
//- Solve the cloud - calls all evolution functions
|
||||
void solve(typename ParcelType::trackData& td);
|
||||
template<class TrackData>
|
||||
void solve(TrackData& td);
|
||||
|
||||
//- Pre-evolve
|
||||
void preEvolve();
|
||||
@ -391,23 +401,28 @@ protected:
|
||||
void updateCellOccupancy();
|
||||
|
||||
//- Evolve the cloud
|
||||
void evolveCloud(typename ParcelType::trackData& td);
|
||||
template<class TrackData>
|
||||
void evolveCloud(TrackData& td);
|
||||
|
||||
//- Particle motion
|
||||
void motion(typename ParcelType::trackData& td);
|
||||
template<class TrackData>
|
||||
void motion(TrackData& td);
|
||||
|
||||
//- Move-collide particles
|
||||
void moveCollide(typename ParcelType::trackData& td);
|
||||
template<class TrackData>
|
||||
void moveCollide(TrackData& td);
|
||||
|
||||
//- Post-evolve
|
||||
void postEvolve();
|
||||
|
||||
//- Reset state of cloud
|
||||
void cloudReset(KinematicCloud<ParcelType>& c);
|
||||
void cloudReset(KinematicCloud<CloudType>& c);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
typedef CloudType cloudType;
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct given carrier gas fields
|
||||
@ -422,29 +437,33 @@ public:
|
||||
);
|
||||
|
||||
//- Copy constructor with new name
|
||||
KinematicCloud(KinematicCloud<ParcelType>& c, const word& name);
|
||||
KinematicCloud
|
||||
(
|
||||
KinematicCloud<CloudType>& c,
|
||||
const word& name
|
||||
);
|
||||
|
||||
//- Copy constructor with new name - creates bare cloud
|
||||
KinematicCloud
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& name,
|
||||
const KinematicCloud<ParcelType>& c
|
||||
const KinematicCloud<CloudType>& c
|
||||
);
|
||||
|
||||
//- Construct and return clone based on (this) with new name
|
||||
virtual autoPtr<Cloud<ParcelType> > clone(const word& name)
|
||||
virtual autoPtr<Cloud<parcelType> > clone(const word& name)
|
||||
{
|
||||
return autoPtr<Cloud<ParcelType> >
|
||||
return autoPtr<Cloud<parcelType> >
|
||||
(
|
||||
new KinematicCloud(*this, name)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return bare clone based on (this) with new name
|
||||
virtual autoPtr<Cloud<ParcelType> > cloneBare(const word& name) const
|
||||
virtual autoPtr<Cloud<parcelType> > cloneBare(const word& name) const
|
||||
{
|
||||
return autoPtr<Cloud<ParcelType> >
|
||||
return autoPtr<Cloud<parcelType> >
|
||||
(
|
||||
new KinematicCloud(this->mesh(), name, *this)
|
||||
);
|
||||
@ -471,7 +490,7 @@ public:
|
||||
|
||||
// References to the mesh and databases
|
||||
|
||||
//- Return refernce to the mesh
|
||||
//- Return reference to the mesh
|
||||
inline const fvMesh& mesh() const;
|
||||
|
||||
//- Return particle properties dictionary
|
||||
@ -484,7 +503,7 @@ public:
|
||||
inline cloudSolution& solution();
|
||||
|
||||
//- Return the constant properties
|
||||
inline const typename ParcelType::constantProperties&
|
||||
inline const typename parcelType::constantProperties&
|
||||
constProps() const;
|
||||
|
||||
//- Return reference to the sub-models dictionary
|
||||
@ -493,14 +512,14 @@ public:
|
||||
|
||||
// Cloud data
|
||||
|
||||
//- Return refernce to the random object
|
||||
//- Return reference to the random object
|
||||
inline cachedRandom& rndGen();
|
||||
|
||||
//- Return the cell occupancy information for each
|
||||
// parcel, non-const access, the caller is
|
||||
// responsible for updating it for its own purposes
|
||||
// if particles are removed or created.
|
||||
inline List<DynamicList<ParcelType*> >& cellOccupancy();
|
||||
inline List<DynamicList<parcelType*> >& cellOccupancy();
|
||||
|
||||
|
||||
// References to the carrier gas fields
|
||||
@ -522,53 +541,54 @@ public:
|
||||
|
||||
|
||||
//- Optional particle forces
|
||||
inline const typename ParcelType::forceType& forces() const;
|
||||
// inline const typename parcelType::forceType& forces() const;
|
||||
inline const forceType& forces() const;
|
||||
|
||||
|
||||
// Sub-models
|
||||
|
||||
//- Return const access to the collision model
|
||||
inline const CollisionModel<KinematicCloud<ParcelType> >&
|
||||
inline const CollisionModel<KinematicCloud<CloudType> >&
|
||||
collision() const;
|
||||
|
||||
//- Return reference to the collision model
|
||||
inline CollisionModel<KinematicCloud<ParcelType> >&
|
||||
inline CollisionModel<KinematicCloud<CloudType> >&
|
||||
collision();
|
||||
|
||||
//- Return const-access to the dispersion model
|
||||
inline const DispersionModel<KinematicCloud<ParcelType> >&
|
||||
inline const DispersionModel<KinematicCloud<CloudType> >&
|
||||
dispersion() const;
|
||||
|
||||
//- Return reference to the dispersion model
|
||||
inline DispersionModel<KinematicCloud<ParcelType> >&
|
||||
inline DispersionModel<KinematicCloud<CloudType> >&
|
||||
dispersion();
|
||||
|
||||
//- Return const access to the injection model
|
||||
inline const InjectionModel<KinematicCloud<ParcelType> >&
|
||||
inline const InjectionModel<KinematicCloud<CloudType> >&
|
||||
injection() const;
|
||||
|
||||
//- Return reference to the injection model
|
||||
inline InjectionModel<KinematicCloud<ParcelType> >&
|
||||
inline InjectionModel<KinematicCloud<CloudType> >&
|
||||
injection();
|
||||
|
||||
//- Return const-access to the patch interaction model
|
||||
inline const PatchInteractionModel<KinematicCloud<ParcelType> >&
|
||||
inline const PatchInteractionModel<KinematicCloud<CloudType> >&
|
||||
patchInteraction() const;
|
||||
|
||||
//- Return reference to the patch interaction model
|
||||
inline PatchInteractionModel<KinematicCloud<ParcelType> >&
|
||||
inline PatchInteractionModel<KinematicCloud<CloudType> >&
|
||||
patchInteraction();
|
||||
|
||||
//- Return reference to post-processing model
|
||||
inline PostProcessingModel<KinematicCloud<ParcelType> >&
|
||||
inline PostProcessingModel<KinematicCloud<CloudType> >&
|
||||
postProcessing();
|
||||
|
||||
//- Return const-access to the surface film model
|
||||
inline const SurfaceFilmModel<KinematicCloud<ParcelType> >&
|
||||
inline const SurfaceFilmModel<KinematicCloud<CloudType> >&
|
||||
surfaceFilm() const;
|
||||
|
||||
//- Return reference to the surface film model
|
||||
inline SurfaceFilmModel<KinematicCloud<ParcelType> >&
|
||||
inline SurfaceFilmModel<KinematicCloud<CloudType> >&
|
||||
surfaceFilm();
|
||||
|
||||
|
||||
@ -638,7 +658,7 @@ public:
|
||||
//- Check parcel properties
|
||||
void checkParcelProperties
|
||||
(
|
||||
ParcelType& parcel,
|
||||
parcelType& parcel,
|
||||
const scalar lagrangianDt,
|
||||
const bool fullyDescribed
|
||||
);
|
||||
@ -662,7 +682,7 @@ public:
|
||||
) const;
|
||||
|
||||
//- Apply relaxation to (steady state) cloud sources
|
||||
void relaxSources(const KinematicCloud<ParcelType>& cloudOldTime);
|
||||
void relaxSources(const KinematicCloud<CloudType>& cloudOldTime);
|
||||
|
||||
//- Evolve the cloud
|
||||
void evolve();
|
||||
|
||||
@ -27,136 +27,136 @@ License
|
||||
|
||||
// * * * * * * * * * * * cloudSolution Member Functions * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::fvMesh&
|
||||
Foam::KinematicCloud<ParcelType>::cloudSolution::mesh() const
|
||||
Foam::KinematicCloud<CloudType>::cloudSolution::mesh() const
|
||||
{
|
||||
return mesh_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::dictionary&
|
||||
Foam::KinematicCloud<ParcelType>::cloudSolution::dict() const
|
||||
Foam::KinematicCloud<CloudType>::cloudSolution::dict() const
|
||||
{
|
||||
return dict_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::Switch
|
||||
Foam::KinematicCloud<ParcelType>::cloudSolution::active() const
|
||||
Foam::KinematicCloud<CloudType>::cloudSolution::active() const
|
||||
{
|
||||
return active_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::dictionary&
|
||||
Foam::KinematicCloud<ParcelType>::cloudSolution::sourceTermDict() const
|
||||
Foam::KinematicCloud<CloudType>::cloudSolution::sourceTermDict() const
|
||||
{
|
||||
return dict_.subDict("sourceTerms");
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::dictionary&
|
||||
Foam::KinematicCloud<ParcelType>::cloudSolution::interpolationSchemes() const
|
||||
Foam::KinematicCloud<CloudType>::cloudSolution::interpolationSchemes() const
|
||||
{
|
||||
return dict_.subDict("interpolationSchemes");
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::dictionary&
|
||||
Foam::KinematicCloud<ParcelType>::cloudSolution::integrationSchemes() const
|
||||
Foam::KinematicCloud<CloudType>::cloudSolution::integrationSchemes() const
|
||||
{
|
||||
return dict_.subDict("integrationSchemes");
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::Switch
|
||||
Foam::KinematicCloud<ParcelType>::cloudSolution::transient() const
|
||||
Foam::KinematicCloud<CloudType>::cloudSolution::transient() const
|
||||
{
|
||||
return transient_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::Switch
|
||||
Foam::KinematicCloud<ParcelType>::cloudSolution::steadyState() const
|
||||
Foam::KinematicCloud<CloudType>::cloudSolution::steadyState() const
|
||||
{
|
||||
return !transient_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline Foam::label
|
||||
Foam::KinematicCloud<ParcelType>::cloudSolution::calcFrequency() const
|
||||
Foam::KinematicCloud<CloudType>::cloudSolution::calcFrequency() const
|
||||
{
|
||||
return calcFrequency_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline Foam::scalar
|
||||
Foam::KinematicCloud<ParcelType>::cloudSolution::maxCo() const
|
||||
Foam::KinematicCloud<CloudType>::cloudSolution::maxCo() const
|
||||
{
|
||||
return maxCo_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::label Foam::KinematicCloud<ParcelType>::cloudSolution::iter() const
|
||||
template<class CloudType>
|
||||
inline Foam::label Foam::KinematicCloud<CloudType>::cloudSolution::iter() const
|
||||
{
|
||||
return iter_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::label Foam::KinematicCloud<ParcelType>::cloudSolution::nextIter()
|
||||
template<class CloudType>
|
||||
inline Foam::label Foam::KinematicCloud<CloudType>::cloudSolution::nextIter()
|
||||
{
|
||||
return ++iter_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline Foam::scalar
|
||||
Foam::KinematicCloud<ParcelType>::cloudSolution::deltaT() const
|
||||
Foam::KinematicCloud<CloudType>::cloudSolution::deltaT() const
|
||||
{
|
||||
return deltaT_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::Switch
|
||||
Foam::KinematicCloud<ParcelType>::cloudSolution::coupled() const
|
||||
Foam::KinematicCloud<CloudType>::cloudSolution::coupled() const
|
||||
{
|
||||
return coupled_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::Switch
|
||||
Foam::KinematicCloud<ParcelType>::cloudSolution::cellValueSourceCorrection()
|
||||
Foam::KinematicCloud<CloudType>::cloudSolution::cellValueSourceCorrection()
|
||||
const
|
||||
{
|
||||
return cellValueSourceCorrection_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline Foam::scalar
|
||||
Foam::KinematicCloud<ParcelType>::cloudSolution::maxTrackTime() const
|
||||
Foam::KinematicCloud<CloudType>::cloudSolution::maxTrackTime() const
|
||||
{
|
||||
return maxTrackTime_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::Switch
|
||||
Foam::KinematicCloud<ParcelType>::cloudSolution::resetSourcesOnStartup() const
|
||||
Foam::KinematicCloud<CloudType>::cloudSolution::resetSourcesOnStartup() const
|
||||
{
|
||||
return resetSourcesOnStartup_;
|
||||
}
|
||||
@ -164,209 +164,208 @@ Foam::KinematicCloud<ParcelType>::cloudSolution::resetSourcesOnStartup() const
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::KinematicCloud<ParcelType>&
|
||||
Foam::KinematicCloud<ParcelType>::cloudCopy() const
|
||||
template<class CloudType>
|
||||
inline const Foam::KinematicCloud<CloudType>&
|
||||
Foam::KinematicCloud<CloudType>::cloudCopy() const
|
||||
{
|
||||
return cloudCopyPtr_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline bool Foam::KinematicCloud<ParcelType>::hasWallImpactDistance() const
|
||||
template<class CloudType>
|
||||
inline bool Foam::KinematicCloud<CloudType>::hasWallImpactDistance() const
|
||||
{
|
||||
return !collision().controlsWallInteraction();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::fvMesh& Foam::KinematicCloud<ParcelType>::mesh() const
|
||||
template<class CloudType>
|
||||
inline const Foam::fvMesh& Foam::KinematicCloud<CloudType>::mesh() const
|
||||
{
|
||||
return mesh_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::IOdictionary&
|
||||
Foam::KinematicCloud<ParcelType>::particleProperties() const
|
||||
Foam::KinematicCloud<CloudType>::particleProperties() const
|
||||
{
|
||||
return particleProperties_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const typename Foam::KinematicCloud<ParcelType>::cloudSolution&
|
||||
Foam::KinematicCloud<ParcelType>::solution() const
|
||||
template<class CloudType>
|
||||
inline const typename Foam::KinematicCloud<CloudType>::cloudSolution&
|
||||
Foam::KinematicCloud<CloudType>::solution() const
|
||||
{
|
||||
return solution_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline typename Foam::KinematicCloud<ParcelType>::cloudSolution&
|
||||
Foam::KinematicCloud<ParcelType>::solution()
|
||||
template<class CloudType>
|
||||
inline typename Foam::KinematicCloud<CloudType>::cloudSolution&
|
||||
Foam::KinematicCloud<CloudType>::solution()
|
||||
{
|
||||
return solution_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const typename ParcelType::constantProperties&
|
||||
Foam::KinematicCloud<ParcelType>::constProps() const
|
||||
template<class CloudType>
|
||||
inline const typename CloudType::particleType::constantProperties&
|
||||
Foam::KinematicCloud<CloudType>::constProps() const
|
||||
{
|
||||
return constProps_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::dictionary&
|
||||
Foam::KinematicCloud<ParcelType>::subModelProperties() const
|
||||
Foam::KinematicCloud<CloudType>::subModelProperties() const
|
||||
{
|
||||
return subModelProperties_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::volScalarField&
|
||||
Foam::KinematicCloud<ParcelType>::rho() const
|
||||
template<class CloudType>
|
||||
inline const Foam::volScalarField& Foam::KinematicCloud<CloudType>::rho() const
|
||||
{
|
||||
return rho_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::volVectorField& Foam::KinematicCloud<ParcelType>::U() const
|
||||
template<class CloudType>
|
||||
inline const Foam::volVectorField& Foam::KinematicCloud<CloudType>::U() const
|
||||
{
|
||||
return U_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::volScalarField& Foam::KinematicCloud<ParcelType>::mu() const
|
||||
template<class CloudType>
|
||||
inline const Foam::volScalarField& Foam::KinematicCloud<CloudType>::mu() const
|
||||
{
|
||||
return mu_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::dimensionedVector&
|
||||
Foam::KinematicCloud<ParcelType>::g() const
|
||||
template<class CloudType>
|
||||
inline const Foam::dimensionedVector& Foam::KinematicCloud<CloudType>::g() const
|
||||
{
|
||||
return g_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const typename ParcelType::forceType&
|
||||
Foam::KinematicCloud<ParcelType>::forces() const
|
||||
template<class CloudType>
|
||||
//inline const typename CloudType::parcelType::forceType&
|
||||
inline const typename Foam::KinematicCloud<CloudType>::forceType&
|
||||
Foam::KinematicCloud<CloudType>::forces() const
|
||||
{
|
||||
return forces_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::CollisionModel<Foam::KinematicCloud<ParcelType> >&
|
||||
Foam::KinematicCloud<ParcelType>::collision() const
|
||||
template<class CloudType>
|
||||
inline const Foam::CollisionModel<Foam::KinematicCloud<CloudType> >&
|
||||
Foam::KinematicCloud<CloudType>::collision() const
|
||||
{
|
||||
return collisionModel_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::CollisionModel<Foam::KinematicCloud<ParcelType> >&
|
||||
Foam::KinematicCloud<ParcelType>::collision()
|
||||
template<class CloudType>
|
||||
inline Foam::CollisionModel<Foam::KinematicCloud<CloudType> >&
|
||||
Foam::KinematicCloud<CloudType>::collision()
|
||||
{
|
||||
return collisionModel_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::DispersionModel<Foam::KinematicCloud<ParcelType> >&
|
||||
Foam::KinematicCloud<ParcelType>::dispersion() const
|
||||
template<class CloudType>
|
||||
inline const Foam::DispersionModel<Foam::KinematicCloud<CloudType> >&
|
||||
Foam::KinematicCloud<CloudType>::dispersion() const
|
||||
{
|
||||
return dispersionModel_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::DispersionModel<Foam::KinematicCloud<ParcelType> >&
|
||||
Foam::KinematicCloud<ParcelType>::dispersion()
|
||||
template<class CloudType>
|
||||
inline Foam::DispersionModel<Foam::KinematicCloud<CloudType> >&
|
||||
Foam::KinematicCloud<CloudType>::dispersion()
|
||||
{
|
||||
return dispersionModel_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::InjectionModel<Foam::KinematicCloud<ParcelType> >&
|
||||
Foam::KinematicCloud<ParcelType>::injection() const
|
||||
template<class CloudType>
|
||||
inline const Foam::InjectionModel<Foam::KinematicCloud<CloudType> >&
|
||||
Foam::KinematicCloud<CloudType>::injection() const
|
||||
{
|
||||
return injectionModel_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::PatchInteractionModel<Foam::KinematicCloud<ParcelType> >&
|
||||
Foam::KinematicCloud<ParcelType>::patchInteraction() const
|
||||
template<class CloudType>
|
||||
inline const Foam::PatchInteractionModel<Foam::KinematicCloud<CloudType> >&
|
||||
Foam::KinematicCloud<CloudType>::patchInteraction() const
|
||||
{
|
||||
return patchInteractionModel_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::PatchInteractionModel<Foam::KinematicCloud<ParcelType> >&
|
||||
Foam::KinematicCloud<ParcelType>::patchInteraction()
|
||||
template<class CloudType>
|
||||
inline Foam::PatchInteractionModel<Foam::KinematicCloud<CloudType> >&
|
||||
Foam::KinematicCloud<CloudType>::patchInteraction()
|
||||
{
|
||||
return patchInteractionModel_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::InjectionModel<Foam::KinematicCloud<ParcelType> >&
|
||||
Foam::KinematicCloud<ParcelType>::injection()
|
||||
template<class CloudType>
|
||||
inline Foam::InjectionModel<Foam::KinematicCloud<CloudType> >&
|
||||
Foam::KinematicCloud<CloudType>::injection()
|
||||
{
|
||||
return injectionModel_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::PostProcessingModel<Foam::KinematicCloud<ParcelType> >&
|
||||
Foam::KinematicCloud<ParcelType>::postProcessing()
|
||||
template<class CloudType>
|
||||
inline Foam::PostProcessingModel<Foam::KinematicCloud<CloudType> >&
|
||||
Foam::KinematicCloud<CloudType>::postProcessing()
|
||||
{
|
||||
return postProcessingModel_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::SurfaceFilmModel<Foam::KinematicCloud<ParcelType> >&
|
||||
Foam::KinematicCloud<ParcelType>::surfaceFilm() const
|
||||
template<class CloudType>
|
||||
inline const Foam::SurfaceFilmModel<Foam::KinematicCloud<CloudType> >&
|
||||
Foam::KinematicCloud<CloudType>::surfaceFilm() const
|
||||
{
|
||||
return surfaceFilmModel_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::SurfaceFilmModel<Foam::KinematicCloud<ParcelType> >&
|
||||
Foam::KinematicCloud<ParcelType>::surfaceFilm()
|
||||
template<class CloudType>
|
||||
inline Foam::SurfaceFilmModel<Foam::KinematicCloud<CloudType> >&
|
||||
Foam::KinematicCloud<CloudType>::surfaceFilm()
|
||||
{
|
||||
return surfaceFilmModel_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::vectorIntegrationScheme&
|
||||
Foam::KinematicCloud<ParcelType>::UIntegrator() const
|
||||
Foam::KinematicCloud<CloudType>::UIntegrator() const
|
||||
{
|
||||
return UIntegrator_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar Foam::KinematicCloud<ParcelType>::massInSystem() const
|
||||
template<class CloudType>
|
||||
inline Foam::scalar Foam::KinematicCloud<CloudType>::massInSystem() const
|
||||
{
|
||||
scalar sysMass = 0.0;
|
||||
forAllConstIter(typename KinematicCloud<ParcelType>, *this, iter)
|
||||
forAllConstIter(typename KinematicCloud<CloudType>, *this, iter)
|
||||
{
|
||||
const ParcelType& p = iter();
|
||||
const parcelType& p = iter();
|
||||
sysMass += p.mass()*p.nParticle();
|
||||
}
|
||||
|
||||
@ -374,15 +373,15 @@ inline Foam::scalar Foam::KinematicCloud<ParcelType>::massInSystem() const
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline Foam::vector
|
||||
Foam::KinematicCloud<ParcelType>::linearMomentumOfSystem() const
|
||||
Foam::KinematicCloud<CloudType>::linearMomentumOfSystem() const
|
||||
{
|
||||
vector linearMomentum(vector::zero);
|
||||
|
||||
forAllConstIter(typename KinematicCloud<ParcelType>, *this, iter)
|
||||
forAllConstIter(typename KinematicCloud<CloudType>, *this, iter)
|
||||
{
|
||||
const ParcelType& p = iter();
|
||||
const parcelType& p = iter();
|
||||
|
||||
linearMomentum += p.mass()*p.U();
|
||||
}
|
||||
@ -391,15 +390,15 @@ Foam::KinematicCloud<ParcelType>::linearMomentumOfSystem() const
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline Foam::scalar
|
||||
Foam::KinematicCloud<ParcelType>::linearKineticEnergyOfSystem() const
|
||||
Foam::KinematicCloud<CloudType>::linearKineticEnergyOfSystem() const
|
||||
{
|
||||
scalar linearKineticEnergy = 0.0;
|
||||
|
||||
forAllConstIter(typename KinematicCloud<ParcelType>, *this, iter)
|
||||
forAllConstIter(typename KinematicCloud<CloudType>, *this, iter)
|
||||
{
|
||||
const ParcelType& p = iter();
|
||||
const parcelType& p = iter();
|
||||
|
||||
linearKineticEnergy += 0.5*p.mass()*(p.U() & p.U());
|
||||
}
|
||||
@ -408,16 +407,15 @@ Foam::KinematicCloud<ParcelType>::linearKineticEnergyOfSystem() const
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline Foam::scalar
|
||||
Foam::KinematicCloud<ParcelType>::
|
||||
rotationalKineticEnergyOfSystem() const
|
||||
Foam::KinematicCloud<CloudType>::rotationalKineticEnergyOfSystem() const
|
||||
{
|
||||
scalar rotationalKineticEnergy = 0.0;
|
||||
|
||||
forAllConstIter(typename KinematicCloud<ParcelType>, *this, iter)
|
||||
forAllConstIter(typename KinematicCloud<CloudType>, *this, iter)
|
||||
{
|
||||
const ParcelType& p = iter();
|
||||
const parcelType& p = iter();
|
||||
|
||||
rotationalKineticEnergy +=
|
||||
0.5*p.momentOfInertia()*(p.omega() & p.omega());
|
||||
@ -427,16 +425,16 @@ rotationalKineticEnergyOfSystem() const
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::cachedRandom& Foam::KinematicCloud<ParcelType>::rndGen()
|
||||
template<class CloudType>
|
||||
inline Foam::cachedRandom& Foam::KinematicCloud<CloudType>::rndGen()
|
||||
{
|
||||
return rndGen_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::List<Foam::DynamicList<ParcelType*> >&
|
||||
Foam::KinematicCloud<ParcelType>::cellOccupancy()
|
||||
template<class CloudType>
|
||||
inline Foam::List<Foam::DynamicList<typename CloudType::particleType*> >&
|
||||
Foam::KinematicCloud<CloudType>::cellOccupancy()
|
||||
{
|
||||
if (cellOccupancyPtr_.empty())
|
||||
{
|
||||
@ -447,41 +445,41 @@ Foam::KinematicCloud<ParcelType>::cellOccupancy()
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline Foam::DimensionedField<Foam::vector, Foam::volMesh>&
|
||||
Foam::KinematicCloud<ParcelType>::UTrans()
|
||||
Foam::KinematicCloud<CloudType>::UTrans()
|
||||
{
|
||||
return UTrans_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::DimensionedField<Foam::vector, Foam::volMesh>&
|
||||
Foam::KinematicCloud<ParcelType>::UTrans() const
|
||||
Foam::KinematicCloud<CloudType>::UTrans() const
|
||||
{
|
||||
return UTrans_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
||||
Foam::KinematicCloud<ParcelType>::UCoeff()
|
||||
Foam::KinematicCloud<CloudType>::UCoeff()
|
||||
{
|
||||
return UCoeff_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
||||
Foam::KinematicCloud<ParcelType>::UCoeff() const
|
||||
Foam::KinematicCloud<CloudType>::UCoeff() const
|
||||
{
|
||||
return UCoeff_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline Foam::tmp<Foam::fvVectorMatrix>
|
||||
Foam::KinematicCloud<ParcelType>::SU(volVectorField& U) const
|
||||
Foam::KinematicCloud<CloudType>::SU(volVectorField& U) const
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
@ -515,9 +513,9 @@ Foam::KinematicCloud<ParcelType>::SU(volVectorField& U) const
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::tmp<Foam::volScalarField>
|
||||
Foam::KinematicCloud<ParcelType>::theta() const
|
||||
Foam::KinematicCloud<CloudType>::theta() const
|
||||
{
|
||||
tmp<volScalarField> ttheta
|
||||
(
|
||||
@ -538,9 +536,9 @@ Foam::KinematicCloud<ParcelType>::theta() const
|
||||
);
|
||||
|
||||
scalarField& theta = ttheta().internalField();
|
||||
forAllConstIter(typename KinematicCloud<ParcelType>, *this, iter)
|
||||
forAllConstIter(typename KinematicCloud<CloudType>, *this, iter)
|
||||
{
|
||||
const ParcelType& p = iter();
|
||||
const parcelType& p = iter();
|
||||
const label cellI = p.cell();
|
||||
|
||||
theta[cellI] += p.nParticle()*p.volume();
|
||||
@ -552,9 +550,9 @@ Foam::KinematicCloud<ParcelType>::theta() const
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::tmp<Foam::volScalarField>
|
||||
Foam::KinematicCloud<ParcelType>::alpha() const
|
||||
Foam::KinematicCloud<CloudType>::alpha() const
|
||||
{
|
||||
tmp<volScalarField> talpha
|
||||
(
|
||||
@ -575,9 +573,9 @@ Foam::KinematicCloud<ParcelType>::alpha() const
|
||||
);
|
||||
|
||||
scalarField& alpha = talpha().internalField();
|
||||
forAllConstIter(typename KinematicCloud<ParcelType>, *this, iter)
|
||||
forAllConstIter(typename KinematicCloud<CloudType>, *this, iter)
|
||||
{
|
||||
const ParcelType& p = iter();
|
||||
const parcelType& p = iter();
|
||||
const label cellI = p.cell();
|
||||
|
||||
alpha[cellI] += p.nParticle()*p.mass();
|
||||
@ -589,9 +587,9 @@ Foam::KinematicCloud<ParcelType>::alpha() const
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::tmp<Foam::volScalarField>
|
||||
Foam::KinematicCloud<ParcelType>::rhoEff() const
|
||||
Foam::KinematicCloud<CloudType>::rhoEff() const
|
||||
{
|
||||
tmp<volScalarField> trhoEff
|
||||
(
|
||||
@ -612,9 +610,9 @@ Foam::KinematicCloud<ParcelType>::rhoEff() const
|
||||
);
|
||||
|
||||
scalarField& rhoEff = trhoEff().internalField();
|
||||
forAllConstIter(typename KinematicCloud<ParcelType>, *this, iter)
|
||||
forAllConstIter(typename KinematicCloud<CloudType>, *this, iter)
|
||||
{
|
||||
const ParcelType& p = iter();
|
||||
const parcelType& p = iter();
|
||||
const label cellI = p.cell();
|
||||
|
||||
rhoEff[cellI] += p.nParticle()*p.mass();
|
||||
|
||||
@ -30,12 +30,12 @@ License
|
||||
|
||||
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingCloud<ParcelType>::setModels()
|
||||
template<class CloudType>
|
||||
void Foam::ReactingCloud<CloudType>::setModels()
|
||||
{
|
||||
compositionModel_.reset
|
||||
(
|
||||
CompositionModel<ReactingCloud<ParcelType> >::New
|
||||
CompositionModel<ReactingCloud<CloudType> >::New
|
||||
(
|
||||
this->subModelProperties(),
|
||||
*this
|
||||
@ -44,7 +44,7 @@ void Foam::ReactingCloud<ParcelType>::setModels()
|
||||
|
||||
phaseChangeModel_.reset
|
||||
(
|
||||
PhaseChangeModel<ReactingCloud<ParcelType> >::New
|
||||
PhaseChangeModel<ReactingCloud<CloudType> >::New
|
||||
(
|
||||
this->subModelProperties(),
|
||||
*this
|
||||
@ -53,8 +53,8 @@ void Foam::ReactingCloud<ParcelType>::setModels()
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingCloud<ParcelType>::checkSuppliedComposition
|
||||
template<class CloudType>
|
||||
void Foam::ReactingCloud<CloudType>::checkSuppliedComposition
|
||||
(
|
||||
const scalarField& YSupplied,
|
||||
const scalarField& Y,
|
||||
@ -65,7 +65,7 @@ void Foam::ReactingCloud<ParcelType>::checkSuppliedComposition
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"ReactingCloud<ParcelType>::checkSuppliedComposition"
|
||||
"ReactingCloud<CloudType>::checkSuppliedComposition"
|
||||
"("
|
||||
"const scalarField&, "
|
||||
"const scalarField&, "
|
||||
@ -80,10 +80,10 @@ void Foam::ReactingCloud<ParcelType>::checkSuppliedComposition
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingCloud<ParcelType>::cloudReset(ReactingCloud<ParcelType>& c)
|
||||
template<class CloudType>
|
||||
void Foam::ReactingCloud<CloudType>::cloudReset(ReactingCloud<CloudType>& c)
|
||||
{
|
||||
ThermoCloud<ParcelType>::cloudReset(c);
|
||||
CloudType::cloudReset(c);
|
||||
|
||||
compositionModel_.reset(c.compositionModel_.ptr());
|
||||
phaseChangeModel_.reset(c.phaseChangeModel_.ptr());
|
||||
@ -94,8 +94,8 @@ void Foam::ReactingCloud<ParcelType>::cloudReset(ReactingCloud<ParcelType>& c)
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::ReactingCloud<ParcelType>::ReactingCloud
|
||||
template<class CloudType>
|
||||
Foam::ReactingCloud<CloudType>::ReactingCloud
|
||||
(
|
||||
const word& cloudName,
|
||||
const volScalarField& rho,
|
||||
@ -105,7 +105,7 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud
|
||||
bool readFields
|
||||
)
|
||||
:
|
||||
ThermoCloud<ParcelType>(cloudName, rho, U, g, thermo, false),
|
||||
CloudType(cloudName, rho, U, g, thermo, false),
|
||||
reactingCloud(),
|
||||
cloudCopyPtr_(NULL),
|
||||
constProps_(this->particleProperties(), this->solution().active()),
|
||||
@ -144,7 +144,7 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud
|
||||
|
||||
if (readFields)
|
||||
{
|
||||
ParcelType::readFields(*this);
|
||||
parcelType::readFields(*this, this->composition());
|
||||
}
|
||||
|
||||
if (this->solution().resetSourcesOnStartup())
|
||||
@ -154,14 +154,14 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::ReactingCloud<ParcelType>::ReactingCloud
|
||||
template<class CloudType>
|
||||
Foam::ReactingCloud<CloudType>::ReactingCloud
|
||||
(
|
||||
ReactingCloud<ParcelType>& c,
|
||||
ReactingCloud<CloudType>& c,
|
||||
const word& name
|
||||
)
|
||||
:
|
||||
ThermoCloud<ParcelType>(c, name),
|
||||
CloudType(c, name),
|
||||
reactingCloud(),
|
||||
cloudCopyPtr_(NULL),
|
||||
constProps_(c.constProps_),
|
||||
@ -194,15 +194,15 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::ReactingCloud<ParcelType>::ReactingCloud
|
||||
template<class CloudType>
|
||||
Foam::ReactingCloud<CloudType>::ReactingCloud
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& name,
|
||||
const ReactingCloud<ParcelType>& c
|
||||
const ReactingCloud<CloudType>& c
|
||||
)
|
||||
:
|
||||
ThermoCloud<ParcelType>(mesh, name, c),
|
||||
CloudType(mesh, name, c),
|
||||
reactingCloud(),
|
||||
cloudCopyPtr_(NULL),
|
||||
constProps_(),
|
||||
@ -216,22 +216,22 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::ReactingCloud<ParcelType>::~ReactingCloud()
|
||||
template<class CloudType>
|
||||
Foam::ReactingCloud<CloudType>::~ReactingCloud()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingCloud<ParcelType>::checkParcelProperties
|
||||
template<class CloudType>
|
||||
void Foam::ReactingCloud<CloudType>::checkParcelProperties
|
||||
(
|
||||
ParcelType& parcel,
|
||||
parcelType& parcel,
|
||||
const scalar lagrangianDt,
|
||||
const bool fullyDescribed
|
||||
)
|
||||
{
|
||||
ThermoCloud<ParcelType>::checkParcelProperties
|
||||
CloudType::checkParcelProperties
|
||||
(
|
||||
parcel,
|
||||
lagrangianDt,
|
||||
@ -257,12 +257,12 @@ void Foam::ReactingCloud<ParcelType>::checkParcelProperties
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingCloud<ParcelType>::storeState()
|
||||
template<class CloudType>
|
||||
void Foam::ReactingCloud<CloudType>::storeState()
|
||||
{
|
||||
cloudCopyPtr_.reset
|
||||
(
|
||||
static_cast<ReactingCloud<ParcelType>*>
|
||||
static_cast<ReactingCloud<CloudType>*>
|
||||
(
|
||||
clone(this->name() + "Copy").ptr()
|
||||
)
|
||||
@ -270,18 +270,18 @@ void Foam::ReactingCloud<ParcelType>::storeState()
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingCloud<ParcelType>::restoreState()
|
||||
template<class CloudType>
|
||||
void Foam::ReactingCloud<CloudType>::restoreState()
|
||||
{
|
||||
cloudReset(cloudCopyPtr_());
|
||||
cloudCopyPtr_.clear();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingCloud<ParcelType>::resetSourceTerms()
|
||||
template<class CloudType>
|
||||
void Foam::ReactingCloud<CloudType>::resetSourceTerms()
|
||||
{
|
||||
ThermoCloud<ParcelType>::resetSourceTerms();
|
||||
CloudType::resetSourceTerms();
|
||||
forAll(rhoTrans_, i)
|
||||
{
|
||||
rhoTrans_[i].field() = 0.0;
|
||||
@ -289,15 +289,15 @@ void Foam::ReactingCloud<ParcelType>::resetSourceTerms()
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingCloud<ParcelType>::relaxSources
|
||||
template<class CloudType>
|
||||
void Foam::ReactingCloud<CloudType>::relaxSources
|
||||
(
|
||||
const ReactingCloud<ParcelType>& cloudOldTime
|
||||
const ReactingCloud<CloudType>& cloudOldTime
|
||||
)
|
||||
{
|
||||
typedef DimensionedField<scalar, volMesh> dsfType;
|
||||
|
||||
ThermoCloud<ParcelType>::relaxSources(cloudOldTime);
|
||||
CloudType::relaxSources(cloudOldTime);
|
||||
|
||||
forAll(rhoTrans_, fieldI)
|
||||
{
|
||||
@ -308,33 +308,44 @@ void Foam::ReactingCloud<ParcelType>::relaxSources
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingCloud<ParcelType>::evolve()
|
||||
template<class CloudType>
|
||||
void Foam::ReactingCloud<CloudType>::evolve()
|
||||
{
|
||||
if (this->solution().canEvolve())
|
||||
{
|
||||
typename ParcelType::trackData td(*this);
|
||||
typename parcelType::template
|
||||
TrackingData<ReactingCloud<CloudType> > td(*this);
|
||||
|
||||
this->solve(td);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingCloud<ParcelType>::addToMassPhaseChange(const scalar dMass)
|
||||
template<class CloudType>
|
||||
void Foam::ReactingCloud<CloudType>::addToMassPhaseChange(const scalar dMass)
|
||||
{
|
||||
dMassPhaseChange_ += dMass;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingCloud<ParcelType>::info() const
|
||||
template<class CloudType>
|
||||
void Foam::ReactingCloud<CloudType>::info() const
|
||||
{
|
||||
ThermoCloud<ParcelType>::info();
|
||||
CloudType::info();
|
||||
|
||||
Info<< " Mass transfer phase change = "
|
||||
<< returnReduce(dMassPhaseChange_, sumOp<scalar>()) << nl;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::ReactingCloud<CloudType>::writeFields() const
|
||||
{
|
||||
if (this->size())
|
||||
{
|
||||
CloudType::particleType::writeFields(*this, this->composition());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -40,7 +40,6 @@ SourceFiles
|
||||
#ifndef ReactingCloud_H
|
||||
#define ReactingCloud_H
|
||||
|
||||
#include "ThermoCloud.H"
|
||||
#include "reactingCloud.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -60,19 +59,24 @@ class PhaseChangeModel;
|
||||
Class ReactingCloud Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
class ReactingCloud
|
||||
:
|
||||
public ThermoCloud<ParcelType>,
|
||||
public CloudType,
|
||||
public reactingCloud
|
||||
{
|
||||
public:
|
||||
|
||||
//- Type of parcel the cloud was instantiated for
|
||||
typedef typename CloudType::particleType parcelType;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Private data
|
||||
|
||||
//- Cloud copy pointer
|
||||
autoPtr<ReactingCloud<ParcelType> > cloudCopyPtr_;
|
||||
autoPtr<ReactingCloud<CloudType> > cloudCopyPtr_;
|
||||
|
||||
|
||||
// Private member functions
|
||||
@ -89,17 +93,17 @@ protected:
|
||||
// Protected data
|
||||
|
||||
//- Parcel constant properties
|
||||
typename ParcelType::constantProperties constProps_;
|
||||
typename parcelType::constantProperties constProps_;
|
||||
|
||||
|
||||
// References to the cloud sub-models
|
||||
|
||||
//- Reacting composition model
|
||||
autoPtr<CompositionModel<ReactingCloud<ParcelType> > >
|
||||
autoPtr<CompositionModel<ReactingCloud<CloudType> > >
|
||||
compositionModel_;
|
||||
|
||||
//- Reacting phase change model
|
||||
autoPtr<PhaseChangeModel<ReactingCloud<ParcelType> > >
|
||||
autoPtr<PhaseChangeModel<ReactingCloud<CloudType> > >
|
||||
phaseChangeModel_;
|
||||
|
||||
|
||||
@ -137,11 +141,13 @@ protected:
|
||||
// Cloud evolution functions
|
||||
|
||||
//- Reset state of cloud
|
||||
void cloudReset(ReactingCloud<ParcelType>& c);
|
||||
void cloudReset(ReactingCloud<CloudType>& c);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
typedef CloudType cloudType;
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct given carrier gas fields
|
||||
@ -156,29 +162,29 @@ public:
|
||||
);
|
||||
|
||||
//- Copy constructor with new name
|
||||
ReactingCloud(ReactingCloud<ParcelType>& c, const word& name);
|
||||
ReactingCloud(ReactingCloud<CloudType>& c, const word& name);
|
||||
|
||||
//- Copy constructor with new name - creates bare cloud
|
||||
ReactingCloud
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& name,
|
||||
const ReactingCloud<ParcelType>& c
|
||||
const ReactingCloud<CloudType>& c
|
||||
);
|
||||
|
||||
//- Construct and return clone based on (this) with new name
|
||||
virtual autoPtr<Cloud<ParcelType> > clone(const word& name)
|
||||
virtual autoPtr<Cloud<parcelType> > clone(const word& name)
|
||||
{
|
||||
return autoPtr<Cloud<ParcelType> >
|
||||
return autoPtr<Cloud<parcelType> >
|
||||
(
|
||||
new ReactingCloud(*this, name)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return bare clone based on (this) with new name
|
||||
virtual autoPtr<Cloud<ParcelType> > cloneBare(const word& name) const
|
||||
virtual autoPtr<Cloud<parcelType> > cloneBare(const word& name) const
|
||||
{
|
||||
return autoPtr<Cloud<ParcelType> >
|
||||
return autoPtr<Cloud<parcelType> >
|
||||
(
|
||||
new ReactingCloud(this->mesh(), name, *this)
|
||||
);
|
||||
@ -189,10 +195,6 @@ public:
|
||||
virtual ~ReactingCloud();
|
||||
|
||||
|
||||
//- Type of parcel the cloud was instantiated for
|
||||
typedef ParcelType parcelType;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
@ -201,18 +203,18 @@ public:
|
||||
inline const ReactingCloud& cloudCopy() const;
|
||||
|
||||
//- Return the constant properties
|
||||
inline const typename ParcelType::constantProperties&
|
||||
inline const typename parcelType::constantProperties&
|
||||
constProps() const;
|
||||
|
||||
|
||||
// Sub-models
|
||||
|
||||
//- Return reference to reacting composition model
|
||||
inline const CompositionModel<ReactingCloud<ParcelType> >&
|
||||
inline const CompositionModel<ReactingCloud<CloudType> >&
|
||||
composition() const;
|
||||
|
||||
//- Return reference to reacting phase change model
|
||||
inline const PhaseChangeModel<ReactingCloud<ParcelType> >&
|
||||
inline const PhaseChangeModel<ReactingCloud<CloudType> >&
|
||||
phaseChange() const;
|
||||
|
||||
|
||||
@ -262,7 +264,7 @@ public:
|
||||
//- Check parcel properties
|
||||
void checkParcelProperties
|
||||
(
|
||||
ParcelType& parcel,
|
||||
parcelType& parcel,
|
||||
const scalar lagrangianDt,
|
||||
const bool fullyDescribed
|
||||
);
|
||||
@ -277,13 +279,19 @@ public:
|
||||
void resetSourceTerms();
|
||||
|
||||
//- Apply relaxation to (steady state) cloud sources
|
||||
void relaxSources(const ReactingCloud<ParcelType>& cloudOldTime);
|
||||
void relaxSources(const ReactingCloud<CloudType>& cloudOldTime);
|
||||
|
||||
//- Evolve the cloud
|
||||
void evolve();
|
||||
|
||||
//- Print cloud information
|
||||
void info() const;
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write the field data for the cloud
|
||||
virtual void writeFields() const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -25,66 +25,65 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::ReactingCloud<ParcelType>&
|
||||
Foam::ReactingCloud<ParcelType>::cloudCopy() const
|
||||
template<class CloudType>
|
||||
inline const Foam::ReactingCloud<CloudType>&
|
||||
Foam::ReactingCloud<CloudType>::cloudCopy() const
|
||||
{
|
||||
return cloudCopyPtr_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const typename ParcelType::constantProperties&
|
||||
Foam::ReactingCloud<ParcelType>::constProps() const
|
||||
template<class CloudType>
|
||||
inline const typename CloudType::particleType::constantProperties&
|
||||
Foam::ReactingCloud<CloudType>::constProps() const
|
||||
{
|
||||
return constProps_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::CompositionModel<Foam::ReactingCloud<ParcelType> >&
|
||||
Foam::ReactingCloud<ParcelType>::composition() const
|
||||
template<class CloudType>
|
||||
inline const Foam::CompositionModel<Foam::ReactingCloud<CloudType> >&
|
||||
Foam::ReactingCloud<CloudType>::composition() const
|
||||
{
|
||||
return compositionModel_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::PhaseChangeModel<Foam::ReactingCloud<ParcelType> >&
|
||||
Foam::ReactingCloud<ParcelType>::phaseChange() const
|
||||
template<class CloudType>
|
||||
inline const Foam::PhaseChangeModel<Foam::ReactingCloud<CloudType> >&
|
||||
Foam::ReactingCloud<CloudType>::phaseChange() const
|
||||
{
|
||||
return phaseChangeModel_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
||||
Foam::ReactingCloud<ParcelType>::rhoTrans(const label i)
|
||||
Foam::ReactingCloud<CloudType>::rhoTrans(const label i)
|
||||
{
|
||||
return rhoTrans_[i];
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline
|
||||
const Foam::PtrList<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >&
|
||||
Foam::ReactingCloud<ParcelType>::rhoTrans() const
|
||||
Foam::ReactingCloud<CloudType>::rhoTrans() const
|
||||
{
|
||||
return rhoTrans_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline Foam::PtrList<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >&
|
||||
Foam::ReactingCloud<ParcelType>::rhoTrans()
|
||||
Foam::ReactingCloud<CloudType>::rhoTrans()
|
||||
{
|
||||
return rhoTrans_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::tmp<Foam::fvScalarMatrix>
|
||||
Foam::ReactingCloud<ParcelType>::SYi
|
||||
template<class CloudType>
|
||||
inline Foam::tmp<Foam::fvScalarMatrix> Foam::ReactingCloud<CloudType>::SYi
|
||||
(
|
||||
const label i,
|
||||
volScalarField& Yi
|
||||
@ -138,9 +137,9 @@ Foam::ReactingCloud<ParcelType>::SYi
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
|
||||
Foam::ReactingCloud<ParcelType>::Srho(const label i) const
|
||||
Foam::ReactingCloud<CloudType>::Srho(const label i) const
|
||||
{
|
||||
tmp<DimensionedField<scalar, volMesh> > tRhoi
|
||||
(
|
||||
@ -175,9 +174,9 @@ Foam::ReactingCloud<ParcelType>::Srho(const label i) const
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
|
||||
Foam::ReactingCloud<ParcelType>::Srho() const
|
||||
Foam::ReactingCloud<CloudType>::Srho() const
|
||||
{
|
||||
tmp<DimensionedField<scalar, volMesh> > trhoTrans
|
||||
(
|
||||
@ -217,9 +216,9 @@ Foam::ReactingCloud<ParcelType>::Srho() const
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline Foam::tmp<Foam::fvScalarMatrix>
|
||||
Foam::ReactingCloud<ParcelType>::Srho(volScalarField& rho) const
|
||||
Foam::ReactingCloud<CloudType>::Srho(volScalarField& rho) const
|
||||
{
|
||||
if (this->solution().coupled())
|
||||
{
|
||||
|
||||
@ -30,12 +30,12 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingMultiphaseCloud<ParcelType>::setModels()
|
||||
template<class CloudType>
|
||||
void Foam::ReactingMultiphaseCloud<CloudType>::setModels()
|
||||
{
|
||||
devolatilisationModel_.reset
|
||||
(
|
||||
DevolatilisationModel<ReactingMultiphaseCloud<ParcelType> >::New
|
||||
DevolatilisationModel<ReactingMultiphaseCloud<CloudType> >::New
|
||||
(
|
||||
this->subModelProperties(),
|
||||
*this
|
||||
@ -44,7 +44,7 @@ void Foam::ReactingMultiphaseCloud<ParcelType>::setModels()
|
||||
|
||||
surfaceReactionModel_.reset
|
||||
(
|
||||
SurfaceReactionModel<ReactingMultiphaseCloud<ParcelType> >::New
|
||||
SurfaceReactionModel<ReactingMultiphaseCloud<CloudType> >::New
|
||||
(
|
||||
this->subModelProperties(),
|
||||
*this
|
||||
@ -53,13 +53,13 @@ void Foam::ReactingMultiphaseCloud<ParcelType>::setModels()
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingMultiphaseCloud<ParcelType>::cloudReset
|
||||
template<class CloudType>
|
||||
void Foam::ReactingMultiphaseCloud<CloudType>::cloudReset
|
||||
(
|
||||
ReactingMultiphaseCloud<ParcelType>& c
|
||||
ReactingMultiphaseCloud<CloudType>& c
|
||||
)
|
||||
{
|
||||
ReactingCloud<ParcelType>::cloudReset(c);
|
||||
CloudType::cloudReset(c);
|
||||
|
||||
devolatilisationModel_.reset(c.devolatilisationModel_.ptr());
|
||||
surfaceReactionModel_.reset(c.surfaceReactionModel_.ptr());
|
||||
@ -71,8 +71,8 @@ void Foam::ReactingMultiphaseCloud<ParcelType>::cloudReset
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud
|
||||
template<class CloudType>
|
||||
Foam::ReactingMultiphaseCloud<CloudType>::ReactingMultiphaseCloud
|
||||
(
|
||||
const word& cloudName,
|
||||
const volScalarField& rho,
|
||||
@ -82,7 +82,7 @@ Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud
|
||||
bool readFields
|
||||
)
|
||||
:
|
||||
ReactingCloud<ParcelType>(cloudName, rho, U, g, thermo, false),
|
||||
CloudType(cloudName, rho, U, g, thermo, false),
|
||||
reactingMultiphaseCloud(),
|
||||
cloudCopyPtr_(NULL),
|
||||
constProps_(this->particleProperties(), this->solution().active()),
|
||||
@ -98,7 +98,7 @@ Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud
|
||||
|
||||
if (readFields)
|
||||
{
|
||||
ParcelType::readFields(*this);
|
||||
parcelType::readFields(*this, this->composition());
|
||||
}
|
||||
|
||||
if (this->solution().resetSourcesOnStartup())
|
||||
@ -108,14 +108,14 @@ Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud
|
||||
template<class CloudType>
|
||||
Foam::ReactingMultiphaseCloud<CloudType>::ReactingMultiphaseCloud
|
||||
(
|
||||
ReactingMultiphaseCloud<ParcelType>& c,
|
||||
ReactingMultiphaseCloud<CloudType>& c,
|
||||
const word& name
|
||||
)
|
||||
:
|
||||
ReactingCloud<ParcelType>(c, name),
|
||||
CloudType(c, name),
|
||||
reactingMultiphaseCloud(),
|
||||
cloudCopyPtr_(NULL),
|
||||
constProps_(c.constProps_),
|
||||
@ -126,15 +126,15 @@ Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud
|
||||
{}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud
|
||||
template<class CloudType>
|
||||
Foam::ReactingMultiphaseCloud<CloudType>::ReactingMultiphaseCloud
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& name,
|
||||
const ReactingMultiphaseCloud<ParcelType>& c
|
||||
const ReactingMultiphaseCloud<CloudType>& c
|
||||
)
|
||||
:
|
||||
ReactingCloud<ParcelType>(mesh, name, c),
|
||||
CloudType(mesh, name, c),
|
||||
reactingMultiphaseCloud(),
|
||||
cloudCopyPtr_(NULL),
|
||||
constProps_(),
|
||||
@ -147,22 +147,22 @@ Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::ReactingMultiphaseCloud<ParcelType>::~ReactingMultiphaseCloud()
|
||||
template<class CloudType>
|
||||
Foam::ReactingMultiphaseCloud<CloudType>::~ReactingMultiphaseCloud()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingMultiphaseCloud<ParcelType>::checkParcelProperties
|
||||
template<class CloudType>
|
||||
void Foam::ReactingMultiphaseCloud<CloudType>::checkParcelProperties
|
||||
(
|
||||
ParcelType& parcel,
|
||||
parcelType& parcel,
|
||||
const scalar lagrangianDt,
|
||||
const bool fullyDescribed
|
||||
)
|
||||
{
|
||||
ReactingCloud<ParcelType>::checkParcelProperties
|
||||
CloudType::checkParcelProperties
|
||||
(
|
||||
parcel,
|
||||
lagrangianDt,
|
||||
@ -203,12 +203,12 @@ void Foam::ReactingMultiphaseCloud<ParcelType>::checkParcelProperties
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingMultiphaseCloud<ParcelType>::storeState()
|
||||
template<class CloudType>
|
||||
void Foam::ReactingMultiphaseCloud<CloudType>::storeState()
|
||||
{
|
||||
cloudCopyPtr_.reset
|
||||
(
|
||||
static_cast<ReactingMultiphaseCloud<ParcelType>*>
|
||||
static_cast<ReactingMultiphaseCloud<CloudType>*>
|
||||
(
|
||||
clone(this->name() + "Copy").ptr()
|
||||
)
|
||||
@ -216,35 +216,36 @@ void Foam::ReactingMultiphaseCloud<ParcelType>::storeState()
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingMultiphaseCloud<ParcelType>::restoreState()
|
||||
template<class CloudType>
|
||||
void Foam::ReactingMultiphaseCloud<CloudType>::restoreState()
|
||||
{
|
||||
cloudReset(cloudCopyPtr_());
|
||||
cloudCopyPtr_.clear();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingMultiphaseCloud<ParcelType>::resetSourceTerms()
|
||||
template<class CloudType>
|
||||
void Foam::ReactingMultiphaseCloud<CloudType>::resetSourceTerms()
|
||||
{
|
||||
ReactingCloud<ParcelType>::resetSourceTerms();
|
||||
CloudType::resetSourceTerms();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingMultiphaseCloud<ParcelType>::evolve()
|
||||
template<class CloudType>
|
||||
void Foam::ReactingMultiphaseCloud<CloudType>::evolve()
|
||||
{
|
||||
if (this->solution().canEvolve())
|
||||
{
|
||||
typename ParcelType::trackData td(*this);
|
||||
typename parcelType::template
|
||||
TrackingData<ReactingMultiphaseCloud<CloudType> > td(*this);
|
||||
|
||||
this->solve(td);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingMultiphaseCloud<ParcelType>::addToMassDevolatilisation
|
||||
template<class CloudType>
|
||||
void Foam::ReactingMultiphaseCloud<CloudType>::addToMassDevolatilisation
|
||||
(
|
||||
const scalar dMass
|
||||
)
|
||||
@ -253,8 +254,8 @@ void Foam::ReactingMultiphaseCloud<ParcelType>::addToMassDevolatilisation
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingMultiphaseCloud<ParcelType>::addToMassSurfaceReaction
|
||||
template<class CloudType>
|
||||
void Foam::ReactingMultiphaseCloud<CloudType>::addToMassSurfaceReaction
|
||||
(
|
||||
const scalar dMass
|
||||
)
|
||||
@ -263,10 +264,10 @@ void Foam::ReactingMultiphaseCloud<ParcelType>::addToMassSurfaceReaction
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingMultiphaseCloud<ParcelType>::info() const
|
||||
template<class CloudType>
|
||||
void Foam::ReactingMultiphaseCloud<CloudType>::info() const
|
||||
{
|
||||
ReactingCloud<ParcelType>::info();
|
||||
CloudType::info();
|
||||
Info<< " Mass transfer devolatilisation = "
|
||||
<< returnReduce(dMassDevolatilisation_, sumOp<scalar>()) << nl;
|
||||
Info<< " Mass transfer surface reaction = "
|
||||
@ -274,4 +275,14 @@ void Foam::ReactingMultiphaseCloud<ParcelType>::info() const
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::ReactingMultiphaseCloud<CloudType>::writeFields() const
|
||||
{
|
||||
if (this->size())
|
||||
{
|
||||
CloudType::particleType::writeFields(*this, this->composition());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -61,16 +61,24 @@ class SurfaceReactionModel;
|
||||
Class ReactingMultiphaseCloud Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
class ReactingMultiphaseCloud
|
||||
:
|
||||
public ReactingCloud<ParcelType>,
|
||||
public CloudType,
|
||||
public reactingMultiphaseCloud
|
||||
{
|
||||
public:
|
||||
|
||||
//- Type of parcel the cloud was instantiated for
|
||||
typedef typename CloudType::particleType parcelType;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Private data
|
||||
|
||||
//- Cloud copy pointer
|
||||
autoPtr<ReactingMultiphaseCloud<ParcelType> > cloudCopyPtr_;
|
||||
autoPtr<ReactingMultiphaseCloud<CloudType> > cloudCopyPtr_;
|
||||
|
||||
|
||||
// Private member functions
|
||||
@ -87,7 +95,7 @@ protected:
|
||||
// Protected data
|
||||
|
||||
//- Parcel constant properties
|
||||
typename ParcelType::constantProperties constProps_;
|
||||
typename parcelType::constantProperties constProps_;
|
||||
|
||||
|
||||
// References to the cloud sub-models
|
||||
@ -95,14 +103,14 @@ protected:
|
||||
//- Devolatilisation model
|
||||
autoPtr
|
||||
<
|
||||
DevolatilisationModel<ReactingMultiphaseCloud<ParcelType> >
|
||||
DevolatilisationModel<ReactingMultiphaseCloud<CloudType> >
|
||||
>
|
||||
devolatilisationModel_;
|
||||
|
||||
//- Surface reaction model
|
||||
autoPtr
|
||||
<
|
||||
SurfaceReactionModel<ReactingMultiphaseCloud<ParcelType> >
|
||||
SurfaceReactionModel<ReactingMultiphaseCloud<CloudType> >
|
||||
>
|
||||
surfaceReactionModel_;
|
||||
|
||||
@ -128,11 +136,13 @@ protected:
|
||||
// Cloud evolution functions
|
||||
|
||||
//- Reset state of cloud
|
||||
void cloudReset(ReactingMultiphaseCloud<ParcelType>& c);
|
||||
void cloudReset(ReactingMultiphaseCloud<CloudType>& c);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
typedef CloudType cloudType;
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct given carrier gas fields
|
||||
@ -150,7 +160,7 @@ public:
|
||||
//- Copy constructor with new name
|
||||
ReactingMultiphaseCloud
|
||||
(
|
||||
ReactingMultiphaseCloud<ParcelType>& c,
|
||||
ReactingMultiphaseCloud<CloudType>& c,
|
||||
const word& name
|
||||
);
|
||||
|
||||
@ -159,22 +169,22 @@ public:
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& name,
|
||||
const ReactingMultiphaseCloud<ParcelType>& c
|
||||
const ReactingMultiphaseCloud<CloudType>& c
|
||||
);
|
||||
|
||||
//- Construct and return clone based on (this) with new name
|
||||
virtual autoPtr<Cloud<ParcelType> > clone(const word& name)
|
||||
virtual autoPtr<Cloud<parcelType> > clone(const word& name)
|
||||
{
|
||||
return autoPtr<Cloud<ParcelType> >
|
||||
return autoPtr<Cloud<parcelType> >
|
||||
(
|
||||
new ReactingMultiphaseCloud(*this, name)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return bare clone based on (this) with new name
|
||||
virtual autoPtr<Cloud<ParcelType> > cloneBare(const word& name) const
|
||||
virtual autoPtr<Cloud<parcelType> > cloneBare(const word& name) const
|
||||
{
|
||||
return autoPtr<Cloud<ParcelType> >
|
||||
return autoPtr<Cloud<parcelType> >
|
||||
(
|
||||
new ReactingMultiphaseCloud(this->mesh(), name, *this)
|
||||
);
|
||||
@ -185,10 +195,6 @@ public:
|
||||
virtual ~ReactingMultiphaseCloud();
|
||||
|
||||
|
||||
//- Type of parcel the cloud was instantiated for
|
||||
typedef ParcelType parcelType;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
@ -197,7 +203,7 @@ public:
|
||||
inline const ReactingMultiphaseCloud& cloudCopy() const;
|
||||
|
||||
//- Return the constant properties
|
||||
inline const typename ParcelType::constantProperties&
|
||||
inline const typename parcelType::constantProperties&
|
||||
constProps() const;
|
||||
|
||||
|
||||
@ -206,14 +212,14 @@ public:
|
||||
//- Return reference to devolatilisation model
|
||||
inline const DevolatilisationModel
|
||||
<
|
||||
ReactingMultiphaseCloud<ParcelType>
|
||||
ReactingMultiphaseCloud<CloudType>
|
||||
>&
|
||||
devolatilisation() const;
|
||||
|
||||
//- Return reference to reacting surface reaction model
|
||||
inline const SurfaceReactionModel
|
||||
<
|
||||
ReactingMultiphaseCloud<ParcelType>
|
||||
ReactingMultiphaseCloud<CloudType>
|
||||
>&
|
||||
surfaceReaction() const;
|
||||
|
||||
@ -232,7 +238,7 @@ public:
|
||||
//- Check parcel properties
|
||||
void checkParcelProperties
|
||||
(
|
||||
ParcelType& parcel,
|
||||
parcelType& parcel,
|
||||
const scalar lagrangianDt,
|
||||
const bool fullyDescribed
|
||||
);
|
||||
@ -251,6 +257,12 @@ public:
|
||||
|
||||
//- Print cloud information
|
||||
void info() const;
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write the field data for the cloud
|
||||
virtual void writeFields() const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,39 +25,39 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::ReactingMultiphaseCloud<ParcelType>&
|
||||
Foam::ReactingMultiphaseCloud<ParcelType>::cloudCopy() const
|
||||
template<class CloudType>
|
||||
inline const Foam::ReactingMultiphaseCloud<CloudType>&
|
||||
Foam::ReactingMultiphaseCloud<CloudType>::cloudCopy() const
|
||||
{
|
||||
return cloudCopyPtr_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const typename ParcelType::constantProperties&
|
||||
Foam::ReactingMultiphaseCloud<ParcelType>::constProps() const
|
||||
template<class CloudType>
|
||||
inline const typename CloudType::particleType::constantProperties&
|
||||
Foam::ReactingMultiphaseCloud<CloudType>::constProps() const
|
||||
{
|
||||
return constProps_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::DevolatilisationModel
|
||||
<
|
||||
Foam::ReactingMultiphaseCloud<ParcelType>
|
||||
Foam::ReactingMultiphaseCloud<CloudType>
|
||||
>&
|
||||
Foam::ReactingMultiphaseCloud<ParcelType>::devolatilisation() const
|
||||
Foam::ReactingMultiphaseCloud<CloudType>::devolatilisation() const
|
||||
{
|
||||
return devolatilisationModel_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::SurfaceReactionModel
|
||||
<
|
||||
Foam::ReactingMultiphaseCloud<ParcelType>
|
||||
Foam::ReactingMultiphaseCloud<CloudType>
|
||||
>&
|
||||
Foam::ReactingMultiphaseCloud<ParcelType>::surfaceReaction() const
|
||||
Foam::ReactingMultiphaseCloud<CloudType>::surfaceReaction() const
|
||||
{
|
||||
return surfaceReactionModel_;
|
||||
}
|
||||
|
||||
@ -30,12 +30,12 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ThermoCloud<ParcelType>::setModels()
|
||||
template<class CloudType>
|
||||
void Foam::ThermoCloud<CloudType>::setModels()
|
||||
{
|
||||
heatTransferModel_.reset
|
||||
(
|
||||
HeatTransferModel<ThermoCloud<ParcelType> >::New
|
||||
HeatTransferModel<ThermoCloud<CloudType> >::New
|
||||
(
|
||||
this->subModelProperties(),
|
||||
*this
|
||||
@ -55,10 +55,10 @@ void Foam::ThermoCloud<ParcelType>::setModels()
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ThermoCloud<ParcelType>::cloudReset(ThermoCloud<ParcelType>& c)
|
||||
template<class CloudType>
|
||||
void Foam::ThermoCloud<CloudType>::cloudReset(ThermoCloud<CloudType>& c)
|
||||
{
|
||||
KinematicCloud<ParcelType>::cloudReset(c);
|
||||
CloudType::cloudReset(c);
|
||||
|
||||
heatTransferModel_.reset(c.heatTransferModel_.ptr());
|
||||
TIntegrator_.reset(c.TIntegrator_.ptr());
|
||||
@ -69,8 +69,8 @@ void Foam::ThermoCloud<ParcelType>::cloudReset(ThermoCloud<ParcelType>& c)
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::ThermoCloud<ParcelType>::ThermoCloud
|
||||
template<class CloudType>
|
||||
Foam::ThermoCloud<CloudType>::ThermoCloud
|
||||
(
|
||||
const word& cloudName,
|
||||
const volScalarField& rho,
|
||||
@ -80,7 +80,7 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud
|
||||
bool readFields
|
||||
)
|
||||
:
|
||||
KinematicCloud<ParcelType>
|
||||
CloudType
|
||||
(
|
||||
cloudName,
|
||||
rho,
|
||||
@ -139,7 +139,7 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud
|
||||
|
||||
if (readFields)
|
||||
{
|
||||
ParcelType::readFields(*this);
|
||||
parcelType::readFields(*this);
|
||||
}
|
||||
|
||||
if (this->solution().resetSourcesOnStartup())
|
||||
@ -149,14 +149,14 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::ThermoCloud<ParcelType>::ThermoCloud
|
||||
template<class CloudType>
|
||||
Foam::ThermoCloud<CloudType>::ThermoCloud
|
||||
(
|
||||
ThermoCloud<ParcelType>& c,
|
||||
ThermoCloud<CloudType>& c,
|
||||
const word& name
|
||||
)
|
||||
:
|
||||
KinematicCloud<ParcelType>(c, name),
|
||||
CloudType(c, name),
|
||||
thermoCloud(),
|
||||
cloudCopyPtr_(NULL),
|
||||
constProps_(c.constProps_),
|
||||
@ -201,15 +201,15 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud
|
||||
{}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::ThermoCloud<ParcelType>::ThermoCloud
|
||||
template<class CloudType>
|
||||
Foam::ThermoCloud<CloudType>::ThermoCloud
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& name,
|
||||
const ThermoCloud<ParcelType>& c
|
||||
const ThermoCloud<CloudType>& c
|
||||
)
|
||||
:
|
||||
KinematicCloud<ParcelType>(mesh, name, c),
|
||||
CloudType(mesh, name, c),
|
||||
thermoCloud(),
|
||||
cloudCopyPtr_(NULL),
|
||||
constProps_(),
|
||||
@ -226,27 +226,22 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::ThermoCloud<ParcelType>::~ThermoCloud()
|
||||
template<class CloudType>
|
||||
Foam::ThermoCloud<CloudType>::~ThermoCloud()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ThermoCloud<ParcelType>::checkParcelProperties
|
||||
template<class CloudType>
|
||||
void Foam::ThermoCloud<CloudType>::checkParcelProperties
|
||||
(
|
||||
ParcelType& parcel,
|
||||
parcelType& parcel,
|
||||
const scalar lagrangianDt,
|
||||
const bool fullyDescribed
|
||||
)
|
||||
{
|
||||
KinematicCloud<ParcelType>::checkParcelProperties
|
||||
(
|
||||
parcel,
|
||||
lagrangianDt,
|
||||
fullyDescribed
|
||||
);
|
||||
CloudType::checkParcelProperties(parcel, lagrangianDt, fullyDescribed);
|
||||
|
||||
if (!fullyDescribed)
|
||||
{
|
||||
@ -256,12 +251,12 @@ void Foam::ThermoCloud<ParcelType>::checkParcelProperties
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ThermoCloud<ParcelType>::storeState()
|
||||
template<class CloudType>
|
||||
void Foam::ThermoCloud<CloudType>::storeState()
|
||||
{
|
||||
cloudCopyPtr_.reset
|
||||
(
|
||||
static_cast<ThermoCloud<ParcelType>*>
|
||||
static_cast<ThermoCloud<CloudType>*>
|
||||
(
|
||||
clone(this->name() + "Copy").ptr()
|
||||
)
|
||||
@ -269,51 +264,52 @@ void Foam::ThermoCloud<ParcelType>::storeState()
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ThermoCloud<ParcelType>::restoreState()
|
||||
template<class CloudType>
|
||||
void Foam::ThermoCloud<CloudType>::restoreState()
|
||||
{
|
||||
cloudReset(cloudCopyPtr_());
|
||||
cloudCopyPtr_.clear();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ThermoCloud<ParcelType>::resetSourceTerms()
|
||||
template<class CloudType>
|
||||
void Foam::ThermoCloud<CloudType>::resetSourceTerms()
|
||||
{
|
||||
KinematicCloud<ParcelType>::resetSourceTerms();
|
||||
CloudType::resetSourceTerms();
|
||||
hsTrans_->field() = 0.0;
|
||||
hsCoeff_->field() = 0.0;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ThermoCloud<ParcelType>::relaxSources
|
||||
template<class CloudType>
|
||||
void Foam::ThermoCloud<CloudType>::relaxSources
|
||||
(
|
||||
const ThermoCloud<ParcelType>& cloudOldTime
|
||||
const ThermoCloud<CloudType>& cloudOldTime
|
||||
)
|
||||
{
|
||||
KinematicCloud<ParcelType>::relaxSources(cloudOldTime);
|
||||
CloudType::relaxSources(cloudOldTime);
|
||||
|
||||
this->relax(hsTrans_(), cloudOldTime.hsTrans(), "hs");
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ThermoCloud<ParcelType>::evolve()
|
||||
template<class CloudType>
|
||||
void Foam::ThermoCloud<CloudType>::evolve()
|
||||
{
|
||||
if (this->solution().canEvolve())
|
||||
{
|
||||
typename ParcelType::trackData td(*this);
|
||||
typename parcelType::template
|
||||
TrackingData<ThermoCloud<CloudType> > td(*this);
|
||||
|
||||
this->solve(td);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ThermoCloud<ParcelType>::info() const
|
||||
template<class CloudType>
|
||||
void Foam::ThermoCloud<CloudType>::info() const
|
||||
{
|
||||
KinematicCloud<ParcelType>::info();
|
||||
CloudType::info();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -57,16 +57,23 @@ class HeatTransferModel;
|
||||
Class ThermoCloud Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
class ThermoCloud
|
||||
:
|
||||
public KinematicCloud<ParcelType>,
|
||||
public CloudType,
|
||||
public thermoCloud
|
||||
{
|
||||
public:
|
||||
|
||||
//- Type of parcel the cloud was instantiated for
|
||||
typedef typename CloudType::particleType parcelType;
|
||||
|
||||
private:
|
||||
|
||||
// Private data
|
||||
|
||||
//- Cloud copy pointer
|
||||
autoPtr<ThermoCloud<ParcelType> > cloudCopyPtr_;
|
||||
autoPtr<ThermoCloud<CloudType> > cloudCopyPtr_;
|
||||
|
||||
|
||||
// Private member functions
|
||||
@ -83,7 +90,7 @@ protected:
|
||||
// Protected data
|
||||
|
||||
//- Thermo parcel constant properties
|
||||
typename ParcelType::constantProperties constProps_;
|
||||
typename parcelType::constantProperties constProps_;
|
||||
|
||||
|
||||
// References to the carrier gas fields
|
||||
@ -101,7 +108,7 @@ protected:
|
||||
// References to the cloud sub-models
|
||||
|
||||
//- Heat transfer model
|
||||
autoPtr<HeatTransferModel<ThermoCloud<ParcelType> > >
|
||||
autoPtr<HeatTransferModel<ThermoCloud<CloudType> > >
|
||||
heatTransferModel_;
|
||||
|
||||
|
||||
@ -137,11 +144,13 @@ protected:
|
||||
// Cloud evolution functions
|
||||
|
||||
//- Reset state of cloud
|
||||
void cloudReset(ThermoCloud<ParcelType>& c);
|
||||
void cloudReset(ThermoCloud<CloudType>& c);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
typedef CloudType cloudType;
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct given carrier gas fields
|
||||
@ -156,29 +165,29 @@ public:
|
||||
);
|
||||
|
||||
//- Copy constructor with new name
|
||||
ThermoCloud(ThermoCloud<ParcelType>& c, const word& name);
|
||||
ThermoCloud(ThermoCloud<CloudType>& c, const word& name);
|
||||
|
||||
//- Copy constructor with new name - creates bare cloud
|
||||
ThermoCloud
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& name,
|
||||
const ThermoCloud<ParcelType>& c
|
||||
const ThermoCloud<CloudType>& c
|
||||
);
|
||||
|
||||
//- Construct and return clone based on (this) with new name
|
||||
virtual autoPtr<Cloud<ParcelType> > clone(const word& name)
|
||||
virtual autoPtr<Cloud<parcelType> > clone(const word& name)
|
||||
{
|
||||
return autoPtr<Cloud<ParcelType> >
|
||||
return autoPtr<Cloud<parcelType> >
|
||||
(
|
||||
new ThermoCloud(*this, name)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return bare clone based on (this) with new name
|
||||
virtual autoPtr<Cloud<ParcelType> > cloneBare(const word& name) const
|
||||
virtual autoPtr<Cloud<parcelType> > cloneBare(const word& name) const
|
||||
{
|
||||
return autoPtr<Cloud<ParcelType> >
|
||||
return autoPtr<Cloud<parcelType> >
|
||||
(
|
||||
new ThermoCloud(this->mesh(), name, *this)
|
||||
);
|
||||
@ -189,10 +198,6 @@ public:
|
||||
virtual ~ThermoCloud();
|
||||
|
||||
|
||||
//- Type of parcel the cloud was instantiated for
|
||||
typedef ParcelType parcelType;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
@ -201,7 +206,7 @@ public:
|
||||
inline const ThermoCloud& cloudCopy() const;
|
||||
|
||||
//- Return the constant properties
|
||||
inline const typename ParcelType::constantProperties&
|
||||
inline const typename parcelType::constantProperties&
|
||||
constProps() const;
|
||||
|
||||
//- Return const access to thermo package
|
||||
@ -217,7 +222,7 @@ public:
|
||||
// Sub-models
|
||||
|
||||
//- Return reference to heat transfer model
|
||||
inline const HeatTransferModel<ThermoCloud<ParcelType> >&
|
||||
inline const HeatTransferModel<ThermoCloud<CloudType> >&
|
||||
heatTransfer() const;
|
||||
|
||||
|
||||
@ -272,7 +277,7 @@ public:
|
||||
//- Check parcel properties
|
||||
void checkParcelProperties
|
||||
(
|
||||
ParcelType& parcel,
|
||||
parcelType& parcel,
|
||||
const scalar lagrangianDt,
|
||||
const bool fullyDescribed
|
||||
);
|
||||
@ -287,7 +292,7 @@ public:
|
||||
void resetSourceTerms();
|
||||
|
||||
//- Apply relaxation to (steady state) cloud sources
|
||||
void relaxSources(const ThermoCloud<ParcelType>& cloudOldTime);
|
||||
void relaxSources(const ThermoCloud<CloudType>& cloudOldTime);
|
||||
|
||||
//- Evolve the cloud
|
||||
void evolve();
|
||||
@ -297,7 +302,6 @@ public:
|
||||
|
||||
//- Print cloud information
|
||||
void info() const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -29,101 +29,101 @@ using namespace Foam::constant;
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::ThermoCloud<ParcelType>&
|
||||
Foam::ThermoCloud<ParcelType>::cloudCopy() const
|
||||
template<class CloudType>
|
||||
inline const Foam::ThermoCloud<CloudType>&
|
||||
Foam::ThermoCloud<CloudType>::cloudCopy() const
|
||||
{
|
||||
return cloudCopyPtr_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const typename ParcelType::constantProperties&
|
||||
Foam::ThermoCloud<ParcelType>::constProps() const
|
||||
template<class CloudType>
|
||||
inline const typename CloudType::particleType::constantProperties&
|
||||
Foam::ThermoCloud<CloudType>::constProps() const
|
||||
{
|
||||
return constProps_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::SLGThermo& Foam::ThermoCloud<ParcelType>::thermo() const
|
||||
template<class CloudType>
|
||||
inline const Foam::SLGThermo& Foam::ThermoCloud<CloudType>::thermo() const
|
||||
{
|
||||
return thermo_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::volScalarField& Foam::ThermoCloud<ParcelType>::T() const
|
||||
template<class CloudType>
|
||||
inline const Foam::volScalarField& Foam::ThermoCloud<CloudType>::T() const
|
||||
{
|
||||
return T_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::volScalarField& Foam::ThermoCloud<ParcelType>::p() const
|
||||
template<class CloudType>
|
||||
inline const Foam::volScalarField& Foam::ThermoCloud<CloudType>::p() const
|
||||
{
|
||||
return p_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::HeatTransferModel<Foam::ThermoCloud<ParcelType> >&
|
||||
Foam::ThermoCloud<ParcelType>::heatTransfer() const
|
||||
template<class CloudType>
|
||||
inline const Foam::HeatTransferModel<Foam::ThermoCloud<CloudType> >&
|
||||
Foam::ThermoCloud<CloudType>::heatTransfer() const
|
||||
{
|
||||
return heatTransferModel_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::scalarIntegrationScheme&
|
||||
Foam::ThermoCloud<ParcelType>::TIntegrator() const
|
||||
Foam::ThermoCloud<CloudType>::TIntegrator() const
|
||||
{
|
||||
return TIntegrator_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline bool Foam::ThermoCloud<ParcelType>::radiation() const
|
||||
template<class CloudType>
|
||||
inline bool Foam::ThermoCloud<CloudType>::radiation() const
|
||||
{
|
||||
return radiation_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
||||
Foam::ThermoCloud<ParcelType>::hsTrans()
|
||||
Foam::ThermoCloud<CloudType>::hsTrans()
|
||||
{
|
||||
return hsTrans_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
||||
Foam::ThermoCloud<ParcelType>::hsTrans() const
|
||||
Foam::ThermoCloud<CloudType>::hsTrans() const
|
||||
{
|
||||
return hsTrans_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
||||
Foam::ThermoCloud<ParcelType>::hsCoeff()
|
||||
Foam::ThermoCloud<CloudType>::hsCoeff()
|
||||
{
|
||||
return hsCoeff_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
||||
Foam::ThermoCloud<ParcelType>::hsCoeff() const
|
||||
Foam::ThermoCloud<CloudType>::hsCoeff() const
|
||||
{
|
||||
return hsCoeff_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline Foam::tmp<Foam::fvScalarMatrix>
|
||||
Foam::ThermoCloud<ParcelType>::Sh(volScalarField& hs) const
|
||||
Foam::ThermoCloud<CloudType>::Sh(volScalarField& hs) const
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
@ -159,9 +159,8 @@ Foam::ThermoCloud<ParcelType>::Sh(volScalarField& hs) const
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::tmp<Foam::volScalarField>
|
||||
Foam::ThermoCloud<ParcelType>::Ep() const
|
||||
template<class CloudType>
|
||||
inline Foam::tmp<Foam::volScalarField> Foam::ThermoCloud<CloudType>::Ep() const
|
||||
{
|
||||
tmp<volScalarField> tEp
|
||||
(
|
||||
@ -188,9 +187,9 @@ Foam::ThermoCloud<ParcelType>::Ep() const
|
||||
const scalarField& V = this->mesh().V();
|
||||
const scalar epsilon = constProps_.epsilon0();
|
||||
|
||||
forAllConstIter(typename ThermoCloud<ParcelType>, *this, iter)
|
||||
forAllConstIter(typename ThermoCloud<CloudType>, *this, iter)
|
||||
{
|
||||
const ParcelType& p = iter();
|
||||
const parcelType& p = iter();
|
||||
const label cellI = p.cell();
|
||||
Ep[cellI] += p.nParticle()*p.areaP()*pow4(p.T());
|
||||
}
|
||||
@ -202,9 +201,8 @@ Foam::ThermoCloud<ParcelType>::Ep() const
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::tmp<Foam::volScalarField>
|
||||
Foam::ThermoCloud<ParcelType>::ap() const
|
||||
template<class CloudType>
|
||||
inline Foam::tmp<Foam::volScalarField> Foam::ThermoCloud<CloudType>::ap() const
|
||||
{
|
||||
tmp<volScalarField> tap
|
||||
(
|
||||
@ -231,9 +229,9 @@ Foam::ThermoCloud<ParcelType>::ap() const
|
||||
const scalarField& V = this->mesh().V();
|
||||
const scalar epsilon = constProps_.epsilon0();
|
||||
|
||||
forAllConstIter(typename ThermoCloud<ParcelType>, *this, iter)
|
||||
forAllConstIter(typename ThermoCloud<CloudType>, *this, iter)
|
||||
{
|
||||
const ParcelType& p = iter();
|
||||
const parcelType& p = iter();
|
||||
const label cellI = p.cell();
|
||||
ap[cellI] += p.nParticle()*p.areaP();
|
||||
}
|
||||
@ -245,9 +243,9 @@ Foam::ThermoCloud<ParcelType>::ap() const
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline Foam::tmp<Foam::volScalarField>
|
||||
Foam::ThermoCloud<ParcelType>::sigmap() const
|
||||
Foam::ThermoCloud<CloudType>::sigmap() const
|
||||
{
|
||||
tmp<volScalarField> tsigmap
|
||||
(
|
||||
@ -276,9 +274,9 @@ Foam::ThermoCloud<ParcelType>::sigmap() const
|
||||
const scalar epsilon = constProps_.epsilon0();
|
||||
const scalar f = constProps_.f0();
|
||||
|
||||
forAllConstIter(typename ThermoCloud<ParcelType>, *this, iter)
|
||||
forAllConstIter(typename ThermoCloud<CloudType>, *this, iter)
|
||||
{
|
||||
const ParcelType& p = iter();
|
||||
const parcelType& p = iter();
|
||||
const label cellI = p.cell();
|
||||
sigmap[cellI] += p.nParticle()*p.areaP();
|
||||
}
|
||||
|
||||
@ -27,14 +27,12 @@ Class
|
||||
Description
|
||||
Cloud class to introduce kinematic parcels
|
||||
|
||||
SourceFiles
|
||||
basicKinematicCloud.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef basicKinematicCloud_H
|
||||
#define basicKinematicCloud_H
|
||||
|
||||
#include "Cloud.H"
|
||||
#include "KinematicCloud.H"
|
||||
#include "basicKinematicParcel.H"
|
||||
|
||||
@ -42,7 +40,7 @@ SourceFiles
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
typedef KinematicCloud<basicKinematicParcel> basicKinematicCloud;
|
||||
typedef KinematicCloud<Cloud<basicKinematicParcel> > basicKinematicCloud;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -27,14 +27,14 @@ Class
|
||||
Description
|
||||
Cloud class to introduce reacting parcels
|
||||
|
||||
SourceFiles
|
||||
BasicReactingCloud.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef basicReactingCloud_H
|
||||
#define basicReactingCloud_H
|
||||
|
||||
#include "Cloud.H"
|
||||
#include "KinematicCloud.H"
|
||||
#include "ThermoCloud.H"
|
||||
#include "ReactingCloud.H"
|
||||
#include "basicReactingParcel.H"
|
||||
|
||||
@ -42,7 +42,19 @@ SourceFiles
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
typedef ReactingCloud<basicReactingParcel> basicReactingCloud;
|
||||
typedef ReactingCloud
|
||||
<
|
||||
ThermoCloud
|
||||
<
|
||||
KinematicCloud
|
||||
<
|
||||
Cloud
|
||||
<
|
||||
basicReactingParcel
|
||||
>
|
||||
>
|
||||
>
|
||||
> basicReactingCloud;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -32,6 +32,10 @@ Description
|
||||
#ifndef basicReactingMultiphaseCloud_H
|
||||
#define basicReactingMultiphaseCloud_H
|
||||
|
||||
#include "Cloud.H"
|
||||
#include "KinematicCloud.H"
|
||||
#include "ThermoCloud.H"
|
||||
#include "ReactingCloud.H"
|
||||
#include "ReactingMultiphaseCloud.H"
|
||||
#include "basicReactingMultiphaseParcel.H"
|
||||
|
||||
@ -40,10 +44,21 @@ Description
|
||||
namespace Foam
|
||||
{
|
||||
typedef ReactingMultiphaseCloud
|
||||
<
|
||||
ReactingCloud
|
||||
<
|
||||
ThermoCloud
|
||||
<
|
||||
KinematicCloud
|
||||
<
|
||||
Cloud
|
||||
<
|
||||
basicReactingMultiphaseParcel
|
||||
>
|
||||
basicReactingMultiphaseCloud;
|
||||
>
|
||||
>
|
||||
>
|
||||
> basicReactingMultiphaseCloud;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -27,9 +27,6 @@ Class
|
||||
Description
|
||||
Cloud class to introduce thermodynamic parcels
|
||||
|
||||
SourceFiles
|
||||
basicThermoCloud.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef basicThermoCloud_H
|
||||
@ -42,7 +39,16 @@ SourceFiles
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
typedef ThermoCloud<basicThermoParcel> basicThermoCloud;
|
||||
typedef ThermoCloud
|
||||
<
|
||||
KinematicCloud
|
||||
<
|
||||
Cloud
|
||||
<
|
||||
basicThermoParcel
|
||||
>
|
||||
>
|
||||
> basicThermoCloud;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -179,10 +179,14 @@ const Foam::vector Foam::KinematicParcel<ParcelType>::calcVelocity
|
||||
scalar& Cud
|
||||
) const
|
||||
{
|
||||
const typename ParcelType::forceType& forces = td.cloud().forces();
|
||||
typedef typename TrackData::cloudType cloudType;
|
||||
typedef typename cloudType::parcelType parcelType;
|
||||
typedef typename cloudType::forceType forceType;
|
||||
|
||||
const forceType& forces = td.cloud().forces();
|
||||
|
||||
// Momentum source due to particle forces
|
||||
const ParcelType& p = static_cast<const ParcelType&>(*this);
|
||||
const parcelType& p = static_cast<const parcelType&>(*this);
|
||||
const forceSuSp Fcp = forces.calcCoupled(p, dt, mass, Re, mu);
|
||||
const forceSuSp Fncp = forces.calcNonCoupled(p, dt, mass, Re, mu);
|
||||
const forceSuSp Feff = Fcp + Fncp;
|
||||
@ -205,7 +209,7 @@ const Foam::vector Foam::KinematicParcel<ParcelType>::calcVelocity
|
||||
dUTrans += dt*(Feff.Sp()*(Ures.average() - Uc_) - Fcp.Su());
|
||||
|
||||
// Apply correction to velocity and dUTrans for reduced-D cases
|
||||
const polyMesh& mesh = this->cloud().pMesh();
|
||||
const polyMesh& mesh = td.cloud().pMesh();
|
||||
meshTools::constrainDirection(mesh, mesh.solutionD(), Unew);
|
||||
meshTools::constrainDirection(mesh, mesh.solutionD(), dUTrans);
|
||||
|
||||
@ -221,7 +225,7 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel
|
||||
const KinematicParcel<ParcelType>& p
|
||||
)
|
||||
:
|
||||
Particle<ParcelType>(p),
|
||||
ParcelType(p),
|
||||
active_(p.active_),
|
||||
typeId_(p.typeId_),
|
||||
nParticle_(p.nParticle_),
|
||||
@ -246,10 +250,10 @@ template<class ParcelType>
|
||||
Foam::KinematicParcel<ParcelType>::KinematicParcel
|
||||
(
|
||||
const KinematicParcel<ParcelType>& p,
|
||||
const KinematicCloud<ParcelType>& c
|
||||
const polyMesh& mesh
|
||||
)
|
||||
:
|
||||
Particle<ParcelType>(p, c),
|
||||
ParcelType(p, mesh),
|
||||
active_(p.active_),
|
||||
typeId_(p.typeId_),
|
||||
nParticle_(p.nParticle_),
|
||||
@ -280,7 +284,8 @@ bool Foam::KinematicParcel<ParcelType>::move
|
||||
const scalar trackTime
|
||||
)
|
||||
{
|
||||
ParcelType& p = static_cast<ParcelType&>(*this);
|
||||
typename TrackData::cloudType::parcelType& p =
|
||||
static_cast<typename TrackData::cloudType::parcelType&>(*this);
|
||||
|
||||
td.switchProcessor = false;
|
||||
td.keepParticle = true;
|
||||
@ -385,7 +390,9 @@ template<class ParcelType>
|
||||
template<class TrackData>
|
||||
void Foam::KinematicParcel<ParcelType>::hitFace(TrackData& td)
|
||||
{
|
||||
ParcelType& p = static_cast<ParcelType&>(*this);
|
||||
typename TrackData::cloudType::parcelType& p =
|
||||
static_cast<typename TrackData::cloudType::parcelType&>(*this);
|
||||
|
||||
td.cloud().postProcessing().postFace(p);
|
||||
}
|
||||
|
||||
@ -406,7 +413,8 @@ bool Foam::KinematicParcel<ParcelType>::hitPatch
|
||||
const tetIndices& tetIs
|
||||
)
|
||||
{
|
||||
ParcelType& p = static_cast<ParcelType&>(*this);
|
||||
typename TrackData::cloudType::parcelType& p =
|
||||
static_cast<typename TrackData::cloudType::parcelType&>(*this);
|
||||
|
||||
// Invoke post-processing model
|
||||
td.cloud().postProcessing().postPatch(p, patchI);
|
||||
@ -422,7 +430,7 @@ bool Foam::KinematicParcel<ParcelType>::hitPatch
|
||||
// Invoke patch interaction model
|
||||
return td.cloud().patchInteraction().correct
|
||||
(
|
||||
static_cast<ParcelType&>(*this),
|
||||
p,
|
||||
pp,
|
||||
td.keepParticle,
|
||||
trackFraction,
|
||||
@ -432,20 +440,6 @@ bool Foam::KinematicParcel<ParcelType>::hitPatch
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
bool Foam::KinematicParcel<ParcelType>::hitPatch
|
||||
(
|
||||
const polyPatch& pp,
|
||||
int& td,
|
||||
const label patchI,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class TrackData>
|
||||
void Foam::KinematicParcel<ParcelType>::hitProcessorPatch
|
||||
@ -458,15 +452,6 @@ void Foam::KinematicParcel<ParcelType>::hitProcessorPatch
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::KinematicParcel<ParcelType>::hitProcessorPatch
|
||||
(
|
||||
const processorPolyPatch&,
|
||||
int&
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class TrackData>
|
||||
void Foam::KinematicParcel<ParcelType>::hitWallPatch
|
||||
@ -480,16 +465,6 @@ void Foam::KinematicParcel<ParcelType>::hitWallPatch
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::KinematicParcel<ParcelType>::hitWallPatch
|
||||
(
|
||||
const wallPolyPatch&,
|
||||
int&,
|
||||
const tetIndices&
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class TrackData>
|
||||
void Foam::KinematicParcel<ParcelType>::hitPatch
|
||||
@ -502,19 +477,10 @@ void Foam::KinematicParcel<ParcelType>::hitPatch
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::KinematicParcel<ParcelType>::hitPatch
|
||||
(
|
||||
const polyPatch&,
|
||||
int&
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::KinematicParcel<ParcelType>::transformProperties(const tensor& T)
|
||||
{
|
||||
Particle<ParcelType>::transformProperties(T);
|
||||
ParcelType::transformProperties(T);
|
||||
|
||||
U_ = transform(T, U_);
|
||||
|
||||
@ -532,7 +498,7 @@ void Foam::KinematicParcel<ParcelType>::transformProperties
|
||||
const vector& separation
|
||||
)
|
||||
{
|
||||
Particle<ParcelType>::transformProperties(separation);
|
||||
ParcelType::transformProperties(separation);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ SourceFiles
|
||||
#ifndef KinematicParcel_H
|
||||
#define KinematicParcel_H
|
||||
|
||||
#include "Particle.H"
|
||||
#include "particle.H"
|
||||
#include "IOstream.H"
|
||||
#include "autoPtr.H"
|
||||
#include "interpolation.H"
|
||||
@ -56,7 +56,7 @@ SourceFiles
|
||||
#include "labelFieldIOField.H"
|
||||
#include "vectorFieldIOField.H"
|
||||
|
||||
#include "ParticleForceList.H"
|
||||
// #include "ParticleForceList.H" // TODO
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -86,14 +86,10 @@ Ostream& operator<<
|
||||
template<class ParcelType>
|
||||
class KinematicParcel
|
||||
:
|
||||
public Particle<ParcelType>
|
||||
public ParcelType
|
||||
{
|
||||
public:
|
||||
|
||||
//- Type of force to be used by this parcel type
|
||||
typedef ParticleForceList<KinematicCloud<ParcelType> > forceType;
|
||||
|
||||
|
||||
//- Class to hold kinematic particle constant properties
|
||||
class constantProperties
|
||||
{
|
||||
@ -165,10 +161,10 @@ public:
|
||||
};
|
||||
|
||||
|
||||
//- Class used to pass kinematic tracking data to the trackToFace function
|
||||
class trackData
|
||||
template<class CloudType>
|
||||
class TrackingData
|
||||
:
|
||||
public Particle<ParcelType>::trackData
|
||||
public ParcelType::template TrackingData<CloudType>
|
||||
{
|
||||
public:
|
||||
|
||||
@ -184,10 +180,6 @@ public:
|
||||
|
||||
// Private data
|
||||
|
||||
//- Reference to the cloud containing this particle
|
||||
KinematicCloud<ParcelType>& cloud_;
|
||||
|
||||
|
||||
// Interpolators for continuous phase fields
|
||||
|
||||
//- Density interpolator
|
||||
@ -213,18 +205,15 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
inline trackData
|
||||
inline TrackingData
|
||||
(
|
||||
KinematicCloud<ParcelType>& cloud,
|
||||
CloudType& cloud,
|
||||
trackPart part = tpLinearTrack
|
||||
);
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Return access to the owner cloud
|
||||
inline KinematicCloud<ParcelType>& cloud();
|
||||
|
||||
//- Return conat access to the interpolator for continuous
|
||||
// phase density field
|
||||
inline const interpolation<scalar>& rhoInterp() const;
|
||||
@ -343,16 +332,13 @@ public:
|
||||
TypeName("KinematicParcel");
|
||||
|
||||
|
||||
friend class Cloud<ParcelType>;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from owner, position, and cloud owner
|
||||
// Other properties initialised as null
|
||||
inline KinematicParcel
|
||||
(
|
||||
KinematicCloud<ParcelType>& owner,
|
||||
const polyMesh& mesh,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
@ -362,7 +348,7 @@ public:
|
||||
//- Construct from components
|
||||
inline KinematicParcel
|
||||
(
|
||||
KinematicCloud<ParcelType>& owner,
|
||||
const polyMesh& mesh,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
@ -381,7 +367,7 @@ public:
|
||||
//- Construct from Istream
|
||||
KinematicParcel
|
||||
(
|
||||
const Cloud<ParcelType>& c,
|
||||
const polyMesh& mesh,
|
||||
Istream& is,
|
||||
bool readFields = true
|
||||
);
|
||||
@ -390,33 +376,41 @@ public:
|
||||
KinematicParcel(const KinematicParcel& p);
|
||||
|
||||
//- Construct as a copy
|
||||
KinematicParcel
|
||||
(
|
||||
const KinematicParcel& p,
|
||||
const KinematicCloud<ParcelType>& c
|
||||
);
|
||||
KinematicParcel(const KinematicParcel& p, const polyMesh& mesh);
|
||||
|
||||
//- Construct and return a (basic particle) clone
|
||||
virtual autoPtr<Particle<ParcelType> > clone() const
|
||||
virtual autoPtr<particle> clone() const
|
||||
{
|
||||
return autoPtr<Particle<ParcelType> >(new KinematicParcel(*this));
|
||||
return autoPtr<particle>(new KinematicParcel(*this));
|
||||
}
|
||||
|
||||
//- Construct and return a (basic particle) clone
|
||||
virtual autoPtr<Particle<ParcelType> > clone
|
||||
(
|
||||
const Cloud<ParcelType>& c
|
||||
) const
|
||||
virtual autoPtr<particle> clone(const polyMesh& mesh) const
|
||||
{
|
||||
return autoPtr<Particle<ParcelType> >
|
||||
return autoPtr<particle>(new KinematicParcel(*this, mesh));
|
||||
}
|
||||
|
||||
//- Factory class to read-construct particles used for
|
||||
// parallel transfer
|
||||
class iNew
|
||||
{
|
||||
const polyMesh& mesh_;
|
||||
|
||||
public:
|
||||
|
||||
iNew(const polyMesh& mesh)
|
||||
:
|
||||
mesh_(mesh)
|
||||
{}
|
||||
|
||||
autoPtr<KinematicParcel<ParcelType> > operator()(Istream& is) const
|
||||
{
|
||||
return autoPtr<KinematicParcel<ParcelType> >
|
||||
(
|
||||
new KinematicParcel
|
||||
(
|
||||
*this,
|
||||
static_cast<const KinematicCloud<ParcelType>&>(c)
|
||||
)
|
||||
new KinematicParcel<ParcelType>(mesh_, is, true)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -629,17 +623,6 @@ public:
|
||||
const tetIndices& tetIs
|
||||
);
|
||||
|
||||
//- Overridable function to handle the particle hitting a patch
|
||||
// Executed before other patch-hitting functions without trackData
|
||||
bool hitPatch
|
||||
(
|
||||
const polyPatch& p,
|
||||
int& td,
|
||||
const label patchI,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
);
|
||||
|
||||
//- Overridable function to handle the particle hitting a
|
||||
// processorPatch
|
||||
template<class TrackData>
|
||||
@ -649,14 +632,6 @@ public:
|
||||
TrackData& td
|
||||
);
|
||||
|
||||
//- Overridable function to handle the particle hitting a
|
||||
// processorPatch without trackData
|
||||
void hitProcessorPatch
|
||||
(
|
||||
const processorPolyPatch&,
|
||||
int&
|
||||
);
|
||||
|
||||
//- Overridable function to handle the particle hitting a wallPatch
|
||||
template<class TrackData>
|
||||
void hitWallPatch
|
||||
@ -666,15 +641,6 @@ public:
|
||||
const tetIndices&
|
||||
);
|
||||
|
||||
//- Overridable function to handle the particle hitting a wallPatch
|
||||
// without trackData
|
||||
void hitWallPatch
|
||||
(
|
||||
const wallPolyPatch&,
|
||||
int&,
|
||||
const tetIndices&
|
||||
);
|
||||
|
||||
//- Overridable function to handle the particle hitting a polyPatch
|
||||
template<class TrackData>
|
||||
void hitPatch
|
||||
@ -683,14 +649,6 @@ public:
|
||||
TrackData& td
|
||||
);
|
||||
|
||||
//- Overridable function to handle the particle hitting a polyPatch
|
||||
//- without trackData
|
||||
void hitPatch
|
||||
(
|
||||
const polyPatch&,
|
||||
int&
|
||||
);
|
||||
|
||||
//- Transform the physical properties of the particle
|
||||
// according to the given transformation tensor
|
||||
void transformProperties(const tensor& T);
|
||||
@ -703,10 +661,12 @@ public:
|
||||
// I-O
|
||||
|
||||
//- Read
|
||||
static void readFields(Cloud<ParcelType>& c);
|
||||
template<class CloudType>
|
||||
static void readFields(CloudType& c);
|
||||
|
||||
//- Write
|
||||
static void writeFields(const Cloud<ParcelType>& c);
|
||||
template<class CloudType>
|
||||
static void writeFields(const CloudType& c);
|
||||
|
||||
|
||||
// Ostream Operator
|
||||
@ -726,6 +686,7 @@ public:
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "KinematicParcelI.H"
|
||||
#include "KinematicParcelTrackingDataI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -86,57 +86,20 @@ inline Foam::KinematicParcel<ParcelType>::constantProperties::constantProperties
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::KinematicParcel<ParcelType>::trackData::trackData
|
||||
(
|
||||
KinematicCloud<ParcelType>& cloud,
|
||||
trackPart part
|
||||
)
|
||||
:
|
||||
Particle<ParcelType>::trackData(cloud),
|
||||
cloud_(cloud),
|
||||
rhoInterp_
|
||||
(
|
||||
interpolation<scalar>::New
|
||||
(
|
||||
cloud.solution().interpolationSchemes(),
|
||||
cloud.rho()
|
||||
)
|
||||
),
|
||||
UInterp_
|
||||
(
|
||||
interpolation<vector>::New
|
||||
(
|
||||
cloud.solution().interpolationSchemes(),
|
||||
cloud.U()
|
||||
)
|
||||
),
|
||||
muInterp_
|
||||
(
|
||||
interpolation<scalar>::New
|
||||
(
|
||||
cloud.solution().interpolationSchemes(),
|
||||
cloud.mu()
|
||||
)
|
||||
),
|
||||
g_(cloud.g().value()),
|
||||
part_(part)
|
||||
{}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::KinematicParcel<ParcelType>::KinematicParcel
|
||||
(
|
||||
KinematicCloud<ParcelType>& owner,
|
||||
const polyMesh& owner,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI
|
||||
)
|
||||
:
|
||||
Particle<ParcelType>(owner, position, cellI, tetFaceI, tetPtI),
|
||||
ParcelType(owner, position, cellI, tetFaceI, tetPtI),
|
||||
active_(true),
|
||||
typeId_(owner.constProps().parcelTypeId()),
|
||||
// typeId_(owner.constProps().parcelTypeId()),
|
||||
typeId_(-1),
|
||||
nParticle_(0),
|
||||
d_(0.0),
|
||||
dTarget_(0.0),
|
||||
@ -152,13 +115,17 @@ inline Foam::KinematicParcel<ParcelType>::KinematicParcel
|
||||
rhoc_(0.0),
|
||||
Uc_(vector::zero),
|
||||
muc_(0.0)
|
||||
{}
|
||||
{
|
||||
// TODO
|
||||
WarningIn("inline Foam::KinematicParcel<ParcelType>::KinematicParcel")
|
||||
<< "typeId set to -1 instead of constProps value" << endl;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::KinematicParcel<ParcelType>::KinematicParcel
|
||||
(
|
||||
KinematicCloud<ParcelType>& owner,
|
||||
const polyMesh& owner,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
@ -174,7 +141,7 @@ inline Foam::KinematicParcel<ParcelType>::KinematicParcel
|
||||
const constantProperties& constProps
|
||||
)
|
||||
:
|
||||
Particle<ParcelType>(owner, position, cellI, tetFaceI, tetPtI),
|
||||
ParcelType(owner, position, cellI, tetFaceI, tetPtI),
|
||||
active_(true),
|
||||
typeId_(typeId),
|
||||
nParticle_(nParticle0),
|
||||
@ -239,8 +206,7 @@ Foam::KinematicParcel<ParcelType>::constantProperties::minParticleMass() const
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar
|
||||
Foam::KinematicParcel<ParcelType>::
|
||||
constantProperties::youngsModulus() const
|
||||
Foam::KinematicParcel<ParcelType>::constantProperties::youngsModulus() const
|
||||
{
|
||||
return youngsModulus_;
|
||||
}
|
||||
@ -248,71 +214,12 @@ constantProperties::youngsModulus() const
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar
|
||||
Foam::KinematicParcel<ParcelType>::
|
||||
constantProperties::poissonsRatio() const
|
||||
Foam::KinematicParcel<ParcelType>::constantProperties::poissonsRatio() const
|
||||
{
|
||||
return poissonsRatio_;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * trackData Member Functions * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::KinematicCloud<ParcelType>&
|
||||
Foam::KinematicParcel<ParcelType>::trackData::cloud()
|
||||
{
|
||||
return cloud_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::interpolation<Foam::scalar>&
|
||||
Foam::KinematicParcel<ParcelType>::trackData::rhoInterp() const
|
||||
{
|
||||
return rhoInterp_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::interpolation<Foam::vector>&
|
||||
Foam::KinematicParcel<ParcelType>::trackData::UInterp() const
|
||||
{
|
||||
return UInterp_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::interpolation<Foam::scalar>&
|
||||
Foam::KinematicParcel<ParcelType>::trackData::muInterp() const
|
||||
{
|
||||
return muInterp_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::vector&
|
||||
Foam::KinematicParcel<ParcelType>::trackData::g() const
|
||||
{
|
||||
return g_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline typename Foam::KinematicParcel<ParcelType>::trackData::trackPart
|
||||
Foam::KinematicParcel<ParcelType>::trackData::part() const
|
||||
{
|
||||
return part_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline typename Foam::KinematicParcel<ParcelType>::trackData::trackPart&
|
||||
Foam::KinematicParcel<ParcelType>::trackData::part()
|
||||
{
|
||||
return part_;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * KinematicParcel Member Functions * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
@ -568,7 +475,7 @@ inline Foam::scalar Foam::KinematicParcel<ParcelType>::massCell
|
||||
const label cellI
|
||||
) const
|
||||
{
|
||||
return rhoc_*this->cloud().pMesh().cellVolumes()[cellI];
|
||||
return rhoc_*this->mesh().cellVolumes()[cellI];
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ License
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::string Foam::KinematicParcel<ParcelType>::propHeader =
|
||||
Particle<ParcelType>::propHeader
|
||||
ParcelType::propHeader
|
||||
+ " active"
|
||||
+ " typeId"
|
||||
+ " nParticle"
|
||||
@ -60,12 +60,12 @@ Foam::string Foam::KinematicParcel<ParcelType>::propHeader =
|
||||
template<class ParcelType>
|
||||
Foam::KinematicParcel<ParcelType>::KinematicParcel
|
||||
(
|
||||
const Cloud<ParcelType>& cloud,
|
||||
const polyMesh& mesh,
|
||||
Istream& is,
|
||||
bool readFields
|
||||
)
|
||||
:
|
||||
Particle<ParcelType>(cloud, is, readFields),
|
||||
ParcelType(mesh, is, readFields),
|
||||
active_(false),
|
||||
typeId_(0),
|
||||
nParticle_(0.0),
|
||||
@ -130,20 +130,21 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel
|
||||
is.check
|
||||
(
|
||||
"KinematicParcel<ParcelType>::KinematicParcel"
|
||||
"(const Cloud<ParcelType>&, Istream&, bool)"
|
||||
"(const polyMesh&, Istream&, bool)"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::KinematicParcel<ParcelType>::readFields(Cloud<ParcelType>& c)
|
||||
template<class CloudType>
|
||||
void Foam::KinematicParcel<ParcelType>::readFields(CloudType& c)
|
||||
{
|
||||
if (!c.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Particle<ParcelType>::readFields(c);
|
||||
ParcelType::readFields(c);
|
||||
|
||||
IOField<label> active(c.fieldIOobject("active", IOobject::MUST_READ));
|
||||
c.checkFieldIOobject(c, active);
|
||||
@ -240,9 +241,9 @@ void Foam::KinematicParcel<ParcelType>::readFields(Cloud<ParcelType>& c)
|
||||
|
||||
label i = 0;
|
||||
|
||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
||||
forAllIter(typename CloudType, c, iter)
|
||||
{
|
||||
ParcelType& p = iter();
|
||||
KinematicParcel<ParcelType>& p = iter();
|
||||
|
||||
p.active_ = active[i];
|
||||
p.typeId_ = typeId[i];
|
||||
@ -273,9 +274,10 @@ void Foam::KinematicParcel<ParcelType>::readFields(Cloud<ParcelType>& c)
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::KinematicParcel<ParcelType>::writeFields(const Cloud<ParcelType>& c)
|
||||
template<class CloudType>
|
||||
void Foam::KinematicParcel<ParcelType>::writeFields(const CloudType& c)
|
||||
{
|
||||
Particle<ParcelType>::writeFields(c);
|
||||
ParcelType::writeFields(c);
|
||||
|
||||
label np = c.size();
|
||||
|
||||
@ -343,7 +345,7 @@ void Foam::KinematicParcel<ParcelType>::writeFields(const Cloud<ParcelType>& c)
|
||||
|
||||
label i = 0;
|
||||
|
||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
||||
forAllConstIter(typename CloudType, c, iter)
|
||||
{
|
||||
const KinematicParcel<ParcelType>& p = iter();
|
||||
|
||||
@ -407,7 +409,7 @@ Foam::Ostream& Foam::operator<<
|
||||
{
|
||||
if (os.format() == IOstream::ASCII)
|
||||
{
|
||||
os << static_cast<const Particle<ParcelType>&>(p)
|
||||
os << static_cast<const ParcelType&>(p)
|
||||
<< token::SPACE << p.active()
|
||||
<< token::SPACE << p.typeId()
|
||||
<< token::SPACE << p.nParticle()
|
||||
@ -425,7 +427,7 @@ Foam::Ostream& Foam::operator<<
|
||||
}
|
||||
else
|
||||
{
|
||||
os << static_cast<const Particle<ParcelType>&>(p);
|
||||
os << static_cast<const ParcelType&>(p);
|
||||
os.write
|
||||
(
|
||||
reinterpret_cast<const char*>(&p.active_),
|
||||
|
||||
@ -0,0 +1,120 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2011 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 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 CloudType>
|
||||
inline Foam::KinematicParcel<ParcelType>::TrackingData<CloudType>::TrackingData
|
||||
(
|
||||
CloudType& cloud,
|
||||
trackPart part
|
||||
)
|
||||
:
|
||||
ParcelType::template TrackingData<CloudType>(cloud),
|
||||
rhoInterp_
|
||||
(
|
||||
interpolation<scalar>::New
|
||||
(
|
||||
cloud.solution().interpolationSchemes(),
|
||||
cloud.rho()
|
||||
)
|
||||
),
|
||||
UInterp_
|
||||
(
|
||||
interpolation<vector>::New
|
||||
(
|
||||
cloud.solution().interpolationSchemes(),
|
||||
cloud.U()
|
||||
)
|
||||
),
|
||||
muInterp_
|
||||
(
|
||||
interpolation<scalar>::New
|
||||
(
|
||||
cloud.solution().interpolationSchemes(),
|
||||
cloud.mu()
|
||||
)
|
||||
),
|
||||
g_(cloud.g().value()),
|
||||
part_(part)
|
||||
{}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::interpolation<Foam::scalar>&
|
||||
Foam::KinematicParcel<ParcelType>::TrackingData<CloudType>::rhoInterp() const
|
||||
{
|
||||
return rhoInterp_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::interpolation<Foam::vector>&
|
||||
Foam::KinematicParcel<ParcelType>::TrackingData<CloudType>::UInterp() const
|
||||
{
|
||||
return UInterp_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::interpolation<Foam::scalar>&
|
||||
Foam::KinematicParcel<ParcelType>::TrackingData<CloudType>::muInterp() const
|
||||
{
|
||||
return muInterp_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::vector&
|
||||
Foam::KinematicParcel<ParcelType>::TrackingData<CloudType>::g() const
|
||||
{
|
||||
return g_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline typename Foam::KinematicParcel<ParcelType>::template
|
||||
TrackingData<CloudType>::trackPart
|
||||
Foam::KinematicParcel<ParcelType>::TrackingData<CloudType>::part() const
|
||||
{
|
||||
return part_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline typename Foam::KinematicParcel<ParcelType>::template
|
||||
TrackingData<CloudType>::trackPart&
|
||||
Foam::KinematicParcel<ParcelType>::TrackingData<CloudType>::part()
|
||||
{
|
||||
return part_;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -138,7 +138,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::setCellValues
|
||||
const label cellI
|
||||
)
|
||||
{
|
||||
ReactingParcel<ParcelType>::setCellValues(td, dt, cellI);
|
||||
ParcelType::setCellValues(td, dt, cellI);
|
||||
}
|
||||
|
||||
|
||||
@ -152,7 +152,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::cellValueSourceCorrection
|
||||
)
|
||||
{
|
||||
// Re-use correction from reacting parcel
|
||||
ReactingParcel<ParcelType>::cellValueSourceCorrection(td, dt, cellI);
|
||||
ParcelType::cellValueSourceCorrection(td, dt, cellI);
|
||||
}
|
||||
|
||||
|
||||
@ -165,9 +165,6 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
const label cellI
|
||||
)
|
||||
{
|
||||
typedef typename ReactingParcel<ParcelType>::trackData::cloudType cloudType;
|
||||
const CompositionModel<cloudType>& composition = td.cloud().composition();
|
||||
|
||||
// Define local properties at beginning of timestep
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
const scalar np0 = this->nParticle_;
|
||||
@ -181,16 +178,15 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
const scalar pc = this->pc_;
|
||||
|
||||
const scalarField& YMix = this->Y_;
|
||||
const label idG = composition.idGas();
|
||||
const label idL = composition.idLiquid();
|
||||
const label idS = composition.idSolid();
|
||||
const label idG = td.cloud().composition().idGas();
|
||||
const label idL = td.cloud().composition().idLiquid();
|
||||
const label idS = td.cloud().composition().idSolid();
|
||||
|
||||
|
||||
// Calc surface values
|
||||
// ~~~~~~~~~~~~~~~~~~~
|
||||
scalar Ts, rhos, mus, Prs, kappas;
|
||||
ThermoParcel<ParcelType>::
|
||||
calcSurfaceValues(td, cellI, T0, Ts, rhos, mus, Prs, kappas);
|
||||
this->calcSurfaceValues(td, cellI, T0, Ts, rhos, mus, Prs, kappas);
|
||||
|
||||
// Reynolds number
|
||||
scalar Res = this->Re(U0, d0, rhos, mus);
|
||||
@ -225,7 +221,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
scalar NCpW = 0.0;
|
||||
|
||||
// Surface concentrations of emitted species
|
||||
scalarField Cs(composition.carrier().species().size(), 0.0);
|
||||
scalarField Cs(td.cloud().composition().carrier().species().size(), 0.0);
|
||||
|
||||
// Calc mass and enthalpy transfer due to phase change
|
||||
this->calcPhaseChange
|
||||
@ -287,7 +283,11 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
scalarField dMassSRGas(YGas_.size(), 0.0);
|
||||
scalarField dMassSRLiquid(YLiquid_.size(), 0.0);
|
||||
scalarField dMassSRSolid(YSolid_.size(), 0.0);
|
||||
scalarField dMassSRCarrier(composition.carrier().species().size(), 0.0);
|
||||
scalarField dMassSRCarrier
|
||||
(
|
||||
td.cloud().composition().carrier().species().size(),
|
||||
0.0
|
||||
);
|
||||
|
||||
// Clac mass and enthalpy transfer due to surface reactions
|
||||
calcSurfaceReactions
|
||||
@ -382,33 +382,36 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
// Transfer mass lost from particle to carrier mass source
|
||||
forAll(YGas_, i)
|
||||
{
|
||||
label gid = composition.localToGlobalCarrierId(GAS, i);
|
||||
label gid = td.cloud().composition().localToGlobalCarrierId(GAS, i);
|
||||
td.cloud().rhoTrans(gid)[cellI] += np0*dMassGas[i];
|
||||
td.cloud().hsTrans()[cellI] +=
|
||||
np0*dMassGas[i]*composition.carrier().Hs(gid, T0);
|
||||
np0*dMassGas[i]*td.cloud().composition().carrier().Hs(gid, T0);
|
||||
}
|
||||
forAll(YLiquid_, i)
|
||||
{
|
||||
label gid = composition.localToGlobalCarrierId(LIQ, i);
|
||||
label gid = td.cloud().composition().localToGlobalCarrierId(LIQ, i);
|
||||
td.cloud().rhoTrans(gid)[cellI] += np0*dMassLiquid[i];
|
||||
td.cloud().hsTrans()[cellI] +=
|
||||
np0*dMassLiquid[i]*composition.carrier().Hs(gid, T0);
|
||||
np0*dMassLiquid[i]
|
||||
*td.cloud().composition().carrier().Hs(gid, T0);
|
||||
}
|
||||
/*
|
||||
// No mapping between solid components and carrier phase
|
||||
forAll(YSolid_, i)
|
||||
{
|
||||
label gid = composition.localToGlobalCarrierId(SLD, i);
|
||||
label gid = td.cloud().composition().localToGlobalCarrierId(SLD, i);
|
||||
td.cloud().rhoTrans(gid)[cellI] += np0*dMassSolid[i];
|
||||
td.cloud().hsTrans()[cellI] +=
|
||||
np0*dMassSolid[i]*composition.carrier().Hs(gid, T0);
|
||||
np0*dMassSolid[i]
|
||||
*td.cloud().composition().carrier().Hs(gid, T0);
|
||||
}
|
||||
*/
|
||||
forAll(dMassSRCarrier, i)
|
||||
{
|
||||
td.cloud().rhoTrans(i)[cellI] += np0*dMassSRCarrier[i];
|
||||
td.cloud().hsTrans()[cellI] +=
|
||||
np0*dMassSRCarrier[i]*composition.carrier().Hs(i, T0);
|
||||
np0*dMassSRCarrier[i]
|
||||
*td.cloud().composition().carrier().Hs(i, T0);
|
||||
}
|
||||
|
||||
// Update momentum transfer
|
||||
@ -437,12 +440,14 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
// Absorb parcel into carrier phase
|
||||
forAll(YGas_, i)
|
||||
{
|
||||
label gid = composition.localToGlobalCarrierId(GAS, i);
|
||||
label gid =
|
||||
td.cloud().composition().localToGlobalCarrierId(GAS, i);
|
||||
td.cloud().rhoTrans(gid)[cellI] += np0*mass1*YMix[GAS]*YGas_[i];
|
||||
}
|
||||
forAll(YLiquid_, i)
|
||||
{
|
||||
label gid = composition.localToGlobalCarrierId(LIQ, i);
|
||||
label gid =
|
||||
td.cloud().composition().localToGlobalCarrierId(LIQ, i);
|
||||
td.cloud().rhoTrans(gid)[cellI] +=
|
||||
np0*mass1*YMix[LIQ]*YLiquid_[i];
|
||||
}
|
||||
@ -450,7 +455,8 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
// No mapping between solid components and carrier phase
|
||||
forAll(YSolid_, i)
|
||||
{
|
||||
label gid = composition.localToGlobalCarrierId(SLD, i);
|
||||
label gid =
|
||||
td.cloud().composition().localToGlobalCarrierId(SLD, i);
|
||||
td.cloud().rhoTrans(gid)[cellI] +=
|
||||
np0*mass1*YMix[SLD]*YSolid_[i];
|
||||
}
|
||||
@ -515,9 +521,6 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcDevolatilisation
|
||||
return;
|
||||
}
|
||||
|
||||
typedef typename ReactingParcel<ParcelType>::trackData::cloudType cloudType;
|
||||
const CompositionModel<cloudType>& composition = td.cloud().composition();
|
||||
|
||||
// Total mass of volatiles evolved
|
||||
td.cloud().devolatilisation().calculate
|
||||
(
|
||||
@ -545,9 +548,10 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcDevolatilisation
|
||||
// Note: hardcoded gaseous diffusivities for now
|
||||
// TODO: add to carrier thermo
|
||||
const scalar beta = sqr(cbrt(15.0) + cbrt(15.0));
|
||||
const label id = composition.localToGlobalCarrierId(GAS, i);
|
||||
const scalar Cp = composition.carrier().Cp(id, Ts);
|
||||
const scalar W = composition.carrier().W(id);
|
||||
const label id =
|
||||
td.cloud().composition().localToGlobalCarrierId(GAS, i);
|
||||
const scalar Cp = td.cloud().composition().carrier().Cp(id, Ts);
|
||||
const scalar W = td.cloud().composition().carrier().W(id);
|
||||
const scalar Ni = dMassDV[i]/(this->areaS(d)*dt*W);
|
||||
|
||||
// Dab calc'd using API vapour mass diffusivity function
|
||||
@ -637,7 +641,7 @@ Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
||||
const ReactingMultiphaseParcel<ParcelType>& p
|
||||
)
|
||||
:
|
||||
ReactingParcel<ParcelType>(p),
|
||||
ParcelType(p),
|
||||
YGas_(p.YGas_),
|
||||
YLiquid_(p.YLiquid_),
|
||||
YSolid_(p.YSolid_)
|
||||
@ -648,10 +652,10 @@ template<class ParcelType>
|
||||
Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
||||
(
|
||||
const ReactingMultiphaseParcel<ParcelType>& p,
|
||||
const ReactingMultiphaseCloud<ParcelType>& c
|
||||
const polyMesh& mesh
|
||||
)
|
||||
:
|
||||
ReactingParcel<ParcelType>(p, c),
|
||||
ParcelType(p, mesh),
|
||||
YGas_(p.YGas_),
|
||||
YLiquid_(p.YLiquid_),
|
||||
YSolid_(p.YSolid_)
|
||||
|
||||
@ -63,7 +63,7 @@ Ostream& operator<<
|
||||
template<class ParcelType>
|
||||
class ReactingMultiphaseParcel
|
||||
:
|
||||
public ReactingParcel<ParcelType>
|
||||
public ParcelType
|
||||
{
|
||||
public:
|
||||
|
||||
@ -77,7 +77,7 @@ public:
|
||||
//- Class to hold reacting multiphase particle constant properties
|
||||
class constantProperties
|
||||
:
|
||||
public ReactingParcel<ParcelType>::constantProperties
|
||||
public ParcelType::constantProperties
|
||||
{
|
||||
// Private data
|
||||
|
||||
@ -118,37 +118,6 @@ public:
|
||||
};
|
||||
|
||||
|
||||
//- Class used to pass reacting tracking data to the trackToFace function
|
||||
class trackData
|
||||
:
|
||||
public ReactingParcel<ParcelType>::trackData
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Reference to the cloud containing this particle
|
||||
ReactingMultiphaseCloud<ParcelType>& cloud_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
inline trackData
|
||||
(
|
||||
ReactingMultiphaseCloud<ParcelType>& cloud,
|
||||
typename ReactingParcel<ParcelType>::trackData::trackPart
|
||||
part = ReactingParcel<ParcelType>::trackData::tpLinearTrack
|
||||
);
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Return access to the owner cloud
|
||||
inline ReactingMultiphaseCloud<ParcelType>& cloud();
|
||||
};
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Private Member Functions
|
||||
@ -277,16 +246,13 @@ public:
|
||||
TypeName("ReactingMultiphaseParcel");
|
||||
|
||||
|
||||
friend class Cloud<ParcelType>;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from owner, position, and cloud owner
|
||||
// Other properties initialised as null
|
||||
inline ReactingMultiphaseParcel
|
||||
(
|
||||
ReactingMultiphaseCloud<ParcelType>& owner,
|
||||
const polyMesh& mesh,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
@ -297,7 +263,7 @@ public:
|
||||
//- Construct from components
|
||||
inline ReactingMultiphaseParcel
|
||||
(
|
||||
ReactingMultiphaseCloud<ParcelType>& owner,
|
||||
const polyMesh& mesh,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
@ -320,7 +286,7 @@ public:
|
||||
//- Construct from Istream
|
||||
ReactingMultiphaseParcel
|
||||
(
|
||||
const Cloud<ParcelType>& c,
|
||||
const polyMesh& mesh,
|
||||
Istream& is,
|
||||
bool readFields = true
|
||||
);
|
||||
@ -332,33 +298,45 @@ public:
|
||||
ReactingMultiphaseParcel
|
||||
(
|
||||
const ReactingMultiphaseParcel& p,
|
||||
const ReactingMultiphaseCloud<ParcelType>& c
|
||||
const polyMesh& mesh
|
||||
);
|
||||
|
||||
//- Construct and return a (basic particle) clone
|
||||
virtual autoPtr<Particle<ParcelType> > clone() const
|
||||
virtual autoPtr<particle> clone() const
|
||||
{
|
||||
return autoPtr<Particle<ParcelType> >
|
||||
(
|
||||
new ReactingMultiphaseParcel(*this)
|
||||
);
|
||||
return autoPtr<particle>(new ReactingMultiphaseParcel(*this));
|
||||
}
|
||||
|
||||
//- Construct and return a (basic particle) clone
|
||||
virtual autoPtr<Particle<ParcelType> > clone
|
||||
virtual autoPtr<particle> clone(const polyMesh& mesh) const
|
||||
{
|
||||
return autoPtr<particle>(new ReactingMultiphaseParcel(*this, mesh));
|
||||
}
|
||||
|
||||
//- Factory class to read-construct particles used for
|
||||
// parallel transfer
|
||||
class iNew
|
||||
{
|
||||
const polyMesh& mesh_;
|
||||
|
||||
public:
|
||||
|
||||
iNew(const polyMesh& mesh)
|
||||
:
|
||||
mesh_(mesh)
|
||||
{}
|
||||
|
||||
autoPtr<ReactingMultiphaseParcel<ParcelType> > operator()
|
||||
(
|
||||
const Cloud<ParcelType>& c
|
||||
Istream& is
|
||||
) const
|
||||
{
|
||||
return autoPtr<Particle<ParcelType> >
|
||||
return autoPtr<ReactingMultiphaseParcel<ParcelType> >
|
||||
(
|
||||
new ReactingMultiphaseParcel
|
||||
(
|
||||
*this,
|
||||
static_cast<const ReactingMultiphaseCloud<ParcelType>&>(c)
|
||||
)
|
||||
new ReactingMultiphaseParcel<ParcelType>(mesh_, is, true)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -426,10 +404,28 @@ public:
|
||||
// I-O
|
||||
|
||||
//- Read
|
||||
static void readFields(Cloud<ParcelType>& c);
|
||||
template<class CloudType, class CompositionType>
|
||||
static void readFields
|
||||
(
|
||||
CloudType& c,
|
||||
const CompositionType& compModel
|
||||
);
|
||||
|
||||
//- Read - no composition
|
||||
template<class CloudType>
|
||||
static void readFields(CloudType& c);
|
||||
|
||||
//- Write
|
||||
static void writeFields(const Cloud<ParcelType>& c);
|
||||
template<class CloudType, class CompositionType>
|
||||
static void writeFields
|
||||
(
|
||||
const CloudType& c,
|
||||
const CompositionType& compModel
|
||||
);
|
||||
|
||||
//- Read - composition supplied
|
||||
template<class CloudType>
|
||||
static void writeFields(const CloudType& c);
|
||||
|
||||
|
||||
// Ostream Operator
|
||||
|
||||
@ -30,7 +30,7 @@ inline
|
||||
Foam::ReactingMultiphaseParcel<ParcelType>::constantProperties::
|
||||
constantProperties()
|
||||
:
|
||||
ReactingParcel<ParcelType>::constantProperties(),
|
||||
ParcelType::constantProperties(),
|
||||
LDevol_(0.0),
|
||||
hRetentionCoeff_(0.0)
|
||||
{}
|
||||
@ -44,7 +44,7 @@ constantProperties
|
||||
const constantProperties& cp
|
||||
)
|
||||
:
|
||||
ReactingParcel<ParcelType>::constantProperties(cp),
|
||||
ParcelType::constantProperties(cp),
|
||||
LDevol_(cp.LDevol_),
|
||||
hRetentionCoeff_(cp.hRetentionCoeff_)
|
||||
{}
|
||||
@ -58,7 +58,7 @@ constantProperties
|
||||
const bool readFields
|
||||
)
|
||||
:
|
||||
ReactingParcel<ParcelType>::constantProperties(parentDict, readFields),
|
||||
ParcelType::constantProperties(parentDict, readFields),
|
||||
LDevol_(0.0),
|
||||
hRetentionCoeff_(0.0)
|
||||
{
|
||||
@ -82,29 +82,17 @@ constantProperties
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::ReactingMultiphaseParcel<ParcelType>::trackData::trackData
|
||||
(
|
||||
ReactingMultiphaseCloud<ParcelType>& cloud,
|
||||
typename ReactingParcel<ParcelType>::trackData::trackPart part
|
||||
)
|
||||
:
|
||||
ReactingParcel<ParcelType>::trackData(cloud, part),
|
||||
cloud_(cloud)
|
||||
{}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
||||
(
|
||||
ReactingMultiphaseCloud<ParcelType>& owner,
|
||||
const polyMesh& mesh,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI
|
||||
)
|
||||
:
|
||||
ReactingParcel<ParcelType>(owner, position, cellI, tetFaceI, tetPtI),
|
||||
ParcelType(mesh, position, cellI, tetFaceI, tetPtI),
|
||||
YGas_(0),
|
||||
YLiquid_(0),
|
||||
YSolid_(0),
|
||||
@ -115,7 +103,7 @@ inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
||||
template<class ParcelType>
|
||||
inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
||||
(
|
||||
ReactingMultiphaseCloud<ParcelType>& owner,
|
||||
const polyMesh& mesh,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
@ -135,9 +123,9 @@ inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
||||
const constantProperties& constProps
|
||||
)
|
||||
:
|
||||
ReactingParcel<ParcelType>
|
||||
ParcelType
|
||||
(
|
||||
owner,
|
||||
mesh,
|
||||
position,
|
||||
cellI,
|
||||
tetFaceI,
|
||||
@ -179,16 +167,6 @@ hRetentionCoeff() const
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * trackData Member Functions * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::ReactingMultiphaseCloud<ParcelType>&
|
||||
Foam::ReactingMultiphaseParcel<ParcelType>::trackData::cloud()
|
||||
{
|
||||
return cloud_;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * ThermoParcel Member Functions * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -30,7 +30,7 @@ License
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::string Foam::ReactingMultiphaseParcel<ParcelType>::propHeader =
|
||||
ReactingParcel<ParcelType>::propHeader
|
||||
ParcelType::propHeader
|
||||
+ " nGas(Y1..YN)"
|
||||
+ " nLiquid(Y1..YN)"
|
||||
+ " nSolid(Y1..YN)";
|
||||
@ -41,12 +41,12 @@ Foam::string Foam::ReactingMultiphaseParcel<ParcelType>::propHeader =
|
||||
template<class ParcelType>
|
||||
Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
||||
(
|
||||
const Cloud<ParcelType>& cloud,
|
||||
const polyMesh& mesh,
|
||||
Istream& is,
|
||||
bool readFields
|
||||
)
|
||||
:
|
||||
ReactingParcel<ParcelType>(cloud, is, readFields),
|
||||
ParcelType(mesh, is, readFields),
|
||||
YGas_(0),
|
||||
YLiquid_(0),
|
||||
YSolid_(0),
|
||||
@ -54,21 +54,15 @@ Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
||||
{
|
||||
if (readFields)
|
||||
{
|
||||
const ReactingMultiphaseCloud<ParcelType>& cR =
|
||||
dynamic_cast<const ReactingMultiphaseCloud<ParcelType>&>(cloud);
|
||||
DynamicList<scalar> Yg;
|
||||
DynamicList<scalar> Yl;
|
||||
DynamicList<scalar> Ys;
|
||||
|
||||
const label idGas = cR.composition().idGas();
|
||||
const label nGas = cR.composition().componentNames(idGas).size();
|
||||
const label idLiquid = cR.composition().idLiquid();
|
||||
const label nLiquid = cR.composition().componentNames(idLiquid).size();
|
||||
const label idSolid = cR.composition().idGas();
|
||||
const label nSolid = cR.composition().componentNames(idSolid).size();
|
||||
is >> Yg >> Yl >> Ys;
|
||||
|
||||
YGas_.setSize(nGas);
|
||||
YLiquid_.setSize(nLiquid);
|
||||
YSolid_.setSize(nSolid);
|
||||
|
||||
is >> YGas_ >> YLiquid_ >> YSolid_;
|
||||
YGas_.transfer(Yg);
|
||||
YLiquid_.transfer(Yl);
|
||||
YSolid_.transfer(Ys);
|
||||
|
||||
// scale the mass fractions
|
||||
const scalarField& YMix = this->Y_;
|
||||
@ -82,7 +76,7 @@ Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
||||
(
|
||||
"ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel"
|
||||
"("
|
||||
"const Cloud<ParcelType>&, "
|
||||
"const polyMesh&, "
|
||||
"Istream&, "
|
||||
"bool"
|
||||
")"
|
||||
@ -91,32 +85,44 @@ Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
|
||||
(
|
||||
Cloud<ParcelType>& cIn
|
||||
)
|
||||
template<class CloudType>
|
||||
void Foam::ReactingMultiphaseParcel<ParcelType>::readFields(CloudType& c)
|
||||
{
|
||||
if (!cIn.size())
|
||||
if (!c.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ReactingMultiphaseCloud<ParcelType>& c =
|
||||
dynamic_cast<ReactingMultiphaseCloud<ParcelType>&>(cIn);
|
||||
ParcelType::readFields(c);
|
||||
}
|
||||
|
||||
ReactingParcel<ParcelType>::readFields(c);
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType, class CompositionType>
|
||||
void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
|
||||
(
|
||||
CloudType& c,
|
||||
const CompositionType& compModel
|
||||
)
|
||||
{
|
||||
if (!c.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ParcelType::readFields(c, compModel);
|
||||
|
||||
// Get names and sizes for each Y...
|
||||
const label idGas = c.composition().idGas();
|
||||
const wordList& gasNames = c.composition().componentNames(idGas);
|
||||
const label idLiquid = c.composition().idLiquid();
|
||||
const wordList& liquidNames = c.composition().componentNames(idLiquid);
|
||||
const label idSolid = c.composition().idSolid();
|
||||
const wordList& solidNames = c.composition().componentNames(idSolid);
|
||||
const wordList& stateLabels = c.composition().stateLabels();
|
||||
const label idGas = compModel.idGas();
|
||||
const wordList& gasNames = compModel.componentNames(idGas);
|
||||
const label idLiquid = compModel.idLiquid();
|
||||
const wordList& liquidNames = compModel.componentNames(idLiquid);
|
||||
const label idSolid = compModel.idSolid();
|
||||
const wordList& solidNames = compModel.componentNames(idSolid);
|
||||
const wordList& stateLabels = compModel.stateLabels();
|
||||
|
||||
// Set storage for each Y... for each parcel
|
||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
||||
forAllIter(typename Cloud<ReactingMultiphaseParcel<ParcelType> >, c, iter)
|
||||
{
|
||||
ReactingMultiphaseParcel<ParcelType>& p = iter();
|
||||
p.YGas_.setSize(gasNames.size(), 0.0);
|
||||
@ -137,7 +143,12 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
|
||||
);
|
||||
|
||||
label i = 0;
|
||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
||||
forAllIter
|
||||
(
|
||||
typename Cloud<ReactingMultiphaseParcel<ParcelType> >,
|
||||
c,
|
||||
iter
|
||||
)
|
||||
{
|
||||
ReactingMultiphaseParcel<ParcelType>& p = iter();
|
||||
p.YGas_[j] = YGas[i++]/(p.Y()[GAS] + ROOTVSMALL);
|
||||
@ -156,7 +167,12 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
|
||||
);
|
||||
|
||||
label i = 0;
|
||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
||||
forAllIter
|
||||
(
|
||||
typename Cloud<ReactingMultiphaseParcel<ParcelType> >,
|
||||
c,
|
||||
iter
|
||||
)
|
||||
{
|
||||
ReactingMultiphaseParcel<ParcelType>& p = iter();
|
||||
p.YLiquid_[j] = YLiquid[i++]/(p.Y()[LIQ] + ROOTVSMALL);
|
||||
@ -175,7 +191,12 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
|
||||
);
|
||||
|
||||
label i = 0;
|
||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
||||
forAllIter
|
||||
(
|
||||
typename Cloud<ReactingMultiphaseParcel<ParcelType> >,
|
||||
c,
|
||||
iter
|
||||
)
|
||||
{
|
||||
ReactingMultiphaseParcel<ParcelType>& p = iter();
|
||||
p.YSolid_[j] = YSolid[i++]/(p.Y()[SLD] + ROOTVSMALL);
|
||||
@ -185,25 +206,32 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields(const CloudType& c)
|
||||
{
|
||||
ParcelType::writeFields(c);
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType, class CompositionType>
|
||||
void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields
|
||||
(
|
||||
const Cloud<ParcelType>& cIn
|
||||
const CloudType& c,
|
||||
const CompositionType& compModel
|
||||
)
|
||||
{
|
||||
const ReactingMultiphaseCloud<ParcelType>& c =
|
||||
dynamic_cast<const ReactingMultiphaseCloud<ParcelType>&>(cIn);
|
||||
|
||||
ReactingParcel<ParcelType>::writeFields(c);
|
||||
ParcelType::writeFields(c, compModel);
|
||||
|
||||
label np = c.size();
|
||||
|
||||
// Write the composition fractions
|
||||
if (np > 0)
|
||||
{
|
||||
const wordList& stateLabels = c.composition().stateLabels();
|
||||
const wordList& stateLabels = compModel.stateLabels();
|
||||
|
||||
const label idGas = c.composition().idGas();
|
||||
const wordList& gasNames = c.composition().componentNames(idGas);
|
||||
const label idGas = compModel.idGas();
|
||||
const wordList& gasNames = compModel.componentNames(idGas);
|
||||
forAll(gasNames, j)
|
||||
{
|
||||
IOField<scalar> YGas
|
||||
@ -217,7 +245,12 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields
|
||||
);
|
||||
|
||||
label i = 0;
|
||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
||||
forAllConstIter
|
||||
(
|
||||
typename Cloud<ReactingMultiphaseParcel<ParcelType> >,
|
||||
c,
|
||||
iter
|
||||
)
|
||||
{
|
||||
const ReactingMultiphaseParcel<ParcelType>& p0 = iter();
|
||||
YGas[i++] = p0.YGas()[j]*p0.Y()[GAS];
|
||||
@ -226,8 +259,8 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields
|
||||
YGas.write();
|
||||
}
|
||||
|
||||
const label idLiquid = c.composition().idLiquid();
|
||||
const wordList& liquidNames = c.composition().componentNames(idLiquid);
|
||||
const label idLiquid = compModel.idLiquid();
|
||||
const wordList& liquidNames = compModel.componentNames(idLiquid);
|
||||
forAll(liquidNames, j)
|
||||
{
|
||||
IOField<scalar> YLiquid
|
||||
@ -241,7 +274,12 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields
|
||||
);
|
||||
|
||||
label i = 0;
|
||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
||||
forAllConstIter
|
||||
(
|
||||
typename Cloud<ReactingMultiphaseParcel<ParcelType> >,
|
||||
c,
|
||||
iter
|
||||
)
|
||||
{
|
||||
const ReactingMultiphaseParcel<ParcelType>& p0 = iter();
|
||||
YLiquid[i++] = p0.YLiquid()[j]*p0.Y()[LIQ];
|
||||
@ -250,8 +288,8 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields
|
||||
YLiquid.write();
|
||||
}
|
||||
|
||||
const label idSolid = c.composition().idSolid();
|
||||
const wordList& solidNames = c.composition().componentNames(idSolid);
|
||||
const label idSolid = compModel.idSolid();
|
||||
const wordList& solidNames = compModel.componentNames(idSolid);
|
||||
forAll(solidNames, j)
|
||||
{
|
||||
IOField<scalar> YSolid
|
||||
@ -265,7 +303,12 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields
|
||||
);
|
||||
|
||||
label i = 0;
|
||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
||||
forAllConstIter
|
||||
(
|
||||
typename Cloud<ReactingMultiphaseParcel<ParcelType> >,
|
||||
c,
|
||||
iter
|
||||
)
|
||||
{
|
||||
const ReactingMultiphaseParcel<ParcelType>& p0 = iter();
|
||||
YSolid[i++] = p0.YSolid()[j]*p0.Y()[SLD];
|
||||
@ -291,14 +334,14 @@ Foam::Ostream& Foam::operator<<
|
||||
scalarField YSolidLoc(p.YSolid()*p.Y()[2]);
|
||||
if (os.format() == IOstream::ASCII)
|
||||
{
|
||||
os << static_cast<const ReactingParcel<ParcelType>&>(p)
|
||||
os << static_cast<const ParcelType&>(p)
|
||||
<< token::SPACE << YGasLoc
|
||||
<< token::SPACE << YLiquidLoc
|
||||
<< token::SPACE << YSolidLoc;
|
||||
}
|
||||
else
|
||||
{
|
||||
os << static_cast<const ReactingParcel<ParcelType>&>(p);
|
||||
os << static_cast<const ParcelType&>(p);
|
||||
os << YGasLoc << YLiquidLoc << YSolidLoc;
|
||||
}
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ void Foam::ReactingParcel<ParcelType>::setCellValues
|
||||
const label cellI
|
||||
)
|
||||
{
|
||||
ThermoParcel<ParcelType>::setCellValues(td, dt, cellI);
|
||||
ParcelType::setCellValues(td, dt, cellI);
|
||||
|
||||
pc_ = td.pInterp().interpolate
|
||||
(
|
||||
@ -252,9 +252,6 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
const label cellI
|
||||
)
|
||||
{
|
||||
typedef typename ReactingParcel<ParcelType>::trackData::cloudType cloudType;
|
||||
const CompositionModel<cloudType>& composition = td.cloud().composition();
|
||||
|
||||
// Define local properties at beginning of time step
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
const scalar np0 = this->nParticle_;
|
||||
@ -304,7 +301,7 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
scalar NCpW = 0.0;
|
||||
|
||||
// Surface concentrations of emitted species
|
||||
scalarField Cs(composition.carrier().species().size(), 0.0);
|
||||
scalarField Cs(td.cloud().composition().carrier().species().size(), 0.0);
|
||||
|
||||
// Calc mass and enthalpy transfer due to phase change
|
||||
calcPhaseChange
|
||||
@ -392,10 +389,10 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
// Transfer mass lost from particle to carrier mass source
|
||||
forAll(dMassPC, i)
|
||||
{
|
||||
label gid = composition.localToGlobalCarrierId(0, i);
|
||||
label gid = td.cloud().composition().localToGlobalCarrierId(0, i);
|
||||
td.cloud().rhoTrans(gid)[cellI] += np0*dMassPC[i];
|
||||
td.cloud().hsTrans()[cellI] +=
|
||||
np0*dMassPC[i]*composition.carrier().Hs(gid, T0);
|
||||
np0*dMassPC[i]*td.cloud().composition().carrier().Hs(gid, T0);
|
||||
}
|
||||
|
||||
// Update momentum transfer
|
||||
@ -423,12 +420,13 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
// Absorb parcel into carrier phase
|
||||
forAll(Y_, i)
|
||||
{
|
||||
label gid = composition.localToGlobalCarrierId(0, i);
|
||||
label gid =
|
||||
td.cloud().composition().localToGlobalCarrierId(0, i);
|
||||
td.cloud().rhoTrans(gid)[cellI] += np0*mass1*Y_[i];
|
||||
}
|
||||
td.cloud().UTrans()[cellI] += np0*mass1*U1;
|
||||
td.cloud().hsTrans()[cellI] +=
|
||||
np0*mass1*composition.H(0, Y_, pc_, T1);
|
||||
np0*mass1*td.cloud().composition().H(0, Y_, pc_, T1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -438,7 +436,7 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
|
||||
else
|
||||
{
|
||||
this->Cp_ = composition.Cp(0, Y_, pc_, T1);
|
||||
this->Cp_ = td.cloud().composition().Cp(0, Y_, pc_, T1);
|
||||
this->T_ = T1;
|
||||
this->U_ = U1;
|
||||
|
||||
@ -478,11 +476,6 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
|
||||
scalarField& Cs
|
||||
)
|
||||
{
|
||||
typedef typename ReactingParcel<ParcelType>::trackData::cloudType cloudType;
|
||||
typedef PhaseChangeModel<cloudType> phaseChangeModelType;
|
||||
const CompositionModel<cloudType>& composition = td.cloud().composition();
|
||||
|
||||
|
||||
if
|
||||
(
|
||||
!td.cloud().phaseChange().active()
|
||||
@ -520,35 +513,19 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
|
||||
|
||||
forAll(YComponents, i)
|
||||
{
|
||||
const label idc = composition.localToGlobalCarrierId(idPhase, i);
|
||||
const label idl = composition.globalIds(idPhase)[i];
|
||||
const label idc =
|
||||
td.cloud().composition().localToGlobalCarrierId(idPhase, i);
|
||||
const label idl = td.cloud().composition().globalIds(idPhase)[i];
|
||||
|
||||
// Calculate enthalpy transfer
|
||||
if
|
||||
(
|
||||
td.cloud().phaseChange().enthalpyTransfer()
|
||||
== phaseChangeModelType::etLatentHeat
|
||||
)
|
||||
{
|
||||
scalar hlp = composition.liquids().properties()[idl].hl(pc_, T);
|
||||
|
||||
Sh -= dMassPC[i]*hlp/dt;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Note: enthalpies of both phases must use the same reference
|
||||
scalar hc = composition.carrier().H(idc, T);
|
||||
scalar hp = composition.liquids().properties()[idl].h(pc_, T);
|
||||
|
||||
Sh -= dMassPC[i]*(hc - hp)/dt;
|
||||
}
|
||||
const scalar dh = td.cloud().phaseChange().dh(idc, idl, pc_, T);
|
||||
Sh -= dMassPC[i]*dh/dt;
|
||||
|
||||
// Update particle surface thermo properties
|
||||
const scalar Dab =
|
||||
composition.liquids().properties()[idl].D(pc_, Ts, Wc);
|
||||
td.cloud().composition().liquids().properties()[idl].D(pc_, Ts, Wc);
|
||||
|
||||
const scalar Cp = composition.carrier().Cp(idc, Ts);
|
||||
const scalar W = composition.carrier().W(idc);
|
||||
const scalar Cp = td.cloud().composition().carrier().Cp(idc, Ts);
|
||||
const scalar W = td.cloud().composition().carrier().W(idc);
|
||||
const scalar Ni = dMassPC[i]/(this->areaS(d)*dt*W);
|
||||
|
||||
// Molar flux of species coming from the particle (kmol/m^2/s)
|
||||
@ -571,7 +548,7 @@ Foam::ReactingParcel<ParcelType>::ReactingParcel
|
||||
const ReactingParcel<ParcelType>& p
|
||||
)
|
||||
:
|
||||
ThermoParcel<ParcelType>(p),
|
||||
ParcelType(p),
|
||||
mass0_(p.mass0_),
|
||||
Y_(p.Y_),
|
||||
pc_(p.pc_)
|
||||
@ -582,10 +559,10 @@ template<class ParcelType>
|
||||
Foam::ReactingParcel<ParcelType>::ReactingParcel
|
||||
(
|
||||
const ReactingParcel<ParcelType>& p,
|
||||
const ReactingCloud<ParcelType>& c
|
||||
const polyMesh& mesh
|
||||
)
|
||||
:
|
||||
ThermoParcel<ParcelType>(p, c),
|
||||
ParcelType(p, mesh),
|
||||
mass0_(p.mass0_),
|
||||
Y_(p.Y_),
|
||||
pc_(p.pc_)
|
||||
|
||||
@ -40,7 +40,6 @@ SourceFiles
|
||||
|
||||
#include "ThermoParcel.H"
|
||||
#include "ReactingCloud.H"
|
||||
#include "reactingParcel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -64,15 +63,14 @@ Ostream& operator<<
|
||||
template<class ParcelType>
|
||||
class ReactingParcel
|
||||
:
|
||||
public reactingParcel,
|
||||
public ThermoParcel<ParcelType>
|
||||
public ParcelType
|
||||
{
|
||||
public:
|
||||
|
||||
//- Class to hold reacting particle constant properties
|
||||
class constantProperties
|
||||
:
|
||||
public ThermoParcel<ParcelType>::constantProperties
|
||||
public ParcelType::constantProperties
|
||||
{
|
||||
// Private data
|
||||
|
||||
@ -123,44 +121,42 @@ public:
|
||||
};
|
||||
|
||||
|
||||
//- Class used to pass reacting tracking data to the trackToFace function
|
||||
class trackData
|
||||
template<class CloudType>
|
||||
class TrackingData
|
||||
:
|
||||
public ThermoParcel<ParcelType>::trackData
|
||||
public ParcelType::template TrackingData<CloudType>
|
||||
{
|
||||
private:
|
||||
|
||||
// Private data
|
||||
|
||||
//- Reference to the cloud containing this particle
|
||||
ReactingCloud<ParcelType>& cloud_;
|
||||
// Interpolators for continuous phase fields
|
||||
|
||||
//- Interpolator for continuous phase pressure field
|
||||
autoPtr<interpolation<scalar> > pInterp_;
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
typedef ReactingCloud<ParcelType> cloudType;
|
||||
|
||||
typedef typename ParcelType::template TrackingData<CloudType>::trackPart
|
||||
trackPart;
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
inline trackData
|
||||
inline TrackingData
|
||||
(
|
||||
ReactingCloud<ParcelType>& cloud,
|
||||
typename ThermoParcel<ParcelType>::trackData::trackPart
|
||||
part = ThermoParcel<ParcelType>::trackData::tpLinearTrack
|
||||
CloudType& cloud,
|
||||
trackPart part = ParcelType::template
|
||||
TrackingData<CloudType>::tpLinearTrack
|
||||
);
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Return access to the owner cloud
|
||||
inline ReactingCloud<ParcelType>& cloud();
|
||||
|
||||
//- Return const access to the interpolator for continuous
|
||||
// phase pressure field
|
||||
//- Return const access to the interpolator for continuous phase
|
||||
// pressure field
|
||||
inline const interpolation<scalar>& pInterp() const;
|
||||
};
|
||||
|
||||
@ -229,16 +225,13 @@ public:
|
||||
TypeName("ReactingParcel");
|
||||
|
||||
|
||||
friend class Cloud<ParcelType>;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from owner, position, and cloud owner
|
||||
// Other properties initialised as null
|
||||
inline ReactingParcel
|
||||
(
|
||||
ReactingCloud<ParcelType>& owner,
|
||||
const polyMesh& mesh,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
@ -248,7 +241,7 @@ public:
|
||||
//- Construct from components
|
||||
inline ReactingParcel
|
||||
(
|
||||
ReactingCloud<ParcelType>& owner,
|
||||
const polyMesh& mesh,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
@ -268,7 +261,7 @@ public:
|
||||
//- Construct from Istream
|
||||
ReactingParcel
|
||||
(
|
||||
const Cloud<ParcelType>& c,
|
||||
const polyMesh& mesh,
|
||||
Istream& is,
|
||||
bool readFields = true
|
||||
);
|
||||
@ -277,37 +270,49 @@ public:
|
||||
ReactingParcel
|
||||
(
|
||||
const ReactingParcel& p,
|
||||
const ReactingCloud<ParcelType>& c
|
||||
const polyMesh& mesh
|
||||
);
|
||||
|
||||
//- Construct as a copy
|
||||
ReactingParcel(const ReactingParcel& p);
|
||||
|
||||
//- Construct and return a (basic particle) clone
|
||||
virtual autoPtr<Particle<ParcelType> > clone() const
|
||||
virtual autoPtr<particle> clone() const
|
||||
{
|
||||
return autoPtr<Particle<ParcelType> >
|
||||
(
|
||||
new ReactingParcel<ParcelType>(*this)
|
||||
);
|
||||
return autoPtr<particle>(new ReactingParcel<ParcelType>(*this));
|
||||
}
|
||||
|
||||
//- Construct and return a (basic particle) clone
|
||||
virtual autoPtr<Particle<ParcelType> > clone
|
||||
(
|
||||
const Cloud<ParcelType>& c
|
||||
) const
|
||||
virtual autoPtr<particle> clone(const polyMesh& mesh) const
|
||||
{
|
||||
return autoPtr<Particle<ParcelType> >
|
||||
return autoPtr<particle>
|
||||
(
|
||||
new ReactingParcel<ParcelType>
|
||||
(
|
||||
*this,
|
||||
static_cast<const ReactingCloud<ParcelType>&>(c)
|
||||
)
|
||||
new ReactingParcel<ParcelType>(*this, mesh)
|
||||
);
|
||||
}
|
||||
|
||||
//- Factory class to read-construct particles used for
|
||||
// parallel transfer
|
||||
class iNew
|
||||
{
|
||||
const polyMesh& mesh_;
|
||||
|
||||
public:
|
||||
|
||||
iNew(const polyMesh& mesh)
|
||||
:
|
||||
mesh_(mesh)
|
||||
{}
|
||||
|
||||
autoPtr<ReactingParcel<ParcelType> > operator()(Istream& is) const
|
||||
{
|
||||
return autoPtr<ReactingParcel<ParcelType> >
|
||||
(
|
||||
new ReactingParcel<ParcelType>(mesh_, is, true)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -379,10 +384,28 @@ public:
|
||||
// I-O
|
||||
|
||||
//- Read
|
||||
static void readFields(Cloud<ParcelType>& c);
|
||||
template<class CloudType, class CompositionType>
|
||||
static void readFields
|
||||
(
|
||||
CloudType& c,
|
||||
const CompositionType& compModel
|
||||
);
|
||||
|
||||
//- Read - no composition
|
||||
template<class CloudType>
|
||||
static void readFields(CloudType& c);
|
||||
|
||||
//- Write
|
||||
static void writeFields(const Cloud<ParcelType>& c);
|
||||
template<class CloudType, class CompositionType>
|
||||
static void writeFields
|
||||
(
|
||||
const CloudType& c,
|
||||
const CompositionType& compModel
|
||||
);
|
||||
|
||||
//- Read - composition supplied
|
||||
template<class CloudType>
|
||||
static void writeFields(const CloudType& c);
|
||||
|
||||
|
||||
// Ostream Operator
|
||||
@ -402,6 +425,7 @@ public:
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "ReactingParcelI.H"
|
||||
#include "ReactingParcelTrackingDataI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -26,10 +26,9 @@ License
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
inline
|
||||
Foam::ReactingParcel<ParcelType>::constantProperties::constantProperties()
|
||||
inline Foam::ReactingParcel<ParcelType>::constantProperties::constantProperties()
|
||||
:
|
||||
ThermoParcel<ParcelType>::constantProperties(),
|
||||
ParcelType::constantProperties(),
|
||||
pMin_(0.0),
|
||||
constantVolume_(false),
|
||||
Tvap_(0.0),
|
||||
@ -43,7 +42,7 @@ inline Foam::ReactingParcel<ParcelType>::constantProperties::constantProperties
|
||||
const constantProperties& cp
|
||||
)
|
||||
:
|
||||
ThermoParcel<ParcelType>::constantProperties(cp),
|
||||
ParcelType::constantProperties(cp),
|
||||
pMin_(cp.pMin_),
|
||||
constantVolume_(cp.constantVolume_),
|
||||
Tvap_(cp.Tvap_),
|
||||
@ -58,7 +57,7 @@ inline Foam::ReactingParcel<ParcelType>::constantProperties::constantProperties
|
||||
const bool readFields
|
||||
)
|
||||
:
|
||||
ThermoParcel<ParcelType>::constantProperties(parentDict, readFields),
|
||||
ParcelType::constantProperties(parentDict, readFields),
|
||||
pMin_(0.0),
|
||||
constantVolume_(false),
|
||||
Tvap_(0.0),
|
||||
@ -74,37 +73,17 @@ inline Foam::ReactingParcel<ParcelType>::constantProperties::constantProperties
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::ReactingParcel<ParcelType>::trackData::trackData
|
||||
(
|
||||
ReactingCloud<ParcelType>& cloud,
|
||||
typename ThermoParcel<ParcelType>::trackData::trackPart part
|
||||
)
|
||||
:
|
||||
ThermoParcel<ParcelType>::trackData(cloud, part),
|
||||
cloud_(cloud),
|
||||
pInterp_
|
||||
(
|
||||
interpolation<scalar>::New
|
||||
(
|
||||
cloud.solution().interpolationSchemes(),
|
||||
cloud.p()
|
||||
)
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::ReactingParcel<ParcelType>::ReactingParcel
|
||||
(
|
||||
ReactingCloud<ParcelType>& owner,
|
||||
const polyMesh& mesh,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI
|
||||
)
|
||||
:
|
||||
ThermoParcel<ParcelType>(owner, position, cellI, tetFaceI, tetPtI),
|
||||
ParcelType(mesh, position, cellI, tetFaceI, tetPtI),
|
||||
mass0_(0.0),
|
||||
Y_(0),
|
||||
pc_(0.0)
|
||||
@ -114,7 +93,7 @@ inline Foam::ReactingParcel<ParcelType>::ReactingParcel
|
||||
template<class ParcelType>
|
||||
inline Foam::ReactingParcel<ParcelType>::ReactingParcel
|
||||
(
|
||||
ReactingCloud<ParcelType>& owner,
|
||||
const polyMesh& mesh,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
@ -131,9 +110,9 @@ inline Foam::ReactingParcel<ParcelType>::ReactingParcel
|
||||
const constantProperties& constProps
|
||||
)
|
||||
:
|
||||
ThermoParcel<ParcelType>
|
||||
ParcelType
|
||||
(
|
||||
owner,
|
||||
mesh,
|
||||
position,
|
||||
cellI,
|
||||
tetFaceI,
|
||||
@ -191,24 +170,6 @@ Foam::ReactingParcel<ParcelType>::constantProperties::Tbp() const
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * trackData Member Functions * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::ReactingCloud<ParcelType>&
|
||||
Foam::ReactingParcel<ParcelType>::trackData::cloud()
|
||||
{
|
||||
return cloud_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::interpolation<Foam::scalar>&
|
||||
Foam::ReactingParcel<ParcelType>::trackData::pInterp() const
|
||||
{
|
||||
return pInterp_();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * ThermoParcel Member Functions * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
|
||||
@ -40,27 +40,23 @@ Foam::string Foam::ReactingParcel<ParcelType>::propHeader =
|
||||
template<class ParcelType>
|
||||
Foam::ReactingParcel<ParcelType>::ReactingParcel
|
||||
(
|
||||
const Cloud<ParcelType>& cloud,
|
||||
const polyMesh& mesh,
|
||||
Istream& is,
|
||||
bool readFields
|
||||
)
|
||||
:
|
||||
ThermoParcel<ParcelType>(cloud, is, readFields),
|
||||
ParcelType(mesh, is, readFields),
|
||||
mass0_(0.0),
|
||||
Y_(0),
|
||||
pc_(0.0)
|
||||
{
|
||||
if (readFields)
|
||||
{
|
||||
const ReactingCloud<ParcelType>& cR =
|
||||
dynamic_cast<const ReactingCloud<ParcelType>&>(cloud);
|
||||
|
||||
const label nMixture = cR.composition().phaseTypes().size();
|
||||
Y_.setSize(nMixture);
|
||||
DynamicList<scalar> Ymix;
|
||||
|
||||
if (is.format() == IOstream::ASCII)
|
||||
{
|
||||
is >> mass0_ >> Y_;
|
||||
is >> mass0_ >> Ymix;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -69,8 +65,10 @@ Foam::ReactingParcel<ParcelType>::ReactingParcel
|
||||
reinterpret_cast<char*>(&mass0_),
|
||||
+ sizeof(mass0_)
|
||||
);
|
||||
is >> Y_;
|
||||
is >> Ymix;
|
||||
}
|
||||
|
||||
Y_.transfer(Ymix);
|
||||
}
|
||||
|
||||
// Check state of Istream
|
||||
@ -78,7 +76,7 @@ Foam::ReactingParcel<ParcelType>::ReactingParcel
|
||||
(
|
||||
"ReactingParcel<ParcelType>::ReactingParcel"
|
||||
"("
|
||||
"const Cloud<ParcelType>&, "
|
||||
"const polyMesh&, "
|
||||
"Istream&, "
|
||||
"bool"
|
||||
")"
|
||||
@ -87,40 +85,55 @@ Foam::ReactingParcel<ParcelType>::ReactingParcel
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingParcel<ParcelType>::readFields(Cloud<ParcelType>& cIn)
|
||||
template<class CloudType>
|
||||
void Foam::ReactingParcel<ParcelType>::readFields(CloudType& c)
|
||||
{
|
||||
if (!cIn.size())
|
||||
if (!c.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ReactingCloud<ParcelType>& c =
|
||||
dynamic_cast<ReactingCloud<ParcelType>&>(cIn);
|
||||
ParcelType::readFields(c);
|
||||
}
|
||||
|
||||
ThermoParcel<ParcelType>::readFields(c);
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType, class CompositionType>
|
||||
void Foam::ReactingParcel<ParcelType>::readFields
|
||||
(
|
||||
CloudType& c,
|
||||
const CompositionType& compModel
|
||||
)
|
||||
{
|
||||
if (!c.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ParcelType::readFields(c);
|
||||
|
||||
IOField<scalar> mass0(c.fieldIOobject("mass0", IOobject::MUST_READ));
|
||||
c.checkFieldIOobject(c, mass0);
|
||||
|
||||
label i = 0;
|
||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
||||
forAllIter(typename Cloud<ReactingParcel<ParcelType> >, c, iter)
|
||||
{
|
||||
ReactingParcel<ParcelType>& p = iter();
|
||||
p.mass0_ = mass0[i++];
|
||||
}
|
||||
|
||||
// Get names and sizes for each Y...
|
||||
const wordList& phaseTypes = c.composition().phaseTypes();
|
||||
const wordList& phaseTypes = compModel.phaseTypes();
|
||||
const label nPhases = phaseTypes.size();
|
||||
wordList stateLabels(nPhases, "");
|
||||
if (c.composition().nPhase() == 1)
|
||||
if (compModel.nPhase() == 1)
|
||||
{
|
||||
stateLabels = c.composition().stateLabels();
|
||||
stateLabels = compModel.stateLabels();
|
||||
}
|
||||
|
||||
|
||||
// Set storage for each Y... for each parcel
|
||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
||||
forAllIter(typename Cloud<ReactingParcel<ParcelType> >, c, iter)
|
||||
{
|
||||
ReactingParcel<ParcelType>& p = iter();
|
||||
p.Y_.setSize(nPhases, 0.0);
|
||||
@ -139,7 +152,7 @@ void Foam::ReactingParcel<ParcelType>::readFields(Cloud<ParcelType>& cIn)
|
||||
);
|
||||
|
||||
label i = 0;
|
||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
||||
forAllIter(typename Cloud<ReactingParcel<ParcelType> >, c, iter)
|
||||
{
|
||||
ReactingParcel<ParcelType>& p = iter();
|
||||
p.Y_[j] = Y[i++];
|
||||
@ -149,15 +162,22 @@ void Foam::ReactingParcel<ParcelType>::readFields(Cloud<ParcelType>& cIn)
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
void Foam::ReactingParcel<ParcelType>::writeFields(const CloudType& c)
|
||||
{
|
||||
ParcelType::writeFields(c);
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType, class CompositionType>
|
||||
void Foam::ReactingParcel<ParcelType>::writeFields
|
||||
(
|
||||
const Cloud<ParcelType>& cIn
|
||||
const CloudType& c,
|
||||
const CompositionType& compModel
|
||||
)
|
||||
{
|
||||
const ReactingCloud<ParcelType>& c =
|
||||
dynamic_cast<const ReactingCloud<ParcelType>&>(cIn);
|
||||
|
||||
ThermoParcel<ParcelType>::writeFields(c);
|
||||
ParcelType::writeFields(c);
|
||||
|
||||
const label np = c.size();
|
||||
|
||||
@ -166,7 +186,7 @@ void Foam::ReactingParcel<ParcelType>::writeFields
|
||||
IOField<scalar> mass0(c.fieldIOobject("mass0", IOobject::NO_READ), np);
|
||||
|
||||
label i = 0;
|
||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
||||
forAllConstIter(typename Cloud<ReactingParcel<ParcelType> >, c, iter)
|
||||
{
|
||||
const ReactingParcel<ParcelType>& p = iter();
|
||||
mass0[i++] = p.mass0_;
|
||||
@ -174,11 +194,11 @@ void Foam::ReactingParcel<ParcelType>::writeFields
|
||||
mass0.write();
|
||||
|
||||
// Write the composition fractions
|
||||
const wordList& phaseTypes = c.composition().phaseTypes();
|
||||
const wordList& phaseTypes = compModel.phaseTypes();
|
||||
wordList stateLabels(phaseTypes.size(), "");
|
||||
if (c.composition().nPhase() == 1)
|
||||
if (compModel.nPhase() == 1)
|
||||
{
|
||||
stateLabels = c.composition().stateLabels();
|
||||
stateLabels = compModel.stateLabels();
|
||||
}
|
||||
|
||||
forAll(phaseTypes, j)
|
||||
@ -192,12 +212,16 @@ void Foam::ReactingParcel<ParcelType>::writeFields
|
||||
),
|
||||
np
|
||||
);
|
||||
|
||||
label i = 0;
|
||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
||||
forAllConstIter
|
||||
(
|
||||
typename Cloud<ReactingParcel<ParcelType> >,
|
||||
c,
|
||||
iter
|
||||
)
|
||||
{
|
||||
const ReactingParcel<ParcelType>& p0 = iter();
|
||||
Y[i++] = p0.Y()[j];
|
||||
const ReactingParcel<ParcelType>& p = iter();
|
||||
Y[i++] = p.Y()[j];
|
||||
}
|
||||
|
||||
Y.write();
|
||||
@ -217,13 +241,13 @@ Foam::Ostream& Foam::operator<<
|
||||
{
|
||||
if (os.format() == IOstream::ASCII)
|
||||
{
|
||||
os << static_cast<const ThermoParcel<ParcelType>&>(p)
|
||||
os << static_cast<const ParcelType&>(p)
|
||||
<< token::SPACE << p.mass0()
|
||||
<< token::SPACE << p.Y();
|
||||
}
|
||||
else
|
||||
{
|
||||
os << static_cast<const ThermoParcel<ParcelType>&>(p);
|
||||
os << static_cast<const ParcelType&>(p);
|
||||
os.write
|
||||
(
|
||||
reinterpret_cast<const char*>(&p.mass0_),
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,26 +23,33 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "reactingParcel.H"
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline Foam::ReactingParcel<ParcelType>::TrackingData<CloudType>::TrackingData
|
||||
(
|
||||
CloudType& cloud,
|
||||
trackPart part
|
||||
)
|
||||
:
|
||||
ParcelType::template TrackingData<CloudType>(cloud, part),
|
||||
pInterp_
|
||||
(
|
||||
interpolation<scalar>::New
|
||||
(
|
||||
cloud.solution().interpolationSchemes(),
|
||||
cloud.p()
|
||||
)
|
||||
)
|
||||
{}
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::interpolation<Foam::scalar>&
|
||||
Foam::ReactingParcel<ParcelType>::TrackingData<CloudType>::pInterp() const
|
||||
{
|
||||
defineTypeNameAndDebug(reactingParcel, 0);
|
||||
return pInterp_();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::reactingParcel::reactingParcel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::reactingParcel::~reactingParcel()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -39,7 +39,7 @@ void Foam::ThermoParcel<ParcelType>::setCellValues
|
||||
const label cellI
|
||||
)
|
||||
{
|
||||
KinematicParcel<ParcelType>::setCellValues(td, dt, cellI);
|
||||
ParcelType::setCellValues(td, dt, cellI);
|
||||
|
||||
tetIndices tetIs = this->currentTetIndices();
|
||||
|
||||
@ -353,7 +353,7 @@ Foam::ThermoParcel<ParcelType>::ThermoParcel
|
||||
const ThermoParcel<ParcelType>& p
|
||||
)
|
||||
:
|
||||
KinematicParcel<ParcelType>(p),
|
||||
ParcelType(p),
|
||||
T_(p.T_),
|
||||
Cp_(p.Cp_),
|
||||
Tc_(p.Tc_),
|
||||
@ -365,10 +365,10 @@ template<class ParcelType>
|
||||
Foam::ThermoParcel<ParcelType>::ThermoParcel
|
||||
(
|
||||
const ThermoParcel<ParcelType>& p,
|
||||
const ThermoCloud<ParcelType>& c
|
||||
const polyMesh& mesh
|
||||
)
|
||||
:
|
||||
KinematicParcel<ParcelType>(p, c),
|
||||
ParcelType(p, mesh),
|
||||
T_(p.T_),
|
||||
Cp_(p.Cp_),
|
||||
Tc_(p.Tc_),
|
||||
|
||||
@ -64,14 +64,14 @@ Ostream& operator<<
|
||||
template<class ParcelType>
|
||||
class ThermoParcel
|
||||
:
|
||||
public KinematicParcel<ParcelType>
|
||||
public ParcelType
|
||||
{
|
||||
public:
|
||||
|
||||
//- Class to hold thermo particle constant properties
|
||||
class constantProperties
|
||||
:
|
||||
public KinematicParcel<ParcelType>::constantProperties
|
||||
public ParcelType::constantProperties
|
||||
{
|
||||
|
||||
// Private data
|
||||
@ -140,17 +140,15 @@ public:
|
||||
};
|
||||
|
||||
|
||||
//- Class used to pass thermo tracking data to the trackToFace function
|
||||
class trackData
|
||||
template<class CloudType>
|
||||
class TrackingData
|
||||
:
|
||||
public KinematicParcel<ParcelType>::trackData
|
||||
public ParcelType::template TrackingData<CloudType>
|
||||
{
|
||||
private:
|
||||
|
||||
// Private data
|
||||
|
||||
//- Reference to the cloud containing this particle
|
||||
ThermoCloud<ParcelType>& cloud_;
|
||||
|
||||
//- Local copy of carrier specific heat field
|
||||
// Cp not stored on acrrier thermo, but returned as tmp<...>
|
||||
const volScalarField Cp_;
|
||||
@ -168,24 +166,25 @@ public:
|
||||
autoPtr<interpolation<scalar> > GInterp_;
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
typedef typename ParcelType::template TrackingData<CloudType>::trackPart
|
||||
trackPart;
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
inline trackData
|
||||
inline TrackingData
|
||||
(
|
||||
ThermoCloud<ParcelType>& cloud,
|
||||
typename KinematicParcel<ParcelType>::trackData::trackPart
|
||||
part = KinematicParcel<ParcelType>::trackData::tpLinearTrack
|
||||
CloudType& cloud,
|
||||
trackPart part = ParcelType::template
|
||||
TrackingData<CloudType>::tpLinearTrack
|
||||
);
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Return access to the owner cloud
|
||||
inline ThermoCloud<ParcelType>& cloud();
|
||||
|
||||
//- Return access to the locally stored carrier Cp field
|
||||
inline const volScalarField& Cp() const;
|
||||
|
||||
@ -259,16 +258,13 @@ public:
|
||||
TypeName("ThermoParcel");
|
||||
|
||||
|
||||
friend class Cloud<ParcelType>;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from owner, position, and cloud owner
|
||||
// Other properties initialised as null
|
||||
inline ThermoParcel
|
||||
(
|
||||
ThermoCloud<ParcelType>& owner,
|
||||
const polyMesh& mesh,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
@ -278,7 +274,7 @@ public:
|
||||
//- Construct from components
|
||||
inline ThermoParcel
|
||||
(
|
||||
ThermoCloud<ParcelType>& owner,
|
||||
const polyMesh& mesh,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
@ -297,7 +293,7 @@ public:
|
||||
//- Construct from Istream
|
||||
ThermoParcel
|
||||
(
|
||||
const Cloud<ParcelType>& c,
|
||||
const polyMesh& mesh,
|
||||
Istream& is,
|
||||
bool readFields = true
|
||||
);
|
||||
@ -306,29 +302,41 @@ public:
|
||||
ThermoParcel(const ThermoParcel& p);
|
||||
|
||||
//- Construct as a copy
|
||||
ThermoParcel(const ThermoParcel& p, const ThermoCloud<ParcelType>& c);
|
||||
ThermoParcel(const ThermoParcel& p, const polyMesh& mesh);
|
||||
|
||||
//- Construct and return a (basic particle) clone
|
||||
virtual autoPtr<Particle<ParcelType> > clone() const
|
||||
virtual autoPtr<particle> clone() const
|
||||
{
|
||||
return autoPtr<Particle<ParcelType> >(new ThermoParcel(*this));
|
||||
return autoPtr<particle>(new ThermoParcel(*this));
|
||||
}
|
||||
|
||||
//- Construct and return a (basic particle) clone
|
||||
virtual autoPtr<Particle<ParcelType> > clone
|
||||
(
|
||||
const Cloud<ParcelType>& c
|
||||
) const
|
||||
virtual autoPtr<particle> clone(const polyMesh& mesh) const
|
||||
{
|
||||
return autoPtr<Particle<ParcelType> >
|
||||
return autoPtr<particle>(new ThermoParcel(*this, mesh));
|
||||
}
|
||||
|
||||
//- Factory class to read-construct particles used for
|
||||
// parallel transfer
|
||||
class iNew
|
||||
{
|
||||
const polyMesh& mesh_;
|
||||
|
||||
public:
|
||||
|
||||
iNew(const polyMesh& mesh)
|
||||
:
|
||||
mesh_(mesh)
|
||||
{}
|
||||
|
||||
autoPtr<ThermoParcel<ParcelType> > operator()(Istream& is) const
|
||||
{
|
||||
return autoPtr<ThermoParcel<ParcelType> >
|
||||
(
|
||||
new ThermoParcel
|
||||
(
|
||||
*this,
|
||||
static_cast<const ThermoCloud<ParcelType>&>(c)
|
||||
)
|
||||
new ThermoParcel<ParcelType>(mesh_, is, true)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -407,10 +415,12 @@ public:
|
||||
// I-O
|
||||
|
||||
//- Read
|
||||
static void readFields(Cloud<ParcelType>& c);
|
||||
template<class CloudType>
|
||||
static void readFields(CloudType& c);
|
||||
|
||||
//- Write
|
||||
static void writeFields(const Cloud<ParcelType>& c);
|
||||
template<class CloudType>
|
||||
static void writeFields(const CloudType& c);
|
||||
|
||||
|
||||
// Ostream Operator
|
||||
@ -430,6 +440,7 @@ public:
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "ThermoParcelI.H"
|
||||
#include "ThermoParcelTrackingDataI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ License
|
||||
template<class ParcelType>
|
||||
inline Foam::ThermoParcel<ParcelType>::constantProperties::constantProperties()
|
||||
:
|
||||
KinematicParcel<ParcelType>::constantProperties(),
|
||||
ParcelType::constantProperties(),
|
||||
T0_(0.0),
|
||||
TMin_(0.0),
|
||||
Cp0_(0.0),
|
||||
@ -44,7 +44,7 @@ inline Foam::ThermoParcel<ParcelType>::constantProperties::constantProperties
|
||||
const constantProperties& cp
|
||||
)
|
||||
:
|
||||
KinematicParcel<ParcelType>::constantProperties(cp),
|
||||
ParcelType::constantProperties(cp),
|
||||
T0_(cp.T0_),
|
||||
TMin_(cp.TMin_),
|
||||
Cp0_(cp.Cp0_),
|
||||
@ -61,7 +61,7 @@ inline Foam::ThermoParcel<ParcelType>::constantProperties::constantProperties
|
||||
const bool readFields
|
||||
)
|
||||
:
|
||||
KinematicParcel<ParcelType>::constantProperties(parentDict, readFields),
|
||||
ParcelType::constantProperties(parentDict, readFields),
|
||||
T0_(0.0),
|
||||
TMin_(0.0),
|
||||
Cp0_(0.0),
|
||||
@ -81,71 +81,17 @@ inline Foam::ThermoParcel<ParcelType>::constantProperties::constantProperties
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::ThermoParcel<ParcelType>::trackData::trackData
|
||||
(
|
||||
ThermoCloud<ParcelType>& cloud,
|
||||
typename KinematicParcel<ParcelType>::trackData::trackPart part
|
||||
)
|
||||
:
|
||||
KinematicParcel<ParcelType>::trackData(cloud, part),
|
||||
cloud_(cloud),
|
||||
Cp_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Cp",
|
||||
cloud.db().time().timeName(),
|
||||
cloud.db(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
cloud.thermo().thermo().Cp()
|
||||
),
|
||||
TInterp_
|
||||
(
|
||||
interpolation<scalar>::New
|
||||
(
|
||||
cloud.solution().interpolationSchemes(),
|
||||
cloud.T()
|
||||
)
|
||||
),
|
||||
CpInterp_
|
||||
(
|
||||
interpolation<scalar>::New
|
||||
(
|
||||
cloud.solution().interpolationSchemes(),
|
||||
Cp_
|
||||
)
|
||||
),
|
||||
GInterp_(NULL)
|
||||
{
|
||||
if (cloud.radiation())
|
||||
{
|
||||
GInterp_.reset
|
||||
(
|
||||
interpolation<scalar>::New
|
||||
(
|
||||
cloud.solution().interpolationSchemes(),
|
||||
cloud.mesh().objectRegistry::template
|
||||
lookupObject<volScalarField>("G")
|
||||
).ptr()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::ThermoParcel<ParcelType>::ThermoParcel
|
||||
(
|
||||
ThermoCloud<ParcelType>& owner,
|
||||
const polyMesh& mesh,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI
|
||||
)
|
||||
:
|
||||
KinematicParcel<ParcelType>(owner, position, cellI, tetFaceI, tetPtI),
|
||||
ParcelType(mesh, position, cellI, tetFaceI, tetPtI),
|
||||
T_(0.0),
|
||||
Cp_(0.0),
|
||||
Tc_(0.0),
|
||||
@ -156,7 +102,7 @@ inline Foam::ThermoParcel<ParcelType>::ThermoParcel
|
||||
template<class ParcelType>
|
||||
inline Foam::ThermoParcel<ParcelType>::ThermoParcel
|
||||
(
|
||||
ThermoCloud<ParcelType>& owner,
|
||||
const polyMesh& mesh,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
@ -172,9 +118,9 @@ inline Foam::ThermoParcel<ParcelType>::ThermoParcel
|
||||
const constantProperties& constProps
|
||||
)
|
||||
:
|
||||
KinematicParcel<ParcelType>
|
||||
ParcelType
|
||||
(
|
||||
owner,
|
||||
mesh,
|
||||
position,
|
||||
cellI,
|
||||
tetFaceI,
|
||||
@ -246,58 +192,6 @@ Foam::ThermoParcel<ParcelType>::constantProperties::Pr() const
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * trackData Member Functions * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::ThermoCloud<ParcelType>&
|
||||
Foam::ThermoParcel<ParcelType>::trackData::cloud()
|
||||
{
|
||||
return cloud_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::volScalarField&
|
||||
Foam::ThermoParcel<ParcelType>::trackData::Cp() const
|
||||
{
|
||||
return Cp_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::interpolation<Foam::scalar>&
|
||||
Foam::ThermoParcel<ParcelType>::trackData::TInterp() const
|
||||
{
|
||||
return TInterp_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::interpolation<Foam::scalar>&
|
||||
Foam::ThermoParcel<ParcelType>::trackData::CpInterp() const
|
||||
{
|
||||
return CpInterp_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::interpolation<Foam::scalar>&
|
||||
Foam::ThermoParcel<ParcelType>::trackData::GInterp() const
|
||||
{
|
||||
if (!GInterp_.valid())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"inline const Foam::interpolation<Foam::scalar>&"
|
||||
"Foam::ThermoParcel<ParcelType>::trackData::GInterp() const"
|
||||
) << "Radiation G interpolation object not set"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
return GInterp_();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * ThermoParcel Member Functions * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
|
||||
@ -30,7 +30,7 @@ License
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::string Foam::ThermoParcel<ParcelType>::propHeader =
|
||||
KinematicParcel<ParcelType>::propHeader
|
||||
ParcelType::propHeader
|
||||
+ " T"
|
||||
+ " Cp";
|
||||
|
||||
@ -40,12 +40,12 @@ Foam::string Foam::ThermoParcel<ParcelType>::propHeader =
|
||||
template<class ParcelType>
|
||||
Foam::ThermoParcel<ParcelType>::ThermoParcel
|
||||
(
|
||||
const Cloud<ParcelType>& cloud,
|
||||
const polyMesh& mesh,
|
||||
Istream& is,
|
||||
bool readFields
|
||||
)
|
||||
:
|
||||
KinematicParcel<ParcelType>(cloud, is, readFields),
|
||||
ParcelType(mesh, is, readFields),
|
||||
T_(0.0),
|
||||
Cp_(0.0),
|
||||
Tc_(0.0),
|
||||
@ -72,20 +72,21 @@ Foam::ThermoParcel<ParcelType>::ThermoParcel
|
||||
// Check state of Istream
|
||||
is.check
|
||||
(
|
||||
"ThermoParcel::ThermoParcel(const Cloud<ParcelType>&, Istream&, bool)"
|
||||
"ThermoParcel::ThermoParcel(const polyMesh&, Istream&, bool)"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ThermoParcel<ParcelType>::readFields(Cloud<ParcelType>& c)
|
||||
template<class CloudType>
|
||||
void Foam::ThermoParcel<ParcelType>::readFields(CloudType& c)
|
||||
{
|
||||
if (!c.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
KinematicParcel<ParcelType>::readFields(c);
|
||||
ParcelType::readFields(c);
|
||||
|
||||
IOField<scalar> T(c.fieldIOobject("T", IOobject::MUST_READ));
|
||||
c.checkFieldIOobject(c, T);
|
||||
@ -95,7 +96,7 @@ void Foam::ThermoParcel<ParcelType>::readFields(Cloud<ParcelType>& c)
|
||||
|
||||
|
||||
label i = 0;
|
||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
||||
forAllIter(typename Cloud<ThermoParcel<ParcelType> >, c, iter)
|
||||
{
|
||||
ThermoParcel<ParcelType>& p = iter();
|
||||
|
||||
@ -107,9 +108,10 @@ void Foam::ThermoParcel<ParcelType>::readFields(Cloud<ParcelType>& c)
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ThermoParcel<ParcelType>::writeFields(const Cloud<ParcelType>& c)
|
||||
template<class CloudType>
|
||||
void Foam::ThermoParcel<ParcelType>::writeFields(const CloudType& c)
|
||||
{
|
||||
KinematicParcel<ParcelType>::writeFields(c);
|
||||
ParcelType::writeFields(c);
|
||||
|
||||
label np = c.size();
|
||||
|
||||
@ -117,7 +119,7 @@ void Foam::ThermoParcel<ParcelType>::writeFields(const Cloud<ParcelType>& c)
|
||||
IOField<scalar> Cp(c.fieldIOobject("Cp", IOobject::NO_READ), np);
|
||||
|
||||
label i = 0;
|
||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
||||
forAllConstIter(typename Cloud<ThermoParcel<ParcelType> >, c, iter)
|
||||
{
|
||||
const ThermoParcel<ParcelType>& p = iter();
|
||||
|
||||
@ -142,13 +144,13 @@ Foam::Ostream& Foam::operator<<
|
||||
{
|
||||
if (os.format() == IOstream::ASCII)
|
||||
{
|
||||
os << static_cast<const KinematicParcel<ParcelType>&>(p)
|
||||
os << static_cast<const ParcelType&>(p)
|
||||
<< token::SPACE << p.T()
|
||||
<< token::SPACE << p.Cp();
|
||||
}
|
||||
else
|
||||
{
|
||||
os << static_cast<const KinematicParcel<ParcelType>&>(p);
|
||||
os << static_cast<const ParcelType&>(p);
|
||||
os.write
|
||||
(
|
||||
reinterpret_cast<const char*>(&p.T_),
|
||||
|
||||
@ -0,0 +1,127 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2011 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 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 CloudType>
|
||||
inline Foam::ThermoParcel<ParcelType>::TrackingData<CloudType>::TrackingData
|
||||
(
|
||||
CloudType& cloud,
|
||||
trackPart part
|
||||
)
|
||||
:
|
||||
ParcelType::template TrackingData<CloudType>(cloud, part),
|
||||
Cp_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Cp",
|
||||
cloud.db().time().timeName(),
|
||||
cloud.db(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
cloud.thermo().thermo().Cp()
|
||||
),
|
||||
TInterp_
|
||||
(
|
||||
interpolation<scalar>::New
|
||||
(
|
||||
cloud.solution().interpolationSchemes(),
|
||||
cloud.T()
|
||||
)
|
||||
),
|
||||
CpInterp_
|
||||
(
|
||||
interpolation<scalar>::New
|
||||
(
|
||||
cloud.solution().interpolationSchemes(),
|
||||
Cp_
|
||||
)
|
||||
),
|
||||
GInterp_(NULL)
|
||||
{
|
||||
if (cloud.radiation())
|
||||
{
|
||||
GInterp_.reset
|
||||
(
|
||||
interpolation<scalar>::New
|
||||
(
|
||||
cloud.solution().interpolationSchemes(),
|
||||
cloud.mesh().objectRegistry::template
|
||||
lookupObject<volScalarField>("G")
|
||||
).ptr()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::volScalarField&
|
||||
Foam::ThermoParcel<ParcelType>::TrackingData<CloudType>::Cp() const
|
||||
{
|
||||
return Cp_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::interpolation<Foam::scalar>&
|
||||
Foam::ThermoParcel<ParcelType>::TrackingData<CloudType>::TInterp() const
|
||||
{
|
||||
return TInterp_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::interpolation<Foam::scalar>&
|
||||
Foam::ThermoParcel<ParcelType>::TrackingData<CloudType>::CpInterp() const
|
||||
{
|
||||
return CpInterp_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
template<class CloudType>
|
||||
inline const Foam::interpolation<Foam::scalar>&
|
||||
Foam::ThermoParcel<ParcelType>::TrackingData<CloudType>::GInterp() const
|
||||
{
|
||||
if (!GInterp_.valid())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"inline const Foam::interpolation<Foam::scalar>&"
|
||||
"Foam::ThermoParcel<ParcelType>::TrackingData<CloudType>::"
|
||||
"GInterp() const"
|
||||
) << "Radiation G interpolation object not set"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
return GInterp_();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,80 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 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 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/>.
|
||||
|
||||
Class
|
||||
Foam::basicReactingParcel
|
||||
|
||||
Description
|
||||
Base class for reacting parcel - simply used to set the contiguous flag
|
||||
|
||||
SourceFiles
|
||||
reactingParcel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef reactingParcel_H
|
||||
#define reactingParcel_H
|
||||
|
||||
#include "typeInfo.H"
|
||||
#include "contiguous.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class reactingParcel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class reactingParcel
|
||||
{
|
||||
public:
|
||||
|
||||
//- Run-time type information
|
||||
TypeName("reactingParcel");
|
||||
|
||||
//- Construct null
|
||||
reactingParcel();
|
||||
|
||||
//- Destructor
|
||||
virtual ~reactingParcel();
|
||||
};
|
||||
|
||||
|
||||
template<>
|
||||
inline bool contiguous<reactingParcel>()
|
||||
{
|
||||
return false; // Derived classes include scalar lists/fields
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,124 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2011 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 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/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "basicKinematicParcel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::basicKinematicParcel::basicKinematicParcel
|
||||
(
|
||||
KinematicCloud<basicKinematicParcel>& owner,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI
|
||||
)
|
||||
:
|
||||
KinematicParcel<basicKinematicParcel>
|
||||
(
|
||||
owner,
|
||||
position,
|
||||
cellI,
|
||||
tetFaceI,
|
||||
tetPtI
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
Foam::basicKinematicParcel::basicKinematicParcel
|
||||
(
|
||||
KinematicCloud<basicKinematicParcel>& owner,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI,
|
||||
const label typeId,
|
||||
const scalar nParticle0,
|
||||
const scalar d0,
|
||||
const scalar dTarget0,
|
||||
const vector& U0,
|
||||
const vector& f0,
|
||||
const vector& angularMomentum0,
|
||||
const vector& torque0,
|
||||
const constantProperties& constProps
|
||||
)
|
||||
:
|
||||
KinematicParcel<basicKinematicParcel>
|
||||
(
|
||||
owner,
|
||||
position,
|
||||
cellI,
|
||||
tetFaceI,
|
||||
tetPtI,
|
||||
typeId,
|
||||
nParticle0,
|
||||
d0,
|
||||
dTarget0,
|
||||
U0,
|
||||
f0,
|
||||
angularMomentum0,
|
||||
torque0,
|
||||
constProps
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
Foam::basicKinematicParcel::basicKinematicParcel
|
||||
(
|
||||
const Cloud<basicKinematicParcel>& cloud,
|
||||
Istream& is,
|
||||
bool readFields
|
||||
)
|
||||
:
|
||||
KinematicParcel<basicKinematicParcel>(cloud, is, readFields)
|
||||
{}
|
||||
|
||||
|
||||
Foam::basicKinematicParcel::basicKinematicParcel
|
||||
(
|
||||
const basicKinematicParcel& p
|
||||
)
|
||||
:
|
||||
KinematicParcel<basicKinematicParcel>(p)
|
||||
{}
|
||||
|
||||
|
||||
Foam::basicKinematicParcel::basicKinematicParcel
|
||||
(
|
||||
const basicKinematicParcel& p,
|
||||
const KinematicCloud<basicKinematicParcel>& c
|
||||
)
|
||||
:
|
||||
KinematicParcel<basicKinematicParcel>(p, c)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::basicKinematicParcel::~basicKinematicParcel()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -25,129 +25,32 @@ Class
|
||||
Foam::basicKinematicParcel
|
||||
|
||||
Description
|
||||
|
||||
Definition of basic kinematic parcel
|
||||
|
||||
SourceFiles
|
||||
basicKinematicParcel.C
|
||||
basicKinematicParcel.H
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef basicKinematicParcel_H
|
||||
#define basicKinematicParcel_H
|
||||
|
||||
#include "contiguous.H"
|
||||
#include "particle.H"
|
||||
#include "KinematicParcel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class basicKinematicParcel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class basicKinematicParcel
|
||||
:
|
||||
public KinematicParcel<basicKinematicParcel>
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Run-time type information
|
||||
TypeName("basicKinematicParcel");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from owner, position, and cloud owner
|
||||
// Other properties initialised as null
|
||||
basicKinematicParcel
|
||||
(
|
||||
KinematicCloud<basicKinematicParcel>& owner,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI
|
||||
);
|
||||
|
||||
//- Construct from components
|
||||
basicKinematicParcel
|
||||
(
|
||||
KinematicCloud<basicKinematicParcel>& owner,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI,
|
||||
const label typeId,
|
||||
const scalar nParticle0,
|
||||
const scalar d0,
|
||||
const scalar dTarget0,
|
||||
const vector& U0,
|
||||
const vector& f0,
|
||||
const vector& angularMomentum0,
|
||||
const vector& torque0,
|
||||
const constantProperties& constProps
|
||||
);
|
||||
|
||||
//- Construct from Istream
|
||||
basicKinematicParcel
|
||||
(
|
||||
const Cloud<basicKinematicParcel>& c,
|
||||
Istream& is,
|
||||
bool readFields = true
|
||||
);
|
||||
|
||||
//- Construct as a copy
|
||||
basicKinematicParcel(const basicKinematicParcel& p);
|
||||
|
||||
//- Construct as a copy
|
||||
basicKinematicParcel
|
||||
(
|
||||
const basicKinematicParcel& p,
|
||||
const KinematicCloud<basicKinematicParcel>& c
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual autoPtr<Particle<basicKinematicParcel> > clone() const
|
||||
{
|
||||
return autoPtr<Particle<basicKinematicParcel> >
|
||||
(
|
||||
new basicKinematicParcel(*this)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual autoPtr<Particle<basicKinematicParcel> > clone
|
||||
(
|
||||
const Cloud<basicKinematicParcel>& c
|
||||
) const
|
||||
{
|
||||
return autoPtr<Particle<basicKinematicParcel> >
|
||||
(
|
||||
new basicKinematicParcel
|
||||
(
|
||||
*this,
|
||||
static_cast<const KinematicCloud<basicKinematicParcel>&>(c)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~basicKinematicParcel();
|
||||
};
|
||||
|
||||
typedef KinematicParcel<particle> basicKinematicParcel;
|
||||
|
||||
template<>
|
||||
inline bool contiguous<basicKinematicParcel>()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -24,13 +24,14 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "basicKinematicParcel.H"
|
||||
#include "createKinematicParcelTypes.H"
|
||||
#include "Cloud.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
createKinematicParcelTypes(basicKinematicParcel);
|
||||
defineTemplateTypeNameAndDebug(basicKinematicParcel, 0);
|
||||
defineTemplateTypeNameAndDebug(Cloud<basicKinematicParcel>, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,138 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 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 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/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "basicReactingMultiphaseParcel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::basicReactingMultiphaseParcel::basicReactingMultiphaseParcel
|
||||
(
|
||||
ReactingMultiphaseCloud<basicReactingMultiphaseParcel>& owner,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI
|
||||
)
|
||||
:
|
||||
ReactingMultiphaseParcel<basicReactingMultiphaseParcel>
|
||||
(
|
||||
owner,
|
||||
position,
|
||||
cellI,
|
||||
tetFaceI,
|
||||
tetPtI
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
Foam::basicReactingMultiphaseParcel::basicReactingMultiphaseParcel
|
||||
(
|
||||
ReactingMultiphaseCloud<basicReactingMultiphaseParcel>& owner,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI,
|
||||
const label typeId,
|
||||
const scalar nParticle0,
|
||||
const scalar d0,
|
||||
const scalar dTarget0,
|
||||
const vector& U0,
|
||||
const vector& f0,
|
||||
const vector& angularMomentum0,
|
||||
const vector& torque0,
|
||||
const scalarField& YGas0,
|
||||
const scalarField& YLiquid0,
|
||||
const scalarField& YSolid0,
|
||||
const scalarField& Y0,
|
||||
const ReactingMultiphaseParcel<basicReactingMultiphaseParcel>::
|
||||
constantProperties& constProps
|
||||
)
|
||||
:
|
||||
ReactingMultiphaseParcel<basicReactingMultiphaseParcel>
|
||||
(
|
||||
owner,
|
||||
position,
|
||||
cellI,
|
||||
tetFaceI,
|
||||
tetPtI,
|
||||
typeId,
|
||||
nParticle0,
|
||||
d0,
|
||||
dTarget0,
|
||||
U0,
|
||||
f0,
|
||||
angularMomentum0,
|
||||
torque0,
|
||||
YGas0,
|
||||
YLiquid0,
|
||||
YSolid0,
|
||||
Y0,
|
||||
constProps
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
Foam::basicReactingMultiphaseParcel::basicReactingMultiphaseParcel
|
||||
(
|
||||
const Cloud<basicReactingMultiphaseParcel>& cloud,
|
||||
Istream& is,
|
||||
bool readFields
|
||||
)
|
||||
:
|
||||
ReactingMultiphaseParcel<basicReactingMultiphaseParcel>
|
||||
(
|
||||
cloud,
|
||||
is,
|
||||
readFields
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
Foam::basicReactingMultiphaseParcel::basicReactingMultiphaseParcel
|
||||
(
|
||||
const basicReactingMultiphaseParcel& p
|
||||
)
|
||||
:
|
||||
ReactingMultiphaseParcel<basicReactingMultiphaseParcel>(p)
|
||||
{}
|
||||
|
||||
|
||||
Foam::basicReactingMultiphaseParcel::basicReactingMultiphaseParcel
|
||||
(
|
||||
const basicReactingMultiphaseParcel& p,
|
||||
const ReactingMultiphaseCloud<basicReactingMultiphaseParcel>& c
|
||||
)
|
||||
:
|
||||
ReactingMultiphaseParcel<basicReactingMultiphaseParcel>(p, c)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::basicReactingMultiphaseParcel::~basicReactingMultiphaseParcel()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,7 +25,7 @@ Class
|
||||
Foam::BasicReactingMultiphaseParcel
|
||||
|
||||
Description
|
||||
|
||||
Definition of basic reacting parcel
|
||||
|
||||
SourceFiles
|
||||
basicReactingMultiphaseParcel.C
|
||||
@ -36,123 +36,38 @@ SourceFiles
|
||||
#ifndef basicReactingMultiphaseParcel_H
|
||||
#define basicReactingMultiphaseParcel_H
|
||||
|
||||
#include "contiguous.H"
|
||||
#include "particle.H"
|
||||
#include "KinematicParcel.H"
|
||||
#include "ThermoParcel.H"
|
||||
#include "ReactingParcel.H"
|
||||
#include "ReactingMultiphaseParcel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
typedef ReactingMultiphaseParcel
|
||||
<
|
||||
ReactingParcel
|
||||
<
|
||||
ThermoParcel
|
||||
<
|
||||
KinematicParcel
|
||||
<
|
||||
particle
|
||||
>
|
||||
>
|
||||
>
|
||||
> basicReactingMultiphaseParcel;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class basicReactingMultiphaseParcel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class basicReactingMultiphaseParcel
|
||||
:
|
||||
public ReactingMultiphaseParcel<basicReactingMultiphaseParcel>
|
||||
template<>
|
||||
inline bool contiguous<basicReactingMultiphaseParcel>()
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Run-time type information
|
||||
TypeName("basicReactingMultiphaseParcel");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from owner, position, and cloud owner
|
||||
// Other properties initialised as null
|
||||
basicReactingMultiphaseParcel
|
||||
(
|
||||
ReactingMultiphaseCloud<basicReactingMultiphaseParcel>& owner,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI
|
||||
);
|
||||
|
||||
//- Construct from components
|
||||
basicReactingMultiphaseParcel
|
||||
(
|
||||
ReactingMultiphaseCloud<basicReactingMultiphaseParcel>& owner,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI,
|
||||
const label typeId,
|
||||
const scalar nParticle0,
|
||||
const scalar d0,
|
||||
const scalar dTarget0,
|
||||
const vector& U0,
|
||||
const vector& f0,
|
||||
const vector& angularMomentum0,
|
||||
const vector& torque0,
|
||||
const scalarField& YGas0,
|
||||
const scalarField& YLiquid0,
|
||||
const scalarField& YSolid0,
|
||||
const scalarField& Y0,
|
||||
const ReactingMultiphaseParcel<basicReactingMultiphaseParcel>::
|
||||
constantProperties& constProps
|
||||
);
|
||||
|
||||
//- Construct from Istream
|
||||
basicReactingMultiphaseParcel
|
||||
(
|
||||
const Cloud<basicReactingMultiphaseParcel>& c,
|
||||
Istream& is,
|
||||
bool readFields = true
|
||||
);
|
||||
|
||||
//- Construct as a copy
|
||||
basicReactingMultiphaseParcel(const basicReactingMultiphaseParcel& p);
|
||||
|
||||
//- Construct as a copy
|
||||
basicReactingMultiphaseParcel
|
||||
(
|
||||
const basicReactingMultiphaseParcel& p,
|
||||
const ReactingMultiphaseCloud<basicReactingMultiphaseParcel>& c
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual autoPtr<Particle<basicReactingMultiphaseParcel> > clone() const
|
||||
{
|
||||
return autoPtr<Particle<basicReactingMultiphaseParcel> >
|
||||
(
|
||||
new basicReactingMultiphaseParcel(*this)
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual autoPtr<Particle<basicReactingMultiphaseParcel> > clone
|
||||
(
|
||||
const Cloud<basicReactingMultiphaseParcel>& c
|
||||
) const
|
||||
{
|
||||
return autoPtr<Particle<basicReactingMultiphaseParcel> >
|
||||
(
|
||||
new basicReactingMultiphaseParcel
|
||||
(
|
||||
*this,
|
||||
static_cast
|
||||
<
|
||||
const ReactingMultiphaseCloud
|
||||
<
|
||||
basicReactingMultiphaseParcel
|
||||
>&
|
||||
>(c)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~basicReactingMultiphaseParcel();
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,14 +23,15 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "createReactingMultiphaseParcelTypes.H"
|
||||
#include "basicReactingMultiphaseParcel.H"
|
||||
#include "Cloud.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
createReactingMultiphaseParcelTypes(basicReactingMultiphaseParcel);
|
||||
defineTemplateTypeNameAndDebug(basicReactingMultiphaseParcel, 0);
|
||||
defineTemplateTypeNameAndDebug(Cloud<basicReactingMultiphaseParcel>, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,126 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2011 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 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/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "basicReactingParcel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::basicReactingParcel::basicReactingParcel
|
||||
(
|
||||
ReactingCloud<basicReactingParcel>& owner,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI
|
||||
)
|
||||
:
|
||||
ReactingParcel<basicReactingParcel>
|
||||
(
|
||||
owner,
|
||||
position,
|
||||
cellI,
|
||||
tetFaceI,
|
||||
tetPtI
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
Foam::basicReactingParcel::basicReactingParcel
|
||||
(
|
||||
ReactingCloud<basicReactingParcel>& owner,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI,
|
||||
const label typeId,
|
||||
const scalar nParticle0,
|
||||
const scalar d0,
|
||||
const scalar dTarget0,
|
||||
const vector& U0,
|
||||
const vector& f0,
|
||||
const vector& angularMomentum0,
|
||||
const vector& torque0,
|
||||
const scalarField& Y0,
|
||||
const ReactingParcel<basicReactingParcel>::constantProperties& constProps
|
||||
)
|
||||
:
|
||||
ReactingParcel<basicReactingParcel>
|
||||
(
|
||||
owner,
|
||||
position,
|
||||
cellI,
|
||||
tetFaceI,
|
||||
tetPtI,
|
||||
typeId,
|
||||
nParticle0,
|
||||
d0,
|
||||
dTarget0,
|
||||
U0,
|
||||
f0,
|
||||
angularMomentum0,
|
||||
torque0,
|
||||
Y0,
|
||||
constProps
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
Foam::basicReactingParcel::basicReactingParcel
|
||||
(
|
||||
const Cloud<basicReactingParcel>& cloud,
|
||||
Istream& is,
|
||||
bool readFields
|
||||
)
|
||||
:
|
||||
ReactingParcel<basicReactingParcel>(cloud, is, readFields)
|
||||
{}
|
||||
|
||||
|
||||
Foam::basicReactingParcel::basicReactingParcel
|
||||
(
|
||||
const basicReactingParcel& p
|
||||
)
|
||||
:
|
||||
ReactingParcel<basicReactingParcel>(p)
|
||||
{}
|
||||
|
||||
|
||||
Foam::basicReactingParcel::basicReactingParcel
|
||||
(
|
||||
const basicReactingParcel& p,
|
||||
const ReactingCloud<basicReactingParcel>& c
|
||||
)
|
||||
:
|
||||
ReactingParcel<basicReactingParcel>(p, c)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::basicReactingParcel::~basicReactingParcel()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -25,7 +25,7 @@ Class
|
||||
Foam::basicReactingParcel
|
||||
|
||||
Description
|
||||
|
||||
Definition of basic reacting parcel
|
||||
|
||||
SourceFiles
|
||||
basicReactingParcel.C
|
||||
@ -35,120 +35,25 @@ SourceFiles
|
||||
#ifndef basicReactingParcel_H
|
||||
#define basicReactingParcel_H
|
||||
|
||||
#include "contiguous.H"
|
||||
#include "particle.H"
|
||||
#include "KinematicParcel.H"
|
||||
#include "ThermoParcel.H"
|
||||
#include "ReactingParcel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class basicReactingParcel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class basicReactingParcel
|
||||
:
|
||||
public ReactingParcel<basicReactingParcel>
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Run-time type information
|
||||
TypeName("basicReactingParcel");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from owner, position, and cloud owner
|
||||
// Other properties initialised as null
|
||||
basicReactingParcel
|
||||
(
|
||||
ReactingCloud<basicReactingParcel>& owner,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI
|
||||
);
|
||||
|
||||
//- Construct from components
|
||||
basicReactingParcel
|
||||
(
|
||||
ReactingCloud<basicReactingParcel>& owner,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI,
|
||||
const label typeId,
|
||||
const scalar nParticle0,
|
||||
const scalar d0,
|
||||
const scalar dTarget0,
|
||||
const vector& U0,
|
||||
const vector& f0,
|
||||
const vector& angularMomentum0,
|
||||
const vector& torque0,
|
||||
const scalarField& Y0,
|
||||
const ReactingParcel<basicReactingParcel>::constantProperties&
|
||||
constProps
|
||||
);
|
||||
|
||||
//- Construct from Istream
|
||||
basicReactingParcel
|
||||
(
|
||||
const Cloud<basicReactingParcel>& c,
|
||||
Istream& is,
|
||||
bool readFields = true
|
||||
);
|
||||
|
||||
//- Construct as a copy
|
||||
basicReactingParcel(const basicReactingParcel& p);
|
||||
|
||||
//- Construct as a copy
|
||||
basicReactingParcel
|
||||
(
|
||||
const basicReactingParcel& p,
|
||||
const ReactingCloud<basicReactingParcel>& c
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual autoPtr<Particle<basicReactingParcel> > clone() const
|
||||
{
|
||||
return autoPtr<Particle<basicReactingParcel> >
|
||||
(
|
||||
new basicReactingParcel(*this)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual autoPtr<Particle<basicReactingParcel> > clone
|
||||
(
|
||||
const Cloud<basicReactingParcel>& c
|
||||
) const
|
||||
{
|
||||
return autoPtr<Particle<basicReactingParcel> >
|
||||
(
|
||||
new basicReactingParcel
|
||||
(
|
||||
*this,
|
||||
static_cast<const ReactingCloud<basicReactingParcel>&>(c)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~basicReactingParcel();
|
||||
};
|
||||
|
||||
typedef ReactingParcel<ThermoParcel<KinematicParcel<particle> > >
|
||||
basicReactingParcel;
|
||||
|
||||
template<>
|
||||
inline bool contiguous<basicReactingParcel>()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -24,13 +24,14 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "basicReactingParcel.H"
|
||||
#include "createReactingParcelTypes.H"
|
||||
#include "Cloud.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
createReactingParcelTypes(basicReactingParcel);
|
||||
defineTemplateTypeNameAndDebug(basicReactingParcel, 0);
|
||||
defineTemplateTypeNameAndDebug(Cloud<basicReactingParcel>, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,117 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2011 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 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/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "basicThermoParcel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::basicThermoParcel::basicThermoParcel
|
||||
(
|
||||
ThermoCloud<basicThermoParcel>& owner,
|
||||
const vector position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI
|
||||
)
|
||||
:
|
||||
ThermoParcel<basicThermoParcel>(owner, position, cellI, tetFaceI, tetPtI)
|
||||
{}
|
||||
|
||||
|
||||
Foam::basicThermoParcel::basicThermoParcel
|
||||
(
|
||||
ThermoCloud<basicThermoParcel>& owner,
|
||||
const vector position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI,
|
||||
const label typeId,
|
||||
const scalar nParticle0,
|
||||
const scalar d0,
|
||||
const scalar dTarget0,
|
||||
const vector U0,
|
||||
const vector& f0,
|
||||
const vector& angularMomentum0,
|
||||
const vector& torque0,
|
||||
const constantProperties& constProps
|
||||
)
|
||||
:
|
||||
ThermoParcel<basicThermoParcel>
|
||||
(
|
||||
owner,
|
||||
position,
|
||||
cellI,
|
||||
tetFaceI,
|
||||
tetPtI,
|
||||
typeId,
|
||||
nParticle0,
|
||||
d0,
|
||||
dTarget0,
|
||||
U0,
|
||||
f0,
|
||||
angularMomentum0,
|
||||
torque0,
|
||||
constProps
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
Foam::basicThermoParcel::basicThermoParcel
|
||||
(
|
||||
const Cloud<basicThermoParcel>& cloud,
|
||||
Istream& is,
|
||||
bool readFields
|
||||
)
|
||||
:
|
||||
ThermoParcel<basicThermoParcel>(cloud, is, readFields)
|
||||
{}
|
||||
|
||||
|
||||
Foam::basicThermoParcel::basicThermoParcel
|
||||
(
|
||||
const basicThermoParcel& p
|
||||
)
|
||||
:
|
||||
ThermoParcel<basicThermoParcel>(p)
|
||||
{}
|
||||
|
||||
|
||||
Foam::basicThermoParcel::basicThermoParcel
|
||||
(
|
||||
const basicThermoParcel& p,
|
||||
const ThermoCloud<basicThermoParcel>& c
|
||||
)
|
||||
:
|
||||
ThermoParcel<basicThermoParcel>(p, c)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::basicThermoParcel::~basicThermoParcel()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -25,7 +25,7 @@ Class
|
||||
Foam::basicThermoParcel
|
||||
|
||||
Description
|
||||
|
||||
Definition of basic thermo parcel
|
||||
|
||||
SourceFiles
|
||||
basicThermoParcel.C
|
||||
@ -35,118 +35,23 @@ SourceFiles
|
||||
#ifndef basicThermoParcel_H
|
||||
#define basicThermoParcel_H
|
||||
|
||||
#include "contiguous.H"
|
||||
#include "particle.H"
|
||||
#include "KinematicParcel.H"
|
||||
#include "ThermoParcel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class basicThermoParcel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class basicThermoParcel
|
||||
:
|
||||
public ThermoParcel<basicThermoParcel>
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("basicThermoParcel");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from owner, position, and cloud owner
|
||||
// Other properties initialised as null
|
||||
basicThermoParcel
|
||||
(
|
||||
ThermoCloud<basicThermoParcel>& owner,
|
||||
const vector position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI
|
||||
);
|
||||
|
||||
//- Construct from components
|
||||
basicThermoParcel
|
||||
(
|
||||
ThermoCloud<basicThermoParcel>& owner,
|
||||
const vector position,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI,
|
||||
const label typeId,
|
||||
const scalar nParticle0,
|
||||
const scalar d0,
|
||||
const scalar dTarget0,
|
||||
const vector U0,
|
||||
const vector& f0,
|
||||
const vector& angularMomentum0,
|
||||
const vector& torque0,
|
||||
const constantProperties& constProps
|
||||
);
|
||||
|
||||
//- Construct from Istream
|
||||
basicThermoParcel
|
||||
(
|
||||
const Cloud<basicThermoParcel>& c,
|
||||
Istream& is,
|
||||
bool readFields = true
|
||||
);
|
||||
|
||||
//- Construct as a copy
|
||||
basicThermoParcel(const basicThermoParcel& p);
|
||||
|
||||
//- Construct as a copy
|
||||
basicThermoParcel
|
||||
(
|
||||
const basicThermoParcel& p,
|
||||
const ThermoCloud<basicThermoParcel>& c
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual autoPtr<Particle<basicThermoParcel> > clone() const
|
||||
{
|
||||
return autoPtr<Particle<basicThermoParcel> >
|
||||
(
|
||||
new basicThermoParcel(*this)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual autoPtr<Particle<basicThermoParcel> > clone
|
||||
(
|
||||
const Cloud<basicThermoParcel>& c
|
||||
) const
|
||||
{
|
||||
return autoPtr<Particle<basicThermoParcel> >
|
||||
(
|
||||
new basicThermoParcel
|
||||
(
|
||||
*this,
|
||||
static_cast<const ThermoCloud<basicThermoParcel>&>(c)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~basicThermoParcel();
|
||||
};
|
||||
|
||||
typedef ThermoParcel<KinematicParcel<particle> > basicThermoParcel;
|
||||
|
||||
template<>
|
||||
inline bool contiguous<basicThermoParcel>()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,14 +24,14 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "basicThermoParcel.H"
|
||||
#include "createThermoParcelTypes.H"
|
||||
#include "Cloud.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
createThermoParcelTypes(basicThermoParcel);
|
||||
defineTemplateTypeNameAndDebug(basicThermoParcel, 0);
|
||||
defineTemplateTypeNameAndDebug(Cloud<basicThermoParcel>, 0);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -26,11 +26,24 @@ License
|
||||
#ifndef createKinematicParcelTypes_H
|
||||
#define createKinematicParcelTypes_H
|
||||
|
||||
#include "KinematicParcel.H"
|
||||
#include "KinematicCloud.H"
|
||||
#include "Cloud.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#define createKinematicParcelTypes(ParcelType) \
|
||||
\
|
||||
defineTemplateTypeNameAndDebug(ParcelType, 0); \
|
||||
\
|
||||
defineTemplateTypeNameAndDebug(Cloud<ParcelType>, 0);
|
||||
|
||||
/*
|
||||
defineTemplateTypeNameAndDebug(KinematicParcel<particle>, 0); \
|
||||
\
|
||||
typedef KinematicParcel<particle> KinematicParcelType; \
|
||||
defineTemplateTypeNameAndDebug(Cloud<KinematicParcelType>, 0);
|
||||
*/
|
||||
|
||||
/*
|
||||
#define createKinematicParcelTypes(ParcelType) \
|
||||
\
|
||||
defineTypeNameAndDebug(ParcelType, 0); \
|
||||
@ -39,7 +52,10 @@ License
|
||||
\
|
||||
defineParcelTypeNameAndDebug(KinematicParcel<ParcelType>, 0); \
|
||||
defineTemplateTypeNameAndDebug(KinematicParcel<ParcelType>, 0); \
|
||||
defineParcelTypeNameAndDebug(KinematicCloud<ParcelType>, 0);
|
||||
typedef Cloud<ParcelType> cloudParcelType \
|
||||
defineParcelTypeNameAndDebug(KinematicCloud<cloudParcelType>, 0);
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -26,9 +26,6 @@ License
|
||||
#ifndef createThermoParcelTypes_H
|
||||
#define createThermoParcelTypes_H
|
||||
|
||||
#include "ThermoParcel.H"
|
||||
#include "ThermoCloud.H"
|
||||
|
||||
#include "createKinematicParcelTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -37,10 +34,20 @@ License
|
||||
\
|
||||
createKinematicParcelTypes(ParcelType); \
|
||||
\
|
||||
defineTemplateTypeNameAndDebug(Cloud<ParcelType>, 0); \
|
||||
|
||||
/*
|
||||
createKinematicParcelTypes(ParcelType); \
|
||||
\
|
||||
typedef ThermoParcel<KinematicParcel<particle> > ThermoParcelType; \
|
||||
defineTemplateTypeNameAndDebug(Cloud<ThermoParcelType>, 0);
|
||||
*/
|
||||
|
||||
/*
|
||||
defineParcelTypeNameAndDebug(ThermoParcel<ParcelType>, 0); \
|
||||
defineTemplateTypeNameAndDebug(ThermoParcel<ParcelType>, 0); \
|
||||
defineParcelTypeNameAndDebug(ThermoCloud<ParcelType>, 0);
|
||||
|
||||
*/
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -28,6 +28,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "Cloud.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "NoCollision.H"
|
||||
@ -42,46 +43,18 @@ License
|
||||
|
||||
#define makeParcelCollisionModels(ParcelType) \
|
||||
\
|
||||
makeCollisionModel(KinematicCloud<ParcelType>); \
|
||||
typedef KinematicCloud<Cloud<ParcelType> > KC##ParcelType; \
|
||||
\
|
||||
makeCollisionModelType \
|
||||
( \
|
||||
NoCollision, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeCollisionModel(KC##ParcelType); \
|
||||
makeCollisionModelType(NoCollision, KC##ParcelType); \
|
||||
makeCollisionModelType(PairCollision, KC##ParcelType); \
|
||||
\
|
||||
makeCollisionModelType \
|
||||
( \
|
||||
PairCollision, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makePairModel(KC##ParcelType); \
|
||||
makePairModelType(PairSpringSliderDashpot, KC##ParcelType); \
|
||||
\
|
||||
makePairModel(KinematicCloud<ParcelType>); \
|
||||
\
|
||||
makePairModelType \
|
||||
( \
|
||||
PairSpringSliderDashpot, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
\
|
||||
makeWallModel(KinematicCloud<ParcelType>); \
|
||||
\
|
||||
makeWallModelType \
|
||||
( \
|
||||
WallSpringSliderDashpot, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
\
|
||||
makeWallModelType \
|
||||
( \
|
||||
WallLocalSpringSliderDashpot, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
);
|
||||
makeWallModel(KC##ParcelType); \
|
||||
makeWallModelType(WallSpringSliderDashpot, KC##ParcelType); \
|
||||
makeWallModelType(WallLocalSpringSliderDashpot, KC##ParcelType);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -28,6 +28,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "Cloud.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "NoDispersion.H"
|
||||
@ -38,32 +39,19 @@ License
|
||||
|
||||
#define makeParcelDispersionModels(ParcelType) \
|
||||
\
|
||||
makeDispersionModel(KinematicCloud<ParcelType>); \
|
||||
typedef KinematicCloud<Cloud<ParcelType> > KC##ParcelType; \
|
||||
\
|
||||
makeDispersionModel(KC##ParcelType); \
|
||||
\
|
||||
defineNamedTemplateTypeNameAndDebug \
|
||||
( \
|
||||
DispersionRASModel<KinematicCloud<ParcelType> >, \
|
||||
DispersionRASModel<KC##ParcelType>, \
|
||||
0 \
|
||||
); \
|
||||
\
|
||||
makeDispersionModelType \
|
||||
( \
|
||||
NoDispersion, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeDispersionModelType \
|
||||
( \
|
||||
GradientDispersionRAS, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeDispersionModelType \
|
||||
( \
|
||||
StochasticDispersionRAS, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
);
|
||||
makeDispersionModelType(NoDispersion, KC##ParcelType); \
|
||||
makeDispersionModelType(GradientDispersionRAS, KC##ParcelType); \
|
||||
makeDispersionModelType(StochasticDispersionRAS, KC##ParcelType);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -28,6 +28,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "Cloud.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "SphereDragForce.H"
|
||||
@ -42,44 +43,15 @@ License
|
||||
|
||||
#define makeParcelForces(ParcelType) \
|
||||
\
|
||||
makeParticleForceModel(KinematicCloud<ParcelType>); \
|
||||
typedef KinematicCloud<Cloud<ParcelType> > KC##ParcelType; \
|
||||
\
|
||||
makeParticleForceModelType \
|
||||
( \
|
||||
SphereDragForce, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeParticleForceModelType \
|
||||
( \
|
||||
NonSphereDragForce, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeParticleForceModelType \
|
||||
( \
|
||||
GravityForce, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeParticleForceModelType \
|
||||
( \
|
||||
ParamagneticForce, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeParticleForceModelType \
|
||||
( \
|
||||
PressureGradientForce, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeParticleForceModelType \
|
||||
( \
|
||||
SRFForce, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
);
|
||||
makeParticleForceModel(KC##ParcelType); \
|
||||
makeParticleForceModelType(SphereDragForce, KC##ParcelType); \
|
||||
makeParticleForceModelType(NonSphereDragForce, KC##ParcelType); \
|
||||
makeParticleForceModelType(GravityForce, KC##ParcelType); \
|
||||
makeParticleForceModelType(ParamagneticForce, KC##ParcelType); \
|
||||
makeParticleForceModelType(PressureGradientForce, KC##ParcelType); \
|
||||
makeParticleForceModelType(SRFForce, KC##ParcelType);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -28,6 +28,8 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "Cloud.H"
|
||||
#include "KinematicCloud.H"
|
||||
#include "ThermoCloud.H"
|
||||
|
||||
#include "NoHeatTransfer.H"
|
||||
@ -37,20 +39,12 @@ License
|
||||
|
||||
#define makeParcelHeatTransferModels(ParcelType) \
|
||||
\
|
||||
makeHeatTransferModel(ThermoCloud<ParcelType>); \
|
||||
typedef ThermoCloud<KinematicCloud<Cloud<ParcelType> > > TKC##ParcelType; \
|
||||
\
|
||||
makeHeatTransferModelType \
|
||||
( \
|
||||
NoHeatTransfer, \
|
||||
ThermoCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeHeatTransferModelType \
|
||||
( \
|
||||
RanzMarshall, \
|
||||
ThermoCloud, \
|
||||
ParcelType \
|
||||
);
|
||||
makeHeatTransferModel(TKC##ParcelType); \
|
||||
\
|
||||
makeHeatTransferModelType(NoHeatTransfer, TKC##ParcelType); \
|
||||
makeHeatTransferModelType(RanzMarshall, TKC##ParcelType);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -28,6 +28,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "Cloud.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "ConeInjection.H"
|
||||
@ -43,50 +44,17 @@ License
|
||||
|
||||
#define makeParcelInjectionModels(ParcelType) \
|
||||
\
|
||||
makeInjectionModel(KinematicCloud<ParcelType>); \
|
||||
typedef KinematicCloud<Cloud<ParcelType> > KC##ParcelType; \
|
||||
\
|
||||
makeInjectionModelType \
|
||||
( \
|
||||
ConeInjection, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeInjectionModelType \
|
||||
( \
|
||||
FieldActivatedInjection, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeInjectionModelType \
|
||||
( \
|
||||
InflationInjection, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeInjectionModelType \
|
||||
( \
|
||||
KinematicLookupTableInjection, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeInjectionModelType \
|
||||
( \
|
||||
ManualInjection, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeInjectionModelType \
|
||||
( \
|
||||
NoInjection, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeInjectionModelType \
|
||||
( \
|
||||
PatchInjection, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
);
|
||||
makeInjectionModel(KC##ParcelType); \
|
||||
\
|
||||
makeInjectionModelType(ConeInjection, KC##ParcelType); \
|
||||
makeInjectionModelType(FieldActivatedInjection, KC##ParcelType); \
|
||||
makeInjectionModelType(InflationInjection, KC##ParcelType); \
|
||||
makeInjectionModelType(KinematicLookupTableInjection, KC##ParcelType); \
|
||||
makeInjectionModelType(ManualInjection, KC##ParcelType); \
|
||||
makeInjectionModelType(NoInjection, KC##ParcelType); \
|
||||
makeInjectionModelType(PatchInjection, KC##ParcelType);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -28,6 +28,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "Cloud.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "LocalInteraction.H"
|
||||
@ -39,32 +40,14 @@ License
|
||||
|
||||
#define makeParcelPatchInteractionModels(ParcelType) \
|
||||
\
|
||||
makePatchInteractionModel(KinematicCloud<ParcelType>); \
|
||||
typedef KinematicCloud<Cloud<ParcelType> > KC##ParcelType; \
|
||||
\
|
||||
makePatchInteractionModelType \
|
||||
( \
|
||||
LocalInteraction, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makePatchInteractionModelType \
|
||||
( \
|
||||
NoInteraction, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makePatchInteractionModelType \
|
||||
( \
|
||||
Rebound, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makePatchInteractionModelType \
|
||||
( \
|
||||
StandardWallInteraction, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
);
|
||||
makePatchInteractionModel(KC##ParcelType); \
|
||||
\
|
||||
makePatchInteractionModelType(LocalInteraction, KC##ParcelType); \
|
||||
makePatchInteractionModelType(NoInteraction, KC##ParcelType); \
|
||||
makePatchInteractionModelType(Rebound, KC##ParcelType); \
|
||||
makePatchInteractionModelType(StandardWallInteraction, KC##ParcelType);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -28,6 +28,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "Cloud.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "NoPostProcessing.H"
|
||||
@ -38,26 +39,13 @@ License
|
||||
|
||||
#define makeParcelPostProcessingModels(ParcelType) \
|
||||
\
|
||||
makePostProcessingModel(KinematicCloud<ParcelType>); \
|
||||
typedef KinematicCloud<Cloud<ParcelType> > KC##ParcelType; \
|
||||
\
|
||||
makePostProcessingModelType \
|
||||
( \
|
||||
NoPostProcessing, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makePostProcessingModelType \
|
||||
( \
|
||||
ParticleTracks, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makePostProcessingModelType \
|
||||
( \
|
||||
PatchPostProcessing, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
);
|
||||
makePostProcessingModel(KC##ParcelType); \
|
||||
\
|
||||
makePostProcessingModelType(NoPostProcessing, KC##ParcelType); \
|
||||
makePostProcessingModelType(ParticleTracks, KC##ParcelType); \
|
||||
makePostProcessingModelType(PatchPostProcessing, KC##ParcelType);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -28,6 +28,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "Cloud.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "NoSurfaceFilm.H"
|
||||
@ -36,14 +37,10 @@ License
|
||||
|
||||
#define makeParcelSurfaceFilmModels(ParcelType) \
|
||||
\
|
||||
makeSurfaceFilmModel(KinematicCloud<ParcelType>); \
|
||||
typedef KinematicCloud<Cloud<ParcelType> > KC##ParcelType; \
|
||||
\
|
||||
makeSurfaceFilmModelType \
|
||||
( \
|
||||
NoSurfaceFilm, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
);
|
||||
makeSurfaceFilmModel(KC##ParcelType); \
|
||||
makeSurfaceFilmModelType(NoSurfaceFilm, KC##ParcelType);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -28,7 +28,11 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "ReactingMultiphaseCloud.H"
|
||||
#include "Cloud.H"
|
||||
#include "KinematicCloud.H"
|
||||
#include "ThermoCloud.H"
|
||||
#include "ReactingCloud.H"
|
||||
|
||||
#include "NoComposition.H"
|
||||
#include "SingleMixtureFraction.H"
|
||||
|
||||
@ -36,21 +40,12 @@ License
|
||||
|
||||
#define makeReactingMultiphaseParcelCompositionModels(ParcelType) \
|
||||
\
|
||||
makeCompositionModel(ReactingCloud<ParcelType>); \
|
||||
typedef ReactingCloud<ThermoCloud<KinematicCloud<Cloud<ParcelType> > > > \
|
||||
RTKC##ParcelType; \
|
||||
\
|
||||
makeCompositionModelType \
|
||||
( \
|
||||
NoComposition, \
|
||||
ReactingCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
\
|
||||
makeCompositionModelType \
|
||||
( \
|
||||
SingleMixtureFraction, \
|
||||
ReactingCloud, \
|
||||
ParcelType \
|
||||
);
|
||||
makeCompositionModel(RTKC##ParcelType); \
|
||||
makeCompositionModelType(NoComposition, RTKC##ParcelType); \
|
||||
makeCompositionModelType(SingleMixtureFraction, RTKC##ParcelType);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -28,6 +28,10 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "Cloud.H"
|
||||
#include "KinematicCloud.H"
|
||||
#include "ThermoCloud.H"
|
||||
#include "ReactingCloud.H"
|
||||
#include "ReactingMultiphaseCloud.H"
|
||||
|
||||
#include "ConstantRateDevolatilisation.H"
|
||||
@ -38,25 +42,38 @@ License
|
||||
|
||||
#define makeReactingMultiphaseParcelDevolatilisationModels(ParcelType) \
|
||||
\
|
||||
makeDevolatilisationModel(ReactingMultiphaseCloud<ParcelType>); \
|
||||
typedef ReactingMultiphaseCloud \
|
||||
< \
|
||||
ReactingCloud \
|
||||
< \
|
||||
ThermoCloud \
|
||||
< \
|
||||
KinematicCloud \
|
||||
< \
|
||||
Cloud \
|
||||
< \
|
||||
ParcelType \
|
||||
> \
|
||||
> \
|
||||
> \
|
||||
> \
|
||||
> RMPRTKC##ParcelType; \
|
||||
\
|
||||
makeDevolatilisationModel(RMPRTKC##ParcelType); \
|
||||
makeDevolatilisationModelType \
|
||||
( \
|
||||
ConstantRateDevolatilisation, \
|
||||
ReactingMultiphaseCloud, \
|
||||
ParcelType \
|
||||
RMPRTKC##ParcelType \
|
||||
); \
|
||||
makeDevolatilisationModelType \
|
||||
( \
|
||||
NoDevolatilisation, \
|
||||
ReactingMultiphaseCloud, \
|
||||
ParcelType \
|
||||
RMPRTKC##ParcelType \
|
||||
); \
|
||||
makeDevolatilisationModelType \
|
||||
( \
|
||||
SingleKineticRateDevolatilisation, \
|
||||
ReactingMultiphaseCloud, \
|
||||
ParcelType \
|
||||
RMPRTKC##ParcelType \
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "thermoPhysicsTypes.H"
|
||||
#include "Cloud.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "ConeInjection.H"
|
||||
@ -42,43 +42,18 @@ License
|
||||
|
||||
#define makeReactingMultiphaseParcelInjectionModels(ParcelType) \
|
||||
\
|
||||
makeInjectionModel(KinematicCloud<ParcelType>); \
|
||||
typedef KinematicCloud<Cloud<ParcelType> > KC##ParcelType; \
|
||||
\
|
||||
makeInjectionModelType \
|
||||
( \
|
||||
ConeInjection, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeInjectionModelType \
|
||||
( \
|
||||
FieldActivatedInjection, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeInjectionModelType \
|
||||
( \
|
||||
ManualInjection, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeInjectionModelType \
|
||||
( \
|
||||
NoInjection, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeInjectionModelType \
|
||||
( \
|
||||
PatchInjection, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeInjectionModel(KC##ParcelType); \
|
||||
makeInjectionModelType(ConeInjection, KC##ParcelType); \
|
||||
makeInjectionModelType(FieldActivatedInjection, KC##ParcelType); \
|
||||
makeInjectionModelType(ManualInjection, KC##ParcelType); \
|
||||
makeInjectionModelType(NoInjection, KC##ParcelType); \
|
||||
makeInjectionModelType(PatchInjection, KC##ParcelType); \
|
||||
makeInjectionModelType \
|
||||
( \
|
||||
ReactingMultiphaseLookupTableInjection, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
KC##ParcelType \
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -28,21 +28,37 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "Cloud.H"
|
||||
#include "KinematicCloud.H"
|
||||
#include "ThermoCloud.H"
|
||||
#include "ReactingCloud.H"
|
||||
#include "ReactingMultiphaseCloud.H"
|
||||
|
||||
#include "NoSurfaceReaction.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#define makeReactingMultiphaseParcelSurfaceReactionModels(ParcelType) \
|
||||
\
|
||||
makeSurfaceReactionModel(ReactingMultiphaseCloud<ParcelType>); \
|
||||
\
|
||||
makeSurfaceReactionModelType \
|
||||
( \
|
||||
NoSurfaceReaction, \
|
||||
ReactingMultiphaseCloud, \
|
||||
typedef ReactingMultiphaseCloud \
|
||||
< \
|
||||
ReactingCloud \
|
||||
< \
|
||||
ThermoCloud \
|
||||
< \
|
||||
KinematicCloud \
|
||||
< \
|
||||
Cloud \
|
||||
< \
|
||||
ParcelType \
|
||||
);
|
||||
> \
|
||||
> \
|
||||
> \
|
||||
> \
|
||||
> RMPRTKC##ParcelType; \
|
||||
\
|
||||
makeSurfaceReactionModel(RMPRTKC##ParcelType); \
|
||||
makeSurfaceReactionModelType(NoSurfaceReaction, RMPRTKC##ParcelType);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -28,7 +28,11 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "Cloud.H"
|
||||
#include "KinematicCloud.H"
|
||||
#include "ThermoCloud.H"
|
||||
#include "ReactingCloud.H"
|
||||
|
||||
#include "NoComposition.H"
|
||||
#include "SinglePhaseMixture.H"
|
||||
|
||||
@ -36,21 +40,12 @@ License
|
||||
|
||||
#define makeReactingParcelCompositionModels(ParcelType) \
|
||||
\
|
||||
makeCompositionModel(ReactingCloud<ParcelType>); \
|
||||
typedef ReactingCloud<ThermoCloud<KinematicCloud<Cloud<ParcelType> > > > \
|
||||
RTKC##ParcelType; \
|
||||
\
|
||||
makeCompositionModelType \
|
||||
( \
|
||||
NoComposition, \
|
||||
ReactingCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
\
|
||||
makeCompositionModelType \
|
||||
( \
|
||||
SinglePhaseMixture, \
|
||||
ReactingCloud, \
|
||||
ParcelType \
|
||||
);
|
||||
makeCompositionModel(RTKC##ParcelType); \
|
||||
makeCompositionModelType(NoComposition, RTKC##ParcelType); \
|
||||
makeCompositionModelType(SinglePhaseMixture, RTKC##ParcelType);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -28,6 +28,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "Cloud.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "ConeInjection.H"
|
||||
@ -41,44 +42,15 @@ License
|
||||
|
||||
#define makeReactingParcelInjectionModels(ParcelType) \
|
||||
\
|
||||
makeInjectionModel(KinematicCloud<ParcelType>); \
|
||||
typedef KinematicCloud<Cloud<ParcelType> > KC##ParcelType; \
|
||||
\
|
||||
makeInjectionModelType \
|
||||
( \
|
||||
ConeInjection, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeInjectionModelType \
|
||||
( \
|
||||
FieldActivatedInjection, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeInjectionModelType \
|
||||
( \
|
||||
ManualInjection, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeInjectionModelType \
|
||||
( \
|
||||
NoInjection, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeInjectionModelType \
|
||||
( \
|
||||
PatchInjection, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeInjectionModelType \
|
||||
( \
|
||||
ReactingLookupTableInjection, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
);
|
||||
makeInjectionModel(KC##ParcelType); \
|
||||
makeInjectionModelType(ConeInjection, KC##ParcelType); \
|
||||
makeInjectionModelType(FieldActivatedInjection, KC##ParcelType); \
|
||||
makeInjectionModelType(ManualInjection, KC##ParcelType); \
|
||||
makeInjectionModelType(NoInjection, KC##ParcelType); \
|
||||
makeInjectionModelType(PatchInjection, KC##ParcelType); \
|
||||
makeInjectionModelType(ReactingLookupTableInjection, KC##ParcelType);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -28,6 +28,9 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "Cloud.H"
|
||||
#include "KinematicCloud.H"
|
||||
#include "ThermoCloud.H"
|
||||
#include "ReactingCloud.H"
|
||||
|
||||
#include "NoPhaseChange.H"
|
||||
@ -37,20 +40,12 @@ License
|
||||
|
||||
#define makeReactingParcelPhaseChangeModels(ParcelType) \
|
||||
\
|
||||
makePhaseChangeModel(ReactingCloud<ParcelType>); \
|
||||
typedef ReactingCloud<ThermoCloud<KinematicCloud<Cloud<ParcelType> > > > \
|
||||
RTKC##ParcelType; \
|
||||
\
|
||||
makePhaseChangeModelType \
|
||||
( \
|
||||
NoPhaseChange, \
|
||||
ReactingCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makePhaseChangeModelType \
|
||||
( \
|
||||
LiquidEvaporation, \
|
||||
ReactingCloud, \
|
||||
ParcelType \
|
||||
);
|
||||
makePhaseChangeModel(RTKC##ParcelType); \
|
||||
makePhaseChangeModelType(NoPhaseChange, RTKC##ParcelType); \
|
||||
makePhaseChangeModelType(LiquidEvaporation, RTKC##ParcelType);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -28,6 +28,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "Cloud.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "NoSurfaceFilm.H"
|
||||
@ -37,20 +38,11 @@ License
|
||||
|
||||
#define makeReactingParcelSurfaceFilmModels(ParcelType) \
|
||||
\
|
||||
makeSurfaceFilmModel(KinematicCloud<ParcelType>); \
|
||||
typedef KinematicCloud<Cloud<ParcelType> > KC##ParcelType; \
|
||||
\
|
||||
makeSurfaceFilmModelType \
|
||||
( \
|
||||
NoSurfaceFilm, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeSurfaceFilmModelType \
|
||||
( \
|
||||
ThermoSurfaceFilm, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
);
|
||||
makeSurfaceFilmModel(KC##ParcelType); \
|
||||
makeSurfaceFilmModelType(NoSurfaceFilm, KC##ParcelType); \
|
||||
makeSurfaceFilmModelType(ThermoSurfaceFilm, KC##ParcelType);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -28,6 +28,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "Cloud.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "SphereDragForce.H"
|
||||
@ -43,50 +44,16 @@ License
|
||||
|
||||
#define makeThermoParcelForces(ParcelType) \
|
||||
\
|
||||
makeParticleForceModel(KinematicCloud<ParcelType>); \
|
||||
typedef KinematicCloud<Cloud<ParcelType> > KC##ParcelType; \
|
||||
\
|
||||
makeParticleForceModelType \
|
||||
( \
|
||||
SphereDragForce, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeParticleForceModelType \
|
||||
( \
|
||||
NonSphereDragForce, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeParticleForceModelType \
|
||||
( \
|
||||
BrownianMotionForce, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeParticleForceModelType \
|
||||
( \
|
||||
GravityForce, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeParticleForceModelType \
|
||||
( \
|
||||
ParamagneticForce, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeParticleForceModelType \
|
||||
( \
|
||||
PressureGradientForce, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeParticleForceModelType \
|
||||
( \
|
||||
SRFForce, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
);
|
||||
makeParticleForceModel(KC##ParcelType); \
|
||||
makeParticleForceModelType(SphereDragForce, KC##ParcelType); \
|
||||
makeParticleForceModelType(NonSphereDragForce, KC##ParcelType); \
|
||||
makeParticleForceModelType(BrownianMotionForce, KC##ParcelType); \
|
||||
makeParticleForceModelType(GravityForce, KC##ParcelType); \
|
||||
makeParticleForceModelType(ParamagneticForce, KC##ParcelType); \
|
||||
makeParticleForceModelType(PressureGradientForce, KC##ParcelType); \
|
||||
makeParticleForceModelType(SRFForce, KC##ParcelType);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -28,7 +28,9 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "Cloud.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "NoSurfaceFilm.H"
|
||||
#include "ThermoSurfaceFilm.H"
|
||||
|
||||
@ -36,21 +38,12 @@ License
|
||||
|
||||
#define makeParcelSurfaceFilmModels(ParcelType) \
|
||||
\
|
||||
makeSurfaceFilmModel(KinematicCloud<ParcelType>); \
|
||||
typedef KinematicCloud<Cloud<ParcelType> > KC##ParcelType; \
|
||||
\
|
||||
makeSurfaceFilmModelType \
|
||||
( \
|
||||
NoSurfaceFilm, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeSurfaceFilmModel(KC##ParcelType); \
|
||||
\
|
||||
makeSurfaceFilmModelType \
|
||||
( \
|
||||
ThermoSurfaceFilm, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
);
|
||||
makeSurfaceFilmModelType(NoSurfaceFilm, KC##ParcelType); \
|
||||
makeSurfaceFilmModelType(ThermoSurfaceFilm, KC##ParcelType);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -146,13 +146,13 @@ public:
|
||||
defineTemplateRunTimeSelectionTable(CollisionModel<CloudType>, dictionary);
|
||||
|
||||
|
||||
#define makeCollisionModelType(SS, CloudType, ParcelType) \
|
||||
#define makeCollisionModelType(SS, CloudType) \
|
||||
\
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType>, 0); \
|
||||
\
|
||||
CollisionModel<CloudType<ParcelType> >:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
||||
CollisionModel<CloudType>:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType> > \
|
||||
add##SS##CloudType##ConstructorToTable_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -155,27 +155,12 @@ public:
|
||||
);
|
||||
|
||||
|
||||
#define makePairModelType(SS, CloudType, ParcelType) \
|
||||
#define makePairModelType(SS, CloudType) \
|
||||
\
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType>, 0); \
|
||||
\
|
||||
PairModel<CloudType<ParcelType> >:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
||||
|
||||
|
||||
#define makePairModelThermoType(SS, CloudType, ParcelType, ThermoType) \
|
||||
\
|
||||
defineNamedTemplateTypeNameAndDebug \
|
||||
( \
|
||||
SS<CloudType<ParcelType<ThermoType> > >, \
|
||||
0 \
|
||||
); \
|
||||
\
|
||||
PairModel<CloudType<ParcelType<ThermoType> > >:: \
|
||||
adddictionaryConstructorToTable \
|
||||
<SS<CloudType<ParcelType<ThermoType> > > > \
|
||||
add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_;
|
||||
PairModel<CloudType>::adddictionaryConstructorToTable<SS<CloudType> > \
|
||||
add##SS##CloudType##ConstructorToTable_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -165,27 +165,12 @@ public:
|
||||
);
|
||||
|
||||
|
||||
#define makeWallModelType(SS, CloudType, ParcelType) \
|
||||
#define makeWallModelType(SS, CloudType) \
|
||||
\
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType>, 0); \
|
||||
\
|
||||
WallModel<CloudType<ParcelType> >:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
||||
|
||||
|
||||
#define makeWallModelThermoType(SS, CloudType, ParcelType, ThermoType) \
|
||||
\
|
||||
defineNamedTemplateTypeNameAndDebug \
|
||||
( \
|
||||
SS<CloudType<ParcelType<ThermoType> > >, \
|
||||
0 \
|
||||
); \
|
||||
\
|
||||
WallModel<CloudType<ParcelType<ThermoType> > >:: \
|
||||
adddictionaryConstructorToTable \
|
||||
<SS<CloudType<ParcelType<ThermoType> > > > \
|
||||
add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_;
|
||||
WallModel<CloudType>::adddictionaryConstructorToTable<SS<CloudType> > \
|
||||
add##SS##CloudType##ConstructorToTable_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -141,13 +141,13 @@ public:
|
||||
);
|
||||
|
||||
|
||||
#define makeDispersionModelType(SS, CloudType, ParcelType) \
|
||||
#define makeDispersionModelType(SS, CloudType) \
|
||||
\
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType>, 0); \
|
||||
\
|
||||
DispersionModel<CloudType<ParcelType> >:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
||||
DispersionModel<CloudType>:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType> > \
|
||||
add##SS##CloudType##ConstructorToTable_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -204,7 +204,7 @@ bool Foam::InjectionModel<CloudType>::findCellAtPosition
|
||||
|
||||
const vector p0 = position;
|
||||
|
||||
this->owner().findCellFacePt
|
||||
this->owner().mesh().findCellFacePt
|
||||
(
|
||||
position,
|
||||
cellI,
|
||||
@ -571,7 +571,7 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td)
|
||||
// Create a new parcel
|
||||
parcelType* pPtr = new parcelType
|
||||
(
|
||||
td.cloud(),
|
||||
td.cloud().pMesh(),
|
||||
pos,
|
||||
cellI,
|
||||
tetFaceI,
|
||||
@ -671,7 +671,7 @@ void Foam::InjectionModel<CloudType>::injectSteadyState
|
||||
// Create a new parcel
|
||||
parcelType* pPtr = new parcelType
|
||||
(
|
||||
td.cloud(),
|
||||
td.cloud().pMesh(),
|
||||
pos,
|
||||
cellI,
|
||||
tetFaceI,
|
||||
|
||||
@ -69,6 +69,10 @@ class InjectionModel
|
||||
{
|
||||
public:
|
||||
|
||||
//- Convenience typedef for parcelType
|
||||
typedef typename CloudType::parcelType parcelType;
|
||||
|
||||
|
||||
// Enumerations
|
||||
|
||||
//- Parcel basis representation options
|
||||
@ -96,9 +100,6 @@ protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Convenience typedef for parcel type
|
||||
typedef typename CloudType::parcelType parcelType;
|
||||
|
||||
// Global injection properties
|
||||
|
||||
//- Start of injection [s]
|
||||
@ -305,7 +306,7 @@ public:
|
||||
const label parcelI,
|
||||
const label nParcels,
|
||||
const scalar time,
|
||||
typename CloudType::parcelType& parcel
|
||||
parcelType& parcel
|
||||
);
|
||||
|
||||
//- Flag to identify whether model fully describes the parcel
|
||||
@ -332,13 +333,12 @@ public:
|
||||
defineTemplateRunTimeSelectionTable(InjectionModel<CloudType>, dictionary);
|
||||
|
||||
|
||||
#define makeInjectionModelType(SS, CloudType, ParcelType) \
|
||||
#define makeInjectionModelType(SS, CloudType) \
|
||||
\
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType>, 0); \
|
||||
\
|
||||
InjectionModel<CloudType<ParcelType> >:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
||||
InjectionModel<CloudType>::adddictionaryConstructorToTable<SS<CloudType> >\
|
||||
add##SS##CloudType##ConstructorToTable_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -206,13 +206,12 @@ public:
|
||||
defineTemplateRunTimeSelectionTable(ParticleForce<CloudType>, dictionary);
|
||||
|
||||
|
||||
#define makeParticleForceModelType(SS, CloudType, ParcelType) \
|
||||
#define makeParticleForceModelType(SS, CloudType) \
|
||||
\
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType>, 0); \
|
||||
\
|
||||
ParticleForce<CloudType<ParcelType> >:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
||||
ParticleForce<CloudType>::adddictionaryConstructorToTable<SS<CloudType> > \
|
||||
add##SS##CloudType##ConstructorToTable_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -47,32 +47,31 @@ Foam::word Foam::PatchInteractionModel<CloudType>::interactionTypeToWord
|
||||
const interactionType& itEnum
|
||||
)
|
||||
{
|
||||
word it = "other";
|
||||
|
||||
switch (itEnum)
|
||||
{
|
||||
case itRebound:
|
||||
{
|
||||
return "rebound";
|
||||
it = "rebound";
|
||||
break;
|
||||
}
|
||||
case itStick:
|
||||
{
|
||||
return "stick";
|
||||
it = "stick";
|
||||
break;
|
||||
}
|
||||
case itEscape:
|
||||
{
|
||||
return "escape";
|
||||
it = "escape";
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
return "other";
|
||||
}
|
||||
}
|
||||
#ifdef __ICC
|
||||
// Prevent Icc complaining about missing return statement.
|
||||
return word::null;
|
||||
#endif
|
||||
|
||||
return it;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -201,13 +201,13 @@ public:
|
||||
);
|
||||
|
||||
|
||||
#define makePatchInteractionModelType(SS, CloudType, ParcelType) \
|
||||
#define makePatchInteractionModelType(SS, CloudType) \
|
||||
\
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType>, 0); \
|
||||
\
|
||||
PatchInteractionModel<CloudType<ParcelType> >:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
||||
PatchInteractionModel<CloudType>:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType> > \
|
||||
add##SS##CloudType##ConstructorToTable_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -137,7 +137,7 @@ void Foam::ParticleTracks<CloudType>::postFace(const parcelType& p)
|
||||
{
|
||||
cloudPtr_->append
|
||||
(
|
||||
static_cast<parcelType*>(p.clone(cloudPtr_()).ptr())
|
||||
static_cast<parcelType*>(p.clone(this->owner().mesh()).ptr())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -53,7 +53,7 @@ class PatchPostProcessing
|
||||
{
|
||||
// Private data
|
||||
|
||||
typedef typename CloudType::parcelType parcelType;
|
||||
typedef typename CloudType::particleType parcelType;
|
||||
|
||||
//- Maximum number of parcels to store
|
||||
label maxStoredParcels_;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -154,13 +154,13 @@ public:
|
||||
);
|
||||
|
||||
|
||||
#define makePostProcessingModelType(SS, CloudType, ParcelType) \
|
||||
#define makePostProcessingModelType(SS, CloudType) \
|
||||
\
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType>, 0); \
|
||||
\
|
||||
PostProcessingModel<CloudType<ParcelType> >:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
||||
PostProcessingModel<CloudType>:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType> > \
|
||||
add##SS##CloudType##ConstructorToTable_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -177,10 +177,10 @@ void Foam::SurfaceFilmModel<CloudType>::inject(TrackData& td)
|
||||
const point& pos = this->owner().mesh().C()[cellI];
|
||||
|
||||
// Create a new parcel
|
||||
typename CloudType::parcelType* pPtr =
|
||||
new typename CloudType::parcelType
|
||||
parcelType* pPtr =
|
||||
new parcelType
|
||||
(
|
||||
td.cloud(),
|
||||
this->owner().pMesh(),
|
||||
pos,
|
||||
cellI,
|
||||
tetFaceI,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -249,13 +249,13 @@ public:
|
||||
);
|
||||
|
||||
|
||||
#define makeSurfaceFilmModelType(SS, CloudType, ParcelType) \
|
||||
#define makeSurfaceFilmModelType(SS, CloudType) \
|
||||
\
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType>, 0); \
|
||||
\
|
||||
SurfaceFilmModel<CloudType<ParcelType> >:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
||||
SurfaceFilmModel<CloudType>:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType> > \
|
||||
add##SS##CloudType##ConstructorToTable_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -280,13 +280,13 @@ public:
|
||||
);
|
||||
|
||||
|
||||
#define makeCompositionModelType(SS, CloudType, ParcelType) \
|
||||
#define makeCompositionModelType(SS, CloudType) \
|
||||
\
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType>, 0); \
|
||||
\
|
||||
CompositionModel<CloudType<ParcelType> >:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
||||
CompositionModel<CloudType>:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType> > \
|
||||
add##SS##CloudType##ConstructorToTable_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -194,5 +194,50 @@ void Foam::LiquidEvaporation<CloudType>::calculate
|
||||
}
|
||||
}
|
||||
|
||||
template<class CloudType>
|
||||
Foam::scalar Foam::LiquidEvaporation<CloudType>::dh
|
||||
(
|
||||
const label idc,
|
||||
const label idl,
|
||||
const label p,
|
||||
const label T
|
||||
) const
|
||||
{
|
||||
scalar dh = 0;
|
||||
|
||||
typedef PhaseChangeModel<CloudType> parent;
|
||||
switch (parent::enthalpyTransfer_)
|
||||
{
|
||||
case (parent::etLatentHeat):
|
||||
{
|
||||
dh = liquids_.properties()[idl].hl(p, T);
|
||||
break;
|
||||
}
|
||||
case (parent::etEnthalpyDifference):
|
||||
{
|
||||
scalar hc = this->owner().composition().carrier().H(idc, T);
|
||||
scalar hp = liquids_.properties()[idl].h(p, T);
|
||||
|
||||
dh = hc - hp;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::scalar Foam::LiquidEvaporation<CloudType>::dh"
|
||||
"("
|
||||
"const label, "
|
||||
"const label, "
|
||||
"const label, "
|
||||
"const label"
|
||||
")"
|
||||
) << "Unknown enthalpyTransfer type" << abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
return dh;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -118,6 +118,15 @@ public:
|
||||
const scalar pc,
|
||||
scalarField& dMassPC
|
||||
) const;
|
||||
|
||||
//- Return the enthalpy per unit mass
|
||||
virtual scalar dh
|
||||
(
|
||||
const label idc,
|
||||
const label idl,
|
||||
const label p,
|
||||
const label T
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -156,6 +156,19 @@ void Foam::PhaseChangeModel<CloudType>::calculate
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
Foam::scalar Foam::PhaseChangeModel<CloudType>::dh
|
||||
(
|
||||
const label idc,
|
||||
const label idl,
|
||||
const label p,
|
||||
const label T
|
||||
) const
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "PhaseChangeModelNew.C"
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -165,6 +165,15 @@ public:
|
||||
const scalar pc,
|
||||
scalarField& dMassPC
|
||||
) const;
|
||||
|
||||
//- Return the enthalpy per unit mass
|
||||
virtual scalar dh
|
||||
(
|
||||
const label idc,
|
||||
const label idl,
|
||||
const label p,
|
||||
const label T
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
@ -185,13 +194,13 @@ public:
|
||||
);
|
||||
|
||||
|
||||
#define makePhaseChangeModelType(SS, CloudType, ParcelType) \
|
||||
#define makePhaseChangeModelType(SS, CloudType) \
|
||||
\
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType>, 0); \
|
||||
\
|
||||
PhaseChangeModel<CloudType<ParcelType> >:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
||||
PhaseChangeModel<CloudType>:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType> > \
|
||||
add##SS##CloudType##ConstructorToTable_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -145,13 +145,13 @@ public:
|
||||
);
|
||||
|
||||
|
||||
#define makeDevolatilisationModelType(SS, CloudType, ParcelType) \
|
||||
#define makeDevolatilisationModelType(SS, CloudType) \
|
||||
\
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType>, 0); \
|
||||
\
|
||||
DevolatilisationModel<CloudType<ParcelType> >:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
||||
DevolatilisationModel<CloudType>:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType> > \
|
||||
add##SS##CloudType##ConstructorToTable_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -158,13 +158,13 @@ public:
|
||||
);
|
||||
|
||||
|
||||
#define makeSurfaceReactionModelType(SS, CloudType, ParcelType) \
|
||||
#define makeSurfaceReactionModelType(SS, CloudType) \
|
||||
\
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType>, 0); \
|
||||
\
|
||||
SurfaceReactionModel<CloudType<ParcelType> >:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
||||
SurfaceReactionModel<CloudType>:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType> > \
|
||||
add##SS##CloudType##ConstructorToTable_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -164,13 +164,13 @@ public:
|
||||
);
|
||||
|
||||
|
||||
#define makeHeatTransferModelType(SS, CloudType, ParcelType) \
|
||||
#define makeHeatTransferModelType(SS, CloudType) \
|
||||
\
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType>, 0); \
|
||||
\
|
||||
HeatTransferModel<CloudType<ParcelType> >:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
||||
HeatTransferModel<CloudType>:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType> > \
|
||||
add##SS##CloudType##ConstructorToTable_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -446,7 +446,7 @@ void Foam::ThermoSurfaceFilm<CloudType>::splashInteraction
|
||||
// Create a new parcel by copying source parcel
|
||||
parcelType* pPtr = new parcelType(p);
|
||||
|
||||
pPtr->origId() = this->owner().getNewParticleID();
|
||||
pPtr->origId() = pPtr->getNewParticleID();
|
||||
|
||||
pPtr->origProc() = Pstream::myProcNo();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user