/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016 OpenFOAM Foundation ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see . Class Foam::prghTotalHydrostaticPressureFvPatchScalarField Group grpGenericBoundaryConditions Description This boundary condition provides static pressure condition for p_rgh, calculated as: \f[ p_rgh = ph_rgh - 0.5 \rho |U|^2 \f] where \vartable p_rgh | Pressure: \f$ \rho g (h - h_{ref}) \f$ [Pa] ph_rgh | Hydrostatic pressure: \f$ \rho g (h - h_{ref}) \f$ [Pa] h | Height in the opposite direction to gravity hRef | Reference height in the opposite direction to gravity \rho | Density g | Acceleration due to gravity [m/s^2] \endtable Usage \table Property | Description | Required | Default value U | Velocity field name | no | U phi | Flux field name | no | phi rho | Density field name | no | rho ph_rgh | ph_rgh field name | no | ph_rgh value | Patch face values | yes | \endtable Example of the boundary condition specification: \verbatim { type prghTotalHydrostaticPressure; value uniform 0; } \endverbatim See also Foam::fixedValueFvPatchScalarField Foam::prghTotalPressureFvPatchScalarField SourceFiles prghTotalHydrostaticPressureFvPatchScalarField.C \*---------------------------------------------------------------------------*/ #ifndef prghTotalHydrostaticPressureFvPatchScalarField_H #define prghTotalHydrostaticPressureFvPatchScalarField_H #include "fixedValueFvPatchFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { /*---------------------------------------------------------------------------*\ Class prghTotalHydrostaticPressureFvPatchScalarField Declaration \*---------------------------------------------------------------------------*/ class prghTotalHydrostaticPressureFvPatchScalarField : public fixedValueFvPatchScalarField { protected: // Protected data //- Name of the velocity field word UName_; //- Name of the flux transporting the field word phiName_; //- Name of density field word rhoName_; //- Name of hydrostatic pressure field word ph_rghName_; public: //- Runtime type information TypeName("prghTotalHydrostaticPressure"); // Constructors //- Construct from patch and internal field prghTotalHydrostaticPressureFvPatchScalarField ( const fvPatch&, const DimensionedField& ); //- Construct from patch, internal field and dictionary prghTotalHydrostaticPressureFvPatchScalarField ( const fvPatch&, const DimensionedField&, const dictionary& ); //- Construct by mapping given // prghTotalHydrostaticPressureFvPatchScalarField onto a new patch prghTotalHydrostaticPressureFvPatchScalarField ( const prghTotalHydrostaticPressureFvPatchScalarField&, const fvPatch&, const DimensionedField&, const fvPatchFieldMapper& ); //- Construct as copy prghTotalHydrostaticPressureFvPatchScalarField ( const prghTotalHydrostaticPressureFvPatchScalarField& ); //- Construct as copy setting internal field reference prghTotalHydrostaticPressureFvPatchScalarField ( const prghTotalHydrostaticPressureFvPatchScalarField&, const DimensionedField& ); //- Return a clone virtual tmp> clone() const { return fvPatchField::Clone(*this); } //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { return fvPatchField::Clone(*this, iF); } // Member functions // Evaluation functions //- Update the coefficients associated with the patch field virtual void updateCoeffs(); //- Write virtual void write(Ostream&) const; }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif // ************************************************************************* //