mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
converted entrainment injection into field activated injection
This commit is contained in:
@ -28,7 +28,7 @@ License
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "ConeInjection.H"
|
||||
#include "EntrainmentInjection.H"
|
||||
#include "FieldActivatedInjection.H"
|
||||
#include "ManualInjection.H"
|
||||
#include "NoInjection.H"
|
||||
|
||||
@ -47,7 +47,7 @@ namespace Foam
|
||||
);
|
||||
makeInjectionModelType
|
||||
(
|
||||
EntrainmentInjection,
|
||||
FieldActivatedInjection,
|
||||
KinematicCloud,
|
||||
basicKinematicParcel
|
||||
);
|
||||
|
||||
@ -28,7 +28,7 @@ License
|
||||
#include "ReactingCloud.H"
|
||||
|
||||
#include "ConeInjection.H"
|
||||
#include "EntrainmentInjection.H"
|
||||
#include "FieldActivatedInjection.H"
|
||||
#include "ManualInjection.H"
|
||||
#include "NoInjection.H"
|
||||
|
||||
@ -47,7 +47,7 @@ namespace Foam
|
||||
);
|
||||
makeInjectionModelType
|
||||
(
|
||||
EntrainmentInjection,
|
||||
FieldActivatedInjection,
|
||||
KinematicCloud,
|
||||
basicReactingMultiphaseParcel
|
||||
);
|
||||
|
||||
@ -28,7 +28,7 @@ License
|
||||
#include "ReactingCloud.H"
|
||||
|
||||
#include "ConeInjection.H"
|
||||
#include "EntrainmentInjection.H"
|
||||
#include "FieldActivatedInjection.H"
|
||||
#include "ManualInjection.H"
|
||||
#include "NoInjection.H"
|
||||
|
||||
@ -47,7 +47,7 @@ namespace Foam
|
||||
);
|
||||
makeInjectionModelType
|
||||
(
|
||||
EntrainmentInjection,
|
||||
FieldActivatedInjection,
|
||||
KinematicCloud,
|
||||
basicReactingParcel
|
||||
);
|
||||
|
||||
@ -28,7 +28,7 @@ License
|
||||
#include "ThermoCloud.H"
|
||||
|
||||
#include "ConeInjection.H"
|
||||
#include "EntrainmentInjection.H"
|
||||
#include "FieldActivatedInjection.H"
|
||||
#include "ManualInjection.H"
|
||||
#include "NoInjection.H"
|
||||
|
||||
@ -48,7 +48,7 @@ namespace Foam
|
||||
);
|
||||
makeInjectionModelType
|
||||
(
|
||||
EntrainmentInjection,
|
||||
FieldActivatedInjection,
|
||||
KinematicCloud,
|
||||
basicThermoParcel
|
||||
);
|
||||
|
||||
@ -24,13 +24,13 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "EntrainmentInjection.H"
|
||||
#include "FieldActivatedInjection.H"
|
||||
#include "volFields.H"
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
Foam::label Foam::EntrainmentInjection<CloudType>::parcelsToInject
|
||||
Foam::label Foam::FieldActivatedInjection<CloudType>::parcelsToInject
|
||||
(
|
||||
const scalar time0,
|
||||
const scalar time1
|
||||
@ -48,7 +48,7 @@ Foam::label Foam::EntrainmentInjection<CloudType>::parcelsToInject
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
Foam::scalar Foam::EntrainmentInjection<CloudType>::volumeToInject
|
||||
Foam::scalar Foam::FieldActivatedInjection<CloudType>::volumeToInject
|
||||
(
|
||||
const scalar time0,
|
||||
const scalar time1
|
||||
@ -68,33 +68,25 @@ Foam::scalar Foam::EntrainmentInjection<CloudType>::volumeToInject
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
Foam::EntrainmentInjection<CloudType>::EntrainmentInjection
|
||||
Foam::FieldActivatedInjection<CloudType>::FieldActivatedInjection
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& owner
|
||||
)
|
||||
:
|
||||
InjectionModel<CloudType>(dict, owner, typeName),
|
||||
c_(readScalar(this->coeffDict().lookup("c"))),
|
||||
rhoc_
|
||||
referenceField_
|
||||
(
|
||||
owner.db().objectRegistry::lookupObject<volScalarField>
|
||||
(
|
||||
this->coeffDict().lookup("rhoc")
|
||||
this->coeffDict().lookup("referenceField")
|
||||
)
|
||||
),
|
||||
rhol_
|
||||
thresholdField_
|
||||
(
|
||||
owner.db().objectRegistry::lookupObject<volScalarField>
|
||||
(
|
||||
this->coeffDict().lookup("rhol")
|
||||
)
|
||||
),
|
||||
Uc_
|
||||
(
|
||||
owner.db().objectRegistry::lookupObject<volVectorField>
|
||||
(
|
||||
this->coeffDict().lookup("Uc")
|
||||
this->coeffDict().lookup("thresholdField")
|
||||
)
|
||||
),
|
||||
positionsFile_(this->coeffDict().lookup("positionsFile")),
|
||||
@ -153,28 +145,28 @@ Foam::EntrainmentInjection<CloudType>::EntrainmentInjection
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
Foam::EntrainmentInjection<CloudType>::~EntrainmentInjection()
|
||||
Foam::FieldActivatedInjection<CloudType>::~FieldActivatedInjection()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
bool Foam::EntrainmentInjection<CloudType>::active() const
|
||||
bool Foam::FieldActivatedInjection<CloudType>::active() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
Foam::scalar Foam::EntrainmentInjection<CloudType>::timeEnd() const
|
||||
Foam::scalar Foam::FieldActivatedInjection<CloudType>::timeEnd() const
|
||||
{
|
||||
return GREAT;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::EntrainmentInjection<CloudType>::setPositionAndCell
|
||||
void Foam::FieldActivatedInjection<CloudType>::setPositionAndCell
|
||||
(
|
||||
const label parcelI,
|
||||
const scalar,
|
||||
@ -188,7 +180,7 @@ void Foam::EntrainmentInjection<CloudType>::setPositionAndCell
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
Foam::vector Foam::EntrainmentInjection<CloudType>::velocity
|
||||
Foam::vector Foam::FieldActivatedInjection<CloudType>::velocity
|
||||
(
|
||||
const label,
|
||||
const scalar
|
||||
@ -199,7 +191,7 @@ Foam::vector Foam::EntrainmentInjection<CloudType>::velocity
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
Foam::scalar Foam::EntrainmentInjection<CloudType>::d0
|
||||
Foam::scalar Foam::FieldActivatedInjection<CloudType>::d0
|
||||
(
|
||||
const label parcelI,
|
||||
const scalar
|
||||
@ -210,14 +202,17 @@ Foam::scalar Foam::EntrainmentInjection<CloudType>::d0
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
bool Foam::EntrainmentInjection<CloudType>::validInjection(const label parcelI)
|
||||
bool Foam::FieldActivatedInjection<CloudType>::validInjection
|
||||
(
|
||||
const label parcelI
|
||||
)
|
||||
{
|
||||
|
||||
const label cellI = injectorCells_[parcelI];
|
||||
|
||||
if
|
||||
(
|
||||
nParcelsInjected_[parcelI] < nParcelsPerInjector_
|
||||
&& rhol_[cellI] < c_*0.5*rhoc_[cellI]*magSqr(Uc_[cellI])
|
||||
&& referenceField_[cellI] > thresholdField_[cellI]
|
||||
)
|
||||
{
|
||||
nParcelsInjected_[parcelI]++;
|
||||
@ -23,27 +23,26 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::EntrainmentInjection
|
||||
Foam::FieldActivatedInjection
|
||||
|
||||
Description
|
||||
Injection at specified positions, with the condition that for injection
|
||||
to be allowed
|
||||
|
||||
rhol <= c_*0.5*rhoc*|Uc|^2
|
||||
referenceField[cellI] >= thresholdField[cellI]
|
||||
|
||||
where:
|
||||
- rhol is the effective density (of all clouds)
|
||||
- c_ is a modelling constant [s2/m2]
|
||||
- rhoc is the carrier phase density
|
||||
- Uc is the carrier phase velocity
|
||||
- referenceField is the field used to supply the look-up values
|
||||
- thresholdField supplies the values beyond which the injection is
|
||||
permitted
|
||||
|
||||
SourceFiles
|
||||
EntrainmentInjection.C
|
||||
FieldActivatedInjection.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef EntrainmentInjection_H
|
||||
#define EntrainmentInjection_H
|
||||
#ifndef FieldActivatedInjection_H
|
||||
#define FieldActivatedInjection_H
|
||||
|
||||
#include "InjectionModel.H"
|
||||
#include "pdf.H"
|
||||
@ -55,11 +54,11 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class EntrainmentInjection Declaration
|
||||
Class FieldActivatedInjection Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class CloudType>
|
||||
class EntrainmentInjection
|
||||
class FieldActivatedInjection
|
||||
:
|
||||
public InjectionModel<CloudType>
|
||||
{
|
||||
@ -67,17 +66,11 @@ class EntrainmentInjection
|
||||
|
||||
// Model parameters
|
||||
|
||||
//- Modelling constant
|
||||
const scalar c_;
|
||||
//- Reference field
|
||||
const volScalarField& referenceField_;
|
||||
|
||||
//- Carrier phase density field
|
||||
const volScalarField& rhoc_;
|
||||
|
||||
//- Lagrangian phase density field
|
||||
const scalarField& rhol_;
|
||||
|
||||
//- Carrier phase velocity field
|
||||
const vectorField& Uc_;
|
||||
//- Threshold field
|
||||
const volScalarField& thresholdField_;
|
||||
|
||||
|
||||
// Injector properties
|
||||
@ -91,7 +84,7 @@ class EntrainmentInjection
|
||||
//- Field of cell labels corresoponding to injector positions
|
||||
labelField injectorCells_;
|
||||
|
||||
//- nParcels per injector
|
||||
//- Number of parcels per injector
|
||||
const label nParcelsPerInjector_;
|
||||
|
||||
//- Field of number of parcels injected for each injector
|
||||
@ -132,13 +125,13 @@ protected:
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("EntrainmentInjection");
|
||||
TypeName("FieldActivatedInjection");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from dictionary
|
||||
EntrainmentInjection
|
||||
FieldActivatedInjection
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& owner
|
||||
@ -146,7 +139,7 @@ public:
|
||||
|
||||
|
||||
// Destructor
|
||||
virtual ~EntrainmentInjection();
|
||||
virtual ~FieldActivatedInjection();
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -196,7 +189,7 @@ public:
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "EntrainmentInjection.C"
|
||||
# include "FieldActivatedInjection.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
Reference in New Issue
Block a user