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 -------------------------------------------------------------------------------
10 License
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 
36 namespace Foam
37 {
38 
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 
41 namespace fv
42 {
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 template<class Type>
47 tmp<GeometricField<Type, fvPatchField, volMesh>>
49 (
50  const dimensioned<Type>& dt
51 )
52 {
53  return scheme_.ref().fvcDdt(dt);
54 }
55 
56 
57 template<class Type>
60 (
62 )
63 {
64  return scheme_.ref().fvcDdt(vf);
65 }
66 
67 
68 template<class Type>
71 (
72  const dimensionedScalar& rho,
74 )
75 {
76  return scheme_.ref().fvcDdt(rho, vf);
77 }
78 
79 
80 template<class Type>
83 (
84  const volScalarField& rho,
86 )
87 {
88  return scheme_.ref().fvcDdt(rho, vf) - fvc::ddt(rho)*vf;
89 }
90 
91 
92 template<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 
105 template<class Type>
108 (
110 )
111 {
112  return scheme_.ref().fvmDdt(vf);
113 }
114 
115 
116 template<class Type>
119 (
120  const dimensionedScalar& rho,
122 )
123 {
124  return scheme_.ref().fvmDdt(rho, vf);
125 }
126 
127 
128 template<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 
140 template<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 
155 template<class Type>
158 (
161 )
162 {
163  return scheme_.ref().fvcDdtUfCorr(U, Uf);
164 }
165 
166 
167 template<class Type>
170 (
172  const fluxFieldType& phi
173 )
174 {
175  return scheme_.ref().fvcDdtPhiCorr(U, phi);
176 }
177 
178 
179 template<class Type>
182 (
183  const volScalarField& rho,
186 )
187 {
188  return scheme_.ref().fvcDdtUfCorr(rho, U, Uf);
189 }
190 
191 
192 template<class Type>
195 (
196  const volScalarField& rho,
198  const fluxFieldType& phi
199 )
200 {
201  return scheme_.ref().fvcDdtPhiCorr(rho, U, phi);
202 }
203 
204 
205 template<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 // ************************************************************************* //
boundedDdtScheme.H
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:212
Uf
autoPtr< surfaceVectorField > Uf
Definition: createUfIfPresent.H:33
fvcDiv.H
Calculate the divergence of the given field.
Foam::fv::boundedDdtScheme::fvcDdt
tmp< GeometricField< Type, fvPatchField, volMesh > > fvcDdt(const dimensioned< Type > &)
Definition: boundedDdtScheme.C:49
rho
rho
Definition: readInitialConditions.H:88
Foam::fv::boundedDdtScheme::meshPhi
tmp< surfaceScalarField > meshPhi(const GeometricField< Type, fvPatchField, volMesh > &)
Definition: boundedDdtScheme.C:207
fvMatrices.H
A special matrix type and solver, designed for finite volume solutions of scalar equations.
Foam::fv::boundedDdtScheme::fvmDdt
tmp< fvMatrix< Type > > fvmDdt(const GeometricField< Type, fvPatchField, volMesh > &)
Definition: boundedDdtScheme.C:108
Foam::fvm::Sp
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::fv::boundedDdtScheme::fvcDdtUfCorr
tmp< fluxFieldType > fvcDdtUfCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const GeometricField< Type, fvsPatchField, surfaceMesh > &Uf)
Definition: boundedDdtScheme.C:158
Foam::dimensioned
Generic dimensioned Type class.
Definition: dimensionedScalarFwd.H:42
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
fvmSup.H
Calculate the matrix for implicit and explicit sources.
fv
labelList fv(nPoints)
U
U
Definition: pEqn.H:72
fvcDdt.H
Calculate the first temporal derivative.
Foam::fvc::ddt
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
Definition: fvcDdt.C:47
Foam::GeometricField< Type, fvPatchField, volMesh >
Foam::fv::boundedDdtScheme::fvcDdtPhiCorr
tmp< fluxFieldType > fvcDdtPhiCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const fluxFieldType &phi)
Definition: boundedDdtScheme.C:170