ENH: Enable flowRateInletVelocity BC to operate as VFR by setting 'rho' to 'none' when phi is kg/s
This commit is contained in:
@ -129,11 +129,19 @@ void Foam::flowRateInletVelocityFvPatchVectorField::updateCoeffs()
|
||||
}
|
||||
else if (phi.dimensions() == dimDensity*dimVelocity*dimArea)
|
||||
{
|
||||
const fvPatchField<scalar>& rhop =
|
||||
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
|
||||
if (rhoName_ == "none")
|
||||
{
|
||||
// volumetric flow-rate if density not given
|
||||
operator==(n*avgU);
|
||||
}
|
||||
else
|
||||
{
|
||||
// mass flow-rate
|
||||
const fvPatchField<scalar>& rhop =
|
||||
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
|
||||
|
||||
// mass flow-rate
|
||||
operator==(n*avgU/rhop);
|
||||
operator==(n*avgU/rhop);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -30,8 +30,10 @@ Description
|
||||
|
||||
The basis of the patch (volumetric or mass) is determined by the
|
||||
dimensions of the flux, phi.
|
||||
The current density is used to correct the velocity when applying the
|
||||
mass basis.
|
||||
|
||||
If the flux is mass-based
|
||||
- the current density is used to correct the velocity
|
||||
- volumetric flow rate can be applied by setting the 'rho' entry to 'none'
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
@ -39,6 +41,7 @@ Description
|
||||
{
|
||||
type flowRateInletVelocity;
|
||||
flowRate 0.2; // Volumetric/mass flow rate [m3/s or kg/s]
|
||||
rho rho; // none | rho [m3/s or kg/s]
|
||||
value uniform (0 0 0); // placeholder
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
Reference in New Issue
Block a user