Loading...
Searching...
No Matches
uniformDensityHydrostaticPressureFvPatchScalarField Class Reference

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

#include <uniformDensityHydrostaticPressureFvPatchScalarField.H>

Inheritance diagram for uniformDensityHydrostaticPressureFvPatchScalarField:
Collaboration diagram for uniformDensityHydrostaticPressureFvPatchScalarField:

Public Member Functions

 TypeName ("uniformDensityHydrostaticPressure")
 Runtime type information.
 uniformDensityHydrostaticPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 Construct from patch and internal field.
 uniformDensityHydrostaticPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary.
 uniformDensityHydrostaticPressureFvPatchScalarField (const uniformDensityHydrostaticPressureFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping given.
 uniformDensityHydrostaticPressureFvPatchScalarField (const uniformDensityHydrostaticPressureFvPatchScalarField &)
 Construct as copy.
 uniformDensityHydrostaticPressureFvPatchScalarField (const uniformDensityHydrostaticPressureFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 Construct as copy setting internal field reference.
virtual tmp< fvPatchField< scalar > > clone () const
 Return a clone.
virtual tmp< fvPatchField< scalar > > clone (const DimensionedField< scalar, volMesh > &iF) const
 Clone with an internal field reference.
scalar rho () const
 Return the constant density in the far-field.
scalar & rho ()
 Return reference to the constant density in the far-field.
scalar pRefValue () const
 Return the reference pressure.
scalar & pRefValue ()
 Return reference to the reference pressure to allow adjustment.
const vectorpRefPoint () const
 Return the pressure reference location.
vectorpRefPoint ()
 Return reference to the pressure reference location.
virtual void updateCoeffs ()
 Update the coefficients associated with the patch field.
virtual void write (Ostream &) const
 Write.

Detailed Description

This boundary condition provides a 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 coordinates
$        \rho    $=density (assumed uniform)
$        g       $=acceleration due to gravity [m/s2]
Usage
Property Description Required Default value
rho uniform density [kg/m3] yes
pRefValue reference pressure [Pa] yes
pRefPoint reference pressure location yes

Example of the boundary condition specification:

    <patchName>
    {
        type            uniformDensityHydrostaticPressure;
        rho             rho;
        pRefValue       1e5;
        pRefPoint       (0 0 0);
        value           uniform 0; // optional initial value
    }
Source files

Definition at line 123 of file uniformDensityHydrostaticPressureFvPatchScalarField.H.

Constructor & Destructor Documentation

◆ uniformDensityHydrostaticPressureFvPatchScalarField() [1/5]

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

Construct from patch and internal field.

Definition at line 30 of file uniformDensityHydrostaticPressureFvPatchScalarField.C.

References p, and Foam::Zero.

Referenced by TypeName(), uniformDensityHydrostaticPressureFvPatchScalarField(), uniformDensityHydrostaticPressureFvPatchScalarField(), and uniformDensityHydrostaticPressureFvPatchScalarField().

Here is the caller graph for this function:

◆ uniformDensityHydrostaticPressureFvPatchScalarField() [2/5]

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

Construct from patch, internal field and dictionary.

Definition at line 44 of file uniformDensityHydrostaticPressureFvPatchScalarField.C.

References dict, and p.

◆ uniformDensityHydrostaticPressureFvPatchScalarField() [3/5]

uniformDensityHydrostaticPressureFvPatchScalarField ( const uniformDensityHydrostaticPressureFvPatchScalarField & ptf,
const fvPatch & p,
const DimensionedField< scalar, volMesh > & iF,
const fvPatchFieldMapper & mapper )

Construct by mapping given.

uniformDensityHydrostaticPressureFvPatchScalarField onto a new patch

Definition at line 64 of file uniformDensityHydrostaticPressureFvPatchScalarField.C.

References p, and uniformDensityHydrostaticPressureFvPatchScalarField().

Here is the call graph for this function:

◆ uniformDensityHydrostaticPressureFvPatchScalarField() [4/5]

uniformDensityHydrostaticPressureFvPatchScalarField ( const uniformDensityHydrostaticPressureFvPatchScalarField & ptf)

Construct as copy.

Definition at line 80 of file uniformDensityHydrostaticPressureFvPatchScalarField.C.

References uniformDensityHydrostaticPressureFvPatchScalarField().

Here is the call graph for this function:

◆ uniformDensityHydrostaticPressureFvPatchScalarField() [5/5]

uniformDensityHydrostaticPressureFvPatchScalarField ( const uniformDensityHydrostaticPressureFvPatchScalarField & ptf,
const DimensionedField< scalar, volMesh > & iF )

Construct as copy setting internal field reference.

Definition at line 93 of file uniformDensityHydrostaticPressureFvPatchScalarField.C.

References uniformDensityHydrostaticPressureFvPatchScalarField().

Here is the call graph for this function:

Member Function Documentation

◆ TypeName()

TypeName ( "uniformDensityHydrostaticPressure" )

Runtime type information.

References uniformDensityHydrostaticPressureFvPatchScalarField().

Here is the call graph for this function:

◆ clone() [1/2]

virtual tmp< fvPatchField< scalar > > clone ( ) const
inlinevirtual

Return a clone.

Definition at line 207 of file uniformDensityHydrostaticPressureFvPatchScalarField.H.

References fvPatchField< Type >::Clone().

Here is the call graph for this function:

◆ clone() [2/2]

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

Clone with an internal field reference.

Definition at line 215 of file uniformDensityHydrostaticPressureFvPatchScalarField.H.

References fvPatchField< Type >::Clone().

Here is the call graph for this function:

◆ rho() [1/2]

scalar rho ( ) const
inline

Return the constant density in the far-field.

Definition at line 231 of file uniformDensityHydrostaticPressureFvPatchScalarField.H.

◆ rho() [2/2]

scalar & rho ( )
inline

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

to allow adjustment

Definition at line 241 of file uniformDensityHydrostaticPressureFvPatchScalarField.H.

◆ pRefValue() [1/2]

scalar pRefValue ( ) const
inline

Return the reference pressure.

Definition at line 249 of file uniformDensityHydrostaticPressureFvPatchScalarField.H.

◆ pRefValue() [2/2]

scalar & pRefValue ( )
inline

Return reference to the reference pressure to allow adjustment.

Definition at line 257 of file uniformDensityHydrostaticPressureFvPatchScalarField.H.

◆ pRefPoint() [1/2]

const vector & pRefPoint ( ) const
inline

Return the pressure reference location.

Definition at line 265 of file uniformDensityHydrostaticPressureFvPatchScalarField.H.

◆ pRefPoint() [2/2]

vector & pRefPoint ( )
inline

Return reference to the pressure reference location.

to allow adjustment

Definition at line 275 of file uniformDensityHydrostaticPressureFvPatchScalarField.H.

◆ updateCoeffs()

void updateCoeffs ( )
virtual

Update the coefficients associated with the patch field.

Definition at line 109 of file uniformDensityHydrostaticPressureFvPatchScalarField.C.

References g, and gravity::New().

Here is the call graph for this function:

◆ write()

void write ( Ostream & os) const
virtual

Write.

Definition at line 129 of file uniformDensityHydrostaticPressureFvPatchScalarField.C.

References os(), fvPatchField< Type >::write(), and fvPatchField< Type >::writeValueEntry().

Here is the call graph for this function:

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