FreeFOAM The Cross-Platform CFD Toolkit
waveTransmissiveFvPatchField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
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.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::waveTransmissiveFvPatchField
26 
27 Description
28  Foam::waveTransmissiveFvPatchField
29 
30 SourceFiles
31  waveTransmissiveFvPatchField.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef waveTransmissiveFvPatchField_H
36 #define waveTransmissiveFvPatchField_H
37 
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class waveTransmissiveFvPatch Declaration
47 \*---------------------------------------------------------------------------*/
48 
49 template<class Type>
51 :
52  public advectiveFvPatchField<Type>
53 {
54 
55  // Private data
56 
57  //- Name of the compressibility field used to calculate the wave speed
58  word psiName_;
59 
60  //- Heat capacity ratio
61  scalar gamma_;
62 
63 
64 public:
65 
66  //- Runtime type information
67  TypeName("waveTransmissive");
68 
69 
70  // Constructors
71 
72  //- Construct from patch and internal field
74  (
75  const fvPatch&,
77  );
78 
79  //- Construct from patch, internal field and dictionary
81  (
82  const fvPatch&,
84  const dictionary&
85  );
86 
87  //- Construct by mapping given waveTransmissiveFvPatchField
88  // onto a new patch
90  (
92  const fvPatch&,
94  const fvPatchFieldMapper&
95  );
96 
97  //- Construct as copy
99  (
101  );
102 
103  //- Construct and return a clone
104  virtual tmp<fvPatchField<Type> > clone() const
105  {
106  return tmp<fvPatchField<Type> >
107  (
109  );
110  }
111 
112  //- Construct as copy setting internal field reference
114  (
117  );
118 
119  //- Construct and return a clone setting internal field reference
120  virtual tmp<fvPatchField<Type> > clone
121  (
123  ) const
124  {
125  return tmp<fvPatchField<Type> >
126  (
128  );
129  }
130 
131 
132  // Member functions
133 
134  // Access
135 
136  //- Return the heat capacity ratio
137  scalar gamma() const
138  {
139  return gamma_;
140  }
141 
142  //- Return reference to the heat capacity ratio to allow adjustment
143  scalar& gamma()
144  {
145  return gamma_;
146  }
147 
148 
149  // Evaluation functions
150 
151  //- Calculate and return the advection speed at the boundary
152  virtual tmp<scalarField> advectionSpeed() const;
153 
154 
155  //- Write
156  virtual void write(Ostream&) const;
157 };
158 
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 
162 } // End namespace Foam
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 #ifdef NoRepository
168 #endif
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 #endif
173 
174 // ************************ vim: set sw=4 sts=4 et: ************************ //