boundedDdtScheme.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "boundedDdtScheme.H"
27 #include "fvcDiv.H"
28 #include "fvcDdt.H"
29 #include "fvMatrices.H"
30 #include "fvmSup.H"
31 
32 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
33 
34 namespace Foam
35 {
36 
37 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
38 
39 namespace fv
40 {
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 template<class Type>
45 tmp<GeometricField<Type, fvPatchField, volMesh> >
47 (
48  const dimensioned<Type>& dt
49 )
50 {
51  return scheme_().fvcDdt(dt);
52 }
53 
54 
55 template<class Type>
58 (
60 )
61 {
62  return scheme_().fvcDdt(vf);
63 }
64 
65 
66 template<class Type>
69 (
70  const dimensionedScalar& rho,
72 )
73 {
74  return scheme_().fvcDdt(rho, vf);
75 }
76 
77 
78 template<class Type>
81 (
82  const volScalarField& rho,
84 )
85 {
86  return scheme_().fvcDdt(rho, vf) - fvc::ddt(rho)*vf;
87 }
88 
89 
90 template<class Type>
93 (
94  const volScalarField& alpha,
95  const volScalarField& rho,
97 )
98 {
99  return scheme_().fvcDdt(alpha, rho, vf) - fvc::ddt(alpha, rho)*vf;
100 }
101 
102 
103 template<class Type>
106 (
108 )
109 {
110  return scheme_().fvmDdt(vf);
111 }
112 
113 
114 template<class Type>
117 (
118  const dimensionedScalar& rho,
120 )
121 {
122  return scheme_().fvmDdt(rho, vf);
123 }
124 
125 
126 template<class Type>
129 (
130  const volScalarField& rho,
132 )
133 {
134  return scheme_().fvmDdt(rho, vf) - fvm::Sp(fvc::ddt(rho), vf);
135 }
136 
137 
138 template<class Type>
141 (
142  const volScalarField& alpha,
143  const volScalarField& rho,
145 )
146 {
147  return scheme_().fvmDdt(alpha, rho, vf) - fvm::Sp(fvc::ddt(alpha, rho), vf);
148 }
149 
150 
151 template<class Type>
154 (
157 )
158 {
159  return scheme_().fvcDdtUfCorr(U, Uf);
160 }
161 
162 
163 template<class Type>
166 (
168  const fluxFieldType& phi
169 )
170 {
171  return scheme_().fvcDdtPhiCorr(U, phi);
172 }
173 
174 
175 template<class Type>
178 (
179  const volScalarField& rho,
182 )
183 {
184  return scheme_().fvcDdtUfCorr(rho, U, Uf);
185 }
186 
187 
188 template<class Type>
191 (
192  const volScalarField& rho,
194  const fluxFieldType& phi
195 )
196 {
197  return scheme_().fvcDdtPhiCorr(rho, U, phi);
198 }
199 
200 
201 template<class Type>
203 (
205 )
206 {
207  return scheme_().meshPhi(vf);
208 }
209 
210 
211 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
212 
213 } // End namespace fv
214 
215 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
216 
217 } // End namespace Foam
218 
219 // ************************************************************************* //
Calculate the matrix for implicit and explicit sources.
tmp< fvMatrix< Type > > fvmDdt(const GeometricField< Type, fvPatchField, volMesh > &)
tmp< surfaceScalarField > meshPhi(const GeometricField< Type, fvPatchField, volMesh > &)
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
Definition: fvcDdt.C:45
tmp< fvMatrix< Type > > Sp(const DimensionedField< scalar, volMesh > &, const GeometricField< Type, fvPatchField, volMesh > &)
Namespace for OpenFOAM.
tmp< fluxFieldType > fvcDdtUfCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const GeometricField< Type, fvsPatchField, surfaceMesh > &Uf)
Generic dimensioned Type class.
Calculate the first temporal derivative.
tmp< GeometricField< Type, fvPatchField, volMesh > > fvcDdt(const dimensioned< Type > &)
Generic GeometricField class.
Calculate the divergence of the given field.
tmp< fluxFieldType > fvcDdtPhiCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const fluxFieldType &phi)
labelList fv(nPoints)
A class for managing temporary objects.
Definition: PtrList.H:118
A special matrix type and solver, designed for finite volume solutions of scalar equations.