FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

waveTransmissiveFvPatchField.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::waveTransmissiveFvPatchField
00026 
00027 Description
00028     Foam::waveTransmissiveFvPatchField
00029 
00030 SourceFiles
00031     waveTransmissiveFvPatchField.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef waveTransmissiveFvPatchField_H
00036 #define waveTransmissiveFvPatchField_H
00037 
00038 #include <finiteVolume/advectiveFvPatchFields.H>
00039 
00040 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00041 
00042 namespace Foam
00043 {
00044 
00045 /*---------------------------------------------------------------------------*\
00046                  Class waveTransmissiveFvPatch Declaration
00047 \*---------------------------------------------------------------------------*/
00048 
00049 template<class Type>
00050 class waveTransmissiveFvPatchField
00051 :
00052     public advectiveFvPatchField<Type>
00053 {
00054 
00055     // Private data
00056 
00057         //- Name of the compressibility field used to calculate the wave speed
00058         word psiName_;
00059 
00060         //- Heat capacity ratio
00061         scalar gamma_;
00062 
00063 
00064 public:
00065 
00066     //- Runtime type information
00067     TypeName("waveTransmissive");
00068 
00069 
00070     // Constructors
00071 
00072         //- Construct from patch and internal field
00073         waveTransmissiveFvPatchField
00074         (
00075             const fvPatch&,
00076             const DimensionedField<Type, volMesh>&
00077         );
00078 
00079         //- Construct from patch, internal field and dictionary
00080         waveTransmissiveFvPatchField
00081         (
00082             const fvPatch&,
00083             const DimensionedField<Type, volMesh>&,
00084             const dictionary&
00085         );
00086 
00087         //- Construct by mapping given waveTransmissiveFvPatchField
00088         //  onto a new patch
00089         waveTransmissiveFvPatchField
00090         (
00091             const waveTransmissiveFvPatchField<Type>&,
00092             const fvPatch&,
00093             const DimensionedField<Type, volMesh>&,
00094             const fvPatchFieldMapper&
00095         );
00096 
00097         //- Construct as copy
00098         waveTransmissiveFvPatchField
00099         (
00100             const waveTransmissiveFvPatchField&
00101         );
00102 
00103         //- Construct and return a clone
00104         virtual tmp<fvPatchField<Type> > clone() const
00105         {
00106             return tmp<fvPatchField<Type> >
00107             (
00108                 new waveTransmissiveFvPatchField<Type>(*this)
00109             );
00110         }
00111 
00112         //- Construct as copy setting internal field reference
00113         waveTransmissiveFvPatchField
00114         (
00115             const waveTransmissiveFvPatchField&,
00116             const DimensionedField<Type, volMesh>&
00117         );
00118 
00119         //- Construct and return a clone setting internal field reference
00120         virtual tmp<fvPatchField<Type> > clone
00121         (
00122             const DimensionedField<Type, volMesh>& iF
00123         ) const
00124         {
00125             return tmp<fvPatchField<Type> >
00126             (
00127                 new waveTransmissiveFvPatchField<Type>(*this, iF)
00128             );
00129         }
00130 
00131 
00132     // Member functions
00133 
00134         // Access
00135 
00136             //- Return the heat capacity ratio
00137             scalar gamma() const
00138             {
00139                 return gamma_;
00140             }
00141 
00142             //- Return reference to the heat capacity ratio to allow adjustment
00143             scalar& gamma()
00144             {
00145                 return gamma_;
00146             }
00147 
00148 
00149         // Evaluation functions
00150 
00151             //- Calculate and return the advection speed at the boundary
00152             virtual tmp<scalarField> advectionSpeed() const;
00153 
00154 
00155         //- Write
00156         virtual void write(Ostream&) const;
00157 };
00158 
00159 
00160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00161 
00162 } // End namespace Foam
00163 
00164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00165 
00166 #ifdef NoRepository
00167 #   include <finiteVolume/waveTransmissiveFvPatchField.C>
00168 #endif
00169 
00170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00171 
00172 #endif
00173 
00174 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines