totalNumberLagrangianScalarFieldSource Class Reference

This source condition sets the values of the number field to recover a specified total volume or mass. It should be used in conjunction with an instantaneous injection model. More...

Inheritance diagram for totalNumberLagrangianScalarFieldSource:
Collaboration diagram for totalNumberLagrangianScalarFieldSource:

Public Member Functions

 TypeName ("totalNumber")
 Runtime type information. More...
 
 totalNumberLagrangianScalarFieldSource (const regIOobject &, const dictionary &dict)
 Construct from internal field and dictionary. More...
 
 totalNumberLagrangianScalarFieldSource (const totalNumberLagrangianScalarFieldSource &, const regIOobject &)
 Copy constructor setting the internal field reference. More...
 
virtual autoPtr< LagrangianScalarFieldSource > clone (const regIOobject &iIo) const
 Construct and return a clone setting the internal field reference. More...
 
virtual ~totalNumberLagrangianScalarFieldSource ()
 Destructor. More...
 
virtual tmp< LagrangianSubScalarFieldvalue (const LagrangianInjection &, const LagrangianSubMesh &) const
 Return the value for an instantaneous injection. More...
 
virtual void write (Ostream &) const
 Write. More...
 
- Public Member Functions inherited from uniformSizeNumberLagrangianScalarFieldSource
 TypeName ("uniformSizeNumber")
 Runtime type information. More...
 
 uniformSizeNumberLagrangianScalarFieldSource (const regIOobject &, const dictionary &dict)
 Construct from internal field and dictionary. More...
 
 uniformSizeNumberLagrangianScalarFieldSource (const uniformSizeNumberLagrangianScalarFieldSource &, const regIOobject &)
 Copy constructor setting the internal field reference. More...
 
virtual ~uniformSizeNumberLagrangianScalarFieldSource ()
 Destructor. More...
 
label sampleQ () const
 Return the sample size exponent. More...
 

Additional Inherited Members

- Public Types inherited from uniformSizeNumberLagrangianScalarFieldSource
enum class  uniformSize { number , surfaceArea , volume , mass }
 Enumeration for the uniform size. More...
 
- Static Public Attributes inherited from uniformSizeNumberLagrangianScalarFieldSource
static const NamedEnum< uniformSize, 4 > uniformSizeNames_
 Names of the uniform size. More...
 
- Protected Member Functions inherited from uniformSizeNumberLagrangianScalarFieldSource
void calcSizes (const LagrangianInjection &injection, const LagrangianSubMesh &subMesh, tmp< LagrangianSubScalarField > &size, const bool needv, tmp< LagrangianSubScalarField > &v, const bool needm, tmp< LagrangianSubScalarField > &m) const
 Calculate the necessary sizes. More...
 

Detailed Description

This source condition sets the values of the number field to recover a specified total volume or mass. It should be used in conjunction with an instantaneous injection model.

This condition requires a uniform size to be specified. All injected parcels will have the same value of this size. The size can be number, surfaceArea, volume or mass. This choice relates to the desired discretisation of the Lagrangian material. Broadly, the uniform size chosen should be that against which the dominant effect of the Lagrangian model scales.

So, if the particles are primarily evaporating droplets of fuel, then the effect of each will be primarily a function of the mass of fuel that evaporates into the system. The uniformSize should therefore be set to mass.

But, if the model is purely dynamic, and the dominant effect is viscous drag, then each particle will exert a force in proportion with a reference area. In this case surfaceArea would be a better choice.

If a distribution of sizes is injected then the choice of uniform size interacts with how the distribution is to be sampled. For that reason, it is important to use a diameter source condition such as distributionDiameter which accounts for this, rather than the general distribution condition.

Usage
Property Description Required? Default
uniformSize The size kept uniform across all parcels yes
volume The total volume to inject if mass is not specified
mass The total mass to inject if volume is not specified

Example specification:

    <LagrangianModelName>
    {
        type            totalNumber;
        uniformSize     volume; // number, surfaceArea, mass
        mass            1 [g];
    }
Source files

Definition at line 111 of file totalNumberLagrangianScalarFieldSource.H.

Constructor & Destructor Documentation

◆ totalNumberLagrangianScalarFieldSource() [1/2]

totalNumberLagrangianScalarFieldSource ( const regIOobject iIo,
const dictionary dict 
)

Construct from internal field and dictionary.

Definition at line 31 of file totalNumberLagrangianScalarFieldSource.C.

References dict, Foam::exit(), Foam::FatalIOError, and FatalIOErrorInFunction.

Referenced by totalNumberLagrangianScalarFieldSource::clone().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ totalNumberLagrangianScalarFieldSource() [2/2]

Copy constructor setting the internal field reference.

Definition at line 62 of file totalNumberLagrangianScalarFieldSource.C.

◆ ~totalNumberLagrangianScalarFieldSource()

Destructor.

Definition at line 77 of file totalNumberLagrangianScalarFieldSource.C.

Member Function Documentation

◆ TypeName()

TypeName ( "totalNumber"  )

Runtime type information.

◆ clone()

virtual autoPtr<LagrangianScalarFieldSource> clone ( const regIOobject iIo) const
inlinevirtual

Construct and return a clone setting the internal field reference.

Reimplemented from uniformSizeNumberLagrangianScalarFieldSource.

Definition at line 149 of file totalNumberLagrangianScalarFieldSource.H.

References totalNumberLagrangianScalarFieldSource::totalNumberLagrangianScalarFieldSource().

Here is the call graph for this function:

◆ value()

Foam::tmp< Foam::LagrangianSubScalarField > value ( const LagrangianInjection injection,
const LagrangianSubMesh subMesh 
) const
virtual

Return the value for an instantaneous injection.

Definition at line 85 of file totalNumberLagrangianScalarFieldSource.C.

References Foam::dimMass, Foam::dimVolume, M, and Foam::sum().

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write.

Reimplemented from uniformSizeNumberLagrangianScalarFieldSource.

Definition at line 118 of file totalNumberLagrangianScalarFieldSource.C.

References uniformSizeNumberLagrangianScalarFieldSource::write(), and Foam::writeEntry().

Here is the call graph for this function:

The documentation for this class was generated from the following files: