Fix tutorials: coupled/conjugateHeatFoam/conjugateCavity: fix Allrun file
[OpenFOAM-1.6-ext.git] / src / finiteVolume / fields / fvPatchFields / derived / waveTransmissive / waveTransmissiveFvPatchField.H
blob1c9e1c0605cc5ea6e62e57a6267399ee33e44205
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright held by original author
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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
25 Class
26     Foam::waveTransmissiveFvPatchField
28 Description
29     Foam::waveTransmissiveFvPatchField
31 SourceFiles
32     waveTransmissiveFvPatchField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef waveTransmissiveFvPatchField_H
37 #define waveTransmissiveFvPatchField_H
39 #include "advectiveFvPatchFields.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 namespace Foam
46 /*---------------------------------------------------------------------------*\
47                    Class waveTransmissiveFvPatch Declaration
48 \*---------------------------------------------------------------------------*/
50 template<class Type>
51 class waveTransmissiveFvPatchField
53     public advectiveFvPatchField<Type>
56     // Private data
58         //- Name of the compressibility field used to calculate the wave speed
59         word psiName_;
61         //- Name of velocity field used to calculate supercritical condition
62         word UName_;
64         //- Heat capacity ratio
65         scalar gamma_;
68 public:
70     //- Runtime type information
71     TypeName("waveTransmissive");
74     // Constructors
76         //- Construct from patch and internal field
77         waveTransmissiveFvPatchField
78         (
79             const fvPatch&,
80             const DimensionedField<Type, volMesh>&
81         );
83         //- Construct from patch, internal field and dictionary
84         waveTransmissiveFvPatchField
85         (
86             const fvPatch&,
87             const DimensionedField<Type, volMesh>&,
88             const dictionary&
89         );
91         //- Construct by mapping given waveTransmissiveFvPatchField
92         //  onto a new patch
93         waveTransmissiveFvPatchField
94         (
95             const waveTransmissiveFvPatchField<Type>&,
96             const fvPatch&,
97             const DimensionedField<Type, volMesh>&,
98             const fvPatchFieldMapper&
99         );
101         //- Construct as copy
102         waveTransmissiveFvPatchField
103         (
104             const waveTransmissiveFvPatchField&
105         );
107         //- Construct and return a clone
108         virtual tmp<fvPatchField<Type> > clone() const
109         {
110             return tmp<fvPatchField<Type> >
111             (
112                 new waveTransmissiveFvPatchField<Type>(*this)
113             );
114         }
116         //- Construct as copy setting internal field reference
117         waveTransmissiveFvPatchField
118         (
119             const waveTransmissiveFvPatchField&,
120             const DimensionedField<Type, volMesh>&
121         );
123         //- Construct and return a clone setting internal field reference
124         virtual tmp<fvPatchField<Type> > clone
125         (
126             const DimensionedField<Type, volMesh>& iF
127         ) const
128         {
129             return tmp<fvPatchField<Type> >
130             (
131                 new waveTransmissiveFvPatchField<Type>(*this, iF)
132             );
133         }
136     // Member functions
138         // Access
140             //- Return the heat capacity ratio
141             scalar gamma() const
142             {
143                 return gamma_;
144             }
146             //- Return reference to the heat capacity ratio to allow adjustment
147             scalar& gamma()
148             {
149                 return gamma_;
150             }
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;
164         //- Write
165         virtual void write(Ostream&) const;
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 } // End namespace Foam
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 #ifdef NoRepository
176 #   include "waveTransmissiveFvPatchField.C"
177 #endif
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 #endif
183 // ************************************************************************* //