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::timeVaryingMappedTotalPressureFvPatchScalarField
29 Foam::timeVaryingMappedTotalPressureFvPatchScalarField
32 timeVaryingMappedTotalPressureFvPatchScalarField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef timeVaryingMappedTotalPressureFvPatchScalarField_H
37 #define timeVaryingMappedTotalPressureFvPatchScalarField_H
39 #include "timeVaryingMappedFixedValueFvPatchFields.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class timeVaryingMappedTotalPressureFvPatch Declaration
48 \*---------------------------------------------------------------------------*/
50 class timeVaryingMappedTotalPressureFvPatchScalarField
52 public timeVaryingMappedFixedValueFvPatchScalarField
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 //- Rho value used to normalise the total pressure for incompressible flow
69 //- Name of the compressibility field used to calculate the wave speed
72 //- Heat capacity ratio
78 //- Runtime type information
79 TypeName("timeVaryingMappedTotalPressure");
84 //- Construct from patch and internal field
85 timeVaryingMappedTotalPressureFvPatchScalarField
88 const DimensionedField<scalar, volMesh>&
91 //- Construct from patch, internal field and dictionary
92 timeVaryingMappedTotalPressureFvPatchScalarField
95 const DimensionedField<scalar, volMesh>&,
99 //- Construct by mapping given timeVaryingMappedTotalPressureFvPatchScalarField
101 timeVaryingMappedTotalPressureFvPatchScalarField
103 const timeVaryingMappedTotalPressureFvPatchScalarField&,
105 const DimensionedField<scalar, volMesh>&,
106 const fvPatchFieldMapper&
109 //- Construct as copy
110 timeVaryingMappedTotalPressureFvPatchScalarField
112 const timeVaryingMappedTotalPressureFvPatchScalarField&
115 //- Construct and return a clone
116 virtual tmp<fvPatchScalarField> clone() const
118 return tmp<fvPatchScalarField>
120 new timeVaryingMappedTotalPressureFvPatchScalarField(*this)
124 //- Construct as copy setting internal field reference
125 timeVaryingMappedTotalPressureFvPatchScalarField
127 const timeVaryingMappedTotalPressureFvPatchScalarField&,
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 timeVaryingMappedTotalPressureFvPatchScalarField(*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
176 //- Map (and resize as needed) from self given a mapping object
179 const fvPatchFieldMapper&
182 //- Reverse map the given fvPatchField onto this fvPatchField
185 const fvPatchScalarField&,
190 // Evaluation functions
192 //- Update the coefficients associated with the patch field
193 // using the given patch velocity field
194 virtual void updateCoeffs(const vectorField& Up);
196 //- Update the coefficients associated with the patch field
197 virtual void updateCoeffs();
201 virtual void write(Ostream&) const;
205 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
207 } // End namespace Foam
209 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
213 // ************************************************************************* //