00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00036 
00037 
00038 
00039 
00040 
00041 
00042 
00043 #ifndef SLTSDdtScheme_H
00044 #define SLTSDdtScheme_H
00045 
00046 #include <finiteVolume/ddtScheme.H>
00047 
00048 
00049 
00050 namespace Foam
00051 {
00052 
00053 
00054 
00055 namespace fv
00056 {
00057 
00058 
00059 
00060 
00061 
00062 template<class Type>
00063 class SLTSDdtScheme
00064 :
00065     public fv::ddtScheme<Type>
00066 {
00067     
00068 
00069         
00070         word phiName_;
00071 
00072         
00073         
00074         word rhoName_;
00075 
00076         
00077         scalar alpha_;
00078 
00079 
00080     
00081 
00082         
00083         SLTSDdtScheme(const SLTSDdtScheme&);
00084 
00085         
00086         void operator=(const SLTSDdtScheme&);
00087 
00088         
00089         void relaxedDiag(scalarField& rD, const surfaceScalarField& phi) const;
00090 
00091         
00092         tmp<volScalarField> SLrDeltaT() const;
00093 
00094 
00095 public:
00096 
00097     
00098     TypeName("SLTS");
00099 
00100 
00101     
00102 
00103         
00104         SLTSDdtScheme(const fvMesh& mesh, Istream& is)
00105         :
00106             ddtScheme<Type>(mesh, is),
00107             phiName_(is),
00108             rhoName_(is),
00109             alpha_(readScalar(is))
00110         {}
00111 
00112 
00113     
00114 
00115         
00116         const fvMesh& mesh() const
00117         {
00118             return fv::ddtScheme<Type>::mesh();
00119         }
00120 
00121         tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
00122         (
00123             const dimensioned<Type>&
00124         );
00125 
00126         tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
00127         (
00128             const GeometricField<Type, fvPatchField, volMesh>&
00129         );
00130 
00131         tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
00132         (
00133             const dimensionedScalar&,
00134             const GeometricField<Type, fvPatchField, volMesh>&
00135         );
00136 
00137         tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
00138         (
00139             const volScalarField&,
00140             const GeometricField<Type, fvPatchField, volMesh>&
00141         );
00142 
00143         tmp<fvMatrix<Type> > fvmDdt
00144         (
00145             GeometricField<Type, fvPatchField, volMesh>&
00146         );
00147 
00148         tmp<fvMatrix<Type> > fvmDdt
00149         (
00150             const dimensionedScalar&,
00151             GeometricField<Type, fvPatchField, volMesh>&
00152         );
00153 
00154         tmp<fvMatrix<Type> > fvmDdt
00155         (
00156             const volScalarField&,
00157             GeometricField<Type, fvPatchField, volMesh>&
00158         );
00159 
00160         typedef typename ddtScheme<Type>::fluxFieldType fluxFieldType;
00161 
00162         tmp<fluxFieldType> fvcDdtPhiCorr
00163         (
00164             const volScalarField& rA,
00165             const GeometricField<Type, fvPatchField, volMesh>& U,
00166             const fluxFieldType& phi
00167         );
00168 
00169         tmp<fluxFieldType> fvcDdtPhiCorr
00170         (
00171             const volScalarField& rA,
00172             const volScalarField& rho,
00173             const GeometricField<Type, fvPatchField, volMesh>& U,
00174             const fluxFieldType& phi
00175         );
00176 
00177         tmp<surfaceScalarField> meshPhi
00178         (
00179             const GeometricField<Type, fvPatchField, volMesh>&
00180         );
00181 };
00182 
00183 
00184 template<>
00185 tmp<surfaceScalarField> SLTSDdtScheme<scalar>::fvcDdtPhiCorr
00186 (
00187     const volScalarField& rA,
00188     const volScalarField& U,
00189     const surfaceScalarField& phi
00190 );
00191 
00192 
00193 template<>
00194 tmp<surfaceScalarField> SLTSDdtScheme<scalar>::fvcDdtPhiCorr
00195 (
00196     const volScalarField& rA,
00197     const volScalarField& rho,
00198     const volScalarField& U,
00199     const surfaceScalarField& phi
00200 );
00201 
00202 
00203 
00204 
00205 } 
00206 
00207 
00208 
00209 } 
00210 
00211 
00212 
00213 #ifdef NoRepository
00214 #   include <finiteVolume/SLTSDdtScheme.C>
00215 #endif
00216 
00217 
00218 
00219 #endif
00220 
00221