Loading...
Searching...
No Matches
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
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
136 );
137
138 //- Construct as copy setting internal field reference
140 (
143 );
144
145 //- Return a clone
146 virtual tmp<fvPatchField<scalar>> clone() const
147 {
148 return fvPatchField<scalar>::Clone(*this);
149 }
150
151 //- Clone with an internal field reference
153 (
155 ) const
156 {
157 return fvPatchField<scalar>::Clone(*this, iF);
158 }
159
160
161 // Member functions
162
163 // Evaluation functions
164
165 //- Update the coefficients associated with the patch field
166 virtual void updateCoeffs();
167
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
Foam::fixedRhoFvPatchScalarField.
fixedRhoFvPatchScalarField(const fixedRhoFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
Construct as copy setting internal field reference.
TypeName("fixedRho")
Runtime type information.
virtual tmp< fvPatchField< scalar > > clone(const DimensionedField< scalar, volMesh > &iF) const
Clone with an internal field reference.
virtual tmp< fvPatchField< scalar > > clone() const
Return a clone.
fixedRhoFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
fixedRhoFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
fixedRhoFvPatchScalarField(const fixedRhoFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
Construct by mapping given fixedRhoFvPatchScalarField.
fixedRhoFvPatchScalarField(const fixedRhoFvPatchScalarField &)
Construct as copy.
virtual void write(Ostream &) const
Write.
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