Loading...
Searching...
No Matches
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>
47(
48 const dimensioned<Type> dt
49)
50{
52 (
53 "ddt("+dt.name()+')',
55 mesh(),
56 Foam::zero{},
71 "ddt("+dt.name()+')',
73 mesh(),
74 Foam::zero{},
89 "ddt("+vf.name()+')',
91 mesh(),
92 Foam::zero{},
107 "ddt0("+vf.name()+')',
109 mesh(),
110 Foam::zero{},
126 "ddt("+rho.name()+','+vf.name()+')',
128 mesh(),
144 "ddt0("+rho.name()+','+vf.name()+')',
146 mesh(),
147 Foam::zero{},
163 "ddt("+rho.name()+','+vf.name()+')',
165 mesh(),
166 Foam::zero{},
182 "ddt0("+rho.name()+','+vf.name()+')',
184 mesh(),
186 rho.dimensions()*vf.dimensions()/dimTime
187 );
188}
189
190template<class Type>
193(
195)
196{
198 (
200 (
201 vf,
203 )
204 );
206 return tfam;
207}
208
209
210template<class Type>
213(
214 const dimensionedScalar& rho,
216)
217{
219 (
221 (
222 vf,
223 rho.dimensions()*vf.dimensions()*dimArea/dimTime
224 )
225 );
227 return tfam;
228}
229
230
231template<class Type>
234(
235 const areaScalarField& rho,
237)
238{
240 (
242 (
243 vf,
244 rho.dimensions()*vf.dimensions()*dimArea/dimTime
245 )
246 );
247
248 return tfam;
249}
250
251
252// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
253
254} // End namespace fa
255
256// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
257
258} // End namespace Foam
259
260// ************************************************************************* //
const dimensionSet & dimensions() const noexcept
Return dimensions.
Generic GeometricField class.
static tmp< GeometricField< Type, PatchField, GeoMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=PatchField< Type >::calculatedType())
Return tmp field (NO_READ, NO_WRITE) from name, mesh, dimensions and patch type. [Takes current timeN...
@ REGISTER
Request registration (bool: true).
const word & name() const noexcept
Return the object name.
Definition IOobjectI.H:205
Generic dimensioned Type class.
const dimensionSet & dimensions() const noexcept
Return const reference to dimensions.
const word & name() const noexcept
Return const reference to name.
A special matrix type and solver, designed for finite area solutions of scalar equations....
Definition faMatrix.H:108
tmp< GeometricField< Type, faPatchField, areaMesh > > facDdt(const dimensioned< Type >)
tmp< faMatrix< Type > > famDdt(const GeometricField< Type, faPatchField, areaMesh > &)
const faMesh & mesh() const
Return mesh reference.
tmp< GeometricField< Type, faPatchField, areaMesh > > facDdt0(const dimensioned< Type >)
A class for managing temporary objects.
Definition tmp.H:75
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Definition zero.H:58
dynamicFvMesh & mesh
Calculate the divergence of the given field.
Namespace for finite-area.
Definition limitHeight.C:30
Namespace for OpenFOAM.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
const dimensionSet dimArea(sqr(dimLength))
GeometricField< scalar, faPatchField, areaMesh > areaScalarField
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.