fvmDdt.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2022 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 "volFields.H"
27 #include "surfaceFields.H"
28 #include "fvMatrix.H"
29 #include "ddtScheme.H"
30 
31 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35 
36 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
37 
38 namespace fvm
39 {
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 template<class Type>
44 tmp<fvMatrix<Type>>
46 (
47  const VolField<Type>& vf
48 )
49 {
51  (
52  vf.mesh(),
53  vf.mesh().schemes().ddt("ddt(" + vf.name() + ')')
54  ).ref().fvmDdt(vf);
55 }
56 
57 
58 template<class Type>
61 (
62  const dimensionedScalar& rho,
63  const VolField<Type>& vf
64 )
65 {
67  (
68  vf.mesh(),
69  vf.mesh().schemes().ddt("ddt(" + rho.name() + ',' + vf.name() + ')')
70  ).ref().fvmDdt(rho, vf);
71 }
72 
73 
74 template<class Type>
77 (
78  const volScalarField& rho,
79  const VolField<Type>& vf
80 )
81 {
83  (
84  vf.mesh(),
85  vf.mesh().schemes().ddt("ddt(" + rho.name() + ',' + vf.name() + ')')
86  ).ref().fvmDdt(rho, vf);
87 }
88 
89 
90 template<class Type>
93 (
94  const one&,
95  const VolField<Type>& vf
96 )
97 {
98  return ddt(vf);
99 }
100 
101 
102 template<class Type>
105 (
106  const volScalarField& alpha,
107  const volScalarField& rho,
108  const VolField<Type>& vf
109 )
110 {
112  (
113  vf.mesh(),
114  vf.mesh().schemes().ddt
115  (
116  "ddt("
117  + alpha.name() + ','
118  + rho.name() + ','
119  + vf.name() + ')'
120  )
121  ).ref().fvmDdt(alpha, rho, vf);
122 }
123 
124 
125 template<class Type>
128 (
129  const one&,
130  const one&,
131  const VolField<Type>& vf
132 )
133 {
134  return ddt(vf);
135 }
136 
137 
138 template<class Type>
141 (
142  const one&,
143  const volScalarField& rho,
144  const VolField<Type>& vf
145 )
146 {
147  return ddt(rho, vf);
148 }
149 
150 
151 template<class Type>
154 (
155  const volScalarField& alpha,
156  const one&,
157  const VolField<Type>& vf
158 )
159 {
160  return ddt(alpha, vf);
161 }
162 
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 } // End namespace fvm
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 } // End namespace Foam
171 
172 // ************************************************************************* //
const Mesh & mesh() const
Return mesh.
Generic GeometricField class.
const word & name() const
Return name.
Definition: IOobject.H:310
static tmp< ddtScheme< Type > > New(const fvMesh &mesh, Istream &schemeData)
Return a pointer to a new ddtScheme created on freestore.
Definition: ddtScheme.C:45
A class representing the concept of 1 (scalar(1)) used to avoid unnecessary manipulations for objects...
Definition: one.H:51
A class for managing temporary objects.
Definition: tmp.H:55
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
tmp< fvMatrix< Type > > ddt(const VolField< Type > &vf)
Definition: fvmDdt.C:46
Namespace for OpenFOAM.
Foam::surfaceFields.