Loading...
Searching...
No Matches
fixedPressureCompressibleDensityFvPatchScalarField.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2016 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::fixedPressureCompressibleDensityFvPatchScalarField
28
29Group
30 grpInletBoundaryConditions
31
32Description
33 This boundary condition calculates a (liquid) compressible density as a
34 function of pressure and fluid properties:
35
36 \f[
37 \rho = \rho_{l,sat} + \psi_l*(p - p_{sat})
38 \f]
39
40 where
41
42 \vartable
43 \rho | density [kg/m3]
44 \rho_{l,sat} | saturation liquid density [kg/m3]
45 \psi_l | liquid compressibility
46 p | pressure [Pa]
47 p_{sat} | saturation pressure [Pa]
48 \endvartable
49
50 The variables \c rholSat, \c pSat and \c psil are retrieved from the
51 \c thermodynamicProperties dictionary.
52
53Usage
54 \table
55 Property | Description | Required | Default value
56 p | pressure field name | no | p
57 \endtable
58
59 Example of the boundary condition specification:
60 \verbatim
61 <patchName>
62 {
63 type fixedPressureCompressibleDensity;
64 p p;
65 value uniform 1;
66 }
67 \endverbatim
68
69See also
70 Foam::fixedValueFvPatchField
71
72SourceFiles
73 fixedPressureCompressibleDensityFvPatchScalarField.C
74
75\*---------------------------------------------------------------------------*/
76
77#ifndef fixedPressureCompressibleDensityFvPatchScalarField_H
78#define fixedPressureCompressibleDensityFvPatchScalarField_H
79
81
82// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
83
84namespace Foam
85{
86
87/*---------------------------------------------------------------------------*\
88 Class fixedPressureCompressibleDensityFvPatchScalarField Declaration
89\*---------------------------------------------------------------------------*/
90
92:
93 public fixedValueFvPatchScalarField
94{
95 // Private data
96
97 //- Name of static pressure field
98 word pName_;
99
100
101public:
102
103 //- Runtime type information
104 TypeName("fixedPressureCompressibleDensity");
105
106
107 // Constructors
108
109 //- Construct from patch and internal field
111 (
112 const fvPatch&,
113 const DimensionedField<scalar, volMesh>&
114 );
115
116 //- Construct from patch, internal field and dictionary
118 (
119 const fvPatch&,
121 const dictionary&
122 );
123
124 //- Construct by mapping given
125 // fixedPressureCompressibleDensityFvPatchScalarField
126 // onto a new patch
128 (
130 const fvPatch&,
132 const fvPatchFieldMapper&
133 );
134
135 //- Construct as copy
137 (
139 );
140
141 //- Construct as copy setting internal field reference
143 (
146 );
147
148 //- Return a clone
149 virtual tmp<fvPatchField<scalar>> clone() const
150 {
151 return fvPatchField<scalar>::Clone(*this);
152 }
153
154 //- Clone with an internal field reference
156 (
158 ) const
159 {
160 return fvPatchField<scalar>::Clone(*this, iF);
161 }
162
163
164 // Member functions
165
166 //- Update the coefficients associated with the patch field
167 virtual void updateCoeffs();
168
169 //- Write
170 virtual void write(Ostream&) const;
171};
172
173
174// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175
176} // End namespace Foam
177
178// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179
180#endif
181
182// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
This boundary condition calculates a (liquid) compressible density as a function of pressure and flui...
virtual tmp< fvPatchField< scalar > > clone(const DimensionedField< scalar, volMesh > &iF) const
Clone with an internal field reference.
fixedPressureCompressibleDensityFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
TypeName("fixedPressureCompressibleDensity")
Runtime type information.
A FieldMapper for finite-volume patch fields.
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition fvPatch.H:71
A class for managing temporary objects.
Definition tmp.H:75
A class for handling words, derived from Foam::string.
Definition word.H:66
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68