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::isentropicTotalPressureFvPatchScalarField
28 Isentropic total pressure boundary condition. The snGrad is set to
29 zero to stop back-diffusion
32 isentropicTotalPressureFvPatchScalarField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef isentropicTotalPressureFvPatchScalarField_H
37 #define isentropicTotalPressureFvPatchScalarField_H
39 #include "fixedValueFvPatchFields.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class isentropicTotalPressureFvPatchScalarField Declaration
48 \*---------------------------------------------------------------------------*/
50 class isentropicTotalPressureFvPatchScalarField
52 public fixedValueFvPatchScalarField
56 //- Name of the velocity field
59 //- Name of the static temperature field
62 //- Total pressure field
68 //- Runtime type information
69 TypeName("isentropicTotalPressure");
74 //- Construct from patch and internal field
75 isentropicTotalPressureFvPatchScalarField
78 const DimensionedField<scalar, volMesh>&
81 //- Construct from patch, internal field and dictionary
82 isentropicTotalPressureFvPatchScalarField
85 const DimensionedField<scalar, volMesh>&,
89 //- Construct by mapping given
90 // isentropicTotalPressureFvPatchScalarField onto a new patch
91 isentropicTotalPressureFvPatchScalarField
93 const isentropicTotalPressureFvPatchScalarField&,
95 const DimensionedField<scalar, volMesh>&,
96 const fvPatchFieldMapper&
100 isentropicTotalPressureFvPatchScalarField
102 const isentropicTotalPressureFvPatchScalarField&
105 //- Construct and return a clone
106 virtual tmp<fvPatchScalarField> clone() const
108 return tmp<fvPatchScalarField>
110 new isentropicTotalPressureFvPatchScalarField(*this)
114 //- Construct as copy setting internal field reference
115 isentropicTotalPressureFvPatchScalarField
117 const isentropicTotalPressureFvPatchScalarField&,
118 const DimensionedField<scalar, volMesh>&
121 //- Construct and return a clone setting internal field reference
122 virtual tmp<fvPatchScalarField> clone
124 const DimensionedField<scalar, volMesh>& iF
127 return tmp<fvPatchScalarField>
129 new isentropicTotalPressureFvPatchScalarField(*this, iF)
138 //- Return the name of the velocity field
139 const word& UName() const
144 //- Return reference to the name of the velocity field
145 // to allow adjustment
151 //- Return the total pressure
152 const scalarField& p0() const
157 //- Return reference to the total pressure to allow adjustment
166 //- Map (and resize as needed) from self given a mapping object
169 const fvPatchFieldMapper&
172 //- Reverse map the given fvPatchField onto this fvPatchField
175 const fvPatchScalarField&,
180 // Evaluation functions
182 //- Update the coefficients associated with the patch field
183 // using the given patch velocity field
184 virtual void updateCoeffs(const vectorField& Up);
186 //- Update the coefficients associated with the patch field
187 virtual void updateCoeffs();
189 //- Return patch-normal gradient: set to zero
190 virtual tmp<scalarField> snGrad() const;
192 //- Return the matrix diagonal coefficients corresponding to the
193 // evaluation of the gradient of this patchField
194 // Removed gradient contribution
195 virtual tmp<scalarField> gradientInternalCoeffs() const;
197 //- Return the matrix source coefficients corresponding to the
198 // evaluation of the gradient of this patchField
199 virtual tmp<scalarField> gradientBoundaryCoeffs() const;
203 virtual void write(Ostream&) const;
207 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
209 } // End namespace Foam
211 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
215 // ************************************************************************* //