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

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