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
|
DERIVEDCLOUDS=$(CLOUDS)/derived
|
||||||
|
|
||||||
|
|
||||||
/* Parcels */
|
|
||||||
$(BASEPARCELS)/reactingParcel/reactingParcel.C
|
|
||||||
|
|
||||||
|
|
||||||
/* Cloud base classes */
|
/* Cloud base classes */
|
||||||
$(BASECLOUDS)/kinematicCloud/kinematicCloud.C
|
$(BASECLOUDS)/kinematicCloud/kinematicCloud.C
|
||||||
$(BASECLOUDS)/thermoCloud/thermoCloud.C
|
$(BASECLOUDS)/thermoCloud/thermoCloud.C
|
||||||
@ -20,28 +16,24 @@ $(BASECLOUDS)/reactingMultiphaseCloud/reactingMultiphaseCloud.C
|
|||||||
|
|
||||||
/* kinematic parcel sub-models */
|
/* kinematic parcel sub-models */
|
||||||
KINEMATICPARCEL=$(DERIVEDPARCELS)/basicKinematicParcel
|
KINEMATICPARCEL=$(DERIVEDPARCELS)/basicKinematicParcel
|
||||||
$(KINEMATICPARCEL)/basicKinematicParcel.C
|
|
||||||
$(KINEMATICPARCEL)/defineBasicKinematicParcel.C
|
$(KINEMATICPARCEL)/defineBasicKinematicParcel.C
|
||||||
$(KINEMATICPARCEL)/makeBasicKinematicParcelSubmodels.C
|
$(KINEMATICPARCEL)/makeBasicKinematicParcelSubmodels.C
|
||||||
|
|
||||||
|
|
||||||
/* thermo parcel sub-models */
|
/* thermo parcel sub-models */
|
||||||
THERMOPARCEL=$(DERIVEDPARCELS)/basicThermoParcel
|
THERMOPARCEL=$(DERIVEDPARCELS)/basicThermoParcel
|
||||||
$(THERMOPARCEL)/basicThermoParcel.C
|
|
||||||
$(THERMOPARCEL)/defineBasicThermoParcel.C
|
$(THERMOPARCEL)/defineBasicThermoParcel.C
|
||||||
$(THERMOPARCEL)/makeBasicThermoParcelSubmodels.C
|
$(THERMOPARCEL)/makeBasicThermoParcelSubmodels.C
|
||||||
|
|
||||||
|
|
||||||
/* reacting parcel sub-models */
|
/* reacting parcel sub-models */
|
||||||
REACTINGPARCEL=$(DERIVEDPARCELS)/basicReactingParcel
|
REACTINGPARCEL=$(DERIVEDPARCELS)/basicReactingParcel
|
||||||
$(REACTINGPARCEL)/basicReactingParcel.C
|
|
||||||
$(REACTINGPARCEL)/defineBasicReactingParcel.C
|
$(REACTINGPARCEL)/defineBasicReactingParcel.C
|
||||||
$(REACTINGPARCEL)/makeBasicReactingParcelSubmodels.C
|
$(REACTINGPARCEL)/makeBasicReactingParcelSubmodels.C
|
||||||
|
|
||||||
|
|
||||||
/* reacting multiphase parcel sub-models */
|
/* reacting multiphase parcel sub-models */
|
||||||
REACTINGMPPARCEL=$(DERIVEDPARCELS)/basicReactingMultiphaseParcel
|
REACTINGMPPARCEL=$(DERIVEDPARCELS)/basicReactingMultiphaseParcel
|
||||||
$(REACTINGMPPARCEL)/basicReactingMultiphaseParcel.C
|
|
||||||
$(REACTINGMPPARCEL)/defineBasicReactingMultiphaseParcel.C
|
$(REACTINGMPPARCEL)/defineBasicReactingMultiphaseParcel.C
|
||||||
$(REACTINGMPPARCEL)/makeBasicReactingMultiphaseParcelSubmodels.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 * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * cloudSolution * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::KinematicCloud<ParcelType>::cloudSolution::read()
|
void Foam::KinematicCloud<CloudType>::cloudSolution::read()
|
||||||
{
|
{
|
||||||
dict_.lookup("transient") >> transient_;
|
dict_.lookup("transient") >> transient_;
|
||||||
dict_.lookup("coupled") >> coupled_;
|
dict_.lookup("coupled") >> coupled_;
|
||||||
@ -55,8 +55,8 @@ void Foam::KinematicCloud<ParcelType>::cloudSolution::read()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
Foam::KinematicCloud<ParcelType>::cloudSolution::cloudSolution
|
Foam::KinematicCloud<CloudType>::cloudSolution::cloudSolution
|
||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
@ -82,8 +82,8 @@ Foam::KinematicCloud<ParcelType>::cloudSolution::cloudSolution
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
Foam::KinematicCloud<ParcelType>::cloudSolution::cloudSolution
|
Foam::KinematicCloud<CloudType>::cloudSolution::cloudSolution
|
||||||
(
|
(
|
||||||
const cloudSolution& cs
|
const cloudSolution& cs
|
||||||
)
|
)
|
||||||
@ -103,8 +103,8 @@ Foam::KinematicCloud<ParcelType>::cloudSolution::cloudSolution
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
Foam::KinematicCloud<ParcelType>::cloudSolution::cloudSolution
|
Foam::KinematicCloud<CloudType>::cloudSolution::cloudSolution
|
||||||
(
|
(
|
||||||
const fvMesh& mesh
|
const fvMesh& mesh
|
||||||
)
|
)
|
||||||
@ -124,13 +124,13 @@ Foam::KinematicCloud<ParcelType>::cloudSolution::cloudSolution
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
Foam::KinematicCloud<ParcelType>::cloudSolution::~cloudSolution()
|
Foam::KinematicCloud<CloudType>::cloudSolution::~cloudSolution()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
Foam::scalar Foam::KinematicCloud<ParcelType>::cloudSolution::relaxCoeff
|
Foam::scalar Foam::KinematicCloud<CloudType>::cloudSolution::relaxCoeff
|
||||||
(
|
(
|
||||||
const word& fieldName
|
const word& fieldName
|
||||||
) const
|
) const
|
||||||
@ -139,8 +139,8 @@ Foam::scalar Foam::KinematicCloud<ParcelType>::cloudSolution::relaxCoeff
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
bool Foam::KinematicCloud<ParcelType>::cloudSolution::semiImplicit
|
bool Foam::KinematicCloud<CloudType>::cloudSolution::semiImplicit
|
||||||
(
|
(
|
||||||
const word& fieldName
|
const word& fieldName
|
||||||
) const
|
) const
|
||||||
@ -149,8 +149,8 @@ bool Foam::KinematicCloud<ParcelType>::cloudSolution::semiImplicit
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
bool Foam::KinematicCloud<ParcelType>::cloudSolution::solveThisStep() const
|
bool Foam::KinematicCloud<CloudType>::cloudSolution::solveThisStep() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
active_
|
active_
|
||||||
@ -161,8 +161,8 @@ bool Foam::KinematicCloud<ParcelType>::cloudSolution::solveThisStep() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
bool Foam::KinematicCloud<ParcelType>::cloudSolution::canEvolve()
|
bool Foam::KinematicCloud<CloudType>::cloudSolution::canEvolve()
|
||||||
{
|
{
|
||||||
// Set the calculation time step
|
// Set the calculation time step
|
||||||
if (transient_)
|
if (transient_)
|
||||||
@ -178,8 +178,8 @@ bool Foam::KinematicCloud<ParcelType>::cloudSolution::canEvolve()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
bool Foam::KinematicCloud<ParcelType>::cloudSolution::output() const
|
bool Foam::KinematicCloud<CloudType>::cloudSolution::output() const
|
||||||
{
|
{
|
||||||
return active_ && mesh_.time().outputTime();
|
return active_ && mesh_.time().outputTime();
|
||||||
}
|
}
|
||||||
@ -187,12 +187,12 @@ bool Foam::KinematicCloud<ParcelType>::cloudSolution::output() const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::KinematicCloud<ParcelType>::setModels()
|
void Foam::KinematicCloud<CloudType>::setModels()
|
||||||
{
|
{
|
||||||
collisionModel_.reset
|
collisionModel_.reset
|
||||||
(
|
(
|
||||||
CollisionModel<KinematicCloud<ParcelType> >::New
|
CollisionModel<KinematicCloud<CloudType> >::New
|
||||||
(
|
(
|
||||||
subModelProperties_,
|
subModelProperties_,
|
||||||
*this
|
*this
|
||||||
@ -201,7 +201,7 @@ void Foam::KinematicCloud<ParcelType>::setModels()
|
|||||||
|
|
||||||
dispersionModel_.reset
|
dispersionModel_.reset
|
||||||
(
|
(
|
||||||
DispersionModel<KinematicCloud<ParcelType> >::New
|
DispersionModel<KinematicCloud<CloudType> >::New
|
||||||
(
|
(
|
||||||
subModelProperties_,
|
subModelProperties_,
|
||||||
*this
|
*this
|
||||||
@ -210,7 +210,7 @@ void Foam::KinematicCloud<ParcelType>::setModels()
|
|||||||
|
|
||||||
injectionModel_.reset
|
injectionModel_.reset
|
||||||
(
|
(
|
||||||
InjectionModel<KinematicCloud<ParcelType> >::New
|
InjectionModel<KinematicCloud<CloudType> >::New
|
||||||
(
|
(
|
||||||
subModelProperties_,
|
subModelProperties_,
|
||||||
*this
|
*this
|
||||||
@ -219,7 +219,7 @@ void Foam::KinematicCloud<ParcelType>::setModels()
|
|||||||
|
|
||||||
patchInteractionModel_.reset
|
patchInteractionModel_.reset
|
||||||
(
|
(
|
||||||
PatchInteractionModel<KinematicCloud<ParcelType> >::New
|
PatchInteractionModel<KinematicCloud<CloudType> >::New
|
||||||
(
|
(
|
||||||
subModelProperties_,
|
subModelProperties_,
|
||||||
*this
|
*this
|
||||||
@ -228,7 +228,7 @@ void Foam::KinematicCloud<ParcelType>::setModels()
|
|||||||
|
|
||||||
postProcessingModel_.reset
|
postProcessingModel_.reset
|
||||||
(
|
(
|
||||||
PostProcessingModel<KinematicCloud<ParcelType> >::New
|
PostProcessingModel<KinematicCloud<CloudType> >::New
|
||||||
(
|
(
|
||||||
subModelProperties_,
|
subModelProperties_,
|
||||||
*this
|
*this
|
||||||
@ -237,7 +237,7 @@ void Foam::KinematicCloud<ParcelType>::setModels()
|
|||||||
|
|
||||||
surfaceFilmModel_.reset
|
surfaceFilmModel_.reset
|
||||||
(
|
(
|
||||||
SurfaceFilmModel<KinematicCloud<ParcelType> >::New
|
SurfaceFilmModel<KinematicCloud<CloudType> >::New
|
||||||
(
|
(
|
||||||
subModelProperties_,
|
subModelProperties_,
|
||||||
*this,
|
*this,
|
||||||
@ -256,11 +256,9 @@ void Foam::KinematicCloud<ParcelType>::setModels()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::KinematicCloud<ParcelType>::solve
|
template<class TrackData>
|
||||||
(
|
void Foam::KinematicCloud<CloudType>::solve(TrackData& td)
|
||||||
typename ParcelType::trackData& td
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if (solution_.transient())
|
if (solution_.transient())
|
||||||
{
|
{
|
||||||
@ -290,8 +288,8 @@ void Foam::KinematicCloud<ParcelType>::solve
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::KinematicCloud<ParcelType>::preEvolve()
|
void Foam::KinematicCloud<CloudType>::preEvolve()
|
||||||
{
|
{
|
||||||
Info<< "\nSolving cloud " << this->name() << endl;
|
Info<< "\nSolving cloud " << this->name() << endl;
|
||||||
|
|
||||||
@ -301,14 +299,14 @@ void Foam::KinematicCloud<ParcelType>::preEvolve()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::KinematicCloud<ParcelType>::buildCellOccupancy()
|
void Foam::KinematicCloud<CloudType>::buildCellOccupancy()
|
||||||
{
|
{
|
||||||
if (cellOccupancyPtr_.empty())
|
if (cellOccupancyPtr_.empty())
|
||||||
{
|
{
|
||||||
cellOccupancyPtr_.reset
|
cellOccupancyPtr_.reset
|
||||||
(
|
(
|
||||||
new List<DynamicList<ParcelType*> >(mesh_.nCells())
|
new List<DynamicList<parcelType*> >(mesh_.nCells())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else if (cellOccupancyPtr_().size() != mesh_.nCells())
|
else if (cellOccupancyPtr_().size() != mesh_.nCells())
|
||||||
@ -319,22 +317,22 @@ void Foam::KinematicCloud<ParcelType>::buildCellOccupancy()
|
|||||||
cellOccupancyPtr_().setSize(mesh_.nCells());
|
cellOccupancyPtr_().setSize(mesh_.nCells());
|
||||||
}
|
}
|
||||||
|
|
||||||
List<DynamicList<ParcelType*> >& cellOccupancy = cellOccupancyPtr_();
|
List<DynamicList<parcelType*> >& cellOccupancy = cellOccupancyPtr_();
|
||||||
|
|
||||||
forAll(cellOccupancy, cO)
|
forAll(cellOccupancy, cO)
|
||||||
{
|
{
|
||||||
cellOccupancy[cO].clear();
|
cellOccupancy[cO].clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
forAllIter(typename KinematicCloud<ParcelType>, *this, iter)
|
forAllIter(typename KinematicCloud<CloudType>, *this, iter)
|
||||||
{
|
{
|
||||||
cellOccupancy[iter().cell()].append(&iter());
|
cellOccupancy[iter().cell()].append(&iter());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::KinematicCloud<ParcelType>::updateCellOccupancy()
|
void Foam::KinematicCloud<CloudType>::updateCellOccupancy()
|
||||||
{
|
{
|
||||||
// Only build the cellOccupancy if the pointer is set, i.e. it has
|
// Only build the cellOccupancy if the pointer is set, i.e. it has
|
||||||
// been requested before.
|
// been requested before.
|
||||||
@ -346,11 +344,9 @@ void Foam::KinematicCloud<ParcelType>::updateCellOccupancy()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::KinematicCloud<ParcelType>::evolveCloud
|
template<class TrackData>
|
||||||
(
|
void Foam::KinematicCloud<CloudType>::evolveCloud(TrackData& td)
|
||||||
typename ParcelType::trackData& td
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if (solution_.coupled())
|
if (solution_.coupled())
|
||||||
{
|
{
|
||||||
@ -384,17 +380,15 @@ void Foam::KinematicCloud<ParcelType>::evolveCloud
|
|||||||
|
|
||||||
this->injection().injectSteadyState(td, solution_.deltaT());
|
this->injection().injectSteadyState(td, solution_.deltaT());
|
||||||
|
|
||||||
td.part() = ParcelType::trackData::tpLinearTrack;
|
td.part() = TrackData::tpLinearTrack;
|
||||||
Cloud<ParcelType>::move(td, solution_.deltaT());
|
CloudType::move(td, solution_.deltaT());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::KinematicCloud<ParcelType>::motion
|
template<class TrackData>
|
||||||
(
|
void Foam::KinematicCloud<CloudType>::motion(TrackData& td)
|
||||||
typename ParcelType::trackData& td
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
// Sympletic leapfrog integration of particle forces:
|
// Sympletic leapfrog integration of particle forces:
|
||||||
// + apply half deltaV with stored force
|
// + apply half deltaV with stored force
|
||||||
@ -428,32 +422,30 @@ void Foam::KinematicCloud<ParcelType>::motion
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::KinematicCloud<ParcelType>::moveCollide
|
template<class TrackData>
|
||||||
(
|
void Foam::KinematicCloud<CloudType>::moveCollide(TrackData& td)
|
||||||
typename ParcelType::trackData& td
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
td.part() = ParcelType::trackData::tpVelocityHalfStep;
|
td.part() = TrackData::tpVelocityHalfStep;
|
||||||
Cloud<ParcelType>::move(td, solution_.deltaT());
|
CloudType::move(td, solution_.deltaT());
|
||||||
|
|
||||||
td.part() = ParcelType::trackData::tpLinearTrack;
|
td.part() = TrackData::tpLinearTrack;
|
||||||
Cloud<ParcelType>::move(td, solution_.deltaT());
|
CloudType::move(td, solution_.deltaT());
|
||||||
|
|
||||||
// td.part() = ParcelType::trackData::tpRotationalTrack;
|
// td.part() = TrackData::tpRotationalTrack;
|
||||||
// Cloud<ParcelType>::move(td);
|
// CloudType::move(td);
|
||||||
|
|
||||||
updateCellOccupancy();
|
updateCellOccupancy();
|
||||||
|
|
||||||
this->collision().collide();
|
this->collision().collide();
|
||||||
|
|
||||||
td.part() = ParcelType::trackData::tpVelocityHalfStep;
|
td.part() = TrackData::tpVelocityHalfStep;
|
||||||
Cloud<ParcelType>::move(td, solution_.deltaT());
|
CloudType::move(td, solution_.deltaT());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::KinematicCloud<ParcelType>::postEvolve()
|
void Foam::KinematicCloud<CloudType>::postEvolve()
|
||||||
{
|
{
|
||||||
Info<< endl;
|
Info<< endl;
|
||||||
|
|
||||||
@ -471,10 +463,10 @@ void Foam::KinematicCloud<ParcelType>::postEvolve()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::KinematicCloud<ParcelType>::cloudReset(KinematicCloud<ParcelType>& c)
|
void Foam::KinematicCloud<CloudType>::cloudReset(KinematicCloud<CloudType>& c)
|
||||||
{
|
{
|
||||||
Cloud<ParcelType>::cloudReset(c);
|
CloudType::cloudReset(c);
|
||||||
|
|
||||||
rndGen_ = c.rndGen_;
|
rndGen_ = c.rndGen_;
|
||||||
|
|
||||||
@ -492,8 +484,8 @@ void Foam::KinematicCloud<ParcelType>::cloudReset(KinematicCloud<ParcelType>& c)
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
Foam::KinematicCloud<ParcelType>::KinematicCloud
|
Foam::KinematicCloud<CloudType>::KinematicCloud
|
||||||
(
|
(
|
||||||
const word& cloudName,
|
const word& cloudName,
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
@ -503,7 +495,7 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
|
|||||||
bool readFields
|
bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Cloud<ParcelType>(rho.mesh(), cloudName, false),
|
CloudType(rho.mesh(), cloudName, false),
|
||||||
kinematicCloud(),
|
kinematicCloud(),
|
||||||
cloudCopyPtr_(NULL),
|
cloudCopyPtr_(NULL),
|
||||||
mesh_(rho.mesh()),
|
mesh_(rho.mesh()),
|
||||||
@ -592,7 +584,7 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
|
|||||||
|
|
||||||
if (readFields)
|
if (readFields)
|
||||||
{
|
{
|
||||||
ParcelType::readFields(*this);
|
parcelType::readFields(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (solution_.resetSourcesOnStartup())
|
if (solution_.resetSourcesOnStartup())
|
||||||
@ -602,14 +594,14 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
Foam::KinematicCloud<ParcelType>::KinematicCloud
|
Foam::KinematicCloud<CloudType>::KinematicCloud
|
||||||
(
|
(
|
||||||
KinematicCloud<ParcelType>& c,
|
KinematicCloud<CloudType>& c,
|
||||||
const word& name
|
const word& name
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Cloud<ParcelType>(c.mesh_, name, c),
|
CloudType(c.mesh_, name, c),
|
||||||
kinematicCloud(),
|
kinematicCloud(),
|
||||||
cloudCopyPtr_(NULL),
|
cloudCopyPtr_(NULL),
|
||||||
mesh_(c.mesh_),
|
mesh_(c.mesh_),
|
||||||
@ -666,15 +658,15 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
Foam::KinematicCloud<ParcelType>::KinematicCloud
|
Foam::KinematicCloud<CloudType>::KinematicCloud
|
||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const word& name,
|
const word& name,
|
||||||
const KinematicCloud<ParcelType>& c
|
const KinematicCloud<CloudType>& c
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Cloud<ParcelType>(mesh, name, IDLList<ParcelType>()),
|
CloudType(mesh, name, IDLList<parcelType>()),
|
||||||
kinematicCloud(),
|
kinematicCloud(),
|
||||||
cloudCopyPtr_(NULL),
|
cloudCopyPtr_(NULL),
|
||||||
mesh_(mesh),
|
mesh_(mesh),
|
||||||
@ -714,17 +706,17 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
Foam::KinematicCloud<ParcelType>::~KinematicCloud()
|
Foam::KinematicCloud<CloudType>::~KinematicCloud()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::KinematicCloud<ParcelType>::checkParcelProperties
|
void Foam::KinematicCloud<CloudType>::checkParcelProperties
|
||||||
(
|
(
|
||||||
ParcelType& parcel,
|
parcelType& parcel,
|
||||||
const scalar lagrangianDt,
|
const scalar lagrangianDt,
|
||||||
const bool fullyDescribed
|
const bool fullyDescribed
|
||||||
)
|
)
|
||||||
@ -739,12 +731,12 @@ void Foam::KinematicCloud<ParcelType>::checkParcelProperties
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::KinematicCloud<ParcelType>::storeState()
|
void Foam::KinematicCloud<CloudType>::storeState()
|
||||||
{
|
{
|
||||||
cloudCopyPtr_.reset
|
cloudCopyPtr_.reset
|
||||||
(
|
(
|
||||||
static_cast<KinematicCloud<ParcelType>*>
|
static_cast<KinematicCloud<CloudType>*>
|
||||||
(
|
(
|
||||||
clone(this->name() + "Copy").ptr()
|
clone(this->name() + "Copy").ptr()
|
||||||
)
|
)
|
||||||
@ -752,25 +744,25 @@ void Foam::KinematicCloud<ParcelType>::storeState()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::KinematicCloud<ParcelType>::restoreState()
|
void Foam::KinematicCloud<CloudType>::restoreState()
|
||||||
{
|
{
|
||||||
cloudReset(cloudCopyPtr_());
|
cloudReset(cloudCopyPtr_());
|
||||||
cloudCopyPtr_.clear();
|
cloudCopyPtr_.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::KinematicCloud<ParcelType>::resetSourceTerms()
|
void Foam::KinematicCloud<CloudType>::resetSourceTerms()
|
||||||
{
|
{
|
||||||
UTrans().field() = vector::zero;
|
UTrans().field() = vector::zero;
|
||||||
UCoeff().field() = 0.0;
|
UCoeff().field() = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::KinematicCloud<ParcelType>::relax
|
void Foam::KinematicCloud<CloudType>::relax
|
||||||
(
|
(
|
||||||
DimensionedField<Type, volMesh>& field,
|
DimensionedField<Type, volMesh>& field,
|
||||||
const DimensionedField<Type, volMesh>& field0,
|
const DimensionedField<Type, volMesh>& field0,
|
||||||
@ -783,30 +775,31 @@ void Foam::KinematicCloud<ParcelType>::relax
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::KinematicCloud<ParcelType>::relaxSources
|
void Foam::KinematicCloud<CloudType>::relaxSources
|
||||||
(
|
(
|
||||||
const KinematicCloud<ParcelType>& cloudOldTime
|
const KinematicCloud<CloudType>& cloudOldTime
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
this->relax(UTrans_(), cloudOldTime.UTrans(), "U");
|
this->relax(UTrans_(), cloudOldTime.UTrans(), "U");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::KinematicCloud<ParcelType>::evolve()
|
void Foam::KinematicCloud<CloudType>::evolve()
|
||||||
{
|
{
|
||||||
if (solution_.canEvolve())
|
if (solution_.canEvolve())
|
||||||
{
|
{
|
||||||
typename ParcelType::trackData td(*this);
|
typename parcelType::template
|
||||||
|
TrackingData<KinematicCloud<CloudType> > td(*this);
|
||||||
|
|
||||||
solve(td);
|
solve(td);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::KinematicCloud<ParcelType>::info() const
|
void Foam::KinematicCloud<CloudType>::info() const
|
||||||
{
|
{
|
||||||
vector linearMomentum = linearMomentumOfSystem();
|
vector linearMomentum = linearMomentumOfSystem();
|
||||||
reduce(linearMomentum, sumOp<vector>());
|
reduce(linearMomentum, sumOp<vector>());
|
||||||
|
|||||||
@ -51,6 +51,7 @@ SourceFiles
|
|||||||
#ifndef KinematicCloud_H
|
#ifndef KinematicCloud_H
|
||||||
#define KinematicCloud_H
|
#define KinematicCloud_H
|
||||||
|
|
||||||
|
#include "particle.H"
|
||||||
#include "Cloud.H"
|
#include "Cloud.H"
|
||||||
#include "kinematicCloud.H"
|
#include "kinematicCloud.H"
|
||||||
#include "IOdictionary.H"
|
#include "IOdictionary.H"
|
||||||
@ -62,6 +63,9 @@ SourceFiles
|
|||||||
|
|
||||||
#include "IntegrationSchemesFwd.H"
|
#include "IntegrationSchemesFwd.H"
|
||||||
|
|
||||||
|
|
||||||
|
#include "ParticleForceList.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
@ -92,16 +96,21 @@ class SurfaceFilmModel;
|
|||||||
Class KinematicCloud Declaration
|
Class KinematicCloud Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
class KinematicCloud
|
class KinematicCloud
|
||||||
:
|
:
|
||||||
public Cloud<ParcelType>,
|
public CloudType,
|
||||||
public kinematicCloud
|
public kinematicCloud
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Type of parcel the cloud was instantiated for
|
// Public typedefs
|
||||||
typedef ParcelType parcelType;
|
|
||||||
|
//- Redefine particle type as parcel type
|
||||||
|
typedef typename CloudType::particleType parcelType;
|
||||||
|
|
||||||
|
//- Force type
|
||||||
|
typedef ParticleForceList<KinematicCloud<CloudType> > forceType;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -109,7 +118,7 @@ private:
|
|||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Cloud copy pointer
|
//- Cloud copy pointer
|
||||||
autoPtr<KinematicCloud<ParcelType> > cloudCopyPtr_;
|
autoPtr<KinematicCloud<CloudType> > cloudCopyPtr_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
@ -293,7 +302,7 @@ protected:
|
|||||||
cloudSolution solution_;
|
cloudSolution solution_;
|
||||||
|
|
||||||
//- Parcel constant properties
|
//- Parcel constant properties
|
||||||
typename ParcelType::constantProperties constProps_;
|
typename parcelType::constantProperties constProps_;
|
||||||
|
|
||||||
//- Sub-models dictionary
|
//- Sub-models dictionary
|
||||||
const dictionary subModelProperties_;
|
const dictionary subModelProperties_;
|
||||||
@ -302,7 +311,7 @@ protected:
|
|||||||
cachedRandom rndGen_;
|
cachedRandom rndGen_;
|
||||||
|
|
||||||
//- Cell occupancy information for each parcel, (demand driven)
|
//- Cell occupancy information for each parcel, (demand driven)
|
||||||
autoPtr<List<DynamicList<ParcelType*> > > cellOccupancyPtr_;
|
autoPtr<List<DynamicList<parcelType*> > > cellOccupancyPtr_;
|
||||||
|
|
||||||
|
|
||||||
// References to the carrier gas fields
|
// References to the carrier gas fields
|
||||||
@ -324,33 +333,33 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
//- Optional particle forces
|
//- Optional particle forces
|
||||||
typename ParcelType::forceType forces_;
|
forceType forces_;
|
||||||
|
|
||||||
|
|
||||||
// References to the cloud sub-models
|
// References to the cloud sub-models
|
||||||
|
|
||||||
//- Collision model
|
//- Collision model
|
||||||
autoPtr<CollisionModel<KinematicCloud<ParcelType> > >
|
autoPtr<CollisionModel<KinematicCloud<CloudType> > >
|
||||||
collisionModel_;
|
collisionModel_;
|
||||||
|
|
||||||
//- Dispersion model
|
//- Dispersion model
|
||||||
autoPtr<DispersionModel<KinematicCloud<ParcelType> > >
|
autoPtr<DispersionModel<KinematicCloud<CloudType> > >
|
||||||
dispersionModel_;
|
dispersionModel_;
|
||||||
|
|
||||||
//- Injector model
|
//- Injector model
|
||||||
autoPtr<InjectionModel<KinematicCloud<ParcelType> > >
|
autoPtr<InjectionModel<KinematicCloud<CloudType> > >
|
||||||
injectionModel_;
|
injectionModel_;
|
||||||
|
|
||||||
//- Patch interaction model
|
//- Patch interaction model
|
||||||
autoPtr<PatchInteractionModel<KinematicCloud<ParcelType> > >
|
autoPtr<PatchInteractionModel<KinematicCloud<CloudType> > >
|
||||||
patchInteractionModel_;
|
patchInteractionModel_;
|
||||||
|
|
||||||
//- Post-processing model
|
//- Post-processing model
|
||||||
autoPtr<PostProcessingModel<KinematicCloud<ParcelType> > >
|
autoPtr<PostProcessingModel<KinematicCloud<CloudType> > >
|
||||||
postProcessingModel_;
|
postProcessingModel_;
|
||||||
|
|
||||||
//- Surface film model
|
//- Surface film model
|
||||||
autoPtr<SurfaceFilmModel<KinematicCloud<ParcelType> > >
|
autoPtr<SurfaceFilmModel<KinematicCloud<CloudType> > >
|
||||||
surfaceFilmModel_;
|
surfaceFilmModel_;
|
||||||
|
|
||||||
|
|
||||||
@ -378,7 +387,8 @@ protected:
|
|||||||
// Cloud evolution functions
|
// Cloud evolution functions
|
||||||
|
|
||||||
//- Solve the cloud - calls all evolution functions
|
//- Solve the cloud - calls all evolution functions
|
||||||
void solve(typename ParcelType::trackData& td);
|
template<class TrackData>
|
||||||
|
void solve(TrackData& td);
|
||||||
|
|
||||||
//- Pre-evolve
|
//- Pre-evolve
|
||||||
void preEvolve();
|
void preEvolve();
|
||||||
@ -391,23 +401,28 @@ protected:
|
|||||||
void updateCellOccupancy();
|
void updateCellOccupancy();
|
||||||
|
|
||||||
//- Evolve the cloud
|
//- Evolve the cloud
|
||||||
void evolveCloud(typename ParcelType::trackData& td);
|
template<class TrackData>
|
||||||
|
void evolveCloud(TrackData& td);
|
||||||
|
|
||||||
//- Particle motion
|
//- Particle motion
|
||||||
void motion(typename ParcelType::trackData& td);
|
template<class TrackData>
|
||||||
|
void motion(TrackData& td);
|
||||||
|
|
||||||
//- Move-collide particles
|
//- Move-collide particles
|
||||||
void moveCollide(typename ParcelType::trackData& td);
|
template<class TrackData>
|
||||||
|
void moveCollide(TrackData& td);
|
||||||
|
|
||||||
//- Post-evolve
|
//- Post-evolve
|
||||||
void postEvolve();
|
void postEvolve();
|
||||||
|
|
||||||
//- Reset state of cloud
|
//- Reset state of cloud
|
||||||
void cloudReset(KinematicCloud<ParcelType>& c);
|
void cloudReset(KinematicCloud<CloudType>& c);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
typedef CloudType cloudType;
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct given carrier gas fields
|
//- Construct given carrier gas fields
|
||||||
@ -422,29 +437,33 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Copy constructor with new name
|
//- 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
|
//- Copy constructor with new name - creates bare cloud
|
||||||
KinematicCloud
|
KinematicCloud
|
||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const word& name,
|
const word& name,
|
||||||
const KinematicCloud<ParcelType>& c
|
const KinematicCloud<CloudType>& c
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return clone based on (this) with new name
|
//- 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)
|
new KinematicCloud(*this, name)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Construct and return bare clone based on (this) with new 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)
|
new KinematicCloud(this->mesh(), name, *this)
|
||||||
);
|
);
|
||||||
@ -471,7 +490,7 @@ public:
|
|||||||
|
|
||||||
// References to the mesh and databases
|
// References to the mesh and databases
|
||||||
|
|
||||||
//- Return refernce to the mesh
|
//- Return reference to the mesh
|
||||||
inline const fvMesh& mesh() const;
|
inline const fvMesh& mesh() const;
|
||||||
|
|
||||||
//- Return particle properties dictionary
|
//- Return particle properties dictionary
|
||||||
@ -484,7 +503,7 @@ public:
|
|||||||
inline cloudSolution& solution();
|
inline cloudSolution& solution();
|
||||||
|
|
||||||
//- Return the constant properties
|
//- Return the constant properties
|
||||||
inline const typename ParcelType::constantProperties&
|
inline const typename parcelType::constantProperties&
|
||||||
constProps() const;
|
constProps() const;
|
||||||
|
|
||||||
//- Return reference to the sub-models dictionary
|
//- Return reference to the sub-models dictionary
|
||||||
@ -493,14 +512,14 @@ public:
|
|||||||
|
|
||||||
// Cloud data
|
// Cloud data
|
||||||
|
|
||||||
//- Return refernce to the random object
|
//- Return reference to the random object
|
||||||
inline cachedRandom& rndGen();
|
inline cachedRandom& rndGen();
|
||||||
|
|
||||||
//- Return the cell occupancy information for each
|
//- Return the cell occupancy information for each
|
||||||
// parcel, non-const access, the caller is
|
// parcel, non-const access, the caller is
|
||||||
// responsible for updating it for its own purposes
|
// responsible for updating it for its own purposes
|
||||||
// if particles are removed or created.
|
// if particles are removed or created.
|
||||||
inline List<DynamicList<ParcelType*> >& cellOccupancy();
|
inline List<DynamicList<parcelType*> >& cellOccupancy();
|
||||||
|
|
||||||
|
|
||||||
// References to the carrier gas fields
|
// References to the carrier gas fields
|
||||||
@ -522,53 +541,54 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Optional particle forces
|
//- Optional particle forces
|
||||||
inline const typename ParcelType::forceType& forces() const;
|
// inline const typename parcelType::forceType& forces() const;
|
||||||
|
inline const forceType& forces() const;
|
||||||
|
|
||||||
|
|
||||||
// Sub-models
|
// Sub-models
|
||||||
|
|
||||||
//- Return const access to the collision model
|
//- Return const access to the collision model
|
||||||
inline const CollisionModel<KinematicCloud<ParcelType> >&
|
inline const CollisionModel<KinematicCloud<CloudType> >&
|
||||||
collision() const;
|
collision() const;
|
||||||
|
|
||||||
//- Return reference to the collision model
|
//- Return reference to the collision model
|
||||||
inline CollisionModel<KinematicCloud<ParcelType> >&
|
inline CollisionModel<KinematicCloud<CloudType> >&
|
||||||
collision();
|
collision();
|
||||||
|
|
||||||
//- Return const-access to the dispersion model
|
//- Return const-access to the dispersion model
|
||||||
inline const DispersionModel<KinematicCloud<ParcelType> >&
|
inline const DispersionModel<KinematicCloud<CloudType> >&
|
||||||
dispersion() const;
|
dispersion() const;
|
||||||
|
|
||||||
//- Return reference to the dispersion model
|
//- Return reference to the dispersion model
|
||||||
inline DispersionModel<KinematicCloud<ParcelType> >&
|
inline DispersionModel<KinematicCloud<CloudType> >&
|
||||||
dispersion();
|
dispersion();
|
||||||
|
|
||||||
//- Return const access to the injection model
|
//- Return const access to the injection model
|
||||||
inline const InjectionModel<KinematicCloud<ParcelType> >&
|
inline const InjectionModel<KinematicCloud<CloudType> >&
|
||||||
injection() const;
|
injection() const;
|
||||||
|
|
||||||
//- Return reference to the injection model
|
//- Return reference to the injection model
|
||||||
inline InjectionModel<KinematicCloud<ParcelType> >&
|
inline InjectionModel<KinematicCloud<CloudType> >&
|
||||||
injection();
|
injection();
|
||||||
|
|
||||||
//- Return const-access to the patch interaction model
|
//- Return const-access to the patch interaction model
|
||||||
inline const PatchInteractionModel<KinematicCloud<ParcelType> >&
|
inline const PatchInteractionModel<KinematicCloud<CloudType> >&
|
||||||
patchInteraction() const;
|
patchInteraction() const;
|
||||||
|
|
||||||
//- Return reference to the patch interaction model
|
//- Return reference to the patch interaction model
|
||||||
inline PatchInteractionModel<KinematicCloud<ParcelType> >&
|
inline PatchInteractionModel<KinematicCloud<CloudType> >&
|
||||||
patchInteraction();
|
patchInteraction();
|
||||||
|
|
||||||
//- Return reference to post-processing model
|
//- Return reference to post-processing model
|
||||||
inline PostProcessingModel<KinematicCloud<ParcelType> >&
|
inline PostProcessingModel<KinematicCloud<CloudType> >&
|
||||||
postProcessing();
|
postProcessing();
|
||||||
|
|
||||||
//- Return const-access to the surface film model
|
//- Return const-access to the surface film model
|
||||||
inline const SurfaceFilmModel<KinematicCloud<ParcelType> >&
|
inline const SurfaceFilmModel<KinematicCloud<CloudType> >&
|
||||||
surfaceFilm() const;
|
surfaceFilm() const;
|
||||||
|
|
||||||
//- Return reference to the surface film model
|
//- Return reference to the surface film model
|
||||||
inline SurfaceFilmModel<KinematicCloud<ParcelType> >&
|
inline SurfaceFilmModel<KinematicCloud<CloudType> >&
|
||||||
surfaceFilm();
|
surfaceFilm();
|
||||||
|
|
||||||
|
|
||||||
@ -638,7 +658,7 @@ public:
|
|||||||
//- Check parcel properties
|
//- Check parcel properties
|
||||||
void checkParcelProperties
|
void checkParcelProperties
|
||||||
(
|
(
|
||||||
ParcelType& parcel,
|
parcelType& parcel,
|
||||||
const scalar lagrangianDt,
|
const scalar lagrangianDt,
|
||||||
const bool fullyDescribed
|
const bool fullyDescribed
|
||||||
);
|
);
|
||||||
@ -662,7 +682,7 @@ public:
|
|||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Apply relaxation to (steady state) cloud sources
|
//- Apply relaxation to (steady state) cloud sources
|
||||||
void relaxSources(const KinematicCloud<ParcelType>& cloudOldTime);
|
void relaxSources(const KinematicCloud<CloudType>& cloudOldTime);
|
||||||
|
|
||||||
//- Evolve the cloud
|
//- Evolve the cloud
|
||||||
void evolve();
|
void evolve();
|
||||||
|
|||||||
@ -27,136 +27,136 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * cloudSolution Member Functions * * * * * * * * * * //
|
// * * * * * * * * * * * cloudSolution Member Functions * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::fvMesh&
|
inline const Foam::fvMesh&
|
||||||
Foam::KinematicCloud<ParcelType>::cloudSolution::mesh() const
|
Foam::KinematicCloud<CloudType>::cloudSolution::mesh() const
|
||||||
{
|
{
|
||||||
return mesh_;
|
return mesh_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::dictionary&
|
inline const Foam::dictionary&
|
||||||
Foam::KinematicCloud<ParcelType>::cloudSolution::dict() const
|
Foam::KinematicCloud<CloudType>::cloudSolution::dict() const
|
||||||
{
|
{
|
||||||
return dict_;
|
return dict_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::Switch
|
inline const Foam::Switch
|
||||||
Foam::KinematicCloud<ParcelType>::cloudSolution::active() const
|
Foam::KinematicCloud<CloudType>::cloudSolution::active() const
|
||||||
{
|
{
|
||||||
return active_;
|
return active_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::dictionary&
|
inline const Foam::dictionary&
|
||||||
Foam::KinematicCloud<ParcelType>::cloudSolution::sourceTermDict() const
|
Foam::KinematicCloud<CloudType>::cloudSolution::sourceTermDict() const
|
||||||
{
|
{
|
||||||
return dict_.subDict("sourceTerms");
|
return dict_.subDict("sourceTerms");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::dictionary&
|
inline const Foam::dictionary&
|
||||||
Foam::KinematicCloud<ParcelType>::cloudSolution::interpolationSchemes() const
|
Foam::KinematicCloud<CloudType>::cloudSolution::interpolationSchemes() const
|
||||||
{
|
{
|
||||||
return dict_.subDict("interpolationSchemes");
|
return dict_.subDict("interpolationSchemes");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::dictionary&
|
inline const Foam::dictionary&
|
||||||
Foam::KinematicCloud<ParcelType>::cloudSolution::integrationSchemes() const
|
Foam::KinematicCloud<CloudType>::cloudSolution::integrationSchemes() const
|
||||||
{
|
{
|
||||||
return dict_.subDict("integrationSchemes");
|
return dict_.subDict("integrationSchemes");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::Switch
|
inline const Foam::Switch
|
||||||
Foam::KinematicCloud<ParcelType>::cloudSolution::transient() const
|
Foam::KinematicCloud<CloudType>::cloudSolution::transient() const
|
||||||
{
|
{
|
||||||
return transient_;
|
return transient_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::Switch
|
inline const Foam::Switch
|
||||||
Foam::KinematicCloud<ParcelType>::cloudSolution::steadyState() const
|
Foam::KinematicCloud<CloudType>::cloudSolution::steadyState() const
|
||||||
{
|
{
|
||||||
return !transient_;
|
return !transient_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline Foam::label
|
inline Foam::label
|
||||||
Foam::KinematicCloud<ParcelType>::cloudSolution::calcFrequency() const
|
Foam::KinematicCloud<CloudType>::cloudSolution::calcFrequency() const
|
||||||
{
|
{
|
||||||
return calcFrequency_;
|
return calcFrequency_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline Foam::scalar
|
inline Foam::scalar
|
||||||
Foam::KinematicCloud<ParcelType>::cloudSolution::maxCo() const
|
Foam::KinematicCloud<CloudType>::cloudSolution::maxCo() const
|
||||||
{
|
{
|
||||||
return maxCo_;
|
return maxCo_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline Foam::label Foam::KinematicCloud<ParcelType>::cloudSolution::iter() const
|
inline Foam::label Foam::KinematicCloud<CloudType>::cloudSolution::iter() const
|
||||||
{
|
{
|
||||||
return iter_;
|
return iter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline Foam::label Foam::KinematicCloud<ParcelType>::cloudSolution::nextIter()
|
inline Foam::label Foam::KinematicCloud<CloudType>::cloudSolution::nextIter()
|
||||||
{
|
{
|
||||||
return ++iter_;
|
return ++iter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline Foam::scalar
|
inline Foam::scalar
|
||||||
Foam::KinematicCloud<ParcelType>::cloudSolution::deltaT() const
|
Foam::KinematicCloud<CloudType>::cloudSolution::deltaT() const
|
||||||
{
|
{
|
||||||
return deltaT_;
|
return deltaT_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::Switch
|
inline const Foam::Switch
|
||||||
Foam::KinematicCloud<ParcelType>::cloudSolution::coupled() const
|
Foam::KinematicCloud<CloudType>::cloudSolution::coupled() const
|
||||||
{
|
{
|
||||||
return coupled_;
|
return coupled_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::Switch
|
inline const Foam::Switch
|
||||||
Foam::KinematicCloud<ParcelType>::cloudSolution::cellValueSourceCorrection()
|
Foam::KinematicCloud<CloudType>::cloudSolution::cellValueSourceCorrection()
|
||||||
const
|
const
|
||||||
{
|
{
|
||||||
return cellValueSourceCorrection_;
|
return cellValueSourceCorrection_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline Foam::scalar
|
inline Foam::scalar
|
||||||
Foam::KinematicCloud<ParcelType>::cloudSolution::maxTrackTime() const
|
Foam::KinematicCloud<CloudType>::cloudSolution::maxTrackTime() const
|
||||||
{
|
{
|
||||||
return maxTrackTime_;
|
return maxTrackTime_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::Switch
|
inline const Foam::Switch
|
||||||
Foam::KinematicCloud<ParcelType>::cloudSolution::resetSourcesOnStartup() const
|
Foam::KinematicCloud<CloudType>::cloudSolution::resetSourcesOnStartup() const
|
||||||
{
|
{
|
||||||
return resetSourcesOnStartup_;
|
return resetSourcesOnStartup_;
|
||||||
}
|
}
|
||||||
@ -164,209 +164,208 @@ Foam::KinematicCloud<ParcelType>::cloudSolution::resetSourcesOnStartup() const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::KinematicCloud<ParcelType>&
|
inline const Foam::KinematicCloud<CloudType>&
|
||||||
Foam::KinematicCloud<ParcelType>::cloudCopy() const
|
Foam::KinematicCloud<CloudType>::cloudCopy() const
|
||||||
{
|
{
|
||||||
return cloudCopyPtr_();
|
return cloudCopyPtr_();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline bool Foam::KinematicCloud<ParcelType>::hasWallImpactDistance() const
|
inline bool Foam::KinematicCloud<CloudType>::hasWallImpactDistance() const
|
||||||
{
|
{
|
||||||
return !collision().controlsWallInteraction();
|
return !collision().controlsWallInteraction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::fvMesh& Foam::KinematicCloud<ParcelType>::mesh() const
|
inline const Foam::fvMesh& Foam::KinematicCloud<CloudType>::mesh() const
|
||||||
{
|
{
|
||||||
return mesh_;
|
return mesh_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::IOdictionary&
|
inline const Foam::IOdictionary&
|
||||||
Foam::KinematicCloud<ParcelType>::particleProperties() const
|
Foam::KinematicCloud<CloudType>::particleProperties() const
|
||||||
{
|
{
|
||||||
return particleProperties_;
|
return particleProperties_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const typename Foam::KinematicCloud<ParcelType>::cloudSolution&
|
inline const typename Foam::KinematicCloud<CloudType>::cloudSolution&
|
||||||
Foam::KinematicCloud<ParcelType>::solution() const
|
Foam::KinematicCloud<CloudType>::solution() const
|
||||||
{
|
{
|
||||||
return solution_;
|
return solution_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline typename Foam::KinematicCloud<ParcelType>::cloudSolution&
|
inline typename Foam::KinematicCloud<CloudType>::cloudSolution&
|
||||||
Foam::KinematicCloud<ParcelType>::solution()
|
Foam::KinematicCloud<CloudType>::solution()
|
||||||
{
|
{
|
||||||
return solution_;
|
return solution_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const typename ParcelType::constantProperties&
|
inline const typename CloudType::particleType::constantProperties&
|
||||||
Foam::KinematicCloud<ParcelType>::constProps() const
|
Foam::KinematicCloud<CloudType>::constProps() const
|
||||||
{
|
{
|
||||||
return constProps_;
|
return constProps_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::dictionary&
|
inline const Foam::dictionary&
|
||||||
Foam::KinematicCloud<ParcelType>::subModelProperties() const
|
Foam::KinematicCloud<CloudType>::subModelProperties() const
|
||||||
{
|
{
|
||||||
return subModelProperties_;
|
return subModelProperties_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::volScalarField&
|
inline const Foam::volScalarField& Foam::KinematicCloud<CloudType>::rho() const
|
||||||
Foam::KinematicCloud<ParcelType>::rho() const
|
|
||||||
{
|
{
|
||||||
return rho_;
|
return rho_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::volVectorField& Foam::KinematicCloud<ParcelType>::U() const
|
inline const Foam::volVectorField& Foam::KinematicCloud<CloudType>::U() const
|
||||||
{
|
{
|
||||||
return U_;
|
return U_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::volScalarField& Foam::KinematicCloud<ParcelType>::mu() const
|
inline const Foam::volScalarField& Foam::KinematicCloud<CloudType>::mu() const
|
||||||
{
|
{
|
||||||
return mu_;
|
return mu_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::dimensionedVector&
|
inline const Foam::dimensionedVector& Foam::KinematicCloud<CloudType>::g() const
|
||||||
Foam::KinematicCloud<ParcelType>::g() const
|
|
||||||
{
|
{
|
||||||
return g_;
|
return g_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const typename ParcelType::forceType&
|
//inline const typename CloudType::parcelType::forceType&
|
||||||
Foam::KinematicCloud<ParcelType>::forces() const
|
inline const typename Foam::KinematicCloud<CloudType>::forceType&
|
||||||
|
Foam::KinematicCloud<CloudType>::forces() const
|
||||||
{
|
{
|
||||||
return forces_;
|
return forces_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::CollisionModel<Foam::KinematicCloud<ParcelType> >&
|
inline const Foam::CollisionModel<Foam::KinematicCloud<CloudType> >&
|
||||||
Foam::KinematicCloud<ParcelType>::collision() const
|
Foam::KinematicCloud<CloudType>::collision() const
|
||||||
{
|
{
|
||||||
return collisionModel_();
|
return collisionModel_();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline Foam::CollisionModel<Foam::KinematicCloud<ParcelType> >&
|
inline Foam::CollisionModel<Foam::KinematicCloud<CloudType> >&
|
||||||
Foam::KinematicCloud<ParcelType>::collision()
|
Foam::KinematicCloud<CloudType>::collision()
|
||||||
{
|
{
|
||||||
return collisionModel_();
|
return collisionModel_();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::DispersionModel<Foam::KinematicCloud<ParcelType> >&
|
inline const Foam::DispersionModel<Foam::KinematicCloud<CloudType> >&
|
||||||
Foam::KinematicCloud<ParcelType>::dispersion() const
|
Foam::KinematicCloud<CloudType>::dispersion() const
|
||||||
{
|
{
|
||||||
return dispersionModel_;
|
return dispersionModel_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline Foam::DispersionModel<Foam::KinematicCloud<ParcelType> >&
|
inline Foam::DispersionModel<Foam::KinematicCloud<CloudType> >&
|
||||||
Foam::KinematicCloud<ParcelType>::dispersion()
|
Foam::KinematicCloud<CloudType>::dispersion()
|
||||||
{
|
{
|
||||||
return dispersionModel_();
|
return dispersionModel_();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::InjectionModel<Foam::KinematicCloud<ParcelType> >&
|
inline const Foam::InjectionModel<Foam::KinematicCloud<CloudType> >&
|
||||||
Foam::KinematicCloud<ParcelType>::injection() const
|
Foam::KinematicCloud<CloudType>::injection() const
|
||||||
{
|
{
|
||||||
return injectionModel_;
|
return injectionModel_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::PatchInteractionModel<Foam::KinematicCloud<ParcelType> >&
|
inline const Foam::PatchInteractionModel<Foam::KinematicCloud<CloudType> >&
|
||||||
Foam::KinematicCloud<ParcelType>::patchInteraction() const
|
Foam::KinematicCloud<CloudType>::patchInteraction() const
|
||||||
{
|
{
|
||||||
return patchInteractionModel_;
|
return patchInteractionModel_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline Foam::PatchInteractionModel<Foam::KinematicCloud<ParcelType> >&
|
inline Foam::PatchInteractionModel<Foam::KinematicCloud<CloudType> >&
|
||||||
Foam::KinematicCloud<ParcelType>::patchInteraction()
|
Foam::KinematicCloud<CloudType>::patchInteraction()
|
||||||
{
|
{
|
||||||
return patchInteractionModel_();
|
return patchInteractionModel_();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline Foam::InjectionModel<Foam::KinematicCloud<ParcelType> >&
|
inline Foam::InjectionModel<Foam::KinematicCloud<CloudType> >&
|
||||||
Foam::KinematicCloud<ParcelType>::injection()
|
Foam::KinematicCloud<CloudType>::injection()
|
||||||
{
|
{
|
||||||
return injectionModel_();
|
return injectionModel_();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline Foam::PostProcessingModel<Foam::KinematicCloud<ParcelType> >&
|
inline Foam::PostProcessingModel<Foam::KinematicCloud<CloudType> >&
|
||||||
Foam::KinematicCloud<ParcelType>::postProcessing()
|
Foam::KinematicCloud<CloudType>::postProcessing()
|
||||||
{
|
{
|
||||||
return postProcessingModel_();
|
return postProcessingModel_();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::SurfaceFilmModel<Foam::KinematicCloud<ParcelType> >&
|
inline const Foam::SurfaceFilmModel<Foam::KinematicCloud<CloudType> >&
|
||||||
Foam::KinematicCloud<ParcelType>::surfaceFilm() const
|
Foam::KinematicCloud<CloudType>::surfaceFilm() const
|
||||||
{
|
{
|
||||||
return surfaceFilmModel_();
|
return surfaceFilmModel_();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline Foam::SurfaceFilmModel<Foam::KinematicCloud<ParcelType> >&
|
inline Foam::SurfaceFilmModel<Foam::KinematicCloud<CloudType> >&
|
||||||
Foam::KinematicCloud<ParcelType>::surfaceFilm()
|
Foam::KinematicCloud<CloudType>::surfaceFilm()
|
||||||
{
|
{
|
||||||
return surfaceFilmModel_();
|
return surfaceFilmModel_();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::vectorIntegrationScheme&
|
inline const Foam::vectorIntegrationScheme&
|
||||||
Foam::KinematicCloud<ParcelType>::UIntegrator() const
|
Foam::KinematicCloud<CloudType>::UIntegrator() const
|
||||||
{
|
{
|
||||||
return UIntegrator_;
|
return UIntegrator_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline Foam::scalar Foam::KinematicCloud<ParcelType>::massInSystem() const
|
inline Foam::scalar Foam::KinematicCloud<CloudType>::massInSystem() const
|
||||||
{
|
{
|
||||||
scalar sysMass = 0.0;
|
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();
|
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
|
inline Foam::vector
|
||||||
Foam::KinematicCloud<ParcelType>::linearMomentumOfSystem() const
|
Foam::KinematicCloud<CloudType>::linearMomentumOfSystem() const
|
||||||
{
|
{
|
||||||
vector linearMomentum(vector::zero);
|
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();
|
linearMomentum += p.mass()*p.U();
|
||||||
}
|
}
|
||||||
@ -391,15 +390,15 @@ Foam::KinematicCloud<ParcelType>::linearMomentumOfSystem() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline Foam::scalar
|
inline Foam::scalar
|
||||||
Foam::KinematicCloud<ParcelType>::linearKineticEnergyOfSystem() const
|
Foam::KinematicCloud<CloudType>::linearKineticEnergyOfSystem() const
|
||||||
{
|
{
|
||||||
scalar linearKineticEnergy = 0.0;
|
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());
|
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
|
inline Foam::scalar
|
||||||
Foam::KinematicCloud<ParcelType>::
|
Foam::KinematicCloud<CloudType>::rotationalKineticEnergyOfSystem() const
|
||||||
rotationalKineticEnergyOfSystem() const
|
|
||||||
{
|
{
|
||||||
scalar rotationalKineticEnergy = 0.0;
|
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 +=
|
rotationalKineticEnergy +=
|
||||||
0.5*p.momentOfInertia()*(p.omega() & p.omega());
|
0.5*p.momentOfInertia()*(p.omega() & p.omega());
|
||||||
@ -427,16 +425,16 @@ rotationalKineticEnergyOfSystem() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline Foam::cachedRandom& Foam::KinematicCloud<ParcelType>::rndGen()
|
inline Foam::cachedRandom& Foam::KinematicCloud<CloudType>::rndGen()
|
||||||
{
|
{
|
||||||
return rndGen_;
|
return rndGen_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline Foam::List<Foam::DynamicList<ParcelType*> >&
|
inline Foam::List<Foam::DynamicList<typename CloudType::particleType*> >&
|
||||||
Foam::KinematicCloud<ParcelType>::cellOccupancy()
|
Foam::KinematicCloud<CloudType>::cellOccupancy()
|
||||||
{
|
{
|
||||||
if (cellOccupancyPtr_.empty())
|
if (cellOccupancyPtr_.empty())
|
||||||
{
|
{
|
||||||
@ -447,41 +445,41 @@ Foam::KinematicCloud<ParcelType>::cellOccupancy()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline Foam::DimensionedField<Foam::vector, Foam::volMesh>&
|
inline Foam::DimensionedField<Foam::vector, Foam::volMesh>&
|
||||||
Foam::KinematicCloud<ParcelType>::UTrans()
|
Foam::KinematicCloud<CloudType>::UTrans()
|
||||||
{
|
{
|
||||||
return UTrans_();
|
return UTrans_();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::DimensionedField<Foam::vector, Foam::volMesh>&
|
inline const Foam::DimensionedField<Foam::vector, Foam::volMesh>&
|
||||||
Foam::KinematicCloud<ParcelType>::UTrans() const
|
Foam::KinematicCloud<CloudType>::UTrans() const
|
||||||
{
|
{
|
||||||
return UTrans_();
|
return UTrans_();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
inline Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
||||||
Foam::KinematicCloud<ParcelType>::UCoeff()
|
Foam::KinematicCloud<CloudType>::UCoeff()
|
||||||
{
|
{
|
||||||
return UCoeff_();
|
return UCoeff_();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
inline const Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
||||||
Foam::KinematicCloud<ParcelType>::UCoeff() const
|
Foam::KinematicCloud<CloudType>::UCoeff() const
|
||||||
{
|
{
|
||||||
return UCoeff_();
|
return UCoeff_();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline Foam::tmp<Foam::fvVectorMatrix>
|
inline Foam::tmp<Foam::fvVectorMatrix>
|
||||||
Foam::KinematicCloud<ParcelType>::SU(volVectorField& U) const
|
Foam::KinematicCloud<CloudType>::SU(volVectorField& U) const
|
||||||
{
|
{
|
||||||
if (debug)
|
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>
|
inline const Foam::tmp<Foam::volScalarField>
|
||||||
Foam::KinematicCloud<ParcelType>::theta() const
|
Foam::KinematicCloud<CloudType>::theta() const
|
||||||
{
|
{
|
||||||
tmp<volScalarField> ttheta
|
tmp<volScalarField> ttheta
|
||||||
(
|
(
|
||||||
@ -538,9 +536,9 @@ Foam::KinematicCloud<ParcelType>::theta() const
|
|||||||
);
|
);
|
||||||
|
|
||||||
scalarField& theta = ttheta().internalField();
|
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();
|
const label cellI = p.cell();
|
||||||
|
|
||||||
theta[cellI] += p.nParticle()*p.volume();
|
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>
|
inline const Foam::tmp<Foam::volScalarField>
|
||||||
Foam::KinematicCloud<ParcelType>::alpha() const
|
Foam::KinematicCloud<CloudType>::alpha() const
|
||||||
{
|
{
|
||||||
tmp<volScalarField> talpha
|
tmp<volScalarField> talpha
|
||||||
(
|
(
|
||||||
@ -575,9 +573,9 @@ Foam::KinematicCloud<ParcelType>::alpha() const
|
|||||||
);
|
);
|
||||||
|
|
||||||
scalarField& alpha = talpha().internalField();
|
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();
|
const label cellI = p.cell();
|
||||||
|
|
||||||
alpha[cellI] += p.nParticle()*p.mass();
|
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>
|
inline const Foam::tmp<Foam::volScalarField>
|
||||||
Foam::KinematicCloud<ParcelType>::rhoEff() const
|
Foam::KinematicCloud<CloudType>::rhoEff() const
|
||||||
{
|
{
|
||||||
tmp<volScalarField> trhoEff
|
tmp<volScalarField> trhoEff
|
||||||
(
|
(
|
||||||
@ -612,9 +610,9 @@ Foam::KinematicCloud<ParcelType>::rhoEff() const
|
|||||||
);
|
);
|
||||||
|
|
||||||
scalarField& rhoEff = trhoEff().internalField();
|
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();
|
const label cellI = p.cell();
|
||||||
|
|
||||||
rhoEff[cellI] += p.nParticle()*p.mass();
|
rhoEff[cellI] += p.nParticle()*p.mass();
|
||||||
|
|||||||
@ -30,12 +30,12 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
|
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ReactingCloud<ParcelType>::setModels()
|
void Foam::ReactingCloud<CloudType>::setModels()
|
||||||
{
|
{
|
||||||
compositionModel_.reset
|
compositionModel_.reset
|
||||||
(
|
(
|
||||||
CompositionModel<ReactingCloud<ParcelType> >::New
|
CompositionModel<ReactingCloud<CloudType> >::New
|
||||||
(
|
(
|
||||||
this->subModelProperties(),
|
this->subModelProperties(),
|
||||||
*this
|
*this
|
||||||
@ -44,7 +44,7 @@ void Foam::ReactingCloud<ParcelType>::setModels()
|
|||||||
|
|
||||||
phaseChangeModel_.reset
|
phaseChangeModel_.reset
|
||||||
(
|
(
|
||||||
PhaseChangeModel<ReactingCloud<ParcelType> >::New
|
PhaseChangeModel<ReactingCloud<CloudType> >::New
|
||||||
(
|
(
|
||||||
this->subModelProperties(),
|
this->subModelProperties(),
|
||||||
*this
|
*this
|
||||||
@ -53,8 +53,8 @@ void Foam::ReactingCloud<ParcelType>::setModels()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ReactingCloud<ParcelType>::checkSuppliedComposition
|
void Foam::ReactingCloud<CloudType>::checkSuppliedComposition
|
||||||
(
|
(
|
||||||
const scalarField& YSupplied,
|
const scalarField& YSupplied,
|
||||||
const scalarField& Y,
|
const scalarField& Y,
|
||||||
@ -65,7 +65,7 @@ void Foam::ReactingCloud<ParcelType>::checkSuppliedComposition
|
|||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"ReactingCloud<ParcelType>::checkSuppliedComposition"
|
"ReactingCloud<CloudType>::checkSuppliedComposition"
|
||||||
"("
|
"("
|
||||||
"const scalarField&, "
|
"const scalarField&, "
|
||||||
"const scalarField&, "
|
"const scalarField&, "
|
||||||
@ -80,10 +80,10 @@ void Foam::ReactingCloud<ParcelType>::checkSuppliedComposition
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ReactingCloud<ParcelType>::cloudReset(ReactingCloud<ParcelType>& c)
|
void Foam::ReactingCloud<CloudType>::cloudReset(ReactingCloud<CloudType>& c)
|
||||||
{
|
{
|
||||||
ThermoCloud<ParcelType>::cloudReset(c);
|
CloudType::cloudReset(c);
|
||||||
|
|
||||||
compositionModel_.reset(c.compositionModel_.ptr());
|
compositionModel_.reset(c.compositionModel_.ptr());
|
||||||
phaseChangeModel_.reset(c.phaseChangeModel_.ptr());
|
phaseChangeModel_.reset(c.phaseChangeModel_.ptr());
|
||||||
@ -94,8 +94,8 @@ void Foam::ReactingCloud<ParcelType>::cloudReset(ReactingCloud<ParcelType>& c)
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
Foam::ReactingCloud<ParcelType>::ReactingCloud
|
Foam::ReactingCloud<CloudType>::ReactingCloud
|
||||||
(
|
(
|
||||||
const word& cloudName,
|
const word& cloudName,
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
@ -105,7 +105,7 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud
|
|||||||
bool readFields
|
bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ThermoCloud<ParcelType>(cloudName, rho, U, g, thermo, false),
|
CloudType(cloudName, rho, U, g, thermo, false),
|
||||||
reactingCloud(),
|
reactingCloud(),
|
||||||
cloudCopyPtr_(NULL),
|
cloudCopyPtr_(NULL),
|
||||||
constProps_(this->particleProperties(), this->solution().active()),
|
constProps_(this->particleProperties(), this->solution().active()),
|
||||||
@ -144,7 +144,7 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud
|
|||||||
|
|
||||||
if (readFields)
|
if (readFields)
|
||||||
{
|
{
|
||||||
ParcelType::readFields(*this);
|
parcelType::readFields(*this, this->composition());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->solution().resetSourcesOnStartup())
|
if (this->solution().resetSourcesOnStartup())
|
||||||
@ -154,14 +154,14 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
Foam::ReactingCloud<ParcelType>::ReactingCloud
|
Foam::ReactingCloud<CloudType>::ReactingCloud
|
||||||
(
|
(
|
||||||
ReactingCloud<ParcelType>& c,
|
ReactingCloud<CloudType>& c,
|
||||||
const word& name
|
const word& name
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ThermoCloud<ParcelType>(c, name),
|
CloudType(c, name),
|
||||||
reactingCloud(),
|
reactingCloud(),
|
||||||
cloudCopyPtr_(NULL),
|
cloudCopyPtr_(NULL),
|
||||||
constProps_(c.constProps_),
|
constProps_(c.constProps_),
|
||||||
@ -194,15 +194,15 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
Foam::ReactingCloud<ParcelType>::ReactingCloud
|
Foam::ReactingCloud<CloudType>::ReactingCloud
|
||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const word& name,
|
const word& name,
|
||||||
const ReactingCloud<ParcelType>& c
|
const ReactingCloud<CloudType>& c
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ThermoCloud<ParcelType>(mesh, name, c),
|
CloudType(mesh, name, c),
|
||||||
reactingCloud(),
|
reactingCloud(),
|
||||||
cloudCopyPtr_(NULL),
|
cloudCopyPtr_(NULL),
|
||||||
constProps_(),
|
constProps_(),
|
||||||
@ -216,22 +216,22 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
Foam::ReactingCloud<ParcelType>::~ReactingCloud()
|
Foam::ReactingCloud<CloudType>::~ReactingCloud()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ReactingCloud<ParcelType>::checkParcelProperties
|
void Foam::ReactingCloud<CloudType>::checkParcelProperties
|
||||||
(
|
(
|
||||||
ParcelType& parcel,
|
parcelType& parcel,
|
||||||
const scalar lagrangianDt,
|
const scalar lagrangianDt,
|
||||||
const bool fullyDescribed
|
const bool fullyDescribed
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ThermoCloud<ParcelType>::checkParcelProperties
|
CloudType::checkParcelProperties
|
||||||
(
|
(
|
||||||
parcel,
|
parcel,
|
||||||
lagrangianDt,
|
lagrangianDt,
|
||||||
@ -257,12 +257,12 @@ void Foam::ReactingCloud<ParcelType>::checkParcelProperties
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ReactingCloud<ParcelType>::storeState()
|
void Foam::ReactingCloud<CloudType>::storeState()
|
||||||
{
|
{
|
||||||
cloudCopyPtr_.reset
|
cloudCopyPtr_.reset
|
||||||
(
|
(
|
||||||
static_cast<ReactingCloud<ParcelType>*>
|
static_cast<ReactingCloud<CloudType>*>
|
||||||
(
|
(
|
||||||
clone(this->name() + "Copy").ptr()
|
clone(this->name() + "Copy").ptr()
|
||||||
)
|
)
|
||||||
@ -270,18 +270,18 @@ void Foam::ReactingCloud<ParcelType>::storeState()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ReactingCloud<ParcelType>::restoreState()
|
void Foam::ReactingCloud<CloudType>::restoreState()
|
||||||
{
|
{
|
||||||
cloudReset(cloudCopyPtr_());
|
cloudReset(cloudCopyPtr_());
|
||||||
cloudCopyPtr_.clear();
|
cloudCopyPtr_.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ReactingCloud<ParcelType>::resetSourceTerms()
|
void Foam::ReactingCloud<CloudType>::resetSourceTerms()
|
||||||
{
|
{
|
||||||
ThermoCloud<ParcelType>::resetSourceTerms();
|
CloudType::resetSourceTerms();
|
||||||
forAll(rhoTrans_, i)
|
forAll(rhoTrans_, i)
|
||||||
{
|
{
|
||||||
rhoTrans_[i].field() = 0.0;
|
rhoTrans_[i].field() = 0.0;
|
||||||
@ -289,15 +289,15 @@ void Foam::ReactingCloud<ParcelType>::resetSourceTerms()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ReactingCloud<ParcelType>::relaxSources
|
void Foam::ReactingCloud<CloudType>::relaxSources
|
||||||
(
|
(
|
||||||
const ReactingCloud<ParcelType>& cloudOldTime
|
const ReactingCloud<CloudType>& cloudOldTime
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
typedef DimensionedField<scalar, volMesh> dsfType;
|
typedef DimensionedField<scalar, volMesh> dsfType;
|
||||||
|
|
||||||
ThermoCloud<ParcelType>::relaxSources(cloudOldTime);
|
CloudType::relaxSources(cloudOldTime);
|
||||||
|
|
||||||
forAll(rhoTrans_, fieldI)
|
forAll(rhoTrans_, fieldI)
|
||||||
{
|
{
|
||||||
@ -308,33 +308,44 @@ void Foam::ReactingCloud<ParcelType>::relaxSources
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ReactingCloud<ParcelType>::evolve()
|
void Foam::ReactingCloud<CloudType>::evolve()
|
||||||
{
|
{
|
||||||
if (this->solution().canEvolve())
|
if (this->solution().canEvolve())
|
||||||
{
|
{
|
||||||
typename ParcelType::trackData td(*this);
|
typename parcelType::template
|
||||||
|
TrackingData<ReactingCloud<CloudType> > td(*this);
|
||||||
|
|
||||||
this->solve(td);
|
this->solve(td);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ReactingCloud<ParcelType>::addToMassPhaseChange(const scalar dMass)
|
void Foam::ReactingCloud<CloudType>::addToMassPhaseChange(const scalar dMass)
|
||||||
{
|
{
|
||||||
dMassPhaseChange_ += dMass;
|
dMassPhaseChange_ += dMass;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ReactingCloud<ParcelType>::info() const
|
void Foam::ReactingCloud<CloudType>::info() const
|
||||||
{
|
{
|
||||||
ThermoCloud<ParcelType>::info();
|
CloudType::info();
|
||||||
|
|
||||||
Info<< " Mass transfer phase change = "
|
Info<< " Mass transfer phase change = "
|
||||||
<< returnReduce(dMassPhaseChange_, sumOp<scalar>()) << nl;
|
<< 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
|
#ifndef ReactingCloud_H
|
||||||
#define ReactingCloud_H
|
#define ReactingCloud_H
|
||||||
|
|
||||||
#include "ThermoCloud.H"
|
|
||||||
#include "reactingCloud.H"
|
#include "reactingCloud.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -60,19 +59,24 @@ class PhaseChangeModel;
|
|||||||
Class ReactingCloud Declaration
|
Class ReactingCloud Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
class ReactingCloud
|
class ReactingCloud
|
||||||
:
|
:
|
||||||
public ThermoCloud<ParcelType>,
|
public CloudType,
|
||||||
public reactingCloud
|
public reactingCloud
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Type of parcel the cloud was instantiated for
|
||||||
|
typedef typename CloudType::particleType parcelType;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Cloud copy pointer
|
//- Cloud copy pointer
|
||||||
autoPtr<ReactingCloud<ParcelType> > cloudCopyPtr_;
|
autoPtr<ReactingCloud<CloudType> > cloudCopyPtr_;
|
||||||
|
|
||||||
|
|
||||||
// Private member functions
|
// Private member functions
|
||||||
@ -89,17 +93,17 @@ protected:
|
|||||||
// Protected data
|
// Protected data
|
||||||
|
|
||||||
//- Parcel constant properties
|
//- Parcel constant properties
|
||||||
typename ParcelType::constantProperties constProps_;
|
typename parcelType::constantProperties constProps_;
|
||||||
|
|
||||||
|
|
||||||
// References to the cloud sub-models
|
// References to the cloud sub-models
|
||||||
|
|
||||||
//- Reacting composition model
|
//- Reacting composition model
|
||||||
autoPtr<CompositionModel<ReactingCloud<ParcelType> > >
|
autoPtr<CompositionModel<ReactingCloud<CloudType> > >
|
||||||
compositionModel_;
|
compositionModel_;
|
||||||
|
|
||||||
//- Reacting phase change model
|
//- Reacting phase change model
|
||||||
autoPtr<PhaseChangeModel<ReactingCloud<ParcelType> > >
|
autoPtr<PhaseChangeModel<ReactingCloud<CloudType> > >
|
||||||
phaseChangeModel_;
|
phaseChangeModel_;
|
||||||
|
|
||||||
|
|
||||||
@ -137,11 +141,13 @@ protected:
|
|||||||
// Cloud evolution functions
|
// Cloud evolution functions
|
||||||
|
|
||||||
//- Reset state of cloud
|
//- Reset state of cloud
|
||||||
void cloudReset(ReactingCloud<ParcelType>& c);
|
void cloudReset(ReactingCloud<CloudType>& c);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
typedef CloudType cloudType;
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct given carrier gas fields
|
//- Construct given carrier gas fields
|
||||||
@ -156,29 +162,29 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Copy constructor with new name
|
//- 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
|
//- Copy constructor with new name - creates bare cloud
|
||||||
ReactingCloud
|
ReactingCloud
|
||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const word& name,
|
const word& name,
|
||||||
const ReactingCloud<ParcelType>& c
|
const ReactingCloud<CloudType>& c
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return clone based on (this) with new name
|
//- 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)
|
new ReactingCloud(*this, name)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Construct and return bare clone based on (this) with new 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)
|
new ReactingCloud(this->mesh(), name, *this)
|
||||||
);
|
);
|
||||||
@ -189,10 +195,6 @@ public:
|
|||||||
virtual ~ReactingCloud();
|
virtual ~ReactingCloud();
|
||||||
|
|
||||||
|
|
||||||
//- Type of parcel the cloud was instantiated for
|
|
||||||
typedef ParcelType parcelType;
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
// Access
|
// Access
|
||||||
@ -201,18 +203,18 @@ public:
|
|||||||
inline const ReactingCloud& cloudCopy() const;
|
inline const ReactingCloud& cloudCopy() const;
|
||||||
|
|
||||||
//- Return the constant properties
|
//- Return the constant properties
|
||||||
inline const typename ParcelType::constantProperties&
|
inline const typename parcelType::constantProperties&
|
||||||
constProps() const;
|
constProps() const;
|
||||||
|
|
||||||
|
|
||||||
// Sub-models
|
// Sub-models
|
||||||
|
|
||||||
//- Return reference to reacting composition model
|
//- Return reference to reacting composition model
|
||||||
inline const CompositionModel<ReactingCloud<ParcelType> >&
|
inline const CompositionModel<ReactingCloud<CloudType> >&
|
||||||
composition() const;
|
composition() const;
|
||||||
|
|
||||||
//- Return reference to reacting phase change model
|
//- Return reference to reacting phase change model
|
||||||
inline const PhaseChangeModel<ReactingCloud<ParcelType> >&
|
inline const PhaseChangeModel<ReactingCloud<CloudType> >&
|
||||||
phaseChange() const;
|
phaseChange() const;
|
||||||
|
|
||||||
|
|
||||||
@ -262,7 +264,7 @@ public:
|
|||||||
//- Check parcel properties
|
//- Check parcel properties
|
||||||
void checkParcelProperties
|
void checkParcelProperties
|
||||||
(
|
(
|
||||||
ParcelType& parcel,
|
parcelType& parcel,
|
||||||
const scalar lagrangianDt,
|
const scalar lagrangianDt,
|
||||||
const bool fullyDescribed
|
const bool fullyDescribed
|
||||||
);
|
);
|
||||||
@ -277,13 +279,19 @@ public:
|
|||||||
void resetSourceTerms();
|
void resetSourceTerms();
|
||||||
|
|
||||||
//- Apply relaxation to (steady state) cloud sources
|
//- Apply relaxation to (steady state) cloud sources
|
||||||
void relaxSources(const ReactingCloud<ParcelType>& cloudOldTime);
|
void relaxSources(const ReactingCloud<CloudType>& cloudOldTime);
|
||||||
|
|
||||||
//- Evolve the cloud
|
//- Evolve the cloud
|
||||||
void evolve();
|
void evolve();
|
||||||
|
|
||||||
//- Print cloud information
|
//- Print cloud information
|
||||||
void info() const;
|
void info() const;
|
||||||
|
|
||||||
|
|
||||||
|
// I-O
|
||||||
|
|
||||||
|
//- Write the field data for the cloud
|
||||||
|
virtual void writeFields() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -25,66 +25,65 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::ReactingCloud<ParcelType>&
|
inline const Foam::ReactingCloud<CloudType>&
|
||||||
Foam::ReactingCloud<ParcelType>::cloudCopy() const
|
Foam::ReactingCloud<CloudType>::cloudCopy() const
|
||||||
{
|
{
|
||||||
return cloudCopyPtr_();
|
return cloudCopyPtr_();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const typename ParcelType::constantProperties&
|
inline const typename CloudType::particleType::constantProperties&
|
||||||
Foam::ReactingCloud<ParcelType>::constProps() const
|
Foam::ReactingCloud<CloudType>::constProps() const
|
||||||
{
|
{
|
||||||
return constProps_;
|
return constProps_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::CompositionModel<Foam::ReactingCloud<ParcelType> >&
|
inline const Foam::CompositionModel<Foam::ReactingCloud<CloudType> >&
|
||||||
Foam::ReactingCloud<ParcelType>::composition() const
|
Foam::ReactingCloud<CloudType>::composition() const
|
||||||
{
|
{
|
||||||
return compositionModel_;
|
return compositionModel_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::PhaseChangeModel<Foam::ReactingCloud<ParcelType> >&
|
inline const Foam::PhaseChangeModel<Foam::ReactingCloud<CloudType> >&
|
||||||
Foam::ReactingCloud<ParcelType>::phaseChange() const
|
Foam::ReactingCloud<CloudType>::phaseChange() const
|
||||||
{
|
{
|
||||||
return phaseChangeModel_;
|
return phaseChangeModel_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
inline Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
||||||
Foam::ReactingCloud<ParcelType>::rhoTrans(const label i)
|
Foam::ReactingCloud<CloudType>::rhoTrans(const label i)
|
||||||
{
|
{
|
||||||
return rhoTrans_[i];
|
return rhoTrans_[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline
|
inline
|
||||||
const Foam::PtrList<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >&
|
const Foam::PtrList<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >&
|
||||||
Foam::ReactingCloud<ParcelType>::rhoTrans() const
|
Foam::ReactingCloud<CloudType>::rhoTrans() const
|
||||||
{
|
{
|
||||||
return rhoTrans_;
|
return rhoTrans_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline Foam::PtrList<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >&
|
inline Foam::PtrList<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >&
|
||||||
Foam::ReactingCloud<ParcelType>::rhoTrans()
|
Foam::ReactingCloud<CloudType>::rhoTrans()
|
||||||
{
|
{
|
||||||
return rhoTrans_;
|
return rhoTrans_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline Foam::tmp<Foam::fvScalarMatrix>
|
inline Foam::tmp<Foam::fvScalarMatrix> Foam::ReactingCloud<CloudType>::SYi
|
||||||
Foam::ReactingCloud<ParcelType>::SYi
|
|
||||||
(
|
(
|
||||||
const label i,
|
const label i,
|
||||||
volScalarField& Yi
|
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> >
|
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
|
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> >
|
inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
|
||||||
Foam::ReactingCloud<ParcelType>::Srho() const
|
Foam::ReactingCloud<CloudType>::Srho() const
|
||||||
{
|
{
|
||||||
tmp<DimensionedField<scalar, volMesh> > trhoTrans
|
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>
|
inline Foam::tmp<Foam::fvScalarMatrix>
|
||||||
Foam::ReactingCloud<ParcelType>::Srho(volScalarField& rho) const
|
Foam::ReactingCloud<CloudType>::Srho(volScalarField& rho) const
|
||||||
{
|
{
|
||||||
if (this->solution().coupled())
|
if (this->solution().coupled())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -30,12 +30,12 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ReactingMultiphaseCloud<ParcelType>::setModels()
|
void Foam::ReactingMultiphaseCloud<CloudType>::setModels()
|
||||||
{
|
{
|
||||||
devolatilisationModel_.reset
|
devolatilisationModel_.reset
|
||||||
(
|
(
|
||||||
DevolatilisationModel<ReactingMultiphaseCloud<ParcelType> >::New
|
DevolatilisationModel<ReactingMultiphaseCloud<CloudType> >::New
|
||||||
(
|
(
|
||||||
this->subModelProperties(),
|
this->subModelProperties(),
|
||||||
*this
|
*this
|
||||||
@ -44,7 +44,7 @@ void Foam::ReactingMultiphaseCloud<ParcelType>::setModels()
|
|||||||
|
|
||||||
surfaceReactionModel_.reset
|
surfaceReactionModel_.reset
|
||||||
(
|
(
|
||||||
SurfaceReactionModel<ReactingMultiphaseCloud<ParcelType> >::New
|
SurfaceReactionModel<ReactingMultiphaseCloud<CloudType> >::New
|
||||||
(
|
(
|
||||||
this->subModelProperties(),
|
this->subModelProperties(),
|
||||||
*this
|
*this
|
||||||
@ -53,13 +53,13 @@ void Foam::ReactingMultiphaseCloud<ParcelType>::setModels()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ReactingMultiphaseCloud<ParcelType>::cloudReset
|
void Foam::ReactingMultiphaseCloud<CloudType>::cloudReset
|
||||||
(
|
(
|
||||||
ReactingMultiphaseCloud<ParcelType>& c
|
ReactingMultiphaseCloud<CloudType>& c
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ReactingCloud<ParcelType>::cloudReset(c);
|
CloudType::cloudReset(c);
|
||||||
|
|
||||||
devolatilisationModel_.reset(c.devolatilisationModel_.ptr());
|
devolatilisationModel_.reset(c.devolatilisationModel_.ptr());
|
||||||
surfaceReactionModel_.reset(c.surfaceReactionModel_.ptr());
|
surfaceReactionModel_.reset(c.surfaceReactionModel_.ptr());
|
||||||
@ -71,8 +71,8 @@ void Foam::ReactingMultiphaseCloud<ParcelType>::cloudReset
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud
|
Foam::ReactingMultiphaseCloud<CloudType>::ReactingMultiphaseCloud
|
||||||
(
|
(
|
||||||
const word& cloudName,
|
const word& cloudName,
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
@ -82,7 +82,7 @@ Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud
|
|||||||
bool readFields
|
bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ReactingCloud<ParcelType>(cloudName, rho, U, g, thermo, false),
|
CloudType(cloudName, rho, U, g, thermo, false),
|
||||||
reactingMultiphaseCloud(),
|
reactingMultiphaseCloud(),
|
||||||
cloudCopyPtr_(NULL),
|
cloudCopyPtr_(NULL),
|
||||||
constProps_(this->particleProperties(), this->solution().active()),
|
constProps_(this->particleProperties(), this->solution().active()),
|
||||||
@ -98,7 +98,7 @@ Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud
|
|||||||
|
|
||||||
if (readFields)
|
if (readFields)
|
||||||
{
|
{
|
||||||
ParcelType::readFields(*this);
|
parcelType::readFields(*this, this->composition());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->solution().resetSourcesOnStartup())
|
if (this->solution().resetSourcesOnStartup())
|
||||||
@ -108,14 +108,14 @@ Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud
|
Foam::ReactingMultiphaseCloud<CloudType>::ReactingMultiphaseCloud
|
||||||
(
|
(
|
||||||
ReactingMultiphaseCloud<ParcelType>& c,
|
ReactingMultiphaseCloud<CloudType>& c,
|
||||||
const word& name
|
const word& name
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ReactingCloud<ParcelType>(c, name),
|
CloudType(c, name),
|
||||||
reactingMultiphaseCloud(),
|
reactingMultiphaseCloud(),
|
||||||
cloudCopyPtr_(NULL),
|
cloudCopyPtr_(NULL),
|
||||||
constProps_(c.constProps_),
|
constProps_(c.constProps_),
|
||||||
@ -126,15 +126,15 @@ Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud
|
Foam::ReactingMultiphaseCloud<CloudType>::ReactingMultiphaseCloud
|
||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const word& name,
|
const word& name,
|
||||||
const ReactingMultiphaseCloud<ParcelType>& c
|
const ReactingMultiphaseCloud<CloudType>& c
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ReactingCloud<ParcelType>(mesh, name, c),
|
CloudType(mesh, name, c),
|
||||||
reactingMultiphaseCloud(),
|
reactingMultiphaseCloud(),
|
||||||
cloudCopyPtr_(NULL),
|
cloudCopyPtr_(NULL),
|
||||||
constProps_(),
|
constProps_(),
|
||||||
@ -147,22 +147,22 @@ Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
Foam::ReactingMultiphaseCloud<ParcelType>::~ReactingMultiphaseCloud()
|
Foam::ReactingMultiphaseCloud<CloudType>::~ReactingMultiphaseCloud()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ReactingMultiphaseCloud<ParcelType>::checkParcelProperties
|
void Foam::ReactingMultiphaseCloud<CloudType>::checkParcelProperties
|
||||||
(
|
(
|
||||||
ParcelType& parcel,
|
parcelType& parcel,
|
||||||
const scalar lagrangianDt,
|
const scalar lagrangianDt,
|
||||||
const bool fullyDescribed
|
const bool fullyDescribed
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ReactingCloud<ParcelType>::checkParcelProperties
|
CloudType::checkParcelProperties
|
||||||
(
|
(
|
||||||
parcel,
|
parcel,
|
||||||
lagrangianDt,
|
lagrangianDt,
|
||||||
@ -203,12 +203,12 @@ void Foam::ReactingMultiphaseCloud<ParcelType>::checkParcelProperties
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ReactingMultiphaseCloud<ParcelType>::storeState()
|
void Foam::ReactingMultiphaseCloud<CloudType>::storeState()
|
||||||
{
|
{
|
||||||
cloudCopyPtr_.reset
|
cloudCopyPtr_.reset
|
||||||
(
|
(
|
||||||
static_cast<ReactingMultiphaseCloud<ParcelType>*>
|
static_cast<ReactingMultiphaseCloud<CloudType>*>
|
||||||
(
|
(
|
||||||
clone(this->name() + "Copy").ptr()
|
clone(this->name() + "Copy").ptr()
|
||||||
)
|
)
|
||||||
@ -216,35 +216,36 @@ void Foam::ReactingMultiphaseCloud<ParcelType>::storeState()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ReactingMultiphaseCloud<ParcelType>::restoreState()
|
void Foam::ReactingMultiphaseCloud<CloudType>::restoreState()
|
||||||
{
|
{
|
||||||
cloudReset(cloudCopyPtr_());
|
cloudReset(cloudCopyPtr_());
|
||||||
cloudCopyPtr_.clear();
|
cloudCopyPtr_.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ReactingMultiphaseCloud<ParcelType>::resetSourceTerms()
|
void Foam::ReactingMultiphaseCloud<CloudType>::resetSourceTerms()
|
||||||
{
|
{
|
||||||
ReactingCloud<ParcelType>::resetSourceTerms();
|
CloudType::resetSourceTerms();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ReactingMultiphaseCloud<ParcelType>::evolve()
|
void Foam::ReactingMultiphaseCloud<CloudType>::evolve()
|
||||||
{
|
{
|
||||||
if (this->solution().canEvolve())
|
if (this->solution().canEvolve())
|
||||||
{
|
{
|
||||||
typename ParcelType::trackData td(*this);
|
typename parcelType::template
|
||||||
|
TrackingData<ReactingMultiphaseCloud<CloudType> > td(*this);
|
||||||
|
|
||||||
this->solve(td);
|
this->solve(td);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ReactingMultiphaseCloud<ParcelType>::addToMassDevolatilisation
|
void Foam::ReactingMultiphaseCloud<CloudType>::addToMassDevolatilisation
|
||||||
(
|
(
|
||||||
const scalar dMass
|
const scalar dMass
|
||||||
)
|
)
|
||||||
@ -253,8 +254,8 @@ void Foam::ReactingMultiphaseCloud<ParcelType>::addToMassDevolatilisation
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ReactingMultiphaseCloud<ParcelType>::addToMassSurfaceReaction
|
void Foam::ReactingMultiphaseCloud<CloudType>::addToMassSurfaceReaction
|
||||||
(
|
(
|
||||||
const scalar dMass
|
const scalar dMass
|
||||||
)
|
)
|
||||||
@ -263,10 +264,10 @@ void Foam::ReactingMultiphaseCloud<ParcelType>::addToMassSurfaceReaction
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ReactingMultiphaseCloud<ParcelType>::info() const
|
void Foam::ReactingMultiphaseCloud<CloudType>::info() const
|
||||||
{
|
{
|
||||||
ReactingCloud<ParcelType>::info();
|
CloudType::info();
|
||||||
Info<< " Mass transfer devolatilisation = "
|
Info<< " Mass transfer devolatilisation = "
|
||||||
<< returnReduce(dMassDevolatilisation_, sumOp<scalar>()) << nl;
|
<< returnReduce(dMassDevolatilisation_, sumOp<scalar>()) << nl;
|
||||||
Info<< " Mass transfer surface reaction = "
|
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
|
Class ReactingMultiphaseCloud Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
class ReactingMultiphaseCloud
|
class ReactingMultiphaseCloud
|
||||||
:
|
:
|
||||||
public ReactingCloud<ParcelType>,
|
public CloudType,
|
||||||
public reactingMultiphaseCloud
|
public reactingMultiphaseCloud
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Type of parcel the cloud was instantiated for
|
||||||
|
typedef typename CloudType::particleType parcelType;
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Cloud copy pointer
|
//- Cloud copy pointer
|
||||||
autoPtr<ReactingMultiphaseCloud<ParcelType> > cloudCopyPtr_;
|
autoPtr<ReactingMultiphaseCloud<CloudType> > cloudCopyPtr_;
|
||||||
|
|
||||||
|
|
||||||
// Private member functions
|
// Private member functions
|
||||||
@ -87,7 +95,7 @@ protected:
|
|||||||
// Protected data
|
// Protected data
|
||||||
|
|
||||||
//- Parcel constant properties
|
//- Parcel constant properties
|
||||||
typename ParcelType::constantProperties constProps_;
|
typename parcelType::constantProperties constProps_;
|
||||||
|
|
||||||
|
|
||||||
// References to the cloud sub-models
|
// References to the cloud sub-models
|
||||||
@ -95,14 +103,14 @@ protected:
|
|||||||
//- Devolatilisation model
|
//- Devolatilisation model
|
||||||
autoPtr
|
autoPtr
|
||||||
<
|
<
|
||||||
DevolatilisationModel<ReactingMultiphaseCloud<ParcelType> >
|
DevolatilisationModel<ReactingMultiphaseCloud<CloudType> >
|
||||||
>
|
>
|
||||||
devolatilisationModel_;
|
devolatilisationModel_;
|
||||||
|
|
||||||
//- Surface reaction model
|
//- Surface reaction model
|
||||||
autoPtr
|
autoPtr
|
||||||
<
|
<
|
||||||
SurfaceReactionModel<ReactingMultiphaseCloud<ParcelType> >
|
SurfaceReactionModel<ReactingMultiphaseCloud<CloudType> >
|
||||||
>
|
>
|
||||||
surfaceReactionModel_;
|
surfaceReactionModel_;
|
||||||
|
|
||||||
@ -128,11 +136,13 @@ protected:
|
|||||||
// Cloud evolution functions
|
// Cloud evolution functions
|
||||||
|
|
||||||
//- Reset state of cloud
|
//- Reset state of cloud
|
||||||
void cloudReset(ReactingMultiphaseCloud<ParcelType>& c);
|
void cloudReset(ReactingMultiphaseCloud<CloudType>& c);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
typedef CloudType cloudType;
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct given carrier gas fields
|
//- Construct given carrier gas fields
|
||||||
@ -150,7 +160,7 @@ public:
|
|||||||
//- Copy constructor with new name
|
//- Copy constructor with new name
|
||||||
ReactingMultiphaseCloud
|
ReactingMultiphaseCloud
|
||||||
(
|
(
|
||||||
ReactingMultiphaseCloud<ParcelType>& c,
|
ReactingMultiphaseCloud<CloudType>& c,
|
||||||
const word& name
|
const word& name
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -159,22 +169,22 @@ public:
|
|||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const word& name,
|
const word& name,
|
||||||
const ReactingMultiphaseCloud<ParcelType>& c
|
const ReactingMultiphaseCloud<CloudType>& c
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return clone based on (this) with new name
|
//- 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)
|
new ReactingMultiphaseCloud(*this, name)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Construct and return bare clone based on (this) with new 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)
|
new ReactingMultiphaseCloud(this->mesh(), name, *this)
|
||||||
);
|
);
|
||||||
@ -185,10 +195,6 @@ public:
|
|||||||
virtual ~ReactingMultiphaseCloud();
|
virtual ~ReactingMultiphaseCloud();
|
||||||
|
|
||||||
|
|
||||||
//- Type of parcel the cloud was instantiated for
|
|
||||||
typedef ParcelType parcelType;
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
// Access
|
// Access
|
||||||
@ -197,7 +203,7 @@ public:
|
|||||||
inline const ReactingMultiphaseCloud& cloudCopy() const;
|
inline const ReactingMultiphaseCloud& cloudCopy() const;
|
||||||
|
|
||||||
//- Return the constant properties
|
//- Return the constant properties
|
||||||
inline const typename ParcelType::constantProperties&
|
inline const typename parcelType::constantProperties&
|
||||||
constProps() const;
|
constProps() const;
|
||||||
|
|
||||||
|
|
||||||
@ -206,14 +212,14 @@ public:
|
|||||||
//- Return reference to devolatilisation model
|
//- Return reference to devolatilisation model
|
||||||
inline const DevolatilisationModel
|
inline const DevolatilisationModel
|
||||||
<
|
<
|
||||||
ReactingMultiphaseCloud<ParcelType>
|
ReactingMultiphaseCloud<CloudType>
|
||||||
>&
|
>&
|
||||||
devolatilisation() const;
|
devolatilisation() const;
|
||||||
|
|
||||||
//- Return reference to reacting surface reaction model
|
//- Return reference to reacting surface reaction model
|
||||||
inline const SurfaceReactionModel
|
inline const SurfaceReactionModel
|
||||||
<
|
<
|
||||||
ReactingMultiphaseCloud<ParcelType>
|
ReactingMultiphaseCloud<CloudType>
|
||||||
>&
|
>&
|
||||||
surfaceReaction() const;
|
surfaceReaction() const;
|
||||||
|
|
||||||
@ -232,7 +238,7 @@ public:
|
|||||||
//- Check parcel properties
|
//- Check parcel properties
|
||||||
void checkParcelProperties
|
void checkParcelProperties
|
||||||
(
|
(
|
||||||
ParcelType& parcel,
|
parcelType& parcel,
|
||||||
const scalar lagrangianDt,
|
const scalar lagrangianDt,
|
||||||
const bool fullyDescribed
|
const bool fullyDescribed
|
||||||
);
|
);
|
||||||
@ -251,6 +257,12 @@ public:
|
|||||||
|
|
||||||
//- Print cloud information
|
//- Print cloud information
|
||||||
void info() const;
|
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
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -25,39 +25,39 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::ReactingMultiphaseCloud<ParcelType>&
|
inline const Foam::ReactingMultiphaseCloud<CloudType>&
|
||||||
Foam::ReactingMultiphaseCloud<ParcelType>::cloudCopy() const
|
Foam::ReactingMultiphaseCloud<CloudType>::cloudCopy() const
|
||||||
{
|
{
|
||||||
return cloudCopyPtr_();
|
return cloudCopyPtr_();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const typename ParcelType::constantProperties&
|
inline const typename CloudType::particleType::constantProperties&
|
||||||
Foam::ReactingMultiphaseCloud<ParcelType>::constProps() const
|
Foam::ReactingMultiphaseCloud<CloudType>::constProps() const
|
||||||
{
|
{
|
||||||
return constProps_;
|
return constProps_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::DevolatilisationModel
|
inline const Foam::DevolatilisationModel
|
||||||
<
|
<
|
||||||
Foam::ReactingMultiphaseCloud<ParcelType>
|
Foam::ReactingMultiphaseCloud<CloudType>
|
||||||
>&
|
>&
|
||||||
Foam::ReactingMultiphaseCloud<ParcelType>::devolatilisation() const
|
Foam::ReactingMultiphaseCloud<CloudType>::devolatilisation() const
|
||||||
{
|
{
|
||||||
return devolatilisationModel_;
|
return devolatilisationModel_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::SurfaceReactionModel
|
inline const Foam::SurfaceReactionModel
|
||||||
<
|
<
|
||||||
Foam::ReactingMultiphaseCloud<ParcelType>
|
Foam::ReactingMultiphaseCloud<CloudType>
|
||||||
>&
|
>&
|
||||||
Foam::ReactingMultiphaseCloud<ParcelType>::surfaceReaction() const
|
Foam::ReactingMultiphaseCloud<CloudType>::surfaceReaction() const
|
||||||
{
|
{
|
||||||
return surfaceReactionModel_;
|
return surfaceReactionModel_;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,12 +30,12 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ThermoCloud<ParcelType>::setModels()
|
void Foam::ThermoCloud<CloudType>::setModels()
|
||||||
{
|
{
|
||||||
heatTransferModel_.reset
|
heatTransferModel_.reset
|
||||||
(
|
(
|
||||||
HeatTransferModel<ThermoCloud<ParcelType> >::New
|
HeatTransferModel<ThermoCloud<CloudType> >::New
|
||||||
(
|
(
|
||||||
this->subModelProperties(),
|
this->subModelProperties(),
|
||||||
*this
|
*this
|
||||||
@ -55,10 +55,10 @@ void Foam::ThermoCloud<ParcelType>::setModels()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ThermoCloud<ParcelType>::cloudReset(ThermoCloud<ParcelType>& c)
|
void Foam::ThermoCloud<CloudType>::cloudReset(ThermoCloud<CloudType>& c)
|
||||||
{
|
{
|
||||||
KinematicCloud<ParcelType>::cloudReset(c);
|
CloudType::cloudReset(c);
|
||||||
|
|
||||||
heatTransferModel_.reset(c.heatTransferModel_.ptr());
|
heatTransferModel_.reset(c.heatTransferModel_.ptr());
|
||||||
TIntegrator_.reset(c.TIntegrator_.ptr());
|
TIntegrator_.reset(c.TIntegrator_.ptr());
|
||||||
@ -69,8 +69,8 @@ void Foam::ThermoCloud<ParcelType>::cloudReset(ThermoCloud<ParcelType>& c)
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
Foam::ThermoCloud<ParcelType>::ThermoCloud
|
Foam::ThermoCloud<CloudType>::ThermoCloud
|
||||||
(
|
(
|
||||||
const word& cloudName,
|
const word& cloudName,
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
@ -80,7 +80,7 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud
|
|||||||
bool readFields
|
bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
KinematicCloud<ParcelType>
|
CloudType
|
||||||
(
|
(
|
||||||
cloudName,
|
cloudName,
|
||||||
rho,
|
rho,
|
||||||
@ -139,7 +139,7 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud
|
|||||||
|
|
||||||
if (readFields)
|
if (readFields)
|
||||||
{
|
{
|
||||||
ParcelType::readFields(*this);
|
parcelType::readFields(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->solution().resetSourcesOnStartup())
|
if (this->solution().resetSourcesOnStartup())
|
||||||
@ -149,14 +149,14 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
Foam::ThermoCloud<ParcelType>::ThermoCloud
|
Foam::ThermoCloud<CloudType>::ThermoCloud
|
||||||
(
|
(
|
||||||
ThermoCloud<ParcelType>& c,
|
ThermoCloud<CloudType>& c,
|
||||||
const word& name
|
const word& name
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
KinematicCloud<ParcelType>(c, name),
|
CloudType(c, name),
|
||||||
thermoCloud(),
|
thermoCloud(),
|
||||||
cloudCopyPtr_(NULL),
|
cloudCopyPtr_(NULL),
|
||||||
constProps_(c.constProps_),
|
constProps_(c.constProps_),
|
||||||
@ -201,15 +201,15 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
Foam::ThermoCloud<ParcelType>::ThermoCloud
|
Foam::ThermoCloud<CloudType>::ThermoCloud
|
||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const word& name,
|
const word& name,
|
||||||
const ThermoCloud<ParcelType>& c
|
const ThermoCloud<CloudType>& c
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
KinematicCloud<ParcelType>(mesh, name, c),
|
CloudType(mesh, name, c),
|
||||||
thermoCloud(),
|
thermoCloud(),
|
||||||
cloudCopyPtr_(NULL),
|
cloudCopyPtr_(NULL),
|
||||||
constProps_(),
|
constProps_(),
|
||||||
@ -226,27 +226,22 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
Foam::ThermoCloud<ParcelType>::~ThermoCloud()
|
Foam::ThermoCloud<CloudType>::~ThermoCloud()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ThermoCloud<ParcelType>::checkParcelProperties
|
void Foam::ThermoCloud<CloudType>::checkParcelProperties
|
||||||
(
|
(
|
||||||
ParcelType& parcel,
|
parcelType& parcel,
|
||||||
const scalar lagrangianDt,
|
const scalar lagrangianDt,
|
||||||
const bool fullyDescribed
|
const bool fullyDescribed
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
KinematicCloud<ParcelType>::checkParcelProperties
|
CloudType::checkParcelProperties(parcel, lagrangianDt, fullyDescribed);
|
||||||
(
|
|
||||||
parcel,
|
|
||||||
lagrangianDt,
|
|
||||||
fullyDescribed
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!fullyDescribed)
|
if (!fullyDescribed)
|
||||||
{
|
{
|
||||||
@ -256,12 +251,12 @@ void Foam::ThermoCloud<ParcelType>::checkParcelProperties
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ThermoCloud<ParcelType>::storeState()
|
void Foam::ThermoCloud<CloudType>::storeState()
|
||||||
{
|
{
|
||||||
cloudCopyPtr_.reset
|
cloudCopyPtr_.reset
|
||||||
(
|
(
|
||||||
static_cast<ThermoCloud<ParcelType>*>
|
static_cast<ThermoCloud<CloudType>*>
|
||||||
(
|
(
|
||||||
clone(this->name() + "Copy").ptr()
|
clone(this->name() + "Copy").ptr()
|
||||||
)
|
)
|
||||||
@ -269,51 +264,52 @@ void Foam::ThermoCloud<ParcelType>::storeState()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ThermoCloud<ParcelType>::restoreState()
|
void Foam::ThermoCloud<CloudType>::restoreState()
|
||||||
{
|
{
|
||||||
cloudReset(cloudCopyPtr_());
|
cloudReset(cloudCopyPtr_());
|
||||||
cloudCopyPtr_.clear();
|
cloudCopyPtr_.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ThermoCloud<ParcelType>::resetSourceTerms()
|
void Foam::ThermoCloud<CloudType>::resetSourceTerms()
|
||||||
{
|
{
|
||||||
KinematicCloud<ParcelType>::resetSourceTerms();
|
CloudType::resetSourceTerms();
|
||||||
hsTrans_->field() = 0.0;
|
hsTrans_->field() = 0.0;
|
||||||
hsCoeff_->field() = 0.0;
|
hsCoeff_->field() = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ThermoCloud<ParcelType>::relaxSources
|
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");
|
this->relax(hsTrans_(), cloudOldTime.hsTrans(), "hs");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ThermoCloud<ParcelType>::evolve()
|
void Foam::ThermoCloud<CloudType>::evolve()
|
||||||
{
|
{
|
||||||
if (this->solution().canEvolve())
|
if (this->solution().canEvolve())
|
||||||
{
|
{
|
||||||
typename ParcelType::trackData td(*this);
|
typename parcelType::template
|
||||||
|
TrackingData<ThermoCloud<CloudType> > td(*this);
|
||||||
|
|
||||||
this->solve(td);
|
this->solve(td);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
void Foam::ThermoCloud<ParcelType>::info() const
|
void Foam::ThermoCloud<CloudType>::info() const
|
||||||
{
|
{
|
||||||
KinematicCloud<ParcelType>::info();
|
CloudType::info();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -57,16 +57,23 @@ class HeatTransferModel;
|
|||||||
Class ThermoCloud Declaration
|
Class ThermoCloud Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
class ThermoCloud
|
class ThermoCloud
|
||||||
:
|
:
|
||||||
public KinematicCloud<ParcelType>,
|
public CloudType,
|
||||||
public thermoCloud
|
public thermoCloud
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Type of parcel the cloud was instantiated for
|
||||||
|
typedef typename CloudType::particleType parcelType;
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Cloud copy pointer
|
//- Cloud copy pointer
|
||||||
autoPtr<ThermoCloud<ParcelType> > cloudCopyPtr_;
|
autoPtr<ThermoCloud<CloudType> > cloudCopyPtr_;
|
||||||
|
|
||||||
|
|
||||||
// Private member functions
|
// Private member functions
|
||||||
@ -83,7 +90,7 @@ protected:
|
|||||||
// Protected data
|
// Protected data
|
||||||
|
|
||||||
//- Thermo parcel constant properties
|
//- Thermo parcel constant properties
|
||||||
typename ParcelType::constantProperties constProps_;
|
typename parcelType::constantProperties constProps_;
|
||||||
|
|
||||||
|
|
||||||
// References to the carrier gas fields
|
// References to the carrier gas fields
|
||||||
@ -101,7 +108,7 @@ protected:
|
|||||||
// References to the cloud sub-models
|
// References to the cloud sub-models
|
||||||
|
|
||||||
//- Heat transfer model
|
//- Heat transfer model
|
||||||
autoPtr<HeatTransferModel<ThermoCloud<ParcelType> > >
|
autoPtr<HeatTransferModel<ThermoCloud<CloudType> > >
|
||||||
heatTransferModel_;
|
heatTransferModel_;
|
||||||
|
|
||||||
|
|
||||||
@ -137,11 +144,13 @@ protected:
|
|||||||
// Cloud evolution functions
|
// Cloud evolution functions
|
||||||
|
|
||||||
//- Reset state of cloud
|
//- Reset state of cloud
|
||||||
void cloudReset(ThermoCloud<ParcelType>& c);
|
void cloudReset(ThermoCloud<CloudType>& c);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
typedef CloudType cloudType;
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct given carrier gas fields
|
//- Construct given carrier gas fields
|
||||||
@ -156,29 +165,29 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Copy constructor with new name
|
//- 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
|
//- Copy constructor with new name - creates bare cloud
|
||||||
ThermoCloud
|
ThermoCloud
|
||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const word& name,
|
const word& name,
|
||||||
const ThermoCloud<ParcelType>& c
|
const ThermoCloud<CloudType>& c
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return clone based on (this) with new name
|
//- 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)
|
new ThermoCloud(*this, name)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Construct and return bare clone based on (this) with new 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)
|
new ThermoCloud(this->mesh(), name, *this)
|
||||||
);
|
);
|
||||||
@ -189,10 +198,6 @@ public:
|
|||||||
virtual ~ThermoCloud();
|
virtual ~ThermoCloud();
|
||||||
|
|
||||||
|
|
||||||
//- Type of parcel the cloud was instantiated for
|
|
||||||
typedef ParcelType parcelType;
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
// Access
|
// Access
|
||||||
@ -201,7 +206,7 @@ public:
|
|||||||
inline const ThermoCloud& cloudCopy() const;
|
inline const ThermoCloud& cloudCopy() const;
|
||||||
|
|
||||||
//- Return the constant properties
|
//- Return the constant properties
|
||||||
inline const typename ParcelType::constantProperties&
|
inline const typename parcelType::constantProperties&
|
||||||
constProps() const;
|
constProps() const;
|
||||||
|
|
||||||
//- Return const access to thermo package
|
//- Return const access to thermo package
|
||||||
@ -217,7 +222,7 @@ public:
|
|||||||
// Sub-models
|
// Sub-models
|
||||||
|
|
||||||
//- Return reference to heat transfer model
|
//- Return reference to heat transfer model
|
||||||
inline const HeatTransferModel<ThermoCloud<ParcelType> >&
|
inline const HeatTransferModel<ThermoCloud<CloudType> >&
|
||||||
heatTransfer() const;
|
heatTransfer() const;
|
||||||
|
|
||||||
|
|
||||||
@ -272,7 +277,7 @@ public:
|
|||||||
//- Check parcel properties
|
//- Check parcel properties
|
||||||
void checkParcelProperties
|
void checkParcelProperties
|
||||||
(
|
(
|
||||||
ParcelType& parcel,
|
parcelType& parcel,
|
||||||
const scalar lagrangianDt,
|
const scalar lagrangianDt,
|
||||||
const bool fullyDescribed
|
const bool fullyDescribed
|
||||||
);
|
);
|
||||||
@ -287,7 +292,7 @@ public:
|
|||||||
void resetSourceTerms();
|
void resetSourceTerms();
|
||||||
|
|
||||||
//- Apply relaxation to (steady state) cloud sources
|
//- Apply relaxation to (steady state) cloud sources
|
||||||
void relaxSources(const ThermoCloud<ParcelType>& cloudOldTime);
|
void relaxSources(const ThermoCloud<CloudType>& cloudOldTime);
|
||||||
|
|
||||||
//- Evolve the cloud
|
//- Evolve the cloud
|
||||||
void evolve();
|
void evolve();
|
||||||
@ -297,7 +302,6 @@ public:
|
|||||||
|
|
||||||
//- Print cloud information
|
//- Print cloud information
|
||||||
void info() const;
|
void info() const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -29,101 +29,101 @@ using namespace Foam::constant;
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::ThermoCloud<ParcelType>&
|
inline const Foam::ThermoCloud<CloudType>&
|
||||||
Foam::ThermoCloud<ParcelType>::cloudCopy() const
|
Foam::ThermoCloud<CloudType>::cloudCopy() const
|
||||||
{
|
{
|
||||||
return cloudCopyPtr_();
|
return cloudCopyPtr_();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const typename ParcelType::constantProperties&
|
inline const typename CloudType::particleType::constantProperties&
|
||||||
Foam::ThermoCloud<ParcelType>::constProps() const
|
Foam::ThermoCloud<CloudType>::constProps() const
|
||||||
{
|
{
|
||||||
return constProps_;
|
return constProps_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::SLGThermo& Foam::ThermoCloud<ParcelType>::thermo() const
|
inline const Foam::SLGThermo& Foam::ThermoCloud<CloudType>::thermo() const
|
||||||
{
|
{
|
||||||
return thermo_;
|
return thermo_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::volScalarField& Foam::ThermoCloud<ParcelType>::T() const
|
inline const Foam::volScalarField& Foam::ThermoCloud<CloudType>::T() const
|
||||||
{
|
{
|
||||||
return T_;
|
return T_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::volScalarField& Foam::ThermoCloud<ParcelType>::p() const
|
inline const Foam::volScalarField& Foam::ThermoCloud<CloudType>::p() const
|
||||||
{
|
{
|
||||||
return p_;
|
return p_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::HeatTransferModel<Foam::ThermoCloud<ParcelType> >&
|
inline const Foam::HeatTransferModel<Foam::ThermoCloud<CloudType> >&
|
||||||
Foam::ThermoCloud<ParcelType>::heatTransfer() const
|
Foam::ThermoCloud<CloudType>::heatTransfer() const
|
||||||
{
|
{
|
||||||
return heatTransferModel_;
|
return heatTransferModel_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::scalarIntegrationScheme&
|
inline const Foam::scalarIntegrationScheme&
|
||||||
Foam::ThermoCloud<ParcelType>::TIntegrator() const
|
Foam::ThermoCloud<CloudType>::TIntegrator() const
|
||||||
{
|
{
|
||||||
return TIntegrator_;
|
return TIntegrator_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline bool Foam::ThermoCloud<ParcelType>::radiation() const
|
inline bool Foam::ThermoCloud<CloudType>::radiation() const
|
||||||
{
|
{
|
||||||
return radiation_;
|
return radiation_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
inline Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
||||||
Foam::ThermoCloud<ParcelType>::hsTrans()
|
Foam::ThermoCloud<CloudType>::hsTrans()
|
||||||
{
|
{
|
||||||
return hsTrans_();
|
return hsTrans_();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
inline const Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
||||||
Foam::ThermoCloud<ParcelType>::hsTrans() const
|
Foam::ThermoCloud<CloudType>::hsTrans() const
|
||||||
{
|
{
|
||||||
return hsTrans_();
|
return hsTrans_();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
inline Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
||||||
Foam::ThermoCloud<ParcelType>::hsCoeff()
|
Foam::ThermoCloud<CloudType>::hsCoeff()
|
||||||
{
|
{
|
||||||
return hsCoeff_();
|
return hsCoeff_();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline const Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
inline const Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
||||||
Foam::ThermoCloud<ParcelType>::hsCoeff() const
|
Foam::ThermoCloud<CloudType>::hsCoeff() const
|
||||||
{
|
{
|
||||||
return hsCoeff_();
|
return hsCoeff_();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline Foam::tmp<Foam::fvScalarMatrix>
|
inline Foam::tmp<Foam::fvScalarMatrix>
|
||||||
Foam::ThermoCloud<ParcelType>::Sh(volScalarField& hs) const
|
Foam::ThermoCloud<CloudType>::Sh(volScalarField& hs) const
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
@ -159,9 +159,8 @@ Foam::ThermoCloud<ParcelType>::Sh(volScalarField& hs) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline Foam::tmp<Foam::volScalarField>
|
inline Foam::tmp<Foam::volScalarField> Foam::ThermoCloud<CloudType>::Ep() const
|
||||||
Foam::ThermoCloud<ParcelType>::Ep() const
|
|
||||||
{
|
{
|
||||||
tmp<volScalarField> tEp
|
tmp<volScalarField> tEp
|
||||||
(
|
(
|
||||||
@ -188,9 +187,9 @@ Foam::ThermoCloud<ParcelType>::Ep() const
|
|||||||
const scalarField& V = this->mesh().V();
|
const scalarField& V = this->mesh().V();
|
||||||
const scalar epsilon = constProps_.epsilon0();
|
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();
|
const label cellI = p.cell();
|
||||||
Ep[cellI] += p.nParticle()*p.areaP()*pow4(p.T());
|
Ep[cellI] += p.nParticle()*p.areaP()*pow4(p.T());
|
||||||
}
|
}
|
||||||
@ -202,9 +201,8 @@ Foam::ThermoCloud<ParcelType>::Ep() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class CloudType>
|
||||||
inline Foam::tmp<Foam::volScalarField>
|
inline Foam::tmp<Foam::volScalarField> Foam::ThermoCloud<CloudType>::ap() const
|
||||||
Foam::ThermoCloud<ParcelType>::ap() const
|
|
||||||
{
|
{
|
||||||
tmp<volScalarField> tap
|
tmp<volScalarField> tap
|
||||||
(
|
(
|
||||||
@ -231,9 +229,9 @@ Foam::ThermoCloud<ParcelType>::ap() const
|
|||||||
const scalarField& V = this->mesh().V();
|
const scalarField& V = this->mesh().V();
|
||||||
const scalar epsilon = constProps_.epsilon0();
|
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();
|
const label cellI = p.cell();
|
||||||
ap[cellI] += p.nParticle()*p.areaP();
|
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>
|
inline Foam::tmp<Foam::volScalarField>
|
||||||
Foam::ThermoCloud<ParcelType>::sigmap() const
|
Foam::ThermoCloud<CloudType>::sigmap() const
|
||||||
{
|
{
|
||||||
tmp<volScalarField> tsigmap
|
tmp<volScalarField> tsigmap
|
||||||
(
|
(
|
||||||
@ -276,9 +274,9 @@ Foam::ThermoCloud<ParcelType>::sigmap() const
|
|||||||
const scalar epsilon = constProps_.epsilon0();
|
const scalar epsilon = constProps_.epsilon0();
|
||||||
const scalar f = constProps_.f0();
|
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();
|
const label cellI = p.cell();
|
||||||
sigmap[cellI] += p.nParticle()*p.areaP();
|
sigmap[cellI] += p.nParticle()*p.areaP();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,14 +27,12 @@ Class
|
|||||||
Description
|
Description
|
||||||
Cloud class to introduce kinematic parcels
|
Cloud class to introduce kinematic parcels
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
basicKinematicCloud.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef basicKinematicCloud_H
|
#ifndef basicKinematicCloud_H
|
||||||
#define basicKinematicCloud_H
|
#define basicKinematicCloud_H
|
||||||
|
|
||||||
|
#include "Cloud.H"
|
||||||
#include "KinematicCloud.H"
|
#include "KinematicCloud.H"
|
||||||
#include "basicKinematicParcel.H"
|
#include "basicKinematicParcel.H"
|
||||||
|
|
||||||
@ -42,7 +40,7 @@ SourceFiles
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
typedef KinematicCloud<basicKinematicParcel> basicKinematicCloud;
|
typedef KinematicCloud<Cloud<basicKinematicParcel> > basicKinematicCloud;
|
||||||
}
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -27,14 +27,14 @@ Class
|
|||||||
Description
|
Description
|
||||||
Cloud class to introduce reacting parcels
|
Cloud class to introduce reacting parcels
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
BasicReactingCloud.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef basicReactingCloud_H
|
#ifndef basicReactingCloud_H
|
||||||
#define basicReactingCloud_H
|
#define basicReactingCloud_H
|
||||||
|
|
||||||
|
#include "Cloud.H"
|
||||||
|
#include "KinematicCloud.H"
|
||||||
|
#include "ThermoCloud.H"
|
||||||
#include "ReactingCloud.H"
|
#include "ReactingCloud.H"
|
||||||
#include "basicReactingParcel.H"
|
#include "basicReactingParcel.H"
|
||||||
|
|
||||||
@ -42,7 +42,19 @@ SourceFiles
|
|||||||
|
|
||||||
namespace Foam
|
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
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -32,6 +32,10 @@ Description
|
|||||||
#ifndef basicReactingMultiphaseCloud_H
|
#ifndef basicReactingMultiphaseCloud_H
|
||||||
#define basicReactingMultiphaseCloud_H
|
#define basicReactingMultiphaseCloud_H
|
||||||
|
|
||||||
|
#include "Cloud.H"
|
||||||
|
#include "KinematicCloud.H"
|
||||||
|
#include "ThermoCloud.H"
|
||||||
|
#include "ReactingCloud.H"
|
||||||
#include "ReactingMultiphaseCloud.H"
|
#include "ReactingMultiphaseCloud.H"
|
||||||
#include "basicReactingMultiphaseParcel.H"
|
#include "basicReactingMultiphaseParcel.H"
|
||||||
|
|
||||||
@ -40,10 +44,21 @@ Description
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
typedef ReactingMultiphaseCloud
|
typedef ReactingMultiphaseCloud
|
||||||
|
<
|
||||||
|
ReactingCloud
|
||||||
<
|
<
|
||||||
basicReactingMultiphaseParcel
|
ThermoCloud
|
||||||
|
<
|
||||||
|
KinematicCloud
|
||||||
|
<
|
||||||
|
Cloud
|
||||||
|
<
|
||||||
|
basicReactingMultiphaseParcel
|
||||||
|
>
|
||||||
|
>
|
||||||
|
>
|
||||||
>
|
>
|
||||||
basicReactingMultiphaseCloud;
|
> basicReactingMultiphaseCloud;
|
||||||
}
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -27,9 +27,6 @@ Class
|
|||||||
Description
|
Description
|
||||||
Cloud class to introduce thermodynamic parcels
|
Cloud class to introduce thermodynamic parcels
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
basicThermoCloud.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef basicThermoCloud_H
|
#ifndef basicThermoCloud_H
|
||||||
@ -42,7 +39,16 @@ SourceFiles
|
|||||||
|
|
||||||
namespace Foam
|
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
|
scalar& Cud
|
||||||
) const
|
) 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
|
// 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 Fcp = forces.calcCoupled(p, dt, mass, Re, mu);
|
||||||
const forceSuSp Fncp = forces.calcNonCoupled(p, dt, mass, Re, mu);
|
const forceSuSp Fncp = forces.calcNonCoupled(p, dt, mass, Re, mu);
|
||||||
const forceSuSp Feff = Fcp + Fncp;
|
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());
|
dUTrans += dt*(Feff.Sp()*(Ures.average() - Uc_) - Fcp.Su());
|
||||||
|
|
||||||
// Apply correction to velocity and dUTrans for reduced-D cases
|
// 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(), Unew);
|
||||||
meshTools::constrainDirection(mesh, mesh.solutionD(), dUTrans);
|
meshTools::constrainDirection(mesh, mesh.solutionD(), dUTrans);
|
||||||
|
|
||||||
@ -221,7 +225,7 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel
|
|||||||
const KinematicParcel<ParcelType>& p
|
const KinematicParcel<ParcelType>& p
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Particle<ParcelType>(p),
|
ParcelType(p),
|
||||||
active_(p.active_),
|
active_(p.active_),
|
||||||
typeId_(p.typeId_),
|
typeId_(p.typeId_),
|
||||||
nParticle_(p.nParticle_),
|
nParticle_(p.nParticle_),
|
||||||
@ -246,10 +250,10 @@ template<class ParcelType>
|
|||||||
Foam::KinematicParcel<ParcelType>::KinematicParcel
|
Foam::KinematicParcel<ParcelType>::KinematicParcel
|
||||||
(
|
(
|
||||||
const KinematicParcel<ParcelType>& p,
|
const KinematicParcel<ParcelType>& p,
|
||||||
const KinematicCloud<ParcelType>& c
|
const polyMesh& mesh
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Particle<ParcelType>(p, c),
|
ParcelType(p, mesh),
|
||||||
active_(p.active_),
|
active_(p.active_),
|
||||||
typeId_(p.typeId_),
|
typeId_(p.typeId_),
|
||||||
nParticle_(p.nParticle_),
|
nParticle_(p.nParticle_),
|
||||||
@ -280,7 +284,8 @@ bool Foam::KinematicParcel<ParcelType>::move
|
|||||||
const scalar trackTime
|
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.switchProcessor = false;
|
||||||
td.keepParticle = true;
|
td.keepParticle = true;
|
||||||
@ -385,7 +390,9 @@ template<class ParcelType>
|
|||||||
template<class TrackData>
|
template<class TrackData>
|
||||||
void Foam::KinematicParcel<ParcelType>::hitFace(TrackData& td)
|
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);
|
td.cloud().postProcessing().postFace(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -406,7 +413,8 @@ bool Foam::KinematicParcel<ParcelType>::hitPatch
|
|||||||
const tetIndices& tetIs
|
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
|
// Invoke post-processing model
|
||||||
td.cloud().postProcessing().postPatch(p, patchI);
|
td.cloud().postProcessing().postPatch(p, patchI);
|
||||||
@ -422,7 +430,7 @@ bool Foam::KinematicParcel<ParcelType>::hitPatch
|
|||||||
// Invoke patch interaction model
|
// Invoke patch interaction model
|
||||||
return td.cloud().patchInteraction().correct
|
return td.cloud().patchInteraction().correct
|
||||||
(
|
(
|
||||||
static_cast<ParcelType&>(*this),
|
p,
|
||||||
pp,
|
pp,
|
||||||
td.keepParticle,
|
td.keepParticle,
|
||||||
trackFraction,
|
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 ParcelType>
|
||||||
template<class TrackData>
|
template<class TrackData>
|
||||||
void Foam::KinematicParcel<ParcelType>::hitProcessorPatch
|
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 ParcelType>
|
||||||
template<class TrackData>
|
template<class TrackData>
|
||||||
void Foam::KinematicParcel<ParcelType>::hitWallPatch
|
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 ParcelType>
|
||||||
template<class TrackData>
|
template<class TrackData>
|
||||||
void Foam::KinematicParcel<ParcelType>::hitPatch
|
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>
|
template<class ParcelType>
|
||||||
void Foam::KinematicParcel<ParcelType>::transformProperties(const tensor& T)
|
void Foam::KinematicParcel<ParcelType>::transformProperties(const tensor& T)
|
||||||
{
|
{
|
||||||
Particle<ParcelType>::transformProperties(T);
|
ParcelType::transformProperties(T);
|
||||||
|
|
||||||
U_ = transform(T, U_);
|
U_ = transform(T, U_);
|
||||||
|
|
||||||
@ -532,7 +498,7 @@ void Foam::KinematicParcel<ParcelType>::transformProperties
|
|||||||
const vector& separation
|
const vector& separation
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Particle<ParcelType>::transformProperties(separation);
|
ParcelType::transformProperties(separation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -45,7 +45,7 @@ SourceFiles
|
|||||||
#ifndef KinematicParcel_H
|
#ifndef KinematicParcel_H
|
||||||
#define KinematicParcel_H
|
#define KinematicParcel_H
|
||||||
|
|
||||||
#include "Particle.H"
|
#include "particle.H"
|
||||||
#include "IOstream.H"
|
#include "IOstream.H"
|
||||||
#include "autoPtr.H"
|
#include "autoPtr.H"
|
||||||
#include "interpolation.H"
|
#include "interpolation.H"
|
||||||
@ -56,7 +56,7 @@ SourceFiles
|
|||||||
#include "labelFieldIOField.H"
|
#include "labelFieldIOField.H"
|
||||||
#include "vectorFieldIOField.H"
|
#include "vectorFieldIOField.H"
|
||||||
|
|
||||||
#include "ParticleForceList.H"
|
// #include "ParticleForceList.H" // TODO
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -86,14 +86,10 @@ Ostream& operator<<
|
|||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
class KinematicParcel
|
class KinematicParcel
|
||||||
:
|
:
|
||||||
public Particle<ParcelType>
|
public ParcelType
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Type of force to be used by this parcel type
|
|
||||||
typedef ParticleForceList<KinematicCloud<ParcelType> > forceType;
|
|
||||||
|
|
||||||
|
|
||||||
//- Class to hold kinematic particle constant properties
|
//- Class to hold kinematic particle constant properties
|
||||||
class constantProperties
|
class constantProperties
|
||||||
{
|
{
|
||||||
@ -165,10 +161,10 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//- Class used to pass kinematic tracking data to the trackToFace function
|
template<class CloudType>
|
||||||
class trackData
|
class TrackingData
|
||||||
:
|
:
|
||||||
public Particle<ParcelType>::trackData
|
public ParcelType::template TrackingData<CloudType>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -184,10 +180,6 @@ public:
|
|||||||
|
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Reference to the cloud containing this particle
|
|
||||||
KinematicCloud<ParcelType>& cloud_;
|
|
||||||
|
|
||||||
|
|
||||||
// Interpolators for continuous phase fields
|
// Interpolators for continuous phase fields
|
||||||
|
|
||||||
//- Density interpolator
|
//- Density interpolator
|
||||||
@ -208,23 +200,20 @@ public:
|
|||||||
trackPart part_;
|
trackPart part_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
inline trackData
|
inline TrackingData
|
||||||
(
|
(
|
||||||
KinematicCloud<ParcelType>& cloud,
|
CloudType& cloud,
|
||||||
trackPart part = tpLinearTrack
|
trackPart part = tpLinearTrack
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
//- Return access to the owner cloud
|
|
||||||
inline KinematicCloud<ParcelType>& cloud();
|
|
||||||
|
|
||||||
//- Return conat access to the interpolator for continuous
|
//- Return conat access to the interpolator for continuous
|
||||||
// phase density field
|
// phase density field
|
||||||
inline const interpolation<scalar>& rhoInterp() const;
|
inline const interpolation<scalar>& rhoInterp() const;
|
||||||
@ -343,16 +332,13 @@ public:
|
|||||||
TypeName("KinematicParcel");
|
TypeName("KinematicParcel");
|
||||||
|
|
||||||
|
|
||||||
friend class Cloud<ParcelType>;
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from owner, position, and cloud owner
|
//- Construct from owner, position, and cloud owner
|
||||||
// Other properties initialised as null
|
// Other properties initialised as null
|
||||||
inline KinematicParcel
|
inline KinematicParcel
|
||||||
(
|
(
|
||||||
KinematicCloud<ParcelType>& owner,
|
const polyMesh& mesh,
|
||||||
const vector& position,
|
const vector& position,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const label tetFaceI,
|
const label tetFaceI,
|
||||||
@ -362,7 +348,7 @@ public:
|
|||||||
//- Construct from components
|
//- Construct from components
|
||||||
inline KinematicParcel
|
inline KinematicParcel
|
||||||
(
|
(
|
||||||
KinematicCloud<ParcelType>& owner,
|
const polyMesh& mesh,
|
||||||
const vector& position,
|
const vector& position,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const label tetFaceI,
|
const label tetFaceI,
|
||||||
@ -381,7 +367,7 @@ public:
|
|||||||
//- Construct from Istream
|
//- Construct from Istream
|
||||||
KinematicParcel
|
KinematicParcel
|
||||||
(
|
(
|
||||||
const Cloud<ParcelType>& c,
|
const polyMesh& mesh,
|
||||||
Istream& is,
|
Istream& is,
|
||||||
bool readFields = true
|
bool readFields = true
|
||||||
);
|
);
|
||||||
@ -390,33 +376,41 @@ public:
|
|||||||
KinematicParcel(const KinematicParcel& p);
|
KinematicParcel(const KinematicParcel& p);
|
||||||
|
|
||||||
//- Construct as a copy
|
//- Construct as a copy
|
||||||
KinematicParcel
|
KinematicParcel(const KinematicParcel& p, const polyMesh& mesh);
|
||||||
(
|
|
||||||
const KinematicParcel& p,
|
|
||||||
const KinematicCloud<ParcelType>& c
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Construct and return a (basic particle) clone
|
//- 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
|
//- Construct and return a (basic particle) clone
|
||||||
virtual autoPtr<Particle<ParcelType> > clone
|
virtual autoPtr<particle> clone(const polyMesh& mesh) const
|
||||||
(
|
|
||||||
const Cloud<ParcelType>& c
|
|
||||||
) const
|
|
||||||
{
|
{
|
||||||
return autoPtr<Particle<ParcelType> >
|
return autoPtr<particle>(new KinematicParcel(*this, mesh));
|
||||||
(
|
}
|
||||||
new KinematicParcel
|
|
||||||
|
//- 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> >
|
||||||
(
|
(
|
||||||
*this,
|
new KinematicParcel<ParcelType>(mesh_, is, true)
|
||||||
static_cast<const KinematicCloud<ParcelType>&>(c)
|
);
|
||||||
)
|
}
|
||||||
);
|
};
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -629,17 +623,6 @@ public:
|
|||||||
const tetIndices& tetIs
|
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
|
//- Overridable function to handle the particle hitting a
|
||||||
// processorPatch
|
// processorPatch
|
||||||
template<class TrackData>
|
template<class TrackData>
|
||||||
@ -649,14 +632,6 @@ public:
|
|||||||
TrackData& td
|
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
|
//- Overridable function to handle the particle hitting a wallPatch
|
||||||
template<class TrackData>
|
template<class TrackData>
|
||||||
void hitWallPatch
|
void hitWallPatch
|
||||||
@ -666,15 +641,6 @@ public:
|
|||||||
const tetIndices&
|
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
|
//- Overridable function to handle the particle hitting a polyPatch
|
||||||
template<class TrackData>
|
template<class TrackData>
|
||||||
void hitPatch
|
void hitPatch
|
||||||
@ -683,14 +649,6 @@ public:
|
|||||||
TrackData& td
|
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
|
//- Transform the physical properties of the particle
|
||||||
// according to the given transformation tensor
|
// according to the given transformation tensor
|
||||||
void transformProperties(const tensor& T);
|
void transformProperties(const tensor& T);
|
||||||
@ -703,10 +661,12 @@ public:
|
|||||||
// I-O
|
// I-O
|
||||||
|
|
||||||
//- Read
|
//- Read
|
||||||
static void readFields(Cloud<ParcelType>& c);
|
template<class CloudType>
|
||||||
|
static void readFields(CloudType& c);
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
static void writeFields(const Cloud<ParcelType>& c);
|
template<class CloudType>
|
||||||
|
static void writeFields(const CloudType& c);
|
||||||
|
|
||||||
|
|
||||||
// Ostream Operator
|
// Ostream Operator
|
||||||
@ -726,6 +686,7 @@ public:
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "KinematicParcelI.H"
|
#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>
|
template<class ParcelType>
|
||||||
inline Foam::KinematicParcel<ParcelType>::KinematicParcel
|
inline Foam::KinematicParcel<ParcelType>::KinematicParcel
|
||||||
(
|
(
|
||||||
KinematicCloud<ParcelType>& owner,
|
const polyMesh& owner,
|
||||||
const vector& position,
|
const vector& position,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const label tetFaceI,
|
const label tetFaceI,
|
||||||
const label tetPtI
|
const label tetPtI
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Particle<ParcelType>(owner, position, cellI, tetFaceI, tetPtI),
|
ParcelType(owner, position, cellI, tetFaceI, tetPtI),
|
||||||
active_(true),
|
active_(true),
|
||||||
typeId_(owner.constProps().parcelTypeId()),
|
// typeId_(owner.constProps().parcelTypeId()),
|
||||||
|
typeId_(-1),
|
||||||
nParticle_(0),
|
nParticle_(0),
|
||||||
d_(0.0),
|
d_(0.0),
|
||||||
dTarget_(0.0),
|
dTarget_(0.0),
|
||||||
@ -152,13 +115,17 @@ inline Foam::KinematicParcel<ParcelType>::KinematicParcel
|
|||||||
rhoc_(0.0),
|
rhoc_(0.0),
|
||||||
Uc_(vector::zero),
|
Uc_(vector::zero),
|
||||||
muc_(0.0)
|
muc_(0.0)
|
||||||
{}
|
{
|
||||||
|
// TODO
|
||||||
|
WarningIn("inline Foam::KinematicParcel<ParcelType>::KinematicParcel")
|
||||||
|
<< "typeId set to -1 instead of constProps value" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::KinematicParcel<ParcelType>::KinematicParcel
|
inline Foam::KinematicParcel<ParcelType>::KinematicParcel
|
||||||
(
|
(
|
||||||
KinematicCloud<ParcelType>& owner,
|
const polyMesh& owner,
|
||||||
const vector& position,
|
const vector& position,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const label tetFaceI,
|
const label tetFaceI,
|
||||||
@ -174,7 +141,7 @@ inline Foam::KinematicParcel<ParcelType>::KinematicParcel
|
|||||||
const constantProperties& constProps
|
const constantProperties& constProps
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Particle<ParcelType>(owner, position, cellI, tetFaceI, tetPtI),
|
ParcelType(owner, position, cellI, tetFaceI, tetPtI),
|
||||||
active_(true),
|
active_(true),
|
||||||
typeId_(typeId),
|
typeId_(typeId),
|
||||||
nParticle_(nParticle0),
|
nParticle_(nParticle0),
|
||||||
@ -239,8 +206,7 @@ Foam::KinematicParcel<ParcelType>::constantProperties::minParticleMass() const
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::scalar
|
inline Foam::scalar
|
||||||
Foam::KinematicParcel<ParcelType>::
|
Foam::KinematicParcel<ParcelType>::constantProperties::youngsModulus() const
|
||||||
constantProperties::youngsModulus() const
|
|
||||||
{
|
{
|
||||||
return youngsModulus_;
|
return youngsModulus_;
|
||||||
}
|
}
|
||||||
@ -248,71 +214,12 @@ constantProperties::youngsModulus() const
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::scalar
|
inline Foam::scalar
|
||||||
Foam::KinematicParcel<ParcelType>::
|
Foam::KinematicParcel<ParcelType>::constantProperties::poissonsRatio() const
|
||||||
constantProperties::poissonsRatio() const
|
|
||||||
{
|
{
|
||||||
return poissonsRatio_;
|
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 * * * * * * * //
|
// * * * * * * * KinematicParcel Member Functions * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
@ -568,7 +475,7 @@ inline Foam::scalar Foam::KinematicParcel<ParcelType>::massCell
|
|||||||
const label cellI
|
const label cellI
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return rhoc_*this->cloud().pMesh().cellVolumes()[cellI];
|
return rhoc_*this->mesh().cellVolumes()[cellI];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,7 @@ License
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
Foam::string Foam::KinematicParcel<ParcelType>::propHeader =
|
Foam::string Foam::KinematicParcel<ParcelType>::propHeader =
|
||||||
Particle<ParcelType>::propHeader
|
ParcelType::propHeader
|
||||||
+ " active"
|
+ " active"
|
||||||
+ " typeId"
|
+ " typeId"
|
||||||
+ " nParticle"
|
+ " nParticle"
|
||||||
@ -60,12 +60,12 @@ Foam::string Foam::KinematicParcel<ParcelType>::propHeader =
|
|||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
Foam::KinematicParcel<ParcelType>::KinematicParcel
|
Foam::KinematicParcel<ParcelType>::KinematicParcel
|
||||||
(
|
(
|
||||||
const Cloud<ParcelType>& cloud,
|
const polyMesh& mesh,
|
||||||
Istream& is,
|
Istream& is,
|
||||||
bool readFields
|
bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Particle<ParcelType>(cloud, is, readFields),
|
ParcelType(mesh, is, readFields),
|
||||||
active_(false),
|
active_(false),
|
||||||
typeId_(0),
|
typeId_(0),
|
||||||
nParticle_(0.0),
|
nParticle_(0.0),
|
||||||
@ -130,20 +130,21 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel
|
|||||||
is.check
|
is.check
|
||||||
(
|
(
|
||||||
"KinematicParcel<ParcelType>::KinematicParcel"
|
"KinematicParcel<ParcelType>::KinematicParcel"
|
||||||
"(const Cloud<ParcelType>&, Istream&, bool)"
|
"(const polyMesh&, Istream&, bool)"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::KinematicParcel<ParcelType>::readFields(Cloud<ParcelType>& c)
|
template<class CloudType>
|
||||||
|
void Foam::KinematicParcel<ParcelType>::readFields(CloudType& c)
|
||||||
{
|
{
|
||||||
if (!c.size())
|
if (!c.size())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Particle<ParcelType>::readFields(c);
|
ParcelType::readFields(c);
|
||||||
|
|
||||||
IOField<label> active(c.fieldIOobject("active", IOobject::MUST_READ));
|
IOField<label> active(c.fieldIOobject("active", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, active);
|
c.checkFieldIOobject(c, active);
|
||||||
@ -240,9 +241,9 @@ void Foam::KinematicParcel<ParcelType>::readFields(Cloud<ParcelType>& c)
|
|||||||
|
|
||||||
label i = 0;
|
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.active_ = active[i];
|
||||||
p.typeId_ = typeId[i];
|
p.typeId_ = typeId[i];
|
||||||
@ -273,9 +274,10 @@ void Foam::KinematicParcel<ParcelType>::readFields(Cloud<ParcelType>& c)
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
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();
|
label np = c.size();
|
||||||
|
|
||||||
@ -343,7 +345,7 @@ void Foam::KinematicParcel<ParcelType>::writeFields(const Cloud<ParcelType>& c)
|
|||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
|
|
||||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
forAllConstIter(typename CloudType, c, iter)
|
||||||
{
|
{
|
||||||
const KinematicParcel<ParcelType>& p = iter();
|
const KinematicParcel<ParcelType>& p = iter();
|
||||||
|
|
||||||
@ -407,7 +409,7 @@ Foam::Ostream& Foam::operator<<
|
|||||||
{
|
{
|
||||||
if (os.format() == IOstream::ASCII)
|
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.active()
|
||||||
<< token::SPACE << p.typeId()
|
<< token::SPACE << p.typeId()
|
||||||
<< token::SPACE << p.nParticle()
|
<< token::SPACE << p.nParticle()
|
||||||
@ -425,7 +427,7 @@ Foam::Ostream& Foam::operator<<
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
os << static_cast<const Particle<ParcelType>&>(p);
|
os << static_cast<const ParcelType&>(p);
|
||||||
os.write
|
os.write
|
||||||
(
|
(
|
||||||
reinterpret_cast<const char*>(&p.active_),
|
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
|
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
|
// 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
|
const label cellI
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
typedef typename ReactingParcel<ParcelType>::trackData::cloudType cloudType;
|
|
||||||
const CompositionModel<cloudType>& composition = td.cloud().composition();
|
|
||||||
|
|
||||||
// Define local properties at beginning of timestep
|
// Define local properties at beginning of timestep
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
const scalar np0 = this->nParticle_;
|
const scalar np0 = this->nParticle_;
|
||||||
@ -181,16 +178,15 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
|||||||
const scalar pc = this->pc_;
|
const scalar pc = this->pc_;
|
||||||
|
|
||||||
const scalarField& YMix = this->Y_;
|
const scalarField& YMix = this->Y_;
|
||||||
const label idG = composition.idGas();
|
const label idG = td.cloud().composition().idGas();
|
||||||
const label idL = composition.idLiquid();
|
const label idL = td.cloud().composition().idLiquid();
|
||||||
const label idS = composition.idSolid();
|
const label idS = td.cloud().composition().idSolid();
|
||||||
|
|
||||||
|
|
||||||
// Calc surface values
|
// Calc surface values
|
||||||
// ~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~
|
||||||
scalar Ts, rhos, mus, Prs, kappas;
|
scalar Ts, rhos, mus, Prs, kappas;
|
||||||
ThermoParcel<ParcelType>::
|
this->calcSurfaceValues(td, cellI, T0, Ts, rhos, mus, Prs, kappas);
|
||||||
calcSurfaceValues(td, cellI, T0, Ts, rhos, mus, Prs, kappas);
|
|
||||||
|
|
||||||
// Reynolds number
|
// Reynolds number
|
||||||
scalar Res = this->Re(U0, d0, rhos, mus);
|
scalar Res = this->Re(U0, d0, rhos, mus);
|
||||||
@ -225,7 +221,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
|||||||
scalar NCpW = 0.0;
|
scalar NCpW = 0.0;
|
||||||
|
|
||||||
// Surface concentrations of emitted species
|
// 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
|
// Calc mass and enthalpy transfer due to phase change
|
||||||
this->calcPhaseChange
|
this->calcPhaseChange
|
||||||
@ -287,7 +283,11 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
|||||||
scalarField dMassSRGas(YGas_.size(), 0.0);
|
scalarField dMassSRGas(YGas_.size(), 0.0);
|
||||||
scalarField dMassSRLiquid(YLiquid_.size(), 0.0);
|
scalarField dMassSRLiquid(YLiquid_.size(), 0.0);
|
||||||
scalarField dMassSRSolid(YSolid_.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
|
// Clac mass and enthalpy transfer due to surface reactions
|
||||||
calcSurfaceReactions
|
calcSurfaceReactions
|
||||||
@ -382,33 +382,36 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
|||||||
// Transfer mass lost from particle to carrier mass source
|
// Transfer mass lost from particle to carrier mass source
|
||||||
forAll(YGas_, i)
|
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().rhoTrans(gid)[cellI] += np0*dMassGas[i];
|
||||||
td.cloud().hsTrans()[cellI] +=
|
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)
|
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().rhoTrans(gid)[cellI] += np0*dMassLiquid[i];
|
||||||
td.cloud().hsTrans()[cellI] +=
|
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
|
// No mapping between solid components and carrier phase
|
||||||
forAll(YSolid_, i)
|
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().rhoTrans(gid)[cellI] += np0*dMassSolid[i];
|
||||||
td.cloud().hsTrans()[cellI] +=
|
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)
|
forAll(dMassSRCarrier, i)
|
||||||
{
|
{
|
||||||
td.cloud().rhoTrans(i)[cellI] += np0*dMassSRCarrier[i];
|
td.cloud().rhoTrans(i)[cellI] += np0*dMassSRCarrier[i];
|
||||||
td.cloud().hsTrans()[cellI] +=
|
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
|
// Update momentum transfer
|
||||||
@ -437,12 +440,14 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
|||||||
// Absorb parcel into carrier phase
|
// Absorb parcel into carrier phase
|
||||||
forAll(YGas_, i)
|
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];
|
td.cloud().rhoTrans(gid)[cellI] += np0*mass1*YMix[GAS]*YGas_[i];
|
||||||
}
|
}
|
||||||
forAll(YLiquid_, i)
|
forAll(YLiquid_, i)
|
||||||
{
|
{
|
||||||
label gid = composition.localToGlobalCarrierId(LIQ, i);
|
label gid =
|
||||||
|
td.cloud().composition().localToGlobalCarrierId(LIQ, i);
|
||||||
td.cloud().rhoTrans(gid)[cellI] +=
|
td.cloud().rhoTrans(gid)[cellI] +=
|
||||||
np0*mass1*YMix[LIQ]*YLiquid_[i];
|
np0*mass1*YMix[LIQ]*YLiquid_[i];
|
||||||
}
|
}
|
||||||
@ -450,7 +455,8 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
|||||||
// No mapping between solid components and carrier phase
|
// No mapping between solid components and carrier phase
|
||||||
forAll(YSolid_, i)
|
forAll(YSolid_, i)
|
||||||
{
|
{
|
||||||
label gid = composition.localToGlobalCarrierId(SLD, i);
|
label gid =
|
||||||
|
td.cloud().composition().localToGlobalCarrierId(SLD, i);
|
||||||
td.cloud().rhoTrans(gid)[cellI] +=
|
td.cloud().rhoTrans(gid)[cellI] +=
|
||||||
np0*mass1*YMix[SLD]*YSolid_[i];
|
np0*mass1*YMix[SLD]*YSolid_[i];
|
||||||
}
|
}
|
||||||
@ -515,9 +521,6 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcDevolatilisation
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef typename ReactingParcel<ParcelType>::trackData::cloudType cloudType;
|
|
||||||
const CompositionModel<cloudType>& composition = td.cloud().composition();
|
|
||||||
|
|
||||||
// Total mass of volatiles evolved
|
// Total mass of volatiles evolved
|
||||||
td.cloud().devolatilisation().calculate
|
td.cloud().devolatilisation().calculate
|
||||||
(
|
(
|
||||||
@ -545,9 +548,10 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcDevolatilisation
|
|||||||
// Note: hardcoded gaseous diffusivities for now
|
// Note: hardcoded gaseous diffusivities for now
|
||||||
// TODO: add to carrier thermo
|
// TODO: add to carrier thermo
|
||||||
const scalar beta = sqr(cbrt(15.0) + cbrt(15.0));
|
const scalar beta = sqr(cbrt(15.0) + cbrt(15.0));
|
||||||
const label id = composition.localToGlobalCarrierId(GAS, i);
|
const label id =
|
||||||
const scalar Cp = composition.carrier().Cp(id, Ts);
|
td.cloud().composition().localToGlobalCarrierId(GAS, i);
|
||||||
const scalar W = composition.carrier().W(id);
|
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);
|
const scalar Ni = dMassDV[i]/(this->areaS(d)*dt*W);
|
||||||
|
|
||||||
// Dab calc'd using API vapour mass diffusivity function
|
// Dab calc'd using API vapour mass diffusivity function
|
||||||
@ -637,7 +641,7 @@ Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
|||||||
const ReactingMultiphaseParcel<ParcelType>& p
|
const ReactingMultiphaseParcel<ParcelType>& p
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ReactingParcel<ParcelType>(p),
|
ParcelType(p),
|
||||||
YGas_(p.YGas_),
|
YGas_(p.YGas_),
|
||||||
YLiquid_(p.YLiquid_),
|
YLiquid_(p.YLiquid_),
|
||||||
YSolid_(p.YSolid_)
|
YSolid_(p.YSolid_)
|
||||||
@ -648,10 +652,10 @@ template<class ParcelType>
|
|||||||
Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
||||||
(
|
(
|
||||||
const ReactingMultiphaseParcel<ParcelType>& p,
|
const ReactingMultiphaseParcel<ParcelType>& p,
|
||||||
const ReactingMultiphaseCloud<ParcelType>& c
|
const polyMesh& mesh
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ReactingParcel<ParcelType>(p, c),
|
ParcelType(p, mesh),
|
||||||
YGas_(p.YGas_),
|
YGas_(p.YGas_),
|
||||||
YLiquid_(p.YLiquid_),
|
YLiquid_(p.YLiquid_),
|
||||||
YSolid_(p.YSolid_)
|
YSolid_(p.YSolid_)
|
||||||
|
|||||||
@ -63,7 +63,7 @@ Ostream& operator<<
|
|||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
class ReactingMultiphaseParcel
|
class ReactingMultiphaseParcel
|
||||||
:
|
:
|
||||||
public ReactingParcel<ParcelType>
|
public ParcelType
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ public:
|
|||||||
//- Class to hold reacting multiphase particle constant properties
|
//- Class to hold reacting multiphase particle constant properties
|
||||||
class constantProperties
|
class constantProperties
|
||||||
:
|
:
|
||||||
public ReactingParcel<ParcelType>::constantProperties
|
public ParcelType::constantProperties
|
||||||
{
|
{
|
||||||
// Private data
|
// 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:
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
@ -277,16 +246,13 @@ public:
|
|||||||
TypeName("ReactingMultiphaseParcel");
|
TypeName("ReactingMultiphaseParcel");
|
||||||
|
|
||||||
|
|
||||||
friend class Cloud<ParcelType>;
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from owner, position, and cloud owner
|
//- Construct from owner, position, and cloud owner
|
||||||
// Other properties initialised as null
|
// Other properties initialised as null
|
||||||
inline ReactingMultiphaseParcel
|
inline ReactingMultiphaseParcel
|
||||||
(
|
(
|
||||||
ReactingMultiphaseCloud<ParcelType>& owner,
|
const polyMesh& mesh,
|
||||||
const vector& position,
|
const vector& position,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const label tetFaceI,
|
const label tetFaceI,
|
||||||
@ -297,7 +263,7 @@ public:
|
|||||||
//- Construct from components
|
//- Construct from components
|
||||||
inline ReactingMultiphaseParcel
|
inline ReactingMultiphaseParcel
|
||||||
(
|
(
|
||||||
ReactingMultiphaseCloud<ParcelType>& owner,
|
const polyMesh& mesh,
|
||||||
const vector& position,
|
const vector& position,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const label tetFaceI,
|
const label tetFaceI,
|
||||||
@ -320,7 +286,7 @@ public:
|
|||||||
//- Construct from Istream
|
//- Construct from Istream
|
||||||
ReactingMultiphaseParcel
|
ReactingMultiphaseParcel
|
||||||
(
|
(
|
||||||
const Cloud<ParcelType>& c,
|
const polyMesh& mesh,
|
||||||
Istream& is,
|
Istream& is,
|
||||||
bool readFields = true
|
bool readFields = true
|
||||||
);
|
);
|
||||||
@ -332,34 +298,46 @@ public:
|
|||||||
ReactingMultiphaseParcel
|
ReactingMultiphaseParcel
|
||||||
(
|
(
|
||||||
const ReactingMultiphaseParcel& p,
|
const ReactingMultiphaseParcel& p,
|
||||||
const ReactingMultiphaseCloud<ParcelType>& c
|
const polyMesh& mesh
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a (basic particle) clone
|
//- Construct and return a (basic particle) clone
|
||||||
virtual autoPtr<Particle<ParcelType> > clone() const
|
virtual autoPtr<particle> clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<Particle<ParcelType> >
|
return autoPtr<particle>(new ReactingMultiphaseParcel(*this));
|
||||||
(
|
|
||||||
new ReactingMultiphaseParcel(*this)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Construct and return a (basic particle) clone
|
//- Construct and return a (basic particle) clone
|
||||||
virtual autoPtr<Particle<ParcelType> > clone
|
virtual autoPtr<particle> clone(const polyMesh& mesh) const
|
||||||
(
|
|
||||||
const Cloud<ParcelType>& c
|
|
||||||
) const
|
|
||||||
{
|
{
|
||||||
return autoPtr<Particle<ParcelType> >
|
return autoPtr<particle>(new ReactingMultiphaseParcel(*this, mesh));
|
||||||
(
|
|
||||||
new ReactingMultiphaseParcel
|
|
||||||
(
|
|
||||||
*this,
|
|
||||||
static_cast<const ReactingMultiphaseCloud<ParcelType>&>(c)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//- 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()
|
||||||
|
(
|
||||||
|
Istream& is
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return autoPtr<ReactingMultiphaseParcel<ParcelType> >
|
||||||
|
(
|
||||||
|
new ReactingMultiphaseParcel<ParcelType>(mesh_, is, true)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
@ -426,10 +404,28 @@ public:
|
|||||||
// I-O
|
// I-O
|
||||||
|
|
||||||
//- Read
|
//- 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
|
//- 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
|
// Ostream Operator
|
||||||
|
|||||||
@ -30,7 +30,7 @@ inline
|
|||||||
Foam::ReactingMultiphaseParcel<ParcelType>::constantProperties::
|
Foam::ReactingMultiphaseParcel<ParcelType>::constantProperties::
|
||||||
constantProperties()
|
constantProperties()
|
||||||
:
|
:
|
||||||
ReactingParcel<ParcelType>::constantProperties(),
|
ParcelType::constantProperties(),
|
||||||
LDevol_(0.0),
|
LDevol_(0.0),
|
||||||
hRetentionCoeff_(0.0)
|
hRetentionCoeff_(0.0)
|
||||||
{}
|
{}
|
||||||
@ -44,7 +44,7 @@ constantProperties
|
|||||||
const constantProperties& cp
|
const constantProperties& cp
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ReactingParcel<ParcelType>::constantProperties(cp),
|
ParcelType::constantProperties(cp),
|
||||||
LDevol_(cp.LDevol_),
|
LDevol_(cp.LDevol_),
|
||||||
hRetentionCoeff_(cp.hRetentionCoeff_)
|
hRetentionCoeff_(cp.hRetentionCoeff_)
|
||||||
{}
|
{}
|
||||||
@ -58,7 +58,7 @@ constantProperties
|
|||||||
const bool readFields
|
const bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ReactingParcel<ParcelType>::constantProperties(parentDict, readFields),
|
ParcelType::constantProperties(parentDict, readFields),
|
||||||
LDevol_(0.0),
|
LDevol_(0.0),
|
||||||
hRetentionCoeff_(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>
|
template<class ParcelType>
|
||||||
inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
||||||
(
|
(
|
||||||
ReactingMultiphaseCloud<ParcelType>& owner,
|
const polyMesh& mesh,
|
||||||
const vector& position,
|
const vector& position,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const label tetFaceI,
|
const label tetFaceI,
|
||||||
const label tetPtI
|
const label tetPtI
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ReactingParcel<ParcelType>(owner, position, cellI, tetFaceI, tetPtI),
|
ParcelType(mesh, position, cellI, tetFaceI, tetPtI),
|
||||||
YGas_(0),
|
YGas_(0),
|
||||||
YLiquid_(0),
|
YLiquid_(0),
|
||||||
YSolid_(0),
|
YSolid_(0),
|
||||||
@ -115,7 +103,7 @@ inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
|||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
||||||
(
|
(
|
||||||
ReactingMultiphaseCloud<ParcelType>& owner,
|
const polyMesh& mesh,
|
||||||
const vector& position,
|
const vector& position,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const label tetFaceI,
|
const label tetFaceI,
|
||||||
@ -135,9 +123,9 @@ inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
|||||||
const constantProperties& constProps
|
const constantProperties& constProps
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ReactingParcel<ParcelType>
|
ParcelType
|
||||||
(
|
(
|
||||||
owner,
|
mesh,
|
||||||
position,
|
position,
|
||||||
cellI,
|
cellI,
|
||||||
tetFaceI,
|
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 * * * * * * * * * * * * //
|
// * * * * * * * * * * ThermoParcel Member Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -30,7 +30,7 @@ License
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
Foam::string Foam::ReactingMultiphaseParcel<ParcelType>::propHeader =
|
Foam::string Foam::ReactingMultiphaseParcel<ParcelType>::propHeader =
|
||||||
ReactingParcel<ParcelType>::propHeader
|
ParcelType::propHeader
|
||||||
+ " nGas(Y1..YN)"
|
+ " nGas(Y1..YN)"
|
||||||
+ " nLiquid(Y1..YN)"
|
+ " nLiquid(Y1..YN)"
|
||||||
+ " nSolid(Y1..YN)";
|
+ " nSolid(Y1..YN)";
|
||||||
@ -41,12 +41,12 @@ Foam::string Foam::ReactingMultiphaseParcel<ParcelType>::propHeader =
|
|||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
||||||
(
|
(
|
||||||
const Cloud<ParcelType>& cloud,
|
const polyMesh& mesh,
|
||||||
Istream& is,
|
Istream& is,
|
||||||
bool readFields
|
bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ReactingParcel<ParcelType>(cloud, is, readFields),
|
ParcelType(mesh, is, readFields),
|
||||||
YGas_(0),
|
YGas_(0),
|
||||||
YLiquid_(0),
|
YLiquid_(0),
|
||||||
YSolid_(0),
|
YSolid_(0),
|
||||||
@ -54,21 +54,15 @@ Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
|||||||
{
|
{
|
||||||
if (readFields)
|
if (readFields)
|
||||||
{
|
{
|
||||||
const ReactingMultiphaseCloud<ParcelType>& cR =
|
DynamicList<scalar> Yg;
|
||||||
dynamic_cast<const ReactingMultiphaseCloud<ParcelType>&>(cloud);
|
DynamicList<scalar> Yl;
|
||||||
|
DynamicList<scalar> Ys;
|
||||||
|
|
||||||
const label idGas = cR.composition().idGas();
|
is >> Yg >> Yl >> Ys;
|
||||||
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();
|
|
||||||
|
|
||||||
YGas_.setSize(nGas);
|
YGas_.transfer(Yg);
|
||||||
YLiquid_.setSize(nLiquid);
|
YLiquid_.transfer(Yl);
|
||||||
YSolid_.setSize(nSolid);
|
YSolid_.transfer(Ys);
|
||||||
|
|
||||||
is >> YGas_ >> YLiquid_ >> YSolid_;
|
|
||||||
|
|
||||||
// scale the mass fractions
|
// scale the mass fractions
|
||||||
const scalarField& YMix = this->Y_;
|
const scalarField& YMix = this->Y_;
|
||||||
@ -82,7 +76,7 @@ Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
|||||||
(
|
(
|
||||||
"ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel"
|
"ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel"
|
||||||
"("
|
"("
|
||||||
"const Cloud<ParcelType>&, "
|
"const polyMesh&, "
|
||||||
"Istream&, "
|
"Istream&, "
|
||||||
"bool"
|
"bool"
|
||||||
")"
|
")"
|
||||||
@ -91,32 +85,44 @@ Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
|
template<class CloudType>
|
||||||
(
|
void Foam::ReactingMultiphaseParcel<ParcelType>::readFields(CloudType& c)
|
||||||
Cloud<ParcelType>& cIn
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if (!cIn.size())
|
if (!c.size())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReactingMultiphaseCloud<ParcelType>& c =
|
ParcelType::readFields(c);
|
||||||
dynamic_cast<ReactingMultiphaseCloud<ParcelType>&>(cIn);
|
}
|
||||||
|
|
||||||
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...
|
// Get names and sizes for each Y...
|
||||||
const label idGas = c.composition().idGas();
|
const label idGas = compModel.idGas();
|
||||||
const wordList& gasNames = c.composition().componentNames(idGas);
|
const wordList& gasNames = compModel.componentNames(idGas);
|
||||||
const label idLiquid = c.composition().idLiquid();
|
const label idLiquid = compModel.idLiquid();
|
||||||
const wordList& liquidNames = c.composition().componentNames(idLiquid);
|
const wordList& liquidNames = compModel.componentNames(idLiquid);
|
||||||
const label idSolid = c.composition().idSolid();
|
const label idSolid = compModel.idSolid();
|
||||||
const wordList& solidNames = c.composition().componentNames(idSolid);
|
const wordList& solidNames = compModel.componentNames(idSolid);
|
||||||
const wordList& stateLabels = c.composition().stateLabels();
|
const wordList& stateLabels = compModel.stateLabels();
|
||||||
|
|
||||||
// Set storage for each Y... for each parcel
|
// 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();
|
ReactingMultiphaseParcel<ParcelType>& p = iter();
|
||||||
p.YGas_.setSize(gasNames.size(), 0.0);
|
p.YGas_.setSize(gasNames.size(), 0.0);
|
||||||
@ -137,7 +143,12 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
|
|||||||
);
|
);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
forAllIter
|
||||||
|
(
|
||||||
|
typename Cloud<ReactingMultiphaseParcel<ParcelType> >,
|
||||||
|
c,
|
||||||
|
iter
|
||||||
|
)
|
||||||
{
|
{
|
||||||
ReactingMultiphaseParcel<ParcelType>& p = iter();
|
ReactingMultiphaseParcel<ParcelType>& p = iter();
|
||||||
p.YGas_[j] = YGas[i++]/(p.Y()[GAS] + ROOTVSMALL);
|
p.YGas_[j] = YGas[i++]/(p.Y()[GAS] + ROOTVSMALL);
|
||||||
@ -156,7 +167,12 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
|
|||||||
);
|
);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
forAllIter
|
||||||
|
(
|
||||||
|
typename Cloud<ReactingMultiphaseParcel<ParcelType> >,
|
||||||
|
c,
|
||||||
|
iter
|
||||||
|
)
|
||||||
{
|
{
|
||||||
ReactingMultiphaseParcel<ParcelType>& p = iter();
|
ReactingMultiphaseParcel<ParcelType>& p = iter();
|
||||||
p.YLiquid_[j] = YLiquid[i++]/(p.Y()[LIQ] + ROOTVSMALL);
|
p.YLiquid_[j] = YLiquid[i++]/(p.Y()[LIQ] + ROOTVSMALL);
|
||||||
@ -175,7 +191,12 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
|
|||||||
);
|
);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
forAllIter
|
||||||
|
(
|
||||||
|
typename Cloud<ReactingMultiphaseParcel<ParcelType> >,
|
||||||
|
c,
|
||||||
|
iter
|
||||||
|
)
|
||||||
{
|
{
|
||||||
ReactingMultiphaseParcel<ParcelType>& p = iter();
|
ReactingMultiphaseParcel<ParcelType>& p = iter();
|
||||||
p.YSolid_[j] = YSolid[i++]/(p.Y()[SLD] + ROOTVSMALL);
|
p.YSolid_[j] = YSolid[i++]/(p.Y()[SLD] + ROOTVSMALL);
|
||||||
@ -185,25 +206,32 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
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
|
void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields
|
||||||
(
|
(
|
||||||
const Cloud<ParcelType>& cIn
|
const CloudType& c,
|
||||||
|
const CompositionType& compModel
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const ReactingMultiphaseCloud<ParcelType>& c =
|
ParcelType::writeFields(c, compModel);
|
||||||
dynamic_cast<const ReactingMultiphaseCloud<ParcelType>&>(cIn);
|
|
||||||
|
|
||||||
ReactingParcel<ParcelType>::writeFields(c);
|
label np = c.size();
|
||||||
|
|
||||||
label np = c.size();
|
|
||||||
|
|
||||||
// Write the composition fractions
|
// Write the composition fractions
|
||||||
if (np > 0)
|
if (np > 0)
|
||||||
{
|
{
|
||||||
const wordList& stateLabels = c.composition().stateLabels();
|
const wordList& stateLabels = compModel.stateLabels();
|
||||||
|
|
||||||
const label idGas = c.composition().idGas();
|
const label idGas = compModel.idGas();
|
||||||
const wordList& gasNames = c.composition().componentNames(idGas);
|
const wordList& gasNames = compModel.componentNames(idGas);
|
||||||
forAll(gasNames, j)
|
forAll(gasNames, j)
|
||||||
{
|
{
|
||||||
IOField<scalar> YGas
|
IOField<scalar> YGas
|
||||||
@ -217,7 +245,12 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields
|
|||||||
);
|
);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
forAllConstIter
|
||||||
|
(
|
||||||
|
typename Cloud<ReactingMultiphaseParcel<ParcelType> >,
|
||||||
|
c,
|
||||||
|
iter
|
||||||
|
)
|
||||||
{
|
{
|
||||||
const ReactingMultiphaseParcel<ParcelType>& p0 = iter();
|
const ReactingMultiphaseParcel<ParcelType>& p0 = iter();
|
||||||
YGas[i++] = p0.YGas()[j]*p0.Y()[GAS];
|
YGas[i++] = p0.YGas()[j]*p0.Y()[GAS];
|
||||||
@ -226,8 +259,8 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields
|
|||||||
YGas.write();
|
YGas.write();
|
||||||
}
|
}
|
||||||
|
|
||||||
const label idLiquid = c.composition().idLiquid();
|
const label idLiquid = compModel.idLiquid();
|
||||||
const wordList& liquidNames = c.composition().componentNames(idLiquid);
|
const wordList& liquidNames = compModel.componentNames(idLiquid);
|
||||||
forAll(liquidNames, j)
|
forAll(liquidNames, j)
|
||||||
{
|
{
|
||||||
IOField<scalar> YLiquid
|
IOField<scalar> YLiquid
|
||||||
@ -241,7 +274,12 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields
|
|||||||
);
|
);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
forAllConstIter
|
||||||
|
(
|
||||||
|
typename Cloud<ReactingMultiphaseParcel<ParcelType> >,
|
||||||
|
c,
|
||||||
|
iter
|
||||||
|
)
|
||||||
{
|
{
|
||||||
const ReactingMultiphaseParcel<ParcelType>& p0 = iter();
|
const ReactingMultiphaseParcel<ParcelType>& p0 = iter();
|
||||||
YLiquid[i++] = p0.YLiquid()[j]*p0.Y()[LIQ];
|
YLiquid[i++] = p0.YLiquid()[j]*p0.Y()[LIQ];
|
||||||
@ -250,8 +288,8 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields
|
|||||||
YLiquid.write();
|
YLiquid.write();
|
||||||
}
|
}
|
||||||
|
|
||||||
const label idSolid = c.composition().idSolid();
|
const label idSolid = compModel.idSolid();
|
||||||
const wordList& solidNames = c.composition().componentNames(idSolid);
|
const wordList& solidNames = compModel.componentNames(idSolid);
|
||||||
forAll(solidNames, j)
|
forAll(solidNames, j)
|
||||||
{
|
{
|
||||||
IOField<scalar> YSolid
|
IOField<scalar> YSolid
|
||||||
@ -265,7 +303,12 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields
|
|||||||
);
|
);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
forAllConstIter
|
||||||
|
(
|
||||||
|
typename Cloud<ReactingMultiphaseParcel<ParcelType> >,
|
||||||
|
c,
|
||||||
|
iter
|
||||||
|
)
|
||||||
{
|
{
|
||||||
const ReactingMultiphaseParcel<ParcelType>& p0 = iter();
|
const ReactingMultiphaseParcel<ParcelType>& p0 = iter();
|
||||||
YSolid[i++] = p0.YSolid()[j]*p0.Y()[SLD];
|
YSolid[i++] = p0.YSolid()[j]*p0.Y()[SLD];
|
||||||
@ -291,14 +334,14 @@ Foam::Ostream& Foam::operator<<
|
|||||||
scalarField YSolidLoc(p.YSolid()*p.Y()[2]);
|
scalarField YSolidLoc(p.YSolid()*p.Y()[2]);
|
||||||
if (os.format() == IOstream::ASCII)
|
if (os.format() == IOstream::ASCII)
|
||||||
{
|
{
|
||||||
os << static_cast<const ReactingParcel<ParcelType>&>(p)
|
os << static_cast<const ParcelType&>(p)
|
||||||
<< token::SPACE << YGasLoc
|
<< token::SPACE << YGasLoc
|
||||||
<< token::SPACE << YLiquidLoc
|
<< token::SPACE << YLiquidLoc
|
||||||
<< token::SPACE << YSolidLoc;
|
<< token::SPACE << YSolidLoc;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
os << static_cast<const ReactingParcel<ParcelType>&>(p);
|
os << static_cast<const ParcelType&>(p);
|
||||||
os << YGasLoc << YLiquidLoc << YSolidLoc;
|
os << YGasLoc << YLiquidLoc << YSolidLoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,7 @@ void Foam::ReactingParcel<ParcelType>::setCellValues
|
|||||||
const label cellI
|
const label cellI
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ThermoParcel<ParcelType>::setCellValues(td, dt, cellI);
|
ParcelType::setCellValues(td, dt, cellI);
|
||||||
|
|
||||||
pc_ = td.pInterp().interpolate
|
pc_ = td.pInterp().interpolate
|
||||||
(
|
(
|
||||||
@ -252,9 +252,6 @@ void Foam::ReactingParcel<ParcelType>::calc
|
|||||||
const label cellI
|
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
|
// Define local properties at beginning of time step
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
const scalar np0 = this->nParticle_;
|
const scalar np0 = this->nParticle_;
|
||||||
@ -304,7 +301,7 @@ void Foam::ReactingParcel<ParcelType>::calc
|
|||||||
scalar NCpW = 0.0;
|
scalar NCpW = 0.0;
|
||||||
|
|
||||||
// Surface concentrations of emitted species
|
// 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
|
// Calc mass and enthalpy transfer due to phase change
|
||||||
calcPhaseChange
|
calcPhaseChange
|
||||||
@ -392,10 +389,10 @@ void Foam::ReactingParcel<ParcelType>::calc
|
|||||||
// Transfer mass lost from particle to carrier mass source
|
// Transfer mass lost from particle to carrier mass source
|
||||||
forAll(dMassPC, i)
|
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().rhoTrans(gid)[cellI] += np0*dMassPC[i];
|
||||||
td.cloud().hsTrans()[cellI] +=
|
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
|
// Update momentum transfer
|
||||||
@ -423,12 +420,13 @@ void Foam::ReactingParcel<ParcelType>::calc
|
|||||||
// Absorb parcel into carrier phase
|
// Absorb parcel into carrier phase
|
||||||
forAll(Y_, i)
|
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().rhoTrans(gid)[cellI] += np0*mass1*Y_[i];
|
||||||
}
|
}
|
||||||
td.cloud().UTrans()[cellI] += np0*mass1*U1;
|
td.cloud().UTrans()[cellI] += np0*mass1*U1;
|
||||||
td.cloud().hsTrans()[cellI] +=
|
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
|
else
|
||||||
{
|
{
|
||||||
this->Cp_ = composition.Cp(0, Y_, pc_, T1);
|
this->Cp_ = td.cloud().composition().Cp(0, Y_, pc_, T1);
|
||||||
this->T_ = T1;
|
this->T_ = T1;
|
||||||
this->U_ = U1;
|
this->U_ = U1;
|
||||||
|
|
||||||
@ -478,11 +476,6 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
|
|||||||
scalarField& Cs
|
scalarField& Cs
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
typedef typename ReactingParcel<ParcelType>::trackData::cloudType cloudType;
|
|
||||||
typedef PhaseChangeModel<cloudType> phaseChangeModelType;
|
|
||||||
const CompositionModel<cloudType>& composition = td.cloud().composition();
|
|
||||||
|
|
||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
!td.cloud().phaseChange().active()
|
!td.cloud().phaseChange().active()
|
||||||
@ -520,35 +513,19 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
|
|||||||
|
|
||||||
forAll(YComponents, i)
|
forAll(YComponents, i)
|
||||||
{
|
{
|
||||||
const label idc = composition.localToGlobalCarrierId(idPhase, i);
|
const label idc =
|
||||||
const label idl = composition.globalIds(idPhase)[i];
|
td.cloud().composition().localToGlobalCarrierId(idPhase, i);
|
||||||
|
const label idl = td.cloud().composition().globalIds(idPhase)[i];
|
||||||
|
|
||||||
// Calculate enthalpy transfer
|
const scalar dh = td.cloud().phaseChange().dh(idc, idl, pc_, T);
|
||||||
if
|
Sh -= dMassPC[i]*dh/dt;
|
||||||
(
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update particle surface thermo properties
|
// Update particle surface thermo properties
|
||||||
const scalar Dab =
|
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 Cp = td.cloud().composition().carrier().Cp(idc, Ts);
|
||||||
const scalar W = composition.carrier().W(idc);
|
const scalar W = td.cloud().composition().carrier().W(idc);
|
||||||
const scalar Ni = dMassPC[i]/(this->areaS(d)*dt*W);
|
const scalar Ni = dMassPC[i]/(this->areaS(d)*dt*W);
|
||||||
|
|
||||||
// Molar flux of species coming from the particle (kmol/m^2/s)
|
// Molar flux of species coming from the particle (kmol/m^2/s)
|
||||||
@ -571,7 +548,7 @@ Foam::ReactingParcel<ParcelType>::ReactingParcel
|
|||||||
const ReactingParcel<ParcelType>& p
|
const ReactingParcel<ParcelType>& p
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ThermoParcel<ParcelType>(p),
|
ParcelType(p),
|
||||||
mass0_(p.mass0_),
|
mass0_(p.mass0_),
|
||||||
Y_(p.Y_),
|
Y_(p.Y_),
|
||||||
pc_(p.pc_)
|
pc_(p.pc_)
|
||||||
@ -582,10 +559,10 @@ template<class ParcelType>
|
|||||||
Foam::ReactingParcel<ParcelType>::ReactingParcel
|
Foam::ReactingParcel<ParcelType>::ReactingParcel
|
||||||
(
|
(
|
||||||
const ReactingParcel<ParcelType>& p,
|
const ReactingParcel<ParcelType>& p,
|
||||||
const ReactingCloud<ParcelType>& c
|
const polyMesh& mesh
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ThermoParcel<ParcelType>(p, c),
|
ParcelType(p, mesh),
|
||||||
mass0_(p.mass0_),
|
mass0_(p.mass0_),
|
||||||
Y_(p.Y_),
|
Y_(p.Y_),
|
||||||
pc_(p.pc_)
|
pc_(p.pc_)
|
||||||
|
|||||||
@ -40,7 +40,6 @@ SourceFiles
|
|||||||
|
|
||||||
#include "ThermoParcel.H"
|
#include "ThermoParcel.H"
|
||||||
#include "ReactingCloud.H"
|
#include "ReactingCloud.H"
|
||||||
#include "reactingParcel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -64,15 +63,14 @@ Ostream& operator<<
|
|||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
class ReactingParcel
|
class ReactingParcel
|
||||||
:
|
:
|
||||||
public reactingParcel,
|
public ParcelType
|
||||||
public ThermoParcel<ParcelType>
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Class to hold reacting particle constant properties
|
//- Class to hold reacting particle constant properties
|
||||||
class constantProperties
|
class constantProperties
|
||||||
:
|
:
|
||||||
public ThermoParcel<ParcelType>::constantProperties
|
public ParcelType::constantProperties
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
@ -120,47 +118,45 @@ public:
|
|||||||
|
|
||||||
//- Return const access to the boiling point
|
//- Return const access to the boiling point
|
||||||
inline scalar Tbp() const;
|
inline scalar Tbp() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//- Class used to pass reacting tracking data to the trackToFace function
|
template<class CloudType>
|
||||||
class trackData
|
class TrackingData
|
||||||
:
|
:
|
||||||
public ThermoParcel<ParcelType>::trackData
|
public ParcelType::template TrackingData<CloudType>
|
||||||
{
|
{
|
||||||
|
private:
|
||||||
|
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Reference to the cloud containing this particle
|
// Interpolators for continuous phase fields
|
||||||
ReactingCloud<ParcelType>& cloud_;
|
|
||||||
|
//- Interpolator for continuous phase pressure field
|
||||||
|
autoPtr<interpolation<scalar> > pInterp_;
|
||||||
|
|
||||||
//- Interpolator for continuous phase pressure field
|
|
||||||
autoPtr<interpolation<scalar> > pInterp_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef ReactingCloud<ParcelType> cloudType;
|
typedef typename ParcelType::template TrackingData<CloudType>::trackPart
|
||||||
|
trackPart;
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
inline trackData
|
inline TrackingData
|
||||||
(
|
(
|
||||||
ReactingCloud<ParcelType>& cloud,
|
CloudType& cloud,
|
||||||
typename ThermoParcel<ParcelType>::trackData::trackPart
|
trackPart part = ParcelType::template
|
||||||
part = ThermoParcel<ParcelType>::trackData::tpLinearTrack
|
TrackingData<CloudType>::tpLinearTrack
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
//- Return access to the owner cloud
|
//- Return const access to the interpolator for continuous phase
|
||||||
inline ReactingCloud<ParcelType>& cloud();
|
// pressure field
|
||||||
|
|
||||||
//- Return const access to the interpolator for continuous
|
|
||||||
// phase pressure field
|
|
||||||
inline const interpolation<scalar>& pInterp() const;
|
inline const interpolation<scalar>& pInterp() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -229,16 +225,13 @@ public:
|
|||||||
TypeName("ReactingParcel");
|
TypeName("ReactingParcel");
|
||||||
|
|
||||||
|
|
||||||
friend class Cloud<ParcelType>;
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from owner, position, and cloud owner
|
//- Construct from owner, position, and cloud owner
|
||||||
// Other properties initialised as null
|
// Other properties initialised as null
|
||||||
inline ReactingParcel
|
inline ReactingParcel
|
||||||
(
|
(
|
||||||
ReactingCloud<ParcelType>& owner,
|
const polyMesh& mesh,
|
||||||
const vector& position,
|
const vector& position,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const label tetFaceI,
|
const label tetFaceI,
|
||||||
@ -248,7 +241,7 @@ public:
|
|||||||
//- Construct from components
|
//- Construct from components
|
||||||
inline ReactingParcel
|
inline ReactingParcel
|
||||||
(
|
(
|
||||||
ReactingCloud<ParcelType>& owner,
|
const polyMesh& mesh,
|
||||||
const vector& position,
|
const vector& position,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const label tetFaceI,
|
const label tetFaceI,
|
||||||
@ -268,7 +261,7 @@ public:
|
|||||||
//- Construct from Istream
|
//- Construct from Istream
|
||||||
ReactingParcel
|
ReactingParcel
|
||||||
(
|
(
|
||||||
const Cloud<ParcelType>& c,
|
const polyMesh& mesh,
|
||||||
Istream& is,
|
Istream& is,
|
||||||
bool readFields = true
|
bool readFields = true
|
||||||
);
|
);
|
||||||
@ -277,37 +270,49 @@ public:
|
|||||||
ReactingParcel
|
ReactingParcel
|
||||||
(
|
(
|
||||||
const ReactingParcel& p,
|
const ReactingParcel& p,
|
||||||
const ReactingCloud<ParcelType>& c
|
const polyMesh& mesh
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct as a copy
|
//- Construct as a copy
|
||||||
ReactingParcel(const ReactingParcel& p);
|
ReactingParcel(const ReactingParcel& p);
|
||||||
|
|
||||||
//- Construct and return a (basic particle) clone
|
//- Construct and return a (basic particle) clone
|
||||||
virtual autoPtr<Particle<ParcelType> > clone() const
|
virtual autoPtr<particle> clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<Particle<ParcelType> >
|
return autoPtr<particle>(new ReactingParcel<ParcelType>(*this));
|
||||||
(
|
|
||||||
new ReactingParcel<ParcelType>(*this)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Construct and return a (basic particle) clone
|
//- Construct and return a (basic particle) clone
|
||||||
virtual autoPtr<Particle<ParcelType> > clone
|
virtual autoPtr<particle> clone(const polyMesh& mesh) const
|
||||||
(
|
|
||||||
const Cloud<ParcelType>& c
|
|
||||||
) const
|
|
||||||
{
|
{
|
||||||
return autoPtr<Particle<ParcelType> >
|
return autoPtr<particle>
|
||||||
(
|
(
|
||||||
new ReactingParcel<ParcelType>
|
new ReactingParcel<ParcelType>(*this, mesh)
|
||||||
(
|
|
||||||
*this,
|
|
||||||
static_cast<const ReactingCloud<ParcelType>&>(c)
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//- 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
|
// Member Functions
|
||||||
|
|
||||||
@ -379,10 +384,28 @@ public:
|
|||||||
// I-O
|
// I-O
|
||||||
|
|
||||||
//- Read
|
//- 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
|
//- 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
|
// Ostream Operator
|
||||||
@ -402,6 +425,7 @@ public:
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "ReactingParcelI.H"
|
#include "ReactingParcelI.H"
|
||||||
|
#include "ReactingParcelTrackingDataI.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -26,10 +26,9 @@ License
|
|||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline
|
inline Foam::ReactingParcel<ParcelType>::constantProperties::constantProperties()
|
||||||
Foam::ReactingParcel<ParcelType>::constantProperties::constantProperties()
|
|
||||||
:
|
:
|
||||||
ThermoParcel<ParcelType>::constantProperties(),
|
ParcelType::constantProperties(),
|
||||||
pMin_(0.0),
|
pMin_(0.0),
|
||||||
constantVolume_(false),
|
constantVolume_(false),
|
||||||
Tvap_(0.0),
|
Tvap_(0.0),
|
||||||
@ -43,7 +42,7 @@ inline Foam::ReactingParcel<ParcelType>::constantProperties::constantProperties
|
|||||||
const constantProperties& cp
|
const constantProperties& cp
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ThermoParcel<ParcelType>::constantProperties(cp),
|
ParcelType::constantProperties(cp),
|
||||||
pMin_(cp.pMin_),
|
pMin_(cp.pMin_),
|
||||||
constantVolume_(cp.constantVolume_),
|
constantVolume_(cp.constantVolume_),
|
||||||
Tvap_(cp.Tvap_),
|
Tvap_(cp.Tvap_),
|
||||||
@ -58,7 +57,7 @@ inline Foam::ReactingParcel<ParcelType>::constantProperties::constantProperties
|
|||||||
const bool readFields
|
const bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ThermoParcel<ParcelType>::constantProperties(parentDict, readFields),
|
ParcelType::constantProperties(parentDict, readFields),
|
||||||
pMin_(0.0),
|
pMin_(0.0),
|
||||||
constantVolume_(false),
|
constantVolume_(false),
|
||||||
Tvap_(0.0),
|
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>
|
template<class ParcelType>
|
||||||
inline Foam::ReactingParcel<ParcelType>::ReactingParcel
|
inline Foam::ReactingParcel<ParcelType>::ReactingParcel
|
||||||
(
|
(
|
||||||
ReactingCloud<ParcelType>& owner,
|
const polyMesh& mesh,
|
||||||
const vector& position,
|
const vector& position,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const label tetFaceI,
|
const label tetFaceI,
|
||||||
const label tetPtI
|
const label tetPtI
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ThermoParcel<ParcelType>(owner, position, cellI, tetFaceI, tetPtI),
|
ParcelType(mesh, position, cellI, tetFaceI, tetPtI),
|
||||||
mass0_(0.0),
|
mass0_(0.0),
|
||||||
Y_(0),
|
Y_(0),
|
||||||
pc_(0.0)
|
pc_(0.0)
|
||||||
@ -114,7 +93,7 @@ inline Foam::ReactingParcel<ParcelType>::ReactingParcel
|
|||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::ReactingParcel<ParcelType>::ReactingParcel
|
inline Foam::ReactingParcel<ParcelType>::ReactingParcel
|
||||||
(
|
(
|
||||||
ReactingCloud<ParcelType>& owner,
|
const polyMesh& mesh,
|
||||||
const vector& position,
|
const vector& position,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const label tetFaceI,
|
const label tetFaceI,
|
||||||
@ -131,9 +110,9 @@ inline Foam::ReactingParcel<ParcelType>::ReactingParcel
|
|||||||
const constantProperties& constProps
|
const constantProperties& constProps
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ThermoParcel<ParcelType>
|
ParcelType
|
||||||
(
|
(
|
||||||
owner,
|
mesh,
|
||||||
position,
|
position,
|
||||||
cellI,
|
cellI,
|
||||||
tetFaceI,
|
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 * * * * * * * * * * * * //
|
// * * * * * * * * * * ThermoParcel Member Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
|
|||||||
@ -40,27 +40,23 @@ Foam::string Foam::ReactingParcel<ParcelType>::propHeader =
|
|||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
Foam::ReactingParcel<ParcelType>::ReactingParcel
|
Foam::ReactingParcel<ParcelType>::ReactingParcel
|
||||||
(
|
(
|
||||||
const Cloud<ParcelType>& cloud,
|
const polyMesh& mesh,
|
||||||
Istream& is,
|
Istream& is,
|
||||||
bool readFields
|
bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ThermoParcel<ParcelType>(cloud, is, readFields),
|
ParcelType(mesh, is, readFields),
|
||||||
mass0_(0.0),
|
mass0_(0.0),
|
||||||
Y_(0),
|
Y_(0),
|
||||||
pc_(0.0)
|
pc_(0.0)
|
||||||
{
|
{
|
||||||
if (readFields)
|
if (readFields)
|
||||||
{
|
{
|
||||||
const ReactingCloud<ParcelType>& cR =
|
DynamicList<scalar> Ymix;
|
||||||
dynamic_cast<const ReactingCloud<ParcelType>&>(cloud);
|
|
||||||
|
|
||||||
const label nMixture = cR.composition().phaseTypes().size();
|
|
||||||
Y_.setSize(nMixture);
|
|
||||||
|
|
||||||
if (is.format() == IOstream::ASCII)
|
if (is.format() == IOstream::ASCII)
|
||||||
{
|
{
|
||||||
is >> mass0_ >> Y_;
|
is >> mass0_ >> Ymix;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -69,8 +65,10 @@ Foam::ReactingParcel<ParcelType>::ReactingParcel
|
|||||||
reinterpret_cast<char*>(&mass0_),
|
reinterpret_cast<char*>(&mass0_),
|
||||||
+ sizeof(mass0_)
|
+ sizeof(mass0_)
|
||||||
);
|
);
|
||||||
is >> Y_;
|
is >> Ymix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Y_.transfer(Ymix);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check state of Istream
|
// Check state of Istream
|
||||||
@ -78,7 +76,7 @@ Foam::ReactingParcel<ParcelType>::ReactingParcel
|
|||||||
(
|
(
|
||||||
"ReactingParcel<ParcelType>::ReactingParcel"
|
"ReactingParcel<ParcelType>::ReactingParcel"
|
||||||
"("
|
"("
|
||||||
"const Cloud<ParcelType>&, "
|
"const polyMesh&, "
|
||||||
"Istream&, "
|
"Istream&, "
|
||||||
"bool"
|
"bool"
|
||||||
")"
|
")"
|
||||||
@ -87,40 +85,55 @@ Foam::ReactingParcel<ParcelType>::ReactingParcel
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReactingCloud<ParcelType>& c =
|
ParcelType::readFields(c);
|
||||||
dynamic_cast<ReactingCloud<ParcelType>&>(cIn);
|
}
|
||||||
|
|
||||||
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));
|
IOField<scalar> mass0(c.fieldIOobject("mass0", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, mass0);
|
c.checkFieldIOobject(c, mass0);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
forAllIter(typename Cloud<ReactingParcel<ParcelType> >, c, iter)
|
||||||
{
|
{
|
||||||
ReactingParcel<ParcelType>& p = iter();
|
ReactingParcel<ParcelType>& p = iter();
|
||||||
p.mass0_ = mass0[i++];
|
p.mass0_ = mass0[i++];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get names and sizes for each Y...
|
// Get names and sizes for each Y...
|
||||||
const wordList& phaseTypes = c.composition().phaseTypes();
|
const wordList& phaseTypes = compModel.phaseTypes();
|
||||||
const label nPhases = phaseTypes.size();
|
const label nPhases = phaseTypes.size();
|
||||||
wordList stateLabels(nPhases, "");
|
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
|
// 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();
|
ReactingParcel<ParcelType>& p = iter();
|
||||||
p.Y_.setSize(nPhases, 0.0);
|
p.Y_.setSize(nPhases, 0.0);
|
||||||
@ -139,7 +152,7 @@ void Foam::ReactingParcel<ParcelType>::readFields(Cloud<ParcelType>& cIn)
|
|||||||
);
|
);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
forAllIter(typename Cloud<ReactingParcel<ParcelType> >, c, iter)
|
||||||
{
|
{
|
||||||
ReactingParcel<ParcelType>& p = iter();
|
ReactingParcel<ParcelType>& p = iter();
|
||||||
p.Y_[j] = Y[i++];
|
p.Y_[j] = Y[i++];
|
||||||
@ -149,15 +162,22 @@ void Foam::ReactingParcel<ParcelType>::readFields(Cloud<ParcelType>& cIn)
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
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
|
void Foam::ReactingParcel<ParcelType>::writeFields
|
||||||
(
|
(
|
||||||
const Cloud<ParcelType>& cIn
|
const CloudType& c,
|
||||||
|
const CompositionType& compModel
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const ReactingCloud<ParcelType>& c =
|
ParcelType::writeFields(c);
|
||||||
dynamic_cast<const ReactingCloud<ParcelType>&>(cIn);
|
|
||||||
|
|
||||||
ThermoParcel<ParcelType>::writeFields(c);
|
|
||||||
|
|
||||||
const label np = c.size();
|
const label np = c.size();
|
||||||
|
|
||||||
@ -166,7 +186,7 @@ void Foam::ReactingParcel<ParcelType>::writeFields
|
|||||||
IOField<scalar> mass0(c.fieldIOobject("mass0", IOobject::NO_READ), np);
|
IOField<scalar> mass0(c.fieldIOobject("mass0", IOobject::NO_READ), np);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
forAllConstIter(typename Cloud<ReactingParcel<ParcelType> >, c, iter)
|
||||||
{
|
{
|
||||||
const ReactingParcel<ParcelType>& p = iter();
|
const ReactingParcel<ParcelType>& p = iter();
|
||||||
mass0[i++] = p.mass0_;
|
mass0[i++] = p.mass0_;
|
||||||
@ -174,11 +194,11 @@ void Foam::ReactingParcel<ParcelType>::writeFields
|
|||||||
mass0.write();
|
mass0.write();
|
||||||
|
|
||||||
// Write the composition fractions
|
// Write the composition fractions
|
||||||
const wordList& phaseTypes = c.composition().phaseTypes();
|
const wordList& phaseTypes = compModel.phaseTypes();
|
||||||
wordList stateLabels(phaseTypes.size(), "");
|
wordList stateLabels(phaseTypes.size(), "");
|
||||||
if (c.composition().nPhase() == 1)
|
if (compModel.nPhase() == 1)
|
||||||
{
|
{
|
||||||
stateLabels = c.composition().stateLabels();
|
stateLabels = compModel.stateLabels();
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll(phaseTypes, j)
|
forAll(phaseTypes, j)
|
||||||
@ -192,12 +212,16 @@ void Foam::ReactingParcel<ParcelType>::writeFields
|
|||||||
),
|
),
|
||||||
np
|
np
|
||||||
);
|
);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
forAllConstIter
|
||||||
|
(
|
||||||
|
typename Cloud<ReactingParcel<ParcelType> >,
|
||||||
|
c,
|
||||||
|
iter
|
||||||
|
)
|
||||||
{
|
{
|
||||||
const ReactingParcel<ParcelType>& p0 = iter();
|
const ReactingParcel<ParcelType>& p = iter();
|
||||||
Y[i++] = p0.Y()[j];
|
Y[i++] = p.Y()[j];
|
||||||
}
|
}
|
||||||
|
|
||||||
Y.write();
|
Y.write();
|
||||||
@ -217,13 +241,13 @@ Foam::Ostream& Foam::operator<<
|
|||||||
{
|
{
|
||||||
if (os.format() == IOstream::ASCII)
|
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.mass0()
|
||||||
<< token::SPACE << p.Y();
|
<< token::SPACE << p.Y();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
os << static_cast<const ThermoParcel<ParcelType>&>(p);
|
os << static_cast<const ParcelType&>(p);
|
||||||
os.write
|
os.write
|
||||||
(
|
(
|
||||||
reinterpret_cast<const char*>(&p.mass0_),
|
reinterpret_cast<const char*>(&p.mass0_),
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
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
|
const label cellI
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
KinematicParcel<ParcelType>::setCellValues(td, dt, cellI);
|
ParcelType::setCellValues(td, dt, cellI);
|
||||||
|
|
||||||
tetIndices tetIs = this->currentTetIndices();
|
tetIndices tetIs = this->currentTetIndices();
|
||||||
|
|
||||||
@ -353,7 +353,7 @@ Foam::ThermoParcel<ParcelType>::ThermoParcel
|
|||||||
const ThermoParcel<ParcelType>& p
|
const ThermoParcel<ParcelType>& p
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
KinematicParcel<ParcelType>(p),
|
ParcelType(p),
|
||||||
T_(p.T_),
|
T_(p.T_),
|
||||||
Cp_(p.Cp_),
|
Cp_(p.Cp_),
|
||||||
Tc_(p.Tc_),
|
Tc_(p.Tc_),
|
||||||
@ -365,10 +365,10 @@ template<class ParcelType>
|
|||||||
Foam::ThermoParcel<ParcelType>::ThermoParcel
|
Foam::ThermoParcel<ParcelType>::ThermoParcel
|
||||||
(
|
(
|
||||||
const ThermoParcel<ParcelType>& p,
|
const ThermoParcel<ParcelType>& p,
|
||||||
const ThermoCloud<ParcelType>& c
|
const polyMesh& mesh
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
KinematicParcel<ParcelType>(p, c),
|
ParcelType(p, mesh),
|
||||||
T_(p.T_),
|
T_(p.T_),
|
||||||
Cp_(p.Cp_),
|
Cp_(p.Cp_),
|
||||||
Tc_(p.Tc_),
|
Tc_(p.Tc_),
|
||||||
|
|||||||
@ -64,14 +64,14 @@ Ostream& operator<<
|
|||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
class ThermoParcel
|
class ThermoParcel
|
||||||
:
|
:
|
||||||
public KinematicParcel<ParcelType>
|
public ParcelType
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Class to hold thermo particle constant properties
|
//- Class to hold thermo particle constant properties
|
||||||
class constantProperties
|
class constantProperties
|
||||||
:
|
:
|
||||||
public KinematicParcel<ParcelType>::constantProperties
|
public ParcelType::constantProperties
|
||||||
{
|
{
|
||||||
|
|
||||||
// Private data
|
// Private data
|
||||||
@ -140,17 +140,15 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//- Class used to pass thermo tracking data to the trackToFace function
|
template<class CloudType>
|
||||||
class trackData
|
class TrackingData
|
||||||
:
|
:
|
||||||
public KinematicParcel<ParcelType>::trackData
|
public ParcelType::template TrackingData<CloudType>
|
||||||
{
|
{
|
||||||
|
private:
|
||||||
|
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Reference to the cloud containing this particle
|
|
||||||
ThermoCloud<ParcelType>& cloud_;
|
|
||||||
|
|
||||||
//- Local copy of carrier specific heat field
|
//- Local copy of carrier specific heat field
|
||||||
// Cp not stored on acrrier thermo, but returned as tmp<...>
|
// Cp not stored on acrrier thermo, but returned as tmp<...>
|
||||||
const volScalarField Cp_;
|
const volScalarField Cp_;
|
||||||
@ -168,24 +166,25 @@ public:
|
|||||||
autoPtr<interpolation<scalar> > GInterp_;
|
autoPtr<interpolation<scalar> > GInterp_;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
typedef typename ParcelType::template TrackingData<CloudType>::trackPart
|
||||||
|
trackPart;
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
inline trackData
|
inline TrackingData
|
||||||
(
|
(
|
||||||
ThermoCloud<ParcelType>& cloud,
|
CloudType& cloud,
|
||||||
typename KinematicParcel<ParcelType>::trackData::trackPart
|
trackPart part = ParcelType::template
|
||||||
part = KinematicParcel<ParcelType>::trackData::tpLinearTrack
|
TrackingData<CloudType>::tpLinearTrack
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
//- Return access to the owner cloud
|
|
||||||
inline ThermoCloud<ParcelType>& cloud();
|
|
||||||
|
|
||||||
//- Return access to the locally stored carrier Cp field
|
//- Return access to the locally stored carrier Cp field
|
||||||
inline const volScalarField& Cp() const;
|
inline const volScalarField& Cp() const;
|
||||||
|
|
||||||
@ -259,16 +258,13 @@ public:
|
|||||||
TypeName("ThermoParcel");
|
TypeName("ThermoParcel");
|
||||||
|
|
||||||
|
|
||||||
friend class Cloud<ParcelType>;
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from owner, position, and cloud owner
|
//- Construct from owner, position, and cloud owner
|
||||||
// Other properties initialised as null
|
// Other properties initialised as null
|
||||||
inline ThermoParcel
|
inline ThermoParcel
|
||||||
(
|
(
|
||||||
ThermoCloud<ParcelType>& owner,
|
const polyMesh& mesh,
|
||||||
const vector& position,
|
const vector& position,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const label tetFaceI,
|
const label tetFaceI,
|
||||||
@ -278,7 +274,7 @@ public:
|
|||||||
//- Construct from components
|
//- Construct from components
|
||||||
inline ThermoParcel
|
inline ThermoParcel
|
||||||
(
|
(
|
||||||
ThermoCloud<ParcelType>& owner,
|
const polyMesh& mesh,
|
||||||
const vector& position,
|
const vector& position,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const label tetFaceI,
|
const label tetFaceI,
|
||||||
@ -297,7 +293,7 @@ public:
|
|||||||
//- Construct from Istream
|
//- Construct from Istream
|
||||||
ThermoParcel
|
ThermoParcel
|
||||||
(
|
(
|
||||||
const Cloud<ParcelType>& c,
|
const polyMesh& mesh,
|
||||||
Istream& is,
|
Istream& is,
|
||||||
bool readFields = true
|
bool readFields = true
|
||||||
);
|
);
|
||||||
@ -306,29 +302,41 @@ public:
|
|||||||
ThermoParcel(const ThermoParcel& p);
|
ThermoParcel(const ThermoParcel& p);
|
||||||
|
|
||||||
//- Construct as a copy
|
//- 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
|
//- 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
|
//- Construct and return a (basic particle) clone
|
||||||
virtual autoPtr<Particle<ParcelType> > clone
|
virtual autoPtr<particle> clone(const polyMesh& mesh) const
|
||||||
(
|
|
||||||
const Cloud<ParcelType>& c
|
|
||||||
) const
|
|
||||||
{
|
{
|
||||||
return autoPtr<Particle<ParcelType> >
|
return autoPtr<particle>(new ThermoParcel(*this, mesh));
|
||||||
(
|
}
|
||||||
new ThermoParcel
|
|
||||||
|
//- 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> >
|
||||||
(
|
(
|
||||||
*this,
|
new ThermoParcel<ParcelType>(mesh_, is, true)
|
||||||
static_cast<const ThermoCloud<ParcelType>&>(c)
|
);
|
||||||
)
|
}
|
||||||
);
|
};
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -407,10 +415,12 @@ public:
|
|||||||
// I-O
|
// I-O
|
||||||
|
|
||||||
//- Read
|
//- Read
|
||||||
static void readFields(Cloud<ParcelType>& c);
|
template<class CloudType>
|
||||||
|
static void readFields(CloudType& c);
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
static void writeFields(const Cloud<ParcelType>& c);
|
template<class CloudType>
|
||||||
|
static void writeFields(const CloudType& c);
|
||||||
|
|
||||||
|
|
||||||
// Ostream Operator
|
// Ostream Operator
|
||||||
@ -430,6 +440,7 @@ public:
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "ThermoParcelI.H"
|
#include "ThermoParcelI.H"
|
||||||
|
#include "ThermoParcelTrackingDataI.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -28,7 +28,7 @@ License
|
|||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::ThermoParcel<ParcelType>::constantProperties::constantProperties()
|
inline Foam::ThermoParcel<ParcelType>::constantProperties::constantProperties()
|
||||||
:
|
:
|
||||||
KinematicParcel<ParcelType>::constantProperties(),
|
ParcelType::constantProperties(),
|
||||||
T0_(0.0),
|
T0_(0.0),
|
||||||
TMin_(0.0),
|
TMin_(0.0),
|
||||||
Cp0_(0.0),
|
Cp0_(0.0),
|
||||||
@ -44,7 +44,7 @@ inline Foam::ThermoParcel<ParcelType>::constantProperties::constantProperties
|
|||||||
const constantProperties& cp
|
const constantProperties& cp
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
KinematicParcel<ParcelType>::constantProperties(cp),
|
ParcelType::constantProperties(cp),
|
||||||
T0_(cp.T0_),
|
T0_(cp.T0_),
|
||||||
TMin_(cp.TMin_),
|
TMin_(cp.TMin_),
|
||||||
Cp0_(cp.Cp0_),
|
Cp0_(cp.Cp0_),
|
||||||
@ -61,7 +61,7 @@ inline Foam::ThermoParcel<ParcelType>::constantProperties::constantProperties
|
|||||||
const bool readFields
|
const bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
KinematicParcel<ParcelType>::constantProperties(parentDict, readFields),
|
ParcelType::constantProperties(parentDict, readFields),
|
||||||
T0_(0.0),
|
T0_(0.0),
|
||||||
TMin_(0.0),
|
TMin_(0.0),
|
||||||
Cp0_(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>
|
template<class ParcelType>
|
||||||
inline Foam::ThermoParcel<ParcelType>::ThermoParcel
|
inline Foam::ThermoParcel<ParcelType>::ThermoParcel
|
||||||
(
|
(
|
||||||
ThermoCloud<ParcelType>& owner,
|
const polyMesh& mesh,
|
||||||
const vector& position,
|
const vector& position,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const label tetFaceI,
|
const label tetFaceI,
|
||||||
const label tetPtI
|
const label tetPtI
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
KinematicParcel<ParcelType>(owner, position, cellI, tetFaceI, tetPtI),
|
ParcelType(mesh, position, cellI, tetFaceI, tetPtI),
|
||||||
T_(0.0),
|
T_(0.0),
|
||||||
Cp_(0.0),
|
Cp_(0.0),
|
||||||
Tc_(0.0),
|
Tc_(0.0),
|
||||||
@ -156,7 +102,7 @@ inline Foam::ThermoParcel<ParcelType>::ThermoParcel
|
|||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::ThermoParcel<ParcelType>::ThermoParcel
|
inline Foam::ThermoParcel<ParcelType>::ThermoParcel
|
||||||
(
|
(
|
||||||
ThermoCloud<ParcelType>& owner,
|
const polyMesh& mesh,
|
||||||
const vector& position,
|
const vector& position,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const label tetFaceI,
|
const label tetFaceI,
|
||||||
@ -172,9 +118,9 @@ inline Foam::ThermoParcel<ParcelType>::ThermoParcel
|
|||||||
const constantProperties& constProps
|
const constantProperties& constProps
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
KinematicParcel<ParcelType>
|
ParcelType
|
||||||
(
|
(
|
||||||
owner,
|
mesh,
|
||||||
position,
|
position,
|
||||||
cellI,
|
cellI,
|
||||||
tetFaceI,
|
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 * * * * * * * * * * * * //
|
// * * * * * * * * * * ThermoParcel Member Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
|
|||||||
@ -30,7 +30,7 @@ License
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
Foam::string Foam::ThermoParcel<ParcelType>::propHeader =
|
Foam::string Foam::ThermoParcel<ParcelType>::propHeader =
|
||||||
KinematicParcel<ParcelType>::propHeader
|
ParcelType::propHeader
|
||||||
+ " T"
|
+ " T"
|
||||||
+ " Cp";
|
+ " Cp";
|
||||||
|
|
||||||
@ -40,12 +40,12 @@ Foam::string Foam::ThermoParcel<ParcelType>::propHeader =
|
|||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
Foam::ThermoParcel<ParcelType>::ThermoParcel
|
Foam::ThermoParcel<ParcelType>::ThermoParcel
|
||||||
(
|
(
|
||||||
const Cloud<ParcelType>& cloud,
|
const polyMesh& mesh,
|
||||||
Istream& is,
|
Istream& is,
|
||||||
bool readFields
|
bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
KinematicParcel<ParcelType>(cloud, is, readFields),
|
ParcelType(mesh, is, readFields),
|
||||||
T_(0.0),
|
T_(0.0),
|
||||||
Cp_(0.0),
|
Cp_(0.0),
|
||||||
Tc_(0.0),
|
Tc_(0.0),
|
||||||
@ -72,20 +72,21 @@ Foam::ThermoParcel<ParcelType>::ThermoParcel
|
|||||||
// Check state of Istream
|
// Check state of Istream
|
||||||
is.check
|
is.check
|
||||||
(
|
(
|
||||||
"ThermoParcel::ThermoParcel(const Cloud<ParcelType>&, Istream&, bool)"
|
"ThermoParcel::ThermoParcel(const polyMesh&, Istream&, bool)"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::ThermoParcel<ParcelType>::readFields(Cloud<ParcelType>& c)
|
template<class CloudType>
|
||||||
|
void Foam::ThermoParcel<ParcelType>::readFields(CloudType& c)
|
||||||
{
|
{
|
||||||
if (!c.size())
|
if (!c.size())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
KinematicParcel<ParcelType>::readFields(c);
|
ParcelType::readFields(c);
|
||||||
|
|
||||||
IOField<scalar> T(c.fieldIOobject("T", IOobject::MUST_READ));
|
IOField<scalar> T(c.fieldIOobject("T", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, T);
|
c.checkFieldIOobject(c, T);
|
||||||
@ -95,7 +96,7 @@ void Foam::ThermoParcel<ParcelType>::readFields(Cloud<ParcelType>& c)
|
|||||||
|
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
forAllIter(typename Cloud<ThermoParcel<ParcelType> >, c, iter)
|
||||||
{
|
{
|
||||||
ThermoParcel<ParcelType>& p = iter();
|
ThermoParcel<ParcelType>& p = iter();
|
||||||
|
|
||||||
@ -107,9 +108,10 @@ void Foam::ThermoParcel<ParcelType>::readFields(Cloud<ParcelType>& c)
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
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();
|
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);
|
IOField<scalar> Cp(c.fieldIOobject("Cp", IOobject::NO_READ), np);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
forAllConstIter(typename Cloud<ThermoParcel<ParcelType> >, c, iter)
|
||||||
{
|
{
|
||||||
const ThermoParcel<ParcelType>& p = iter();
|
const ThermoParcel<ParcelType>& p = iter();
|
||||||
|
|
||||||
@ -142,13 +144,13 @@ Foam::Ostream& Foam::operator<<
|
|||||||
{
|
{
|
||||||
if (os.format() == IOstream::ASCII)
|
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.T()
|
||||||
<< token::SPACE << p.Cp();
|
<< token::SPACE << p.Cp();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
os << static_cast<const KinematicParcel<ParcelType>&>(p);
|
os << static_cast<const ParcelType&>(p);
|
||||||
os.write
|
os.write
|
||||||
(
|
(
|
||||||
reinterpret_cast<const char*>(&p.T_),
|
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,130 +25,33 @@ Class
|
|||||||
Foam::basicKinematicParcel
|
Foam::basicKinematicParcel
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
Definition of basic kinematic parcel
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
basicKinematicParcel.C
|
basicKinematicParcel.H
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef basicKinematicParcel_H
|
#ifndef basicKinematicParcel_H
|
||||||
#define basicKinematicParcel_H
|
#define basicKinematicParcel_H
|
||||||
|
|
||||||
|
#include "contiguous.H"
|
||||||
|
#include "particle.H"
|
||||||
#include "KinematicParcel.H"
|
#include "KinematicParcel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
typedef KinematicParcel<particle> basicKinematicParcel;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
template<>
|
||||||
Class basicKinematicParcel Declaration
|
inline bool contiguous<basicKinematicParcel>()
|
||||||
\*---------------------------------------------------------------------------*/
|
{
|
||||||
|
return true;
|
||||||
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();
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
template<>
|
|
||||||
inline bool contiguous<basicKinematicParcel>()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -24,13 +24,14 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "basicKinematicParcel.H"
|
#include "basicKinematicParcel.H"
|
||||||
#include "createKinematicParcelTypes.H"
|
#include "Cloud.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
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
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -25,7 +25,7 @@ Class
|
|||||||
Foam::BasicReactingMultiphaseParcel
|
Foam::BasicReactingMultiphaseParcel
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
Definition of basic reacting parcel
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
basicReactingMultiphaseParcel.C
|
basicReactingMultiphaseParcel.C
|
||||||
@ -36,123 +36,38 @@ SourceFiles
|
|||||||
#ifndef basicReactingMultiphaseParcel_H
|
#ifndef basicReactingMultiphaseParcel_H
|
||||||
#define basicReactingMultiphaseParcel_H
|
#define basicReactingMultiphaseParcel_H
|
||||||
|
|
||||||
|
#include "contiguous.H"
|
||||||
|
#include "particle.H"
|
||||||
|
#include "KinematicParcel.H"
|
||||||
|
#include "ThermoParcel.H"
|
||||||
|
#include "ReactingParcel.H"
|
||||||
#include "ReactingMultiphaseParcel.H"
|
#include "ReactingMultiphaseParcel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
typedef ReactingMultiphaseParcel
|
||||||
|
<
|
||||||
|
ReactingParcel
|
||||||
|
<
|
||||||
|
ThermoParcel
|
||||||
|
<
|
||||||
|
KinematicParcel
|
||||||
|
<
|
||||||
|
particle
|
||||||
|
>
|
||||||
|
>
|
||||||
|
>
|
||||||
|
> basicReactingMultiphaseParcel;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
template<>
|
||||||
Class basicReactingMultiphaseParcel Declaration
|
inline bool contiguous<basicReactingMultiphaseParcel>()
|
||||||
\*---------------------------------------------------------------------------*/
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class basicReactingMultiphaseParcel
|
|
||||||
:
|
|
||||||
public ReactingMultiphaseParcel<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)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
//- 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
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -23,14 +23,15 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "createReactingMultiphaseParcelTypes.H"
|
|
||||||
#include "basicReactingMultiphaseParcel.H"
|
#include "basicReactingMultiphaseParcel.H"
|
||||||
|
#include "Cloud.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
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
|
Foam::basicReactingParcel
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
Definition of basic reacting parcel
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
basicReactingParcel.C
|
basicReactingParcel.C
|
||||||
@ -35,121 +35,26 @@ SourceFiles
|
|||||||
#ifndef basicReactingParcel_H
|
#ifndef basicReactingParcel_H
|
||||||
#define basicReactingParcel_H
|
#define basicReactingParcel_H
|
||||||
|
|
||||||
|
#include "contiguous.H"
|
||||||
|
#include "particle.H"
|
||||||
|
#include "KinematicParcel.H"
|
||||||
|
#include "ThermoParcel.H"
|
||||||
#include "ReactingParcel.H"
|
#include "ReactingParcel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
typedef ReactingParcel<ThermoParcel<KinematicParcel<particle> > >
|
||||||
|
basicReactingParcel;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
template<>
|
||||||
Class basicReactingParcel Declaration
|
inline bool contiguous<basicReactingParcel>()
|
||||||
\*---------------------------------------------------------------------------*/
|
{
|
||||||
|
return false;
|
||||||
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();
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
template<>
|
|
||||||
inline bool contiguous<basicReactingParcel>()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -24,13 +24,14 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "basicReactingParcel.H"
|
#include "basicReactingParcel.H"
|
||||||
#include "createReactingParcelTypes.H"
|
#include "Cloud.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
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
|
Foam::basicThermoParcel
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
Definition of basic thermo parcel
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
basicThermoParcel.C
|
basicThermoParcel.C
|
||||||
@ -35,119 +35,24 @@ SourceFiles
|
|||||||
#ifndef basicThermoParcel_H
|
#ifndef basicThermoParcel_H
|
||||||
#define basicThermoParcel_H
|
#define basicThermoParcel_H
|
||||||
|
|
||||||
|
#include "contiguous.H"
|
||||||
|
#include "particle.H"
|
||||||
|
#include "KinematicParcel.H"
|
||||||
#include "ThermoParcel.H"
|
#include "ThermoParcel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
typedef ThermoParcel<KinematicParcel<particle> > basicThermoParcel;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
template<>
|
||||||
Class basicThermoParcel Declaration
|
inline bool contiguous<basicThermoParcel>()
|
||||||
\*---------------------------------------------------------------------------*/
|
{
|
||||||
|
return true;
|
||||||
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();
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
template<>
|
|
||||||
inline bool contiguous<basicThermoParcel>()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,14 +24,14 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "basicThermoParcel.H"
|
#include "basicThermoParcel.H"
|
||||||
#include "createThermoParcelTypes.H"
|
#include "Cloud.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
createThermoParcelTypes(basicThermoParcel);
|
defineTemplateTypeNameAndDebug(basicThermoParcel, 0);
|
||||||
|
defineTemplateTypeNameAndDebug(Cloud<basicThermoParcel>, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -26,11 +26,24 @@ License
|
|||||||
#ifndef createKinematicParcelTypes_H
|
#ifndef createKinematicParcelTypes_H
|
||||||
#define createKinematicParcelTypes_H
|
#define createKinematicParcelTypes_H
|
||||||
|
|
||||||
#include "KinematicParcel.H"
|
#include "Cloud.H"
|
||||||
#include "KinematicCloud.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) \
|
#define createKinematicParcelTypes(ParcelType) \
|
||||||
\
|
\
|
||||||
defineTypeNameAndDebug(ParcelType, 0); \
|
defineTypeNameAndDebug(ParcelType, 0); \
|
||||||
@ -39,7 +52,10 @@ License
|
|||||||
\
|
\
|
||||||
defineParcelTypeNameAndDebug(KinematicParcel<ParcelType>, 0); \
|
defineParcelTypeNameAndDebug(KinematicParcel<ParcelType>, 0); \
|
||||||
defineTemplateTypeNameAndDebug(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
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -26,9 +26,6 @@ License
|
|||||||
#ifndef createThermoParcelTypes_H
|
#ifndef createThermoParcelTypes_H
|
||||||
#define createThermoParcelTypes_H
|
#define createThermoParcelTypes_H
|
||||||
|
|
||||||
#include "ThermoParcel.H"
|
|
||||||
#include "ThermoCloud.H"
|
|
||||||
|
|
||||||
#include "createKinematicParcelTypes.H"
|
#include "createKinematicParcelTypes.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -37,10 +34,20 @@ License
|
|||||||
\
|
\
|
||||||
createKinematicParcelTypes(ParcelType); \
|
createKinematicParcelTypes(ParcelType); \
|
||||||
\
|
\
|
||||||
|
defineTemplateTypeNameAndDebug(Cloud<ParcelType>, 0); \
|
||||||
|
|
||||||
|
/*
|
||||||
|
createKinematicParcelTypes(ParcelType); \
|
||||||
|
\
|
||||||
|
typedef ThermoParcel<KinematicParcel<particle> > ThermoParcelType; \
|
||||||
|
defineTemplateTypeNameAndDebug(Cloud<ThermoParcelType>, 0);
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
defineParcelTypeNameAndDebug(ThermoParcel<ParcelType>, 0); \
|
defineParcelTypeNameAndDebug(ThermoParcel<ParcelType>, 0); \
|
||||||
defineTemplateTypeNameAndDebug(ThermoParcel<ParcelType>, 0); \
|
defineTemplateTypeNameAndDebug(ThermoParcel<ParcelType>, 0); \
|
||||||
defineParcelTypeNameAndDebug(ThermoCloud<ParcelType>, 0);
|
defineParcelTypeNameAndDebug(ThermoCloud<ParcelType>, 0);
|
||||||
|
*/
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -28,6 +28,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "Cloud.H"
|
||||||
#include "KinematicCloud.H"
|
#include "KinematicCloud.H"
|
||||||
|
|
||||||
#include "NoCollision.H"
|
#include "NoCollision.H"
|
||||||
@ -42,46 +43,18 @@ License
|
|||||||
|
|
||||||
#define makeParcelCollisionModels(ParcelType) \
|
#define makeParcelCollisionModels(ParcelType) \
|
||||||
\
|
\
|
||||||
makeCollisionModel(KinematicCloud<ParcelType>); \
|
typedef KinematicCloud<Cloud<ParcelType> > KC##ParcelType; \
|
||||||
\
|
\
|
||||||
makeCollisionModelType \
|
makeCollisionModel(KC##ParcelType); \
|
||||||
( \
|
makeCollisionModelType(NoCollision, KC##ParcelType); \
|
||||||
NoCollision, \
|
makeCollisionModelType(PairCollision, KC##ParcelType); \
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
\
|
\
|
||||||
makeCollisionModelType \
|
makePairModel(KC##ParcelType); \
|
||||||
( \
|
makePairModelType(PairSpringSliderDashpot, KC##ParcelType); \
|
||||||
PairCollision, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
\
|
\
|
||||||
makePairModel(KinematicCloud<ParcelType>); \
|
makeWallModel(KC##ParcelType); \
|
||||||
\
|
makeWallModelType(WallSpringSliderDashpot, KC##ParcelType); \
|
||||||
makePairModelType \
|
makeWallModelType(WallLocalSpringSliderDashpot, KC##ParcelType);
|
||||||
( \
|
|
||||||
PairSpringSliderDashpot, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
\
|
|
||||||
makeWallModel(KinematicCloud<ParcelType>); \
|
|
||||||
\
|
|
||||||
makeWallModelType \
|
|
||||||
( \
|
|
||||||
WallSpringSliderDashpot, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
\
|
|
||||||
makeWallModelType \
|
|
||||||
( \
|
|
||||||
WallLocalSpringSliderDashpot, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -28,6 +28,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "Cloud.H"
|
||||||
#include "KinematicCloud.H"
|
#include "KinematicCloud.H"
|
||||||
|
|
||||||
#include "NoDispersion.H"
|
#include "NoDispersion.H"
|
||||||
@ -38,32 +39,19 @@ License
|
|||||||
|
|
||||||
#define makeParcelDispersionModels(ParcelType) \
|
#define makeParcelDispersionModels(ParcelType) \
|
||||||
\
|
\
|
||||||
makeDispersionModel(KinematicCloud<ParcelType>); \
|
typedef KinematicCloud<Cloud<ParcelType> > KC##ParcelType; \
|
||||||
|
\
|
||||||
|
makeDispersionModel(KC##ParcelType); \
|
||||||
\
|
\
|
||||||
defineNamedTemplateTypeNameAndDebug \
|
defineNamedTemplateTypeNameAndDebug \
|
||||||
( \
|
( \
|
||||||
DispersionRASModel<KinematicCloud<ParcelType> >, \
|
DispersionRASModel<KC##ParcelType>, \
|
||||||
0 \
|
0 \
|
||||||
); \
|
); \
|
||||||
\
|
\
|
||||||
makeDispersionModelType \
|
makeDispersionModelType(NoDispersion, KC##ParcelType); \
|
||||||
( \
|
makeDispersionModelType(GradientDispersionRAS, KC##ParcelType); \
|
||||||
NoDispersion, \
|
makeDispersionModelType(StochasticDispersionRAS, KC##ParcelType);
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makeDispersionModelType \
|
|
||||||
( \
|
|
||||||
GradientDispersionRAS, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makeDispersionModelType \
|
|
||||||
( \
|
|
||||||
StochasticDispersionRAS, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -28,6 +28,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "Cloud.H"
|
||||||
#include "KinematicCloud.H"
|
#include "KinematicCloud.H"
|
||||||
|
|
||||||
#include "SphereDragForce.H"
|
#include "SphereDragForce.H"
|
||||||
@ -42,44 +43,15 @@ License
|
|||||||
|
|
||||||
#define makeParcelForces(ParcelType) \
|
#define makeParcelForces(ParcelType) \
|
||||||
\
|
\
|
||||||
makeParticleForceModel(KinematicCloud<ParcelType>); \
|
typedef KinematicCloud<Cloud<ParcelType> > KC##ParcelType; \
|
||||||
\
|
\
|
||||||
makeParticleForceModelType \
|
makeParticleForceModel(KC##ParcelType); \
|
||||||
( \
|
makeParticleForceModelType(SphereDragForce, KC##ParcelType); \
|
||||||
SphereDragForce, \
|
makeParticleForceModelType(NonSphereDragForce, KC##ParcelType); \
|
||||||
KinematicCloud, \
|
makeParticleForceModelType(GravityForce, KC##ParcelType); \
|
||||||
ParcelType \
|
makeParticleForceModelType(ParamagneticForce, KC##ParcelType); \
|
||||||
); \
|
makeParticleForceModelType(PressureGradientForce, KC##ParcelType); \
|
||||||
makeParticleForceModelType \
|
makeParticleForceModelType(SRFForce, KC##ParcelType);
|
||||||
( \
|
|
||||||
NonSphereDragForce, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makeParticleForceModelType \
|
|
||||||
( \
|
|
||||||
GravityForce, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makeParticleForceModelType \
|
|
||||||
( \
|
|
||||||
ParamagneticForce, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makeParticleForceModelType \
|
|
||||||
( \
|
|
||||||
PressureGradientForce, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makeParticleForceModelType \
|
|
||||||
( \
|
|
||||||
SRFForce, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -28,6 +28,8 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "Cloud.H"
|
||||||
|
#include "KinematicCloud.H"
|
||||||
#include "ThermoCloud.H"
|
#include "ThermoCloud.H"
|
||||||
|
|
||||||
#include "NoHeatTransfer.H"
|
#include "NoHeatTransfer.H"
|
||||||
@ -37,20 +39,12 @@ License
|
|||||||
|
|
||||||
#define makeParcelHeatTransferModels(ParcelType) \
|
#define makeParcelHeatTransferModels(ParcelType) \
|
||||||
\
|
\
|
||||||
makeHeatTransferModel(ThermoCloud<ParcelType>); \
|
typedef ThermoCloud<KinematicCloud<Cloud<ParcelType> > > TKC##ParcelType; \
|
||||||
\
|
\
|
||||||
makeHeatTransferModelType \
|
makeHeatTransferModel(TKC##ParcelType); \
|
||||||
( \
|
\
|
||||||
NoHeatTransfer, \
|
makeHeatTransferModelType(NoHeatTransfer, TKC##ParcelType); \
|
||||||
ThermoCloud, \
|
makeHeatTransferModelType(RanzMarshall, TKC##ParcelType);
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makeHeatTransferModelType \
|
|
||||||
( \
|
|
||||||
RanzMarshall, \
|
|
||||||
ThermoCloud, \
|
|
||||||
ParcelType \
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -28,6 +28,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "Cloud.H"
|
||||||
#include "KinematicCloud.H"
|
#include "KinematicCloud.H"
|
||||||
|
|
||||||
#include "ConeInjection.H"
|
#include "ConeInjection.H"
|
||||||
@ -43,50 +44,17 @@ License
|
|||||||
|
|
||||||
#define makeParcelInjectionModels(ParcelType) \
|
#define makeParcelInjectionModels(ParcelType) \
|
||||||
\
|
\
|
||||||
makeInjectionModel(KinematicCloud<ParcelType>); \
|
typedef KinematicCloud<Cloud<ParcelType> > KC##ParcelType; \
|
||||||
\
|
\
|
||||||
makeInjectionModelType \
|
makeInjectionModel(KC##ParcelType); \
|
||||||
( \
|
\
|
||||||
ConeInjection, \
|
makeInjectionModelType(ConeInjection, KC##ParcelType); \
|
||||||
KinematicCloud, \
|
makeInjectionModelType(FieldActivatedInjection, KC##ParcelType); \
|
||||||
ParcelType \
|
makeInjectionModelType(InflationInjection, KC##ParcelType); \
|
||||||
); \
|
makeInjectionModelType(KinematicLookupTableInjection, KC##ParcelType); \
|
||||||
makeInjectionModelType \
|
makeInjectionModelType(ManualInjection, KC##ParcelType); \
|
||||||
( \
|
makeInjectionModelType(NoInjection, KC##ParcelType); \
|
||||||
FieldActivatedInjection, \
|
makeInjectionModelType(PatchInjection, KC##ParcelType);
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makeInjectionModelType \
|
|
||||||
( \
|
|
||||||
InflationInjection, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makeInjectionModelType \
|
|
||||||
( \
|
|
||||||
KinematicLookupTableInjection, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makeInjectionModelType \
|
|
||||||
( \
|
|
||||||
ManualInjection, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makeInjectionModelType \
|
|
||||||
( \
|
|
||||||
NoInjection, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makeInjectionModelType \
|
|
||||||
( \
|
|
||||||
PatchInjection, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -28,6 +28,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "Cloud.H"
|
||||||
#include "KinematicCloud.H"
|
#include "KinematicCloud.H"
|
||||||
|
|
||||||
#include "LocalInteraction.H"
|
#include "LocalInteraction.H"
|
||||||
@ -39,32 +40,14 @@ License
|
|||||||
|
|
||||||
#define makeParcelPatchInteractionModels(ParcelType) \
|
#define makeParcelPatchInteractionModels(ParcelType) \
|
||||||
\
|
\
|
||||||
makePatchInteractionModel(KinematicCloud<ParcelType>); \
|
typedef KinematicCloud<Cloud<ParcelType> > KC##ParcelType; \
|
||||||
\
|
\
|
||||||
makePatchInteractionModelType \
|
makePatchInteractionModel(KC##ParcelType); \
|
||||||
( \
|
\
|
||||||
LocalInteraction, \
|
makePatchInteractionModelType(LocalInteraction, KC##ParcelType); \
|
||||||
KinematicCloud, \
|
makePatchInteractionModelType(NoInteraction, KC##ParcelType); \
|
||||||
ParcelType \
|
makePatchInteractionModelType(Rebound, KC##ParcelType); \
|
||||||
); \
|
makePatchInteractionModelType(StandardWallInteraction, KC##ParcelType);
|
||||||
makePatchInteractionModelType \
|
|
||||||
( \
|
|
||||||
NoInteraction, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makePatchInteractionModelType \
|
|
||||||
( \
|
|
||||||
Rebound, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makePatchInteractionModelType \
|
|
||||||
( \
|
|
||||||
StandardWallInteraction, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -28,6 +28,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "Cloud.H"
|
||||||
#include "KinematicCloud.H"
|
#include "KinematicCloud.H"
|
||||||
|
|
||||||
#include "NoPostProcessing.H"
|
#include "NoPostProcessing.H"
|
||||||
@ -38,26 +39,13 @@ License
|
|||||||
|
|
||||||
#define makeParcelPostProcessingModels(ParcelType) \
|
#define makeParcelPostProcessingModels(ParcelType) \
|
||||||
\
|
\
|
||||||
makePostProcessingModel(KinematicCloud<ParcelType>); \
|
typedef KinematicCloud<Cloud<ParcelType> > KC##ParcelType; \
|
||||||
\
|
\
|
||||||
makePostProcessingModelType \
|
makePostProcessingModel(KC##ParcelType); \
|
||||||
( \
|
\
|
||||||
NoPostProcessing, \
|
makePostProcessingModelType(NoPostProcessing, KC##ParcelType); \
|
||||||
KinematicCloud, \
|
makePostProcessingModelType(ParticleTracks, KC##ParcelType); \
|
||||||
ParcelType \
|
makePostProcessingModelType(PatchPostProcessing, KC##ParcelType);
|
||||||
); \
|
|
||||||
makePostProcessingModelType \
|
|
||||||
( \
|
|
||||||
ParticleTracks, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makePostProcessingModelType \
|
|
||||||
( \
|
|
||||||
PatchPostProcessing, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -28,6 +28,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "Cloud.H"
|
||||||
#include "KinematicCloud.H"
|
#include "KinematicCloud.H"
|
||||||
|
|
||||||
#include "NoSurfaceFilm.H"
|
#include "NoSurfaceFilm.H"
|
||||||
@ -36,14 +37,10 @@ License
|
|||||||
|
|
||||||
#define makeParcelSurfaceFilmModels(ParcelType) \
|
#define makeParcelSurfaceFilmModels(ParcelType) \
|
||||||
\
|
\
|
||||||
makeSurfaceFilmModel(KinematicCloud<ParcelType>); \
|
typedef KinematicCloud<Cloud<ParcelType> > KC##ParcelType; \
|
||||||
\
|
\
|
||||||
makeSurfaceFilmModelType \
|
makeSurfaceFilmModel(KC##ParcelType); \
|
||||||
( \
|
makeSurfaceFilmModelType(NoSurfaceFilm, KC##ParcelType);
|
||||||
NoSurfaceFilm, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
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 "NoComposition.H"
|
||||||
#include "SingleMixtureFraction.H"
|
#include "SingleMixtureFraction.H"
|
||||||
|
|
||||||
@ -36,21 +40,12 @@ License
|
|||||||
|
|
||||||
#define makeReactingMultiphaseParcelCompositionModels(ParcelType) \
|
#define makeReactingMultiphaseParcelCompositionModels(ParcelType) \
|
||||||
\
|
\
|
||||||
makeCompositionModel(ReactingCloud<ParcelType>); \
|
typedef ReactingCloud<ThermoCloud<KinematicCloud<Cloud<ParcelType> > > > \
|
||||||
|
RTKC##ParcelType; \
|
||||||
\
|
\
|
||||||
makeCompositionModelType \
|
makeCompositionModel(RTKC##ParcelType); \
|
||||||
( \
|
makeCompositionModelType(NoComposition, RTKC##ParcelType); \
|
||||||
NoComposition, \
|
makeCompositionModelType(SingleMixtureFraction, RTKC##ParcelType);
|
||||||
ReactingCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
\
|
|
||||||
makeCompositionModelType \
|
|
||||||
( \
|
|
||||||
SingleMixtureFraction, \
|
|
||||||
ReactingCloud, \
|
|
||||||
ParcelType \
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -28,6 +28,10 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "Cloud.H"
|
||||||
|
#include "KinematicCloud.H"
|
||||||
|
#include "ThermoCloud.H"
|
||||||
|
#include "ReactingCloud.H"
|
||||||
#include "ReactingMultiphaseCloud.H"
|
#include "ReactingMultiphaseCloud.H"
|
||||||
|
|
||||||
#include "ConstantRateDevolatilisation.H"
|
#include "ConstantRateDevolatilisation.H"
|
||||||
@ -38,25 +42,38 @@ License
|
|||||||
|
|
||||||
#define makeReactingMultiphaseParcelDevolatilisationModels(ParcelType) \
|
#define makeReactingMultiphaseParcelDevolatilisationModels(ParcelType) \
|
||||||
\
|
\
|
||||||
makeDevolatilisationModel(ReactingMultiphaseCloud<ParcelType>); \
|
typedef ReactingMultiphaseCloud \
|
||||||
|
< \
|
||||||
|
ReactingCloud \
|
||||||
|
< \
|
||||||
|
ThermoCloud \
|
||||||
|
< \
|
||||||
|
KinematicCloud \
|
||||||
|
< \
|
||||||
|
Cloud \
|
||||||
|
< \
|
||||||
|
ParcelType \
|
||||||
|
> \
|
||||||
|
> \
|
||||||
|
> \
|
||||||
|
> \
|
||||||
|
> RMPRTKC##ParcelType; \
|
||||||
\
|
\
|
||||||
|
makeDevolatilisationModel(RMPRTKC##ParcelType); \
|
||||||
makeDevolatilisationModelType \
|
makeDevolatilisationModelType \
|
||||||
( \
|
( \
|
||||||
ConstantRateDevolatilisation, \
|
ConstantRateDevolatilisation, \
|
||||||
ReactingMultiphaseCloud, \
|
RMPRTKC##ParcelType \
|
||||||
ParcelType \
|
|
||||||
); \
|
); \
|
||||||
makeDevolatilisationModelType \
|
makeDevolatilisationModelType \
|
||||||
( \
|
( \
|
||||||
NoDevolatilisation, \
|
NoDevolatilisation, \
|
||||||
ReactingMultiphaseCloud, \
|
RMPRTKC##ParcelType \
|
||||||
ParcelType \
|
|
||||||
); \
|
); \
|
||||||
makeDevolatilisationModelType \
|
makeDevolatilisationModelType \
|
||||||
( \
|
( \
|
||||||
SingleKineticRateDevolatilisation, \
|
SingleKineticRateDevolatilisation, \
|
||||||
ReactingMultiphaseCloud, \
|
RMPRTKC##ParcelType \
|
||||||
ParcelType \
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -28,7 +28,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "thermoPhysicsTypes.H"
|
#include "Cloud.H"
|
||||||
#include "KinematicCloud.H"
|
#include "KinematicCloud.H"
|
||||||
|
|
||||||
#include "ConeInjection.H"
|
#include "ConeInjection.H"
|
||||||
@ -42,43 +42,18 @@ License
|
|||||||
|
|
||||||
#define makeReactingMultiphaseParcelInjectionModels(ParcelType) \
|
#define makeReactingMultiphaseParcelInjectionModels(ParcelType) \
|
||||||
\
|
\
|
||||||
makeInjectionModel(KinematicCloud<ParcelType>); \
|
typedef KinematicCloud<Cloud<ParcelType> > KC##ParcelType; \
|
||||||
\
|
\
|
||||||
makeInjectionModelType \
|
makeInjectionModel(KC##ParcelType); \
|
||||||
( \
|
makeInjectionModelType(ConeInjection, KC##ParcelType); \
|
||||||
ConeInjection, \
|
makeInjectionModelType(FieldActivatedInjection, KC##ParcelType); \
|
||||||
KinematicCloud, \
|
makeInjectionModelType(ManualInjection, KC##ParcelType); \
|
||||||
ParcelType \
|
makeInjectionModelType(NoInjection, KC##ParcelType); \
|
||||||
); \
|
makeInjectionModelType(PatchInjection, KC##ParcelType); \
|
||||||
makeInjectionModelType \
|
|
||||||
( \
|
|
||||||
FieldActivatedInjection, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makeInjectionModelType \
|
|
||||||
( \
|
|
||||||
ManualInjection, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makeInjectionModelType \
|
|
||||||
( \
|
|
||||||
NoInjection, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makeInjectionModelType \
|
|
||||||
( \
|
|
||||||
PatchInjection, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makeInjectionModelType \
|
makeInjectionModelType \
|
||||||
( \
|
( \
|
||||||
ReactingMultiphaseLookupTableInjection, \
|
ReactingMultiphaseLookupTableInjection, \
|
||||||
KinematicCloud, \
|
KC##ParcelType \
|
||||||
ParcelType \
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -28,21 +28,37 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "Cloud.H"
|
||||||
|
#include "KinematicCloud.H"
|
||||||
|
#include "ThermoCloud.H"
|
||||||
|
#include "ReactingCloud.H"
|
||||||
#include "ReactingMultiphaseCloud.H"
|
#include "ReactingMultiphaseCloud.H"
|
||||||
|
|
||||||
#include "NoSurfaceReaction.H"
|
#include "NoSurfaceReaction.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#define makeReactingMultiphaseParcelSurfaceReactionModels(ParcelType) \
|
#define makeReactingMultiphaseParcelSurfaceReactionModels(ParcelType) \
|
||||||
\
|
\
|
||||||
makeSurfaceReactionModel(ReactingMultiphaseCloud<ParcelType>); \
|
typedef ReactingMultiphaseCloud \
|
||||||
|
< \
|
||||||
|
ReactingCloud \
|
||||||
|
< \
|
||||||
|
ThermoCloud \
|
||||||
|
< \
|
||||||
|
KinematicCloud \
|
||||||
|
< \
|
||||||
|
Cloud \
|
||||||
|
< \
|
||||||
|
ParcelType \
|
||||||
|
> \
|
||||||
|
> \
|
||||||
|
> \
|
||||||
|
> \
|
||||||
|
> RMPRTKC##ParcelType; \
|
||||||
\
|
\
|
||||||
makeSurfaceReactionModelType \
|
makeSurfaceReactionModel(RMPRTKC##ParcelType); \
|
||||||
( \
|
makeSurfaceReactionModelType(NoSurfaceReaction, RMPRTKC##ParcelType);
|
||||||
NoSurfaceReaction, \
|
|
||||||
ReactingMultiphaseCloud, \
|
|
||||||
ParcelType \
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -28,7 +28,11 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "Cloud.H"
|
||||||
|
#include "KinematicCloud.H"
|
||||||
|
#include "ThermoCloud.H"
|
||||||
#include "ReactingCloud.H"
|
#include "ReactingCloud.H"
|
||||||
|
|
||||||
#include "NoComposition.H"
|
#include "NoComposition.H"
|
||||||
#include "SinglePhaseMixture.H"
|
#include "SinglePhaseMixture.H"
|
||||||
|
|
||||||
@ -36,21 +40,12 @@ License
|
|||||||
|
|
||||||
#define makeReactingParcelCompositionModels(ParcelType) \
|
#define makeReactingParcelCompositionModels(ParcelType) \
|
||||||
\
|
\
|
||||||
makeCompositionModel(ReactingCloud<ParcelType>); \
|
typedef ReactingCloud<ThermoCloud<KinematicCloud<Cloud<ParcelType> > > > \
|
||||||
|
RTKC##ParcelType; \
|
||||||
\
|
\
|
||||||
makeCompositionModelType \
|
makeCompositionModel(RTKC##ParcelType); \
|
||||||
( \
|
makeCompositionModelType(NoComposition, RTKC##ParcelType); \
|
||||||
NoComposition, \
|
makeCompositionModelType(SinglePhaseMixture, RTKC##ParcelType);
|
||||||
ReactingCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
\
|
|
||||||
makeCompositionModelType \
|
|
||||||
( \
|
|
||||||
SinglePhaseMixture, \
|
|
||||||
ReactingCloud, \
|
|
||||||
ParcelType \
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -28,6 +28,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "Cloud.H"
|
||||||
#include "KinematicCloud.H"
|
#include "KinematicCloud.H"
|
||||||
|
|
||||||
#include "ConeInjection.H"
|
#include "ConeInjection.H"
|
||||||
@ -41,44 +42,15 @@ License
|
|||||||
|
|
||||||
#define makeReactingParcelInjectionModels(ParcelType) \
|
#define makeReactingParcelInjectionModels(ParcelType) \
|
||||||
\
|
\
|
||||||
makeInjectionModel(KinematicCloud<ParcelType>); \
|
typedef KinematicCloud<Cloud<ParcelType> > KC##ParcelType; \
|
||||||
\
|
\
|
||||||
makeInjectionModelType \
|
makeInjectionModel(KC##ParcelType); \
|
||||||
( \
|
makeInjectionModelType(ConeInjection, KC##ParcelType); \
|
||||||
ConeInjection, \
|
makeInjectionModelType(FieldActivatedInjection, KC##ParcelType); \
|
||||||
KinematicCloud, \
|
makeInjectionModelType(ManualInjection, KC##ParcelType); \
|
||||||
ParcelType \
|
makeInjectionModelType(NoInjection, KC##ParcelType); \
|
||||||
); \
|
makeInjectionModelType(PatchInjection, KC##ParcelType); \
|
||||||
makeInjectionModelType \
|
makeInjectionModelType(ReactingLookupTableInjection, KC##ParcelType);
|
||||||
( \
|
|
||||||
FieldActivatedInjection, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makeInjectionModelType \
|
|
||||||
( \
|
|
||||||
ManualInjection, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makeInjectionModelType \
|
|
||||||
( \
|
|
||||||
NoInjection, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makeInjectionModelType \
|
|
||||||
( \
|
|
||||||
PatchInjection, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makeInjectionModelType \
|
|
||||||
( \
|
|
||||||
ReactingLookupTableInjection, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -28,6 +28,9 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "Cloud.H"
|
||||||
|
#include "KinematicCloud.H"
|
||||||
|
#include "ThermoCloud.H"
|
||||||
#include "ReactingCloud.H"
|
#include "ReactingCloud.H"
|
||||||
|
|
||||||
#include "NoPhaseChange.H"
|
#include "NoPhaseChange.H"
|
||||||
@ -37,20 +40,12 @@ License
|
|||||||
|
|
||||||
#define makeReactingParcelPhaseChangeModels(ParcelType) \
|
#define makeReactingParcelPhaseChangeModels(ParcelType) \
|
||||||
\
|
\
|
||||||
makePhaseChangeModel(ReactingCloud<ParcelType>); \
|
typedef ReactingCloud<ThermoCloud<KinematicCloud<Cloud<ParcelType> > > > \
|
||||||
|
RTKC##ParcelType; \
|
||||||
\
|
\
|
||||||
makePhaseChangeModelType \
|
makePhaseChangeModel(RTKC##ParcelType); \
|
||||||
( \
|
makePhaseChangeModelType(NoPhaseChange, RTKC##ParcelType); \
|
||||||
NoPhaseChange, \
|
makePhaseChangeModelType(LiquidEvaporation, RTKC##ParcelType);
|
||||||
ReactingCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makePhaseChangeModelType \
|
|
||||||
( \
|
|
||||||
LiquidEvaporation, \
|
|
||||||
ReactingCloud, \
|
|
||||||
ParcelType \
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -28,6 +28,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "Cloud.H"
|
||||||
#include "KinematicCloud.H"
|
#include "KinematicCloud.H"
|
||||||
|
|
||||||
#include "NoSurfaceFilm.H"
|
#include "NoSurfaceFilm.H"
|
||||||
@ -37,20 +38,11 @@ License
|
|||||||
|
|
||||||
#define makeReactingParcelSurfaceFilmModels(ParcelType) \
|
#define makeReactingParcelSurfaceFilmModels(ParcelType) \
|
||||||
\
|
\
|
||||||
makeSurfaceFilmModel(KinematicCloud<ParcelType>); \
|
typedef KinematicCloud<Cloud<ParcelType> > KC##ParcelType; \
|
||||||
\
|
\
|
||||||
makeSurfaceFilmModelType \
|
makeSurfaceFilmModel(KC##ParcelType); \
|
||||||
( \
|
makeSurfaceFilmModelType(NoSurfaceFilm, KC##ParcelType); \
|
||||||
NoSurfaceFilm, \
|
makeSurfaceFilmModelType(ThermoSurfaceFilm, KC##ParcelType);
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makeSurfaceFilmModelType \
|
|
||||||
( \
|
|
||||||
ThermoSurfaceFilm, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -28,6 +28,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "Cloud.H"
|
||||||
#include "KinematicCloud.H"
|
#include "KinematicCloud.H"
|
||||||
|
|
||||||
#include "SphereDragForce.H"
|
#include "SphereDragForce.H"
|
||||||
@ -41,52 +42,18 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#define makeThermoParcelForces(ParcelType) \
|
#define makeThermoParcelForces(ParcelType) \
|
||||||
\
|
\
|
||||||
makeParticleForceModel(KinematicCloud<ParcelType>); \
|
typedef KinematicCloud<Cloud<ParcelType> > KC##ParcelType; \
|
||||||
\
|
\
|
||||||
makeParticleForceModelType \
|
makeParticleForceModel(KC##ParcelType); \
|
||||||
( \
|
makeParticleForceModelType(SphereDragForce, KC##ParcelType); \
|
||||||
SphereDragForce, \
|
makeParticleForceModelType(NonSphereDragForce, KC##ParcelType); \
|
||||||
KinematicCloud, \
|
makeParticleForceModelType(BrownianMotionForce, KC##ParcelType); \
|
||||||
ParcelType \
|
makeParticleForceModelType(GravityForce, KC##ParcelType); \
|
||||||
); \
|
makeParticleForceModelType(ParamagneticForce, KC##ParcelType); \
|
||||||
makeParticleForceModelType \
|
makeParticleForceModelType(PressureGradientForce, KC##ParcelType); \
|
||||||
( \
|
makeParticleForceModelType(SRFForce, KC##ParcelType);
|
||||||
NonSphereDragForce, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makeParticleForceModelType \
|
|
||||||
( \
|
|
||||||
BrownianMotionForce, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makeParticleForceModelType \
|
|
||||||
( \
|
|
||||||
GravityForce, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makeParticleForceModelType \
|
|
||||||
( \
|
|
||||||
ParamagneticForce, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makeParticleForceModelType \
|
|
||||||
( \
|
|
||||||
PressureGradientForce, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
makeParticleForceModelType \
|
|
||||||
( \
|
|
||||||
SRFForce, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -28,7 +28,9 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "Cloud.H"
|
||||||
#include "KinematicCloud.H"
|
#include "KinematicCloud.H"
|
||||||
|
|
||||||
#include "NoSurfaceFilm.H"
|
#include "NoSurfaceFilm.H"
|
||||||
#include "ThermoSurfaceFilm.H"
|
#include "ThermoSurfaceFilm.H"
|
||||||
|
|
||||||
@ -36,21 +38,12 @@ License
|
|||||||
|
|
||||||
#define makeParcelSurfaceFilmModels(ParcelType) \
|
#define makeParcelSurfaceFilmModels(ParcelType) \
|
||||||
\
|
\
|
||||||
makeSurfaceFilmModel(KinematicCloud<ParcelType>); \
|
typedef KinematicCloud<Cloud<ParcelType> > KC##ParcelType; \
|
||||||
\
|
\
|
||||||
makeSurfaceFilmModelType \
|
makeSurfaceFilmModel(KC##ParcelType); \
|
||||||
( \
|
|
||||||
NoSurfaceFilm, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
); \
|
|
||||||
\
|
\
|
||||||
makeSurfaceFilmModelType \
|
makeSurfaceFilmModelType(NoSurfaceFilm, KC##ParcelType); \
|
||||||
( \
|
makeSurfaceFilmModelType(ThermoSurfaceFilm, KC##ParcelType);
|
||||||
ThermoSurfaceFilm, \
|
|
||||||
KinematicCloud, \
|
|
||||||
ParcelType \
|
|
||||||
);
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -146,13 +146,13 @@ public:
|
|||||||
defineTemplateRunTimeSelectionTable(CollisionModel<CloudType>, dictionary);
|
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> >:: \
|
CollisionModel<CloudType>:: \
|
||||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
adddictionaryConstructorToTable<SS<CloudType> > \
|
||||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
add##SS##CloudType##ConstructorToTable_;
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
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> >:: \
|
PairModel<CloudType>::adddictionaryConstructorToTable<SS<CloudType> > \
|
||||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
add##SS##CloudType##ConstructorToTable_;
|
||||||
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_;
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
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> >:: \
|
WallModel<CloudType>::adddictionaryConstructorToTable<SS<CloudType> > \
|
||||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
add##SS##CloudType##ConstructorToTable_;
|
||||||
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_;
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -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> >:: \
|
DispersionModel<CloudType>:: \
|
||||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
adddictionaryConstructorToTable<SS<CloudType> > \
|
||||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
add##SS##CloudType##ConstructorToTable_;
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -204,7 +204,7 @@ bool Foam::InjectionModel<CloudType>::findCellAtPosition
|
|||||||
|
|
||||||
const vector p0 = position;
|
const vector p0 = position;
|
||||||
|
|
||||||
this->owner().findCellFacePt
|
this->owner().mesh().findCellFacePt
|
||||||
(
|
(
|
||||||
position,
|
position,
|
||||||
cellI,
|
cellI,
|
||||||
@ -571,7 +571,7 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td)
|
|||||||
// Create a new parcel
|
// Create a new parcel
|
||||||
parcelType* pPtr = new parcelType
|
parcelType* pPtr = new parcelType
|
||||||
(
|
(
|
||||||
td.cloud(),
|
td.cloud().pMesh(),
|
||||||
pos,
|
pos,
|
||||||
cellI,
|
cellI,
|
||||||
tetFaceI,
|
tetFaceI,
|
||||||
@ -671,7 +671,7 @@ void Foam::InjectionModel<CloudType>::injectSteadyState
|
|||||||
// Create a new parcel
|
// Create a new parcel
|
||||||
parcelType* pPtr = new parcelType
|
parcelType* pPtr = new parcelType
|
||||||
(
|
(
|
||||||
td.cloud(),
|
td.cloud().pMesh(),
|
||||||
pos,
|
pos,
|
||||||
cellI,
|
cellI,
|
||||||
tetFaceI,
|
tetFaceI,
|
||||||
|
|||||||
@ -69,6 +69,10 @@ class InjectionModel
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
//- Convenience typedef for parcelType
|
||||||
|
typedef typename CloudType::parcelType parcelType;
|
||||||
|
|
||||||
|
|
||||||
// Enumerations
|
// Enumerations
|
||||||
|
|
||||||
//- Parcel basis representation options
|
//- Parcel basis representation options
|
||||||
@ -96,9 +100,6 @@ protected:
|
|||||||
|
|
||||||
// Protected data
|
// Protected data
|
||||||
|
|
||||||
//- Convenience typedef for parcel type
|
|
||||||
typedef typename CloudType::parcelType parcelType;
|
|
||||||
|
|
||||||
// Global injection properties
|
// Global injection properties
|
||||||
|
|
||||||
//- Start of injection [s]
|
//- Start of injection [s]
|
||||||
@ -305,7 +306,7 @@ public:
|
|||||||
const label parcelI,
|
const label parcelI,
|
||||||
const label nParcels,
|
const label nParcels,
|
||||||
const scalar time,
|
const scalar time,
|
||||||
typename CloudType::parcelType& parcel
|
parcelType& parcel
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Flag to identify whether model fully describes the parcel
|
//- Flag to identify whether model fully describes the parcel
|
||||||
@ -332,13 +333,12 @@ public:
|
|||||||
defineTemplateRunTimeSelectionTable(InjectionModel<CloudType>, dictionary);
|
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> >:: \
|
InjectionModel<CloudType>::adddictionaryConstructorToTable<SS<CloudType> >\
|
||||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
add##SS##CloudType##ConstructorToTable_;
|
||||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -206,13 +206,12 @@ public:
|
|||||||
defineTemplateRunTimeSelectionTable(ParticleForce<CloudType>, dictionary);
|
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> >:: \
|
ParticleForce<CloudType>::adddictionaryConstructorToTable<SS<CloudType> > \
|
||||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
add##SS##CloudType##ConstructorToTable_;
|
||||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -47,32 +47,31 @@ Foam::word Foam::PatchInteractionModel<CloudType>::interactionTypeToWord
|
|||||||
const interactionType& itEnum
|
const interactionType& itEnum
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
word it = "other";
|
||||||
|
|
||||||
switch (itEnum)
|
switch (itEnum)
|
||||||
{
|
{
|
||||||
case itRebound:
|
case itRebound:
|
||||||
{
|
{
|
||||||
return "rebound";
|
it = "rebound";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case itStick:
|
case itStick:
|
||||||
{
|
{
|
||||||
return "stick";
|
it = "stick";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case itEscape:
|
case itEscape:
|
||||||
{
|
{
|
||||||
return "escape";
|
it = "escape";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
return "other";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef __ICC
|
|
||||||
// Prevent Icc complaining about missing return statement.
|
return it;
|
||||||
return word::null;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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> >:: \
|
PatchInteractionModel<CloudType>:: \
|
||||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
adddictionaryConstructorToTable<SS<CloudType> > \
|
||||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
add##SS##CloudType##ConstructorToTable_;
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -137,7 +137,7 @@ void Foam::ParticleTracks<CloudType>::postFace(const parcelType& p)
|
|||||||
{
|
{
|
||||||
cloudPtr_->append
|
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
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -53,7 +53,7 @@ class PatchPostProcessing
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
typedef typename CloudType::parcelType parcelType;
|
typedef typename CloudType::particleType parcelType;
|
||||||
|
|
||||||
//- Maximum number of parcels to store
|
//- Maximum number of parcels to store
|
||||||
label maxStoredParcels_;
|
label maxStoredParcels_;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
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> >:: \
|
PostProcessingModel<CloudType>:: \
|
||||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
adddictionaryConstructorToTable<SS<CloudType> > \
|
||||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
add##SS##CloudType##ConstructorToTable_;
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -149,7 +149,7 @@ void Foam::SurfaceFilmModel<CloudType>::inject(TrackData& td)
|
|||||||
const directMappedWallPolyPatch& wpp =
|
const directMappedWallPolyPatch& wpp =
|
||||||
refCast<const directMappedWallPolyPatch>
|
refCast<const directMappedWallPolyPatch>
|
||||||
(
|
(
|
||||||
this->owner().mesh().boundaryMesh()[primaryPatchI]
|
this->owner().mesh().boundaryMesh()[primaryPatchI]
|
||||||
);
|
);
|
||||||
|
|
||||||
const labelList& injectorCellsPatch = wpp.faceCells();
|
const labelList& injectorCellsPatch = wpp.faceCells();
|
||||||
@ -177,10 +177,10 @@ void Foam::SurfaceFilmModel<CloudType>::inject(TrackData& td)
|
|||||||
const point& pos = this->owner().mesh().C()[cellI];
|
const point& pos = this->owner().mesh().C()[cellI];
|
||||||
|
|
||||||
// Create a new parcel
|
// Create a new parcel
|
||||||
typename CloudType::parcelType* pPtr =
|
parcelType* pPtr =
|
||||||
new typename CloudType::parcelType
|
new parcelType
|
||||||
(
|
(
|
||||||
td.cloud(),
|
this->owner().pMesh(),
|
||||||
pos,
|
pos,
|
||||||
cellI,
|
cellI,
|
||||||
tetFaceI,
|
tetFaceI,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
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> >:: \
|
SurfaceFilmModel<CloudType>:: \
|
||||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
adddictionaryConstructorToTable<SS<CloudType> > \
|
||||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
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> >:: \
|
CompositionModel<CloudType>:: \
|
||||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
adddictionaryConstructorToTable<SS<CloudType> > \
|
||||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
add##SS##CloudType##ConstructorToTable_;
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
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,
|
const scalar pc,
|
||||||
scalarField& dMassPC
|
scalarField& dMassPC
|
||||||
) const;
|
) 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
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
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"
|
#include "PhaseChangeModelNew.C"
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -165,6 +165,15 @@ public:
|
|||||||
const scalar pc,
|
const scalar pc,
|
||||||
scalarField& dMassPC
|
scalarField& dMassPC
|
||||||
) const;
|
) 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> >:: \
|
PhaseChangeModel<CloudType>:: \
|
||||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
adddictionaryConstructorToTable<SS<CloudType> > \
|
||||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
add##SS##CloudType##ConstructorToTable_;
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
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> >:: \
|
DevolatilisationModel<CloudType>:: \
|
||||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
adddictionaryConstructorToTable<SS<CloudType> > \
|
||||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
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> >:: \
|
SurfaceReactionModel<CloudType>:: \
|
||||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
adddictionaryConstructorToTable<SS<CloudType> > \
|
||||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
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> >:: \
|
HeatTransferModel<CloudType>:: \
|
||||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
adddictionaryConstructorToTable<SS<CloudType> > \
|
||||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
add##SS##CloudType##ConstructorToTable_;
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -446,7 +446,7 @@ void Foam::ThermoSurfaceFilm<CloudType>::splashInteraction
|
|||||||
// Create a new parcel by copying source parcel
|
// Create a new parcel by copying source parcel
|
||||||
parcelType* pPtr = new parcelType(p);
|
parcelType* pPtr = new parcelType(p);
|
||||||
|
|
||||||
pPtr->origId() = this->owner().getNewParticleID();
|
pPtr->origId() = pPtr->getNewParticleID();
|
||||||
|
|
||||||
pPtr->origProc() = Pstream::myProcNo();
|
pPtr->origProc() = Pstream::myProcNo();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user