steadyStateFaDdtScheme.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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2016-2017 Wikki Ltd
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26\*---------------------------------------------------------------------------*/
27
29#include "facDiv.H"
30#include "faMatrices.H"
31
32// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
33
34namespace Foam
35{
36
37// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
38
39namespace fa
40{
41
42// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43
44template<class Type>
45tmp<GeometricField<Type, faPatchField, areaMesh>>
47(
48 const dimensioned<Type> dt
49)
50{
52 (
54 (
55 "ddt("+dt.name()+')',
56 mesh()().time().timeName(),
57 mesh()()
58 ),
59 mesh(),
61 );
62}
63
64
65template<class Type>
68(
69 const dimensioned<Type> dt
70)
71{
73 (
75 (
76 "ddt("+dt.name()+')',
77 mesh()().time().timeName(),
78 mesh()()
79 ),
80 mesh(),
82 );
83}
84
85
86template<class Type>
89(
91)
92{
94 (
96 (
97 "ddt("+vf.name()+')',
98 mesh()().time().timeName(),
99 mesh()()
100 ),
101 mesh(),
103 );
104}
105
106
107template<class Type>
110(
112)
113{
115 (
117 (
118 "ddt0("+vf.name()+')',
119 mesh()().time().timeName(),
120 mesh()()
121 ),
122 mesh(),
124 );
125}
126
127
128template<class Type>
131(
132 const dimensionedScalar& rho,
134)
135{
137 (
139 (
140 "ddt("+rho.name()+','+vf.name()+')',
141 mesh()().time().timeName(),
142 mesh()()
143 ),
144 mesh(),
145 dimensioned<Type>(rho.dimensions()*vf.dimensions()/dimTime, Zero)
146 );
147}
148
149template<class Type>
152(
153 const dimensionedScalar& rho,
155)
156{
158 (
160 (
161 "ddt0("+rho.name()+','+vf.name()+')',
162 mesh()().time().timeName(),
163 mesh()()
164 ),
165 mesh(),
166 dimensioned<Type>(rho.dimensions()*vf.dimensions()/dimTime, Zero)
167 );
168}
169
170
171template<class Type>
174(
175 const areaScalarField& rho,
177)
178{
180 (
182 (
183 "ddt("+rho.name()+','+vf.name()+')',
184 mesh()().time().timeName(),
185 mesh()()
186 ),
187 mesh(),
188 dimensioned<Type>(rho.dimensions()*vf.dimensions()/dimTime, Zero)
189 );
190}
191
192
193template<class Type>
196(
197 const areaScalarField& rho,
199)
200{
202 (
204 (
205 "ddt0("+rho.name()+','+vf.name()+')',
206 mesh()().time().timeName(),
207 mesh()()
208 ),
209 mesh(),
210 dimensioned<Type>(rho.dimensions()*vf.dimensions()/dimTime, Zero)
211 );
212}
213
214template<class Type>
217(
219)
220{
222 (
224 (
225 vf,
227 )
228 );
229
230 return tfam;
231}
232
233
234template<class Type>
237(
238 const dimensionedScalar& rho,
240)
241{
243 (
245 (
246 vf,
247 rho.dimensions()*vf.dimensions()*dimArea/dimTime
248 )
249 );
250
251 return tfam;
252}
253
254
255template<class Type>
258(
259 const areaScalarField& rho,
261)
262{
264 (
266 (
267 vf,
268 rho.dimensions()*vf.dimensions()*dimArea/dimTime
269 )
270 );
271
272 return tfam;
273}
274
275
276// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
277
278} // End namespace fa
279
280// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
281
282} // End namespace Foam
283
284// ************************************************************************* //
const dimensionSet & dimensions() const
Return dimensions.
Generic GeometricField class.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:170
const word & name() const noexcept
Return the object name.
Definition: IOobjectI.H:65
Generic dimensioned Type class.
const dimensionSet & dimensions() const
Return const reference to dimensions.
const word & name() const
Return const reference to name.
A special matrix type and solver, designed for finite area solutions of scalar equations....
Definition: faMatrix.H:76
tmp< GeometricField< Type, faPatchField, areaMesh > > facDdt(const dimensioned< Type >)
tmp< faMatrix< Type > > famDdt(const GeometricField< Type, faPatchField, areaMesh > &)
tmp< GeometricField< Type, faPatchField, areaMesh > > facDdt0(const dimensioned< Type >)
A class for managing temporary objects.
Definition: tmp.H:65
dynamicFvMesh & mesh
Calculate the divergence of the given field.
word timeName
Definition: getTimeIndex.H:3
Namespace for OpenFOAM.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:53
const dimensionSet dimArea(sqr(dimLength))
Definition: dimensionSets.H:59
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.