1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::totalPressureFvPatchScalarField
29 Foam::totalPressureFvPatchScalarField
32 totalPressureFvPatchScalarField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef totalPressureFvPatchScalarField_H
37 #define totalPressureFvPatchScalarField_H
39 #include "fixedValueFvPatchFields.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class totalPressureFvPatchScalarField Declaration
48 \*---------------------------------------------------------------------------*/
50 class totalPressureFvPatchScalarField
52 public fixedValueFvPatchScalarField
56 //- Name of the velocity field
59 //- Name of the flux transporting the field
62 //- Name of the density field used to normalise the mass flux
66 //- Name of the compressibility field used to calculate the wave speed
69 //- Heat capacity ratio
78 //- Runtime type information
79 TypeName("totalPressure");
84 //- Construct from patch and internal field
85 totalPressureFvPatchScalarField
88 const DimensionedField<scalar, volMesh>&
91 //- Construct from patch, internal field and dictionary
92 totalPressureFvPatchScalarField
95 const DimensionedField<scalar, volMesh>&,
99 //- Construct by mapping given totalPressureFvPatchScalarField
101 totalPressureFvPatchScalarField
103 const totalPressureFvPatchScalarField&,
105 const DimensionedField<scalar, volMesh>&,
106 const fvPatchFieldMapper&
109 //- Construct as copy
110 totalPressureFvPatchScalarField
112 const totalPressureFvPatchScalarField&
115 //- Construct and return a clone
116 virtual tmp<fvPatchScalarField> clone() const
118 return tmp<fvPatchScalarField>
120 new totalPressureFvPatchScalarField(*this)
124 //- Construct as copy setting internal field reference
125 totalPressureFvPatchScalarField
127 const totalPressureFvPatchScalarField&,
128 const DimensionedField<scalar, volMesh>&
131 //- Construct and return a clone setting internal field reference
132 virtual tmp<fvPatchScalarField> clone
134 const DimensionedField<scalar, volMesh>& iF
137 return tmp<fvPatchScalarField>
139 new totalPressureFvPatchScalarField(*this, iF)
148 //- Return the name of the velocity field
149 const word& UName() const
154 //- Return reference to the name of the velocity field
155 // to allow adjustment
161 //- Return the heat capacity ratio
167 //- Return reference to the heat capacity ratio to allow adjustment
173 //- Return the total pressure
174 const scalarField& p0() const
179 //- Return reference to the total pressure to allow adjustment
188 //- Map (and resize as needed) from self given a mapping object
191 const fvPatchFieldMapper&
194 //- Reverse map the given fvPatchField onto this fvPatchField
197 const fvPatchScalarField&,
202 // Evaluation functions
204 //- Update the coefficients associated with the patch field
205 // using the given patch velocity field
206 virtual void updateCoeffs(const vectorField& Up);
208 //- Update the coefficients associated with the patch field
209 virtual void updateCoeffs();
213 virtual void write(Ostream&) const;
217 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
219 } // End namespace Foam
221 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
225 // ************************************************************************* //