fixedRhoFvPatchScalarField.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::fixedRhoFvPatchScalarField
28
29Group
30 grpInletBoundaryConditions
31
32Description
33 Foam::fixedRhoFvPatchScalarField
34
35 This boundary condition provides a fixed density inlet condition for
36 compressible solvers, where the density of calculated using:
37
38 \f[
39 \rho = \psi p
40 \f]
41
42 where
43 \vartable
44 p | pressure [Pa]
45 \rho | density [kg/m3]
46 \endvartable
47
48
49Usage
50 \table
51 Property | Description | Required | Default value
52 p | Pressure field name | no | p
53 psi | Compressibility field name | no | thermo:psi
54 \endtable
55
56 Example of the boundary condition specification:
57 \verbatim
58 <patchName>
59 {
60 type fixedRho;
61 }
62 \endverbatim
63
64SourceFiles
65 fixedRhoFvPatchScalarField.C
66
67\*---------------------------------------------------------------------------*/
68
69#ifndef fixedRhoFvPatchScalarField_H
70#define fixedRhoFvPatchScalarField_H
71
73
74// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
75
76namespace Foam
77{
78
79/*---------------------------------------------------------------------------*\
80 Class fixedRhoFvPatchScalarField Declaration
81\*---------------------------------------------------------------------------*/
82
83class fixedRhoFvPatchScalarField
84:
85 public fixedValueFvPatchScalarField
86{
87
88private:
89
90 // Private data
91
92 //- Pressure field name, default = "p"
93 word pName_;
94
95 //- Compressibility field name, default = "thermo:psi"
96 word psiName_;
97
98
99public:
100
101 //- Runtime type information
102 TypeName("fixedRho");
103
104
105 // Constructors
106
107 //- Construct from patch and internal field
109 (
110 const fvPatch&,
112 );
113
114 //- Construct from patch, internal field and dictionary
116 (
117 const fvPatch&,
119 const dictionary&
120 );
121
122 //- Construct by mapping given fixedRhoFvPatchScalarField
123 // onto a new patch
125 (
127 const fvPatch&,
129 const fvPatchFieldMapper&
130 );
131
132 //- Construct as copy
134 (
136 );
138 //- Construct and return a clone
139 virtual tmp<fvPatchScalarField> clone() const
140 {
142 (
144 );
145 }
147 //- Construct as copy setting internal field reference
149 (
152 );
153
154 //- Construct and return a clone setting internal field reference
156 (
158 ) const
159 {
162 new fixedRhoFvPatchScalarField(*this, iF)
163 );
164 }
165
166
167 // Member functions
168
169 // Evaluation functions
171 //- Update the coefficients associated with the patch field
172 virtual void updateCoeffs();
173
174
175 //- Write
176 virtual void write(Ostream&) const;
178
179
180// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181
182} // End namespace Foam
183
184// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185
186#endif
187
188// ************************************************************************* //
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:62
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Foam::fixedRhoFvPatchScalarField.
fixedRhoFvPatchScalarField(const fixedRhoFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
Construct as copy setting internal field reference.
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
TypeName("fixedRho")
Runtime type information.
fixedRhoFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
fixedRhoFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
fixedRhoFvPatchScalarField(const fixedRhoFvPatchScalarField &)
Construct as copy.
virtual void write(Ostream &) const
Write.
A FieldMapper for finite-volume patch fields.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73