|
|
|
waveTransmissiveFvPatchField.HGo 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-2009 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 the 00013 Free Software Foundation; either version 2 of the License, or (at your 00014 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, write to the Free Software Foundation, 00023 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00024 00025 Class 00026 Foam::waveTransmissiveFvPatchField 00027 00028 Description 00029 Foam::waveTransmissiveFvPatchField 00030 00031 SourceFiles 00032 waveTransmissiveFvPatchField.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef waveTransmissiveFvPatchField_H 00037 #define waveTransmissiveFvPatchField_H 00038 00039 #include "advectiveFvPatchFields.H" 00040 00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00042 00043 namespace Foam 00044 { 00045 00046 /*---------------------------------------------------------------------------*\ 00047 Class waveTransmissiveFvPatch Declaration 00048 \*---------------------------------------------------------------------------*/ 00049 00050 template<class Type> 00051 class waveTransmissiveFvPatchField 00052 : 00053 public advectiveFvPatchField<Type> 00054 { 00055 00056 // Private data 00057 00058 //- Name of the compressibility field used to calculate the wave speed 00059 word psiName_; 00060 00061 //- Heat capacity ratio 00062 scalar gamma_; 00063 00064 00065 public: 00066 00067 //- Runtime type information 00068 TypeName("waveTransmissive"); 00069 00070 00071 // Constructors 00072 00073 //- Construct from patch and internal field 00074 waveTransmissiveFvPatchField 00075 ( 00076 const fvPatch&, 00077 const DimensionedField<Type, volMesh>& 00078 ); 00079 00080 //- Construct from patch, internal field and dictionary 00081 waveTransmissiveFvPatchField 00082 ( 00083 const fvPatch&, 00084 const DimensionedField<Type, volMesh>&, 00085 const dictionary& 00086 ); 00087 00088 //- Construct by mapping given waveTransmissiveFvPatchField 00089 // onto a new patch 00090 waveTransmissiveFvPatchField 00091 ( 00092 const waveTransmissiveFvPatchField<Type>&, 00093 const fvPatch&, 00094 const DimensionedField<Type, volMesh>&, 00095 const fvPatchFieldMapper& 00096 ); 00097 00098 //- Construct as copy 00099 waveTransmissiveFvPatchField 00100 ( 00101 const waveTransmissiveFvPatchField& 00102 ); 00103 00104 //- Construct and return a clone 00105 virtual tmp<fvPatchField<Type> > clone() const 00106 { 00107 return tmp<fvPatchField<Type> > 00108 ( 00109 new waveTransmissiveFvPatchField<Type>(*this) 00110 ); 00111 } 00112 00113 //- Construct as copy setting internal field reference 00114 waveTransmissiveFvPatchField 00115 ( 00116 const waveTransmissiveFvPatchField&, 00117 const DimensionedField<Type, volMesh>& 00118 ); 00119 00120 //- Construct and return a clone setting internal field reference 00121 virtual tmp<fvPatchField<Type> > clone 00122 ( 00123 const DimensionedField<Type, volMesh>& iF 00124 ) const 00125 { 00126 return tmp<fvPatchField<Type> > 00127 ( 00128 new waveTransmissiveFvPatchField<Type>(*this, iF) 00129 ); 00130 } 00131 00132 00133 // Member functions 00134 00135 // Access 00136 00137 //- Return the heat capacity ratio 00138 scalar gamma() const 00139 { 00140 return gamma_; 00141 } 00142 00143 //- Return reference to the heat capacity ratio to allow adjustment 00144 scalar& gamma() 00145 { 00146 return gamma_; 00147 } 00148 00149 00150 // Evaluation functions 00151 00152 //- Calculate and return the advection speed at the boundary 00153 virtual tmp<scalarField> advectionSpeed() const; 00154 00155 00156 //- Write 00157 virtual void write(Ostream&) const; 00158 }; 00159 00160 00161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00162 00163 } // End namespace Foam 00164 00165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00166 00167 #ifdef NoRepository 00168 # include "waveTransmissiveFvPatchField.C" 00169 #endif 00170 00171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00172 00173 #endif 00174 00175 // ************************************************************************* // |