boundedDdtScheme.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) 2012-2023 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 "boundedDdtScheme.H"
27 #include "fvcDiv.H"
28 #include "fvcDdt.H"
29 #include "fvMatrices.H"
30 #include "fvmSup.H"
31 
32 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
33 
34 namespace Foam
35 {
36 
37 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
38 
39 namespace fv
40 {
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 template<class Type>
45 tmp<VolField<Type>>
47 (
48  const dimensioned<Type>& dt
49 )
50 {
51  return scheme_.ref().fvcDdt(dt);
52 }
53 
54 
55 template<class Type>
58 (
59  const VolField<Type>& vf
60 )
61 {
62  return scheme_.ref().fvcDdt(vf);
63 }
64 
65 
66 template<class Type>
69 (
70  const dimensionedScalar& rho,
71  const VolField<Type>& vf
72 )
73 {
74  return scheme_.ref().fvcDdt(rho, vf);
75 }
76 
77 
78 template<class Type>
81 (
82  const volScalarField& rho,
83  const VolField<Type>& vf
84 )
85 {
86  return scheme_.ref().fvcDdt(rho, vf) - fvc::ddt(rho)*vf;
87 }
88 
89 
90 template<class Type>
93 (
94  const volScalarField& alpha,
95  const volScalarField& rho,
96  const VolField<Type>& vf
97 )
98 {
99  return scheme_.ref().fvcDdt(alpha, rho, vf) - fvc::ddt(alpha, rho)*vf;
100 }
101 
102 
103 template<class Type>
106 (
107  const VolField<Type>& vf
108 )
109 {
110  return scheme_.ref().fvmDdt(vf);
111 }
112 
113 
114 template<class Type>
117 (
118  const dimensionedScalar& rho,
119  const VolField<Type>& vf
120 )
121 {
122  return scheme_.ref().fvmDdt(rho, vf);
123 }
124 
125 
126 template<class Type>
129 (
130  const volScalarField& rho,
131  const VolField<Type>& vf
132 )
133 {
134  return scheme_.ref().fvmDdt(rho, vf) - fvm::Sp(fvc::ddt(rho), vf);
135 }
136 
137 
138 template<class Type>
141 (
142  const volScalarField& alpha,
143  const volScalarField& rho,
144  const VolField<Type>& vf
145 )
146 {
147  return
148  scheme_.ref().fvmDdt(alpha, rho, vf)
149  - fvm::Sp(fvc::ddt(alpha, rho), vf);
150 }
151 
152 
153 template<class Type>
156 (
157  const VolField<Type>& U,
158  const SurfaceField<Type>& Uf
159 )
160 {
161  return scheme_.ref().fvcDdtUfCorr(U, Uf);
162 }
163 
164 
165 template<class Type>
168 (
169  const VolField<Type>& U,
170  const fluxFieldType& phi
171 )
172 {
173  return scheme_.ref().fvcDdtPhiCorr(U, phi);
174 }
175 
176 
177 template<class Type>
180 (
181  const volScalarField& rho,
182  const VolField<Type>& U,
183  const SurfaceField<Type>& rhoUf
184 )
185 {
186  return scheme_.ref().fvcDdtUfCorr(rho, U, rhoUf);
187 }
188 
189 
190 template<class Type>
193 (
194  const volScalarField& rho,
195  const VolField<Type>& U,
196  const fluxFieldType& phi
197 )
198 {
199  return scheme_.ref().fvcDdtPhiCorr(rho, U, phi);
200 }
201 
202 
203 template<class Type>
205 (
206  const VolField<Type>& vf
207 )
208 {
209  return scheme_.ref().meshPhi(vf);
210 }
211 
212 
213 template<class Type>
215 (
216  const VolField<Type>& vf,
217  const label patchi
218 )
219 {
220  return scheme_.ref().meshPhi(vf, patchi);
221 }
222 
223 
224 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
225 
226 } // End namespace fv
227 
228 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
229 
230 } // End namespace Foam
231 
232 // ************************************************************************* //
Generic GeometricField class.
Generic dimensioned Type class.
virtual tmp< fvMatrix< Type > > fvmDdt(const VolField< Type > &)
virtual tmp< fluxFieldType > fvcDdtPhiCorr(const VolField< Type > &U, const fluxFieldType &phi)
virtual tmp< fluxFieldType > fvcDdtUfCorr(const VolField< Type > &U, const SurfaceField< Type > &Uf)
virtual tmp< surfaceScalarField > meshPhi(const VolField< Type > &)
virtual tmp< VolField< Type > > fvcDdt(const dimensioned< Type > &)
A class for managing temporary objects.
Definition: tmp.H:55
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 matrix for implicit and explicit sources.
label patchi
U
Definition: pEqn.H:72
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
tmp< VolField< Type > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
Definition: fvcDdt.C:45
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const VolField< Type > &)
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
labelList fv(nPoints)