OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

fvcDdt.C

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-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 \*---------------------------------------------------------------------------*/
00026 
00027 #include "fvcDdt.H"
00028 #include "fvMesh.H"
00029 #include "ddtScheme.H"
00030 
00031 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00032 
00033 namespace Foam
00034 {
00035 
00036 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00037 
00038 namespace fvc
00039 {
00040 
00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00042 
00043 template<class Type>
00044 tmp<GeometricField<Type, fvPatchField, volMesh> >
00045 ddt
00046 (
00047     const dimensioned<Type> dt,
00048     const fvMesh& mesh
00049 )
00050 {
00051     return fv::ddtScheme<Type>::New
00052     (
00053         mesh,
00054         mesh.ddtScheme("ddt(" + dt.name() + ')')
00055     )().fvcDdt(dt);
00056 }
00057 
00058 
00059 template<class Type>
00060 tmp<GeometricField<Type, fvPatchField, volMesh> >
00061 ddt
00062 (
00063     const GeometricField<Type, fvPatchField, volMesh>& vf
00064 )
00065 {
00066     return fv::ddtScheme<Type>::New
00067     (
00068         vf.mesh(),
00069         vf.mesh().ddtScheme("ddt(" + vf.name() + ')')
00070     )().fvcDdt(vf);
00071 }
00072 
00073 
00074 template<class Type>
00075 tmp<GeometricField<Type, fvPatchField, volMesh> >
00076 ddt
00077 (
00078     const dimensionedScalar& rho,
00079     const GeometricField<Type, fvPatchField, volMesh>& vf
00080 )
00081 {
00082     return fv::ddtScheme<Type>::New
00083     (
00084         vf.mesh(),
00085         vf.mesh().ddtScheme("ddt(" + rho.name() + ',' + vf.name() + ')')
00086     )().fvcDdt(rho, vf);
00087 }
00088 
00089 
00090 template<class Type>
00091 tmp<GeometricField<Type, fvPatchField, volMesh> >
00092 ddt
00093 (
00094     const volScalarField& rho,
00095     const GeometricField<Type, fvPatchField, volMesh>& vf
00096 )
00097 {
00098     return fv::ddtScheme<Type>::New
00099     (
00100         vf.mesh(),
00101         vf.mesh().ddtScheme("ddt(" + rho.name() + ',' + vf.name() + ')')
00102     )().fvcDdt(rho, vf);
00103 }
00104 
00105 
00106 template<class Type>
00107 tmp<GeometricField<typename flux<Type>::type, fvsPatchField, surfaceMesh> >
00108 ddtPhiCorr
00109 (
00110     const volScalarField& rA,
00111     const GeometricField<Type, fvPatchField, volMesh>& U,
00112     const GeometricField
00113     <
00114         typename flux<Type>::type,
00115         fvsPatchField,
00116         surfaceMesh
00117     >& phi
00118 )
00119 {
00120     return fv::ddtScheme<Type>::New
00121     (
00122         U.mesh(),
00123         U.mesh().ddtScheme("ddt(" + U.name() + ')')
00124     )().fvcDdtPhiCorr(rA, U, phi);
00125 }
00126 
00127 
00128 template<class Type>
00129 tmp<GeometricField<typename flux<Type>::type, fvsPatchField, surfaceMesh> >
00130 ddtPhiCorr
00131 (
00132     const volScalarField& rA,
00133     const volScalarField& rho,
00134     const GeometricField<Type, fvPatchField, volMesh>& U,
00135     const GeometricField
00136     <
00137         typename flux<Type>::type,
00138         fvsPatchField,
00139         surfaceMesh
00140     >& phi
00141 )
00142 {
00143     return fv::ddtScheme<Type>::New
00144     (
00145         U.mesh(),
00146         U.mesh().ddtScheme("ddt(" + rho.name() + ',' + U.name() + ')')
00147     )().fvcDdtPhiCorr(rA, rho, U, phi);
00148 }
00149 
00150 
00151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00152 
00153 } // End namespace fvc
00154 
00155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00156 
00157 } // End namespace Foam
00158 
00159 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd