OpenFOAM logo
Open Source CFD Toolkit

EulerDdtScheme.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-2005 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     EulerDdtScheme
00027 
00028 Description
00029     Basic first-order Euler implicit/explicit ddt using only the current and
00030     previous time-step values.
00031 
00032 SourceFiles
00033     EulerDdtScheme.C
00034 
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef EulerDdtScheme_H
00038 #define EulerDdtScheme_H
00039 
00040 #include "ddtScheme.H"
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 
00047 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00048 
00049 namespace fv
00050 {
00051 
00052 /*---------------------------------------------------------------------------*\
00053                        Class EulerDdtScheme Declaration
00054 \*---------------------------------------------------------------------------*/
00055 
00056 template<class Type>
00057 class EulerDdtScheme
00058 :
00059     public ddtScheme<Type>
00060 {
00061     // Private Member Functions
00062 
00063         //- Disallow default bitwise copy construct
00064         EulerDdtScheme(const EulerDdtScheme&);
00065 
00066         //- Disallow default bitwise assignment
00067         void operator=(const EulerDdtScheme&);
00068 
00069 
00070 public:
00071 
00072     //- Runtime type information
00073     TypeName("Euler");
00074 
00075 
00076     // Constructors
00077 
00078         //- Construct from mesh
00079         EulerDdtScheme(const fvMesh& mesh)
00080         :
00081             ddtScheme<Type>(mesh)
00082         {}
00083 
00084         //- Construct from mesh and Istream
00085         EulerDdtScheme(const fvMesh& mesh, Istream& is)
00086         :
00087             ddtScheme<Type>(mesh, is)
00088         {}
00089 
00090 
00091     // Member Functions
00092 
00093         //- Return mesh reference
00094         const fvMesh& mesh() const
00095         {
00096             return fv::ddtScheme<Type>::mesh();
00097         }
00098 
00099         tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
00100         (
00101             const dimensioned<Type>&
00102         );
00103 
00104         tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
00105         (
00106             const GeometricField<Type, fvPatchField, volMesh>&
00107         );
00108 
00109         tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
00110         (
00111             const dimensionedScalar&,
00112             const GeometricField<Type, fvPatchField, volMesh>&
00113         );
00114 
00115         tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
00116         (
00117             const volScalarField&,
00118             const GeometricField<Type, fvPatchField, volMesh>&
00119         );
00120 
00121         tmp<fvMatrix<Type> > fvmDdt
00122         (
00123             GeometricField<Type, fvPatchField, volMesh>&
00124         );
00125 
00126         tmp<fvMatrix<Type> > fvmDdt
00127         (
00128             const dimensionedScalar&,
00129             GeometricField<Type, fvPatchField, volMesh>&
00130         );
00131 
00132         tmp<fvMatrix<Type> > fvmDdt
00133         (
00134             const volScalarField&,
00135             GeometricField<Type, fvPatchField, volMesh>&
00136         );
00137 
00138         typedef typename ddtScheme<Type>::fluxFieldType fluxFieldType;
00139 
00140         tmp<fluxFieldType> fvcDdtPhiCorr
00141         (
00142             const volScalarField& rA,
00143             const GeometricField<Type, fvPatchField, volMesh>& U,
00144             const fluxFieldType& phi
00145         );
00146 
00147         tmp<fluxFieldType> fvcDdtPhiCorr
00148         (
00149             const volScalarField& rA,
00150             const volScalarField& rho,
00151             const GeometricField<Type, fvPatchField, volMesh>& U,
00152             const fluxFieldType& phi
00153         );
00154 
00155         tmp<surfaceScalarField> meshPhi
00156         (
00157             const GeometricField<Type, fvPatchField, volMesh>&
00158         );
00159 };
00160 
00161 
00162 template<>
00163 tmp<surfaceScalarField> EulerDdtScheme<scalar>::fvcDdtPhiCorr
00164 (
00165     const volScalarField& rA,
00166     const volScalarField& U,
00167     const surfaceScalarField& phi
00168 );
00169 
00170 
00171 template<>
00172 tmp<surfaceScalarField> EulerDdtScheme<scalar>::fvcDdtPhiCorr
00173 (
00174     const volScalarField& rA,
00175     const volScalarField& rho,
00176     const volScalarField& U,
00177     const surfaceScalarField& phi
00178 );
00179 
00180 
00181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00182 
00183 } // End namespace fv
00184 
00185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00186 
00187 } // End namespace Foam
00188 
00189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00190 
00191 #ifdef NoRepository
00192 #   include "EulerDdtScheme.C"
00193 #endif
00194 
00195 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00196 
00197 #endif
00198 
00199 // ************************************************************************* //
For further information go to www.openfoam.org