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::waveTransmissiveFvPatchField
29 Foam::waveTransmissiveFvPatchField
32 waveTransmissiveFvPatchField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef waveTransmissiveFvPatchField_H
37 #define waveTransmissiveFvPatchField_H
39 #include "advectiveFvPatchFields.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class waveTransmissiveFvPatch Declaration
48 \*---------------------------------------------------------------------------*/
51 class waveTransmissiveFvPatchField
53 public advectiveFvPatchField<Type>
58 //- Name of the compressibility field used to calculate the wave speed
61 //- Name of velocity field used to calculate supercritical condition
64 //- Heat capacity ratio
70 //- Runtime type information
71 TypeName("waveTransmissive");
76 //- Construct from patch and internal field
77 waveTransmissiveFvPatchField
80 const DimensionedField<Type, volMesh>&
83 //- Construct from patch, internal field and dictionary
84 waveTransmissiveFvPatchField
87 const DimensionedField<Type, volMesh>&,
91 //- Construct by mapping given waveTransmissiveFvPatchField
93 waveTransmissiveFvPatchField
95 const waveTransmissiveFvPatchField<Type>&,
97 const DimensionedField<Type, volMesh>&,
98 const fvPatchFieldMapper&
101 //- Construct as copy
102 waveTransmissiveFvPatchField
104 const waveTransmissiveFvPatchField&
107 //- Construct and return a clone
108 virtual tmp<fvPatchField<Type> > clone() const
110 return tmp<fvPatchField<Type> >
112 new waveTransmissiveFvPatchField<Type>(*this)
116 //- Construct as copy setting internal field reference
117 waveTransmissiveFvPatchField
119 const waveTransmissiveFvPatchField&,
120 const DimensionedField<Type, volMesh>&
123 //- Construct and return a clone setting internal field reference
124 virtual tmp<fvPatchField<Type> > clone
126 const DimensionedField<Type, volMesh>& iF
129 return tmp<fvPatchField<Type> >
131 new waveTransmissiveFvPatchField<Type>(*this, iF)
140 //- Return the heat capacity ratio
146 //- Return reference to the heat capacity ratio to allow adjustment
153 // Evaluation functions
155 //- Calculate and return the advection speed at the boundary
156 virtual tmp<scalarField> advectionSpeed() const;
158 //- Calculate and return the supercritical switch at the boundary
159 // Supercritical = 1 converts the outlet to zeroGradient
160 // Supercritical = 0 no correction
161 virtual tmp<scalarField> supercritical() const;
165 virtual void write(Ostream&) const;
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 } // End namespace Foam
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 # include "waveTransmissiveFvPatchField.C"
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 // ************************************************************************* //