FreeFOAM The Cross-Platform CFD Toolkit
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 | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::fixedPressureCompressibleDensityFvPatchScalarField
26 
27 Description
28  Calculate compressible density as a function of pressure and fluid
29  properties.
30 
31  Example of the boundary condition specification:
32  @verbatim
33  inlet
34  {
35  type fixedPressureCompressibleDensity;
36  p p; // Name of static pressure field
37  value uniform 1; // Initial value
38  }
39  @endverbatim
40 
41 SourceFiles
42  fixedPressureCompressibleDensityFvPatchScalarField.C
43 
44 \*---------------------------------------------------------------------------*/
45 
46 #ifndef fixedPressureCompressibleDensityFvPatchScalarField_H
47 #define fixedPressureCompressibleDensityFvPatchScalarField_H
48 
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 
56 /*---------------------------------------------------------------------------*\
57  Class fixedPressureCompressibleDensityFvPatchScalarField Declaration
58 \*---------------------------------------------------------------------------*/
59 
61 :
62  public fixedValueFvPatchScalarField
63 {
64  // Private data
65 
66  //- Name of static pressure field
67  word pName_;
68 
69 
70 public:
71 
72  //- Runtime type information
73  TypeName("fixedPressureCompressibleDensity");
74 
75 
76  // Constructors
77 
78  //- Construct from patch and internal field
80  (
81  const fvPatch&,
83  );
84 
85  //- Construct from patch, internal field and dictionary
87  (
88  const fvPatch&,
90  const dictionary&
91  );
92 
93  //- Construct by mapping given
94  // fixedPressureCompressibleDensityFvPatchScalarField
95  // onto a new patch
97  (
99  const fvPatch&,
101  const fvPatchFieldMapper&
102  );
103 
104  //- Construct as copy
106  (
108  );
109 
110  //- Construct and return a clone
112  {
114  (
116  );
117  }
118 
119  //- Construct as copy setting internal field reference
121  (
124  );
125 
126  //- Construct and return a clone setting internal field reference
128  (
130  ) const
131  {
133  (
135  (
136  *this,
137  iF
138  )
139  );
140  }
141 
142 
143  // Member functions
144 
145  //- Update the coefficients associated with the patch field
146  virtual void updateCoeffs();
147 
148  //- Write
149  virtual void write(Ostream&) const;
150 };
151 
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 } // End namespace Foam
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 #endif
160 
161 // ************************ vim: set sw=4 sts=4 et: ************************ //