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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2012-2016 OpenFOAM Foundation
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
28#include "boundedDdtScheme.H"
29#include "fvcDiv.H"
30#include "fvcDdt.H"
31#include "fvMatrices.H"
32#include "fvmSup.H"
33
34// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
35
36namespace Foam
37{
38
39// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40
41namespace fv
42{
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46template<class Type>
47tmp<GeometricField<Type, fvPatchField, volMesh>>
49(
50 const dimensioned<Type>& dt
51)
52{
53 return scheme_.ref().fvcDdt(dt);
54}
55
56
57template<class Type>
60(
62)
63{
64 return scheme_.ref().fvcDdt(vf);
65}
66
67
68template<class Type>
71(
74)
75{
76 return scheme_.ref().fvcDdt(rho, vf);
77}
78
79
80template<class Type>
83(
84 const volScalarField& rho,
86)
87{
88 return scheme_.ref().fvcDdt(rho, vf) - fvc::ddt(rho)*vf;
89}
90
91
92template<class Type>
95(
96 const volScalarField& alpha,
97 const volScalarField& rho,
99)
100{
101 return scheme_.ref().fvcDdt(alpha, rho, vf) - fvc::ddt(alpha, rho)*vf;
102}
103
104
105template<class Type>
108(
110)
111{
112 return scheme_.ref().fvmDdt(vf);
113}
114
115
116template<class Type>
119(
120 const dimensionedScalar& rho,
122)
123{
124 return scheme_.ref().fvmDdt(rho, vf);
125}
126
127
128template<class Type>
131(
132 const volScalarField& rho,
134)
135{
136 return scheme_.ref().fvmDdt(rho, vf) - fvm::Sp(fvc::ddt(rho), vf);
137}
138
139
140template<class Type>
143(
144 const volScalarField& alpha,
145 const volScalarField& rho,
147)
148{
149 return
150 scheme_.ref().fvmDdt(alpha, rho, vf)
151 - fvm::Sp(fvc::ddt(alpha, rho), vf);
152}
153
154
155template<class Type>
158(
161)
162{
163 return scheme_.ref().fvcDdtUfCorr(U, Uf);
164}
165
166
167template<class Type>
170(
172 const fluxFieldType& phi
173)
174{
175 return scheme_.ref().fvcDdtPhiCorr(U, phi);
176}
177
178
179template<class Type>
182(
183 const volScalarField& rho,
186)
187{
188 return scheme_.ref().fvcDdtUfCorr(rho, U, Uf);
189}
190
191
192template<class Type>
195(
196 const volScalarField& rho,
198 const fluxFieldType& phi
199)
200{
201 return scheme_.ref().fvcDdtPhiCorr(rho, U, phi);
202}
203
204
205template<class Type>
207(
209)
210{
211 return scheme_.ref().meshPhi(vf);
212}
213
214
215// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
216
217} // End namespace fv
218
219// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
220
221} // End namespace Foam
222
223// ************************************************************************* //
surfaceScalarField & phi
Generic GeometricField class.
Generic dimensioned Type class.
tmp< fluxFieldType > fvcDdtPhiCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const fluxFieldType &phi)
tmp< GeometricField< Type, fvPatchField, volMesh > > fvcDdt(const dimensioned< Type > &)
tmp< fvMatrix< Type > > fvmDdt(const GeometricField< Type, fvPatchField, volMesh > &)
tmp< fluxFieldType > fvcDdtUfCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const GeometricField< Type, fvsPatchField, surfaceMesh > &Uf)
tmp< surfaceScalarField > meshPhi(const GeometricField< Type, fvPatchField, volMesh > &)
A class for managing temporary objects.
Definition: tmp.H:65
U
Definition: pEqn.H:72
autoPtr< surfaceVectorField > Uf
A special matrix type and solver, designed for finite volume solutions of scalar equations.
Calculate the first temporal derivative.
Calculate the divergence of the given field.
Calculate the finiteVolume matrix for implicit and explicit sources.
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
Definition: fvcDdt.C:47
zeroField Sp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
Namespace for OpenFOAM.
labelList fv(nPoints)
volScalarField & alpha