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-2016 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_.ref().fvcDdt(dt);
52 }
53 
54 
55 template<class Type>
58 (
60 )
61 {
62  return scheme_.ref().fvcDdt(vf);
63 }
64 
65 
66 template<class Type>
69 (
70  const dimensionedScalar& rho,
72 )
73 {
74  return scheme_.ref().fvcDdt(rho, vf);
75 }
76 
77 
78 template<class Type>
81 (
82  const volScalarField& rho,
84 )
85 {
86  return scheme_.ref().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_.ref().fvcDdt(alpha, rho, vf) - fvc::ddt(alpha, rho)*vf;
100 }
101 
102 
103 template<class Type>
106 (
108 )
109 {
110  return scheme_.ref().fvmDdt(vf);
111 }
112 
113 
114 template<class Type>
117 (
118  const dimensionedScalar& rho,
120 )
121 {
122  return scheme_.ref().fvmDdt(rho, vf);
123 }
124 
125 
126 template<class Type>
129 (
130  const volScalarField& rho,
132 )
133 {
134  return scheme_.ref().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
148  scheme_.ref().fvmDdt(alpha, rho, vf)
149  - fvm::Sp(fvc::ddt(alpha, rho), vf);
150 }
151 
152 
153 template<class Type>
156 (
159 )
160 {
161  return scheme_.ref().fvcDdtUfCorr(U, Uf);
162 }
163 
164 
165 template<class Type>
168 (
170  const fluxFieldType& phi
171 )
172 {
173  return scheme_.ref().fvcDdtPhiCorr(U, phi);
174 }
175 
176 
177 template<class Type>
180 (
181  const volScalarField& rho,
184 )
185 {
186  return scheme_.ref().fvcDdtUfCorr(rho, U, Uf);
187 }
188 
189 
190 template<class Type>
193 (
194  const volScalarField& rho,
196  const fluxFieldType& phi
197 )
198 {
199  return scheme_.ref().fvcDdtPhiCorr(rho, U, phi);
200 }
201 
202 
203 template<class Type>
205 (
207 )
208 {
209  return scheme_.ref().meshPhi(vf);
210 }
211 
212 
213 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
214 
215 } // End namespace fv
216 
217 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
218 
219 } // End namespace Foam
220 
221 // ************************************************************************* //
tmp< surfaceScalarField > meshPhi(const GeometricField< Type, fvPatchField, volMesh > &)
tmp< fluxFieldType > fvcDdtUfCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const GeometricField< Type, fvsPatchField, surfaceMesh > &Uf)
Generic GeometricField class.
Generic dimensioned Type class.
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
Definition: fvcDdt.C:45
Calculate the first temporal derivative.
labelList fv(nPoints)
tmp< fluxFieldType > fvcDdtPhiCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const fluxFieldType &phi)
Calculate the divergence of the given field.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
A class for managing temporary objects.
Definition: PtrList.H:53
tmp< fvMatrix< Type > > fvmDdt(const GeometricField< Type, fvPatchField, volMesh > &)
Calculate the matrix for implicit and explicit sources.
Namespace for OpenFOAM.
tmp< GeometricField< Type, fvPatchField, volMesh > > fvcDdt(const dimensioned< Type > &)