1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
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 //- Heat capacity ratio
67 //- Runtime type information
68 TypeName("waveTransmissive");
73 //- Construct from patch and internal field
74 waveTransmissiveFvPatchField
77 const DimensionedField<Type, volMesh>&
80 //- Construct from patch, internal field and dictionary
81 waveTransmissiveFvPatchField
84 const DimensionedField<Type, volMesh>&,
88 //- Construct by mapping given waveTransmissiveFvPatchField
90 waveTransmissiveFvPatchField
92 const waveTransmissiveFvPatchField<Type>&,
94 const DimensionedField<Type, volMesh>&,
95 const fvPatchFieldMapper&
99 waveTransmissiveFvPatchField
101 const waveTransmissiveFvPatchField&
104 //- Construct and return a clone
105 virtual tmp<fvPatchField<Type> > clone() const
107 return tmp<fvPatchField<Type> >
109 new waveTransmissiveFvPatchField<Type>(*this)
113 //- Construct as copy setting internal field reference
114 waveTransmissiveFvPatchField
116 const waveTransmissiveFvPatchField&,
117 const DimensionedField<Type, volMesh>&
120 //- Construct and return a clone setting internal field reference
121 virtual tmp<fvPatchField<Type> > clone
123 const DimensionedField<Type, volMesh>& iF
126 return tmp<fvPatchField<Type> >
128 new waveTransmissiveFvPatchField<Type>(*this, iF)
137 //- Return the heat capacity ratio
143 //- Return reference to the heat capacity ratio to allow adjustment
150 // Evaluation functions
152 //- Calculate and return the advection speed at the boundary
153 virtual tmp<scalarField> advectionSpeed() const;
157 virtual void write(Ostream&) const;
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 } // End namespace Foam
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 # include "waveTransmissiveFvPatchField.C"
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 // ************************************************************************* //