Public Member Functions | Protected Attributes | List of all members
phaseHydrostaticPressureFvPatchScalarField Class Reference

This boundary condition provides a phase-based hydrostatic pressure condition, calculated as: More...

Inheritance diagram for phaseHydrostaticPressureFvPatchScalarField:
Inheritance graph
[legend]
Collaboration diagram for phaseHydrostaticPressureFvPatchScalarField:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("phaseHydrostaticPressure")
 Runtime type information. More...
 
 phaseHydrostaticPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 Construct from patch and internal field. More...
 
 phaseHydrostaticPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 phaseHydrostaticPressureFvPatchScalarField (const phaseHydrostaticPressureFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping given. More...
 
 phaseHydrostaticPressureFvPatchScalarField (const phaseHydrostaticPressureFvPatchScalarField &)
 Construct as copy. More...
 
virtual tmp< fvPatchScalarFieldclone () const
 Construct and return a clone. More...
 
 phaseHydrostaticPressureFvPatchScalarField (const phaseHydrostaticPressureFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 Construct as copy setting internal field reference. More...
 
virtual tmp< fvPatchScalarFieldclone (const DimensionedField< scalar, volMesh > &iF) const
 Construct and return a clone setting internal field reference. More...
 
const wordphaseName () const
 Return the phaseName. More...
 
wordphaseName ()
 Return reference to the phaseName to allow adjustment. More...
 
scalar rho () const
 Return the constant density in the far-field. More...
 
scalar & rho ()
 Return reference to the constant density in the far-field. More...
 
scalar pRefValue () const
 Return the reference pressure. More...
 
scalar & pRefValue ()
 Return reference to the reference pressure to allow adjustment. More...
 
const vectorpRefPoint () const
 Return the pressure reference location. More...
 
vectorpRefPoint ()
 Return reference to the pressure reference location. More...
 
virtual void updateCoeffs ()
 Update the coefficients associated with the patch field. More...
 
virtual void write (Ostream &) const
 Write. More...
 
virtual void operator= (const fvPatchScalarField &pvf)
 

Protected Attributes

word phaseName_
 Name of phase-fraction field. More...
 
scalar rho_
 Constant density in the far-field. More...
 
scalar pRefValue_
 Reference pressure. More...
 
vector pRefPoint_
 Reference pressure location. More...
 

Detailed Description

This boundary condition provides a phase-based hydrostatic pressure condition, calculated as:

\[ p_{hyd} = p_{ref} + \rho g (x - x_{ref}) \]

where

$ p_{hyd} $ = hyrostatic pressure [Pa]
$ p_{ref} $ = reference pressure [Pa]
$ x_{ref} $ = reference point in Cartesian co-ordinates
$ \rho $ = density (assumed uniform)
$ g $ = acceleration due to gravity [m/s2]

The values are assigned according to the phase-fraction field:


Patch usage

Property Description Required Default value
phaseName phase field name no alpha
rho density field name no rho
pRefValue reference pressure [Pa] yes
pRefPoint reference pressure location yes

Example of the boundary condition specification:

    myPatch
    {
        type            phaseHydrostaticPressure;
        phaseName       alpha1;
        rho             rho;
        pRefValue       1e5;
        pRefPoint       (0 0 0);
        value           uniform 0; // optional initial value
    }
See also
Foam::mixedFvPatchScalarField
Source files

Definition at line 140 of file phaseHydrostaticPressureFvPatchScalarField.H.

Constructor & Destructor Documentation

phaseHydrostaticPressureFvPatchScalarField ( const fvPatch p,
const DimensionedField< scalar, volMesh > &  iF 
)

Construct from patch and internal field.

Definition at line 37 of file phaseHydrostaticPressureFvPatchScalarField.C.

Referenced by phaseHydrostaticPressureFvPatchScalarField::clone(), and phaseHydrostaticPressureFvPatchScalarField::phaseHydrostaticPressureFvPatchScalarField().

Here is the caller graph for this function:

phaseHydrostaticPressureFvPatchScalarField ( const fvPatch p,
const DimensionedField< scalar, volMesh > &  iF,
const dictionary dict 
)

Construct from patch, internal field and dictionary.

Definition at line 56 of file phaseHydrostaticPressureFvPatchScalarField.C.

References dictionary::found(), phaseHydrostaticPressureFvPatchScalarField::phaseHydrostaticPressureFvPatchScalarField(), scalarField(), and fvPatch::size().

Here is the call graph for this function:

Construct by mapping given.

phaseHydrostaticPressureFvPatchScalarField onto a new patch

Definition at line 89 of file phaseHydrostaticPressureFvPatchScalarField.C.

References phaseHydrostaticPressureFvPatchScalarField::phaseHydrostaticPressureFvPatchScalarField().

Here is the call graph for this function:

Construct as copy.

Definition at line 106 of file phaseHydrostaticPressureFvPatchScalarField.C.

References phaseHydrostaticPressureFvPatchScalarField::phaseHydrostaticPressureFvPatchScalarField().

Here is the call graph for this function:

Construct as copy setting internal field reference.

Definition at line 117 of file phaseHydrostaticPressureFvPatchScalarField.C.

Member Function Documentation

TypeName ( "phaseHydrostaticPressure"  )

Runtime type information.

virtual tmp<fvPatchScalarField> clone ( ) const
inlinevirtual

Construct and return a clone.

Definition at line 202 of file phaseHydrostaticPressureFvPatchScalarField.H.

References phaseHydrostaticPressureFvPatchScalarField::phaseHydrostaticPressureFvPatchScalarField().

Here is the call graph for this function:

virtual tmp<fvPatchScalarField> clone ( const DimensionedField< scalar, volMesh > &  iF) const
inlinevirtual

Construct and return a clone setting internal field reference.

Definition at line 219 of file phaseHydrostaticPressureFvPatchScalarField.H.

References phaseHydrostaticPressureFvPatchScalarField::phaseHydrostaticPressureFvPatchScalarField().

Here is the call graph for this function:

const word& phaseName ( ) const
inline
word& phaseName ( )
inline

Return reference to the phaseName to allow adjustment.

Definition at line 241 of file phaseHydrostaticPressureFvPatchScalarField.H.

References phaseHydrostaticPressureFvPatchScalarField::phaseName_.

scalar rho ( ) const
inline

Return the constant density in the far-field.

Definition at line 247 of file phaseHydrostaticPressureFvPatchScalarField.H.

References phaseHydrostaticPressureFvPatchScalarField::rho_.

scalar& rho ( )
inline

Return reference to the constant density in the far-field.

to allow adjustment

Definition at line 254 of file phaseHydrostaticPressureFvPatchScalarField.H.

scalar pRefValue ( ) const
inline

Return the reference pressure.

Definition at line 260 of file phaseHydrostaticPressureFvPatchScalarField.H.

References phaseHydrostaticPressureFvPatchScalarField::pRefValue_.

scalar& pRefValue ( )
inline

Return reference to the reference pressure to allow adjustment.

Definition at line 266 of file phaseHydrostaticPressureFvPatchScalarField.H.

References phaseHydrostaticPressureFvPatchScalarField::pRefValue_.

const vector& pRefPoint ( ) const
inline
vector& pRefPoint ( )
inline

Return reference to the pressure reference location.

to allow adjustment

Definition at line 279 of file phaseHydrostaticPressureFvPatchScalarField.H.

void updateCoeffs ( )
virtual
void write ( Ostream os) const
virtual
void operator= ( const fvPatchScalarField pvf)
virtual

Definition at line 179 of file phaseHydrostaticPressureFvPatchScalarField.C.

References Foam::makePatchTypeField(), and fvPatchField< Type >::operator.

Referenced by phaseHydrostaticPressureFvPatchScalarField::pRefPoint().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

word phaseName_
protected
scalar rho_
protected
scalar pRefValue_
protected
vector pRefPoint_
protected

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