initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / finiteVolume / fields / fvPatchFields / derived / waveTransmissive / waveTransmissiveFvPatchField.H
blob7914d46b32fc8a40f2fa4062aabb1e74a719f188
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
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         //- Heat capacity ratio
62         scalar gamma_;
65 public:
67     //- Runtime type information
68     TypeName("waveTransmissive");
71     // Constructors
73         //- Construct from patch and internal field
74         waveTransmissiveFvPatchField
75         (
76             const fvPatch&,
77             const DimensionedField<Type, volMesh>&
78         );
80         //- Construct from patch, internal field and dictionary
81         waveTransmissiveFvPatchField
82         (
83             const fvPatch&,
84             const DimensionedField<Type, volMesh>&,
85             const dictionary&
86         );
88         //- Construct by mapping given waveTransmissiveFvPatchField
89         //  onto a new patch
90         waveTransmissiveFvPatchField
91         (
92             const waveTransmissiveFvPatchField<Type>&,
93             const fvPatch&,
94             const DimensionedField<Type, volMesh>&,
95             const fvPatchFieldMapper&
96         );
98         //- Construct as copy
99         waveTransmissiveFvPatchField
100         (
101             const waveTransmissiveFvPatchField&
102         );
104         //- Construct and return a clone
105         virtual tmp<fvPatchField<Type> > clone() const
106         {
107             return tmp<fvPatchField<Type> >
108             (
109                 new waveTransmissiveFvPatchField<Type>(*this)
110             );
111         }
113         //- Construct as copy setting internal field reference
114         waveTransmissiveFvPatchField
115         (
116             const waveTransmissiveFvPatchField&,
117             const DimensionedField<Type, volMesh>&
118         );
120         //- Construct and return a clone setting internal field reference
121         virtual tmp<fvPatchField<Type> > clone
122         (
123             const DimensionedField<Type, volMesh>& iF
124         ) const
125         {
126             return tmp<fvPatchField<Type> >
127             (
128                 new waveTransmissiveFvPatchField<Type>(*this, iF)
129             );
130         }
133     // Member functions
135         // Access
137             //- Return the heat capacity ratio
138             scalar gamma() const
139             {
140                 return gamma_;
141             }
143             //- Return reference to the heat capacity ratio to allow adjustment
144             scalar& gamma()
145             {
146                 return gamma_;
147             }
150         // Evaluation functions
152             //- Calculate and return the advection speed at the boundary
153             virtual tmp<scalarField> advectionSpeed() const;
156         //- Write
157         virtual void write(Ostream&) const;
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 } // End namespace Foam
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 #ifdef NoRepository
168 #   include "waveTransmissiveFvPatchField.C"
169 #endif
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 #endif
175 // ************************************************************************* //