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::supersonicFreestreamFvPatchVectorField
29 Supersonic free stream condition.
31 Supersonic outflow is vented according to ???
33 Supersonic inflow is assumed to occur according to the Prandtl-Meyer
36 Subsonic outflow is zero-gradiented from inside the domain.
38 N.B. This boundary condition is ill-posed if the free-stream flow is
39 normal to the boundary.
42 supersonicFreestreamFvPatchVectorField.C
44 \*---------------------------------------------------------------------------*/
46 #ifndef supersonicFreestreamFvPatchVectorFields_H
47 #define supersonicFreestreamFvPatchVectorFields_H
49 #include "fvPatchFields.H"
50 #include "mixedFvPatchFields.H"
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 /*---------------------------------------------------------------------------*\
58 Class supersonicFreestreamFvPatch Declaration
59 \*---------------------------------------------------------------------------*/
61 class supersonicFreestreamFvPatchVectorField
63 public mixedFvPatchVectorField
67 //- Velocity of the free stream
70 //- Pressure of the free stream
73 //- Temperature of the free stream
76 //- Heat capacity ratio
82 //- Runtime type information
83 TypeName("supersonicFreestream");
88 //- Construct from patch and internal field
89 supersonicFreestreamFvPatchVectorField
92 const DimensionedField<vector, volMesh>&
95 //- Construct from patch, internal field and dictionary
96 supersonicFreestreamFvPatchVectorField
99 const DimensionedField<vector, volMesh>&,
103 //- Construct by mapping given supersonicFreestreamFvPatchVectorField
105 supersonicFreestreamFvPatchVectorField
107 const supersonicFreestreamFvPatchVectorField&,
109 const DimensionedField<vector, volMesh>&,
110 const fvPatchFieldMapper&
113 //- Construct as copy
114 supersonicFreestreamFvPatchVectorField
116 const supersonicFreestreamFvPatchVectorField&
119 //- Construct and return a clone
120 virtual tmp<fvPatchVectorField> clone() const
122 return tmp<fvPatchVectorField>
124 new supersonicFreestreamFvPatchVectorField(*this)
128 //- Construct as copy setting internal field reference
129 supersonicFreestreamFvPatchVectorField
131 const supersonicFreestreamFvPatchVectorField&,
132 const DimensionedField<vector, volMesh>&
135 //- Construct and return a clone setting internal field reference
136 virtual tmp<fvPatchVectorField> clone
138 const DimensionedField<vector, volMesh>& iF
141 return tmp<fvPatchVectorField>
143 new supersonicFreestreamFvPatchVectorField(*this, iF)
152 //- Return the velocity at infinity
153 const vector& UInf() const
158 //- Return reference to the velocity at infinity to allow adjustment
164 //- Return the pressure at infinity
170 //- Return reference to the pressure at infinity to allow adjustment
176 //- Return the temperature at infinity
182 //- Return reference to the temperature at infinity
183 // to allow adjustment
190 // Evaluation functions
192 //- Update the coefficients associated with the patch field
193 virtual void updateCoeffs();
197 virtual void write(Ostream&) const;
201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
203 } // End namespace Foam
205 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
209 // ************************************************************************* //