1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend 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 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
25 Foam::isentropicTotalTemperatureFvPatchScalarField
28 Isentropic total temperature boundary condition. The snGrad is set to
29 zero to stop back-diffusion
32 isentropicTotalTemperatureFvPatchScalarField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef isentropicTotalTemperatureFvPatchScalarField_H
37 #define isentropicTotalTemperatureFvPatchScalarField_H
39 #include "fixedValueFvPatchFields.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class isentropicTotalTemperatureFvPatchScalarField Declaration
48 \*---------------------------------------------------------------------------*/
50 class isentropicTotalTemperatureFvPatchScalarField
52 public fixedValueFvPatchScalarField
56 //- Name of the static pressure field
59 //- Total temperature field
65 //- Runtime type information
66 TypeName("isentropicTotalTemperature");
71 //- Construct from patch and internal field
72 isentropicTotalTemperatureFvPatchScalarField
75 const DimensionedField<scalar, volMesh>&
78 //- Construct from patch, internal field and dictionary
79 isentropicTotalTemperatureFvPatchScalarField
82 const DimensionedField<scalar, volMesh>&,
86 //- Construct by mapping given
87 // isentropicTotalTemperatureFvPatchScalarField onto a new patch
88 isentropicTotalTemperatureFvPatchScalarField
90 const isentropicTotalTemperatureFvPatchScalarField&,
92 const DimensionedField<scalar, volMesh>&,
93 const fvPatchFieldMapper&
97 isentropicTotalTemperatureFvPatchScalarField
99 const isentropicTotalTemperatureFvPatchScalarField&
102 //- Construct and return a clone
103 virtual tmp<fvPatchScalarField> clone() const
105 return tmp<fvPatchScalarField>
107 new isentropicTotalTemperatureFvPatchScalarField(*this)
111 //- Construct as copy setting internal field reference
112 isentropicTotalTemperatureFvPatchScalarField
114 const isentropicTotalTemperatureFvPatchScalarField&,
115 const DimensionedField<scalar, volMesh>&
118 //- Construct and return a clone setting internal field reference
119 virtual tmp<fvPatchScalarField> clone
121 const DimensionedField<scalar, volMesh>& iF
124 return tmp<fvPatchScalarField>
126 new isentropicTotalTemperatureFvPatchScalarField(*this, iF)
135 //- Return the total pressure
136 const scalarField& T0() const
141 //- Return reference to the total pressure to allow adjustment
150 //- Map (and resize as needed) from self given a mapping object
153 const fvPatchFieldMapper&
156 //- Reverse map the given fvPatchField onto this fvPatchField
159 const fvPatchScalarField&,
164 // Evaluation functions
166 //- Update the coefficients associated with the patch field
167 // using the given patch velocity field
168 virtual void updateCoeffs(const vectorField& Up);
170 //- Update the coefficients associated with the patch field
171 virtual void updateCoeffs();
173 //- Return patch-normal gradient: set to zero
174 virtual tmp<scalarField> snGrad() const;
176 //- Return the matrix diagonal coefficients corresponding to the
177 // evaluation of the gradient of this patchField
178 // Removed gradient contribution
179 virtual tmp<scalarField> gradientInternalCoeffs() const;
181 //- Return the matrix source coefficients corresponding to the
182 // evaluation of the gradient of this patchField
183 virtual tmp<scalarField> gradientBoundaryCoeffs() const;
187 virtual void write(Ostream&) const;
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193 } // End namespace Foam
195 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 // ************************************************************************* //