CMULES.H
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) 2013-2025 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 Global
25  MULES
26 
27 Description
28  CMULES: Multidimensional universal limiter for
29  explicit corrected implicit solution.
30 
31  Solve a convective-only transport equation using an explicit universal
32  multi-dimensional limiter to correct an implicit conservative bounded
33  obtained using rigorously bounded schemes such as Euler-implicit in time
34  upwind in space.
35 
36  Parameters are the variable to solve, the normal convective flux and the
37  actual explicit flux of the variable which is also used to return limited
38  flux used in the bounded-solution.
39 
40 SourceFiles
41  CMULES.C
42  CMULESTemplates.C
43 
44 \*---------------------------------------------------------------------------*/
45 
46 #ifndef CMULES_H
47 #define CMULES_H
48 
49 #include "MULES.H"
50 #include "EulerDdtScheme.H"
51 #include "localEulerDdtScheme.H"
52 #include "gaussConvectionScheme.H"
53 
54 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 
56 namespace Foam
57 {
58 namespace MULES
59 {
60 
61 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62 
63 template<class RdeltaTType, class RhoType, class SpType>
64 void correct
65 (
66  const RdeltaTType& rDeltaT,
67  const RhoType& rho,
69  const surfaceScalarField& phiCorr,
70  const SpType& Sp
71 );
72 
73 template<class RhoType>
74 void correct
75 (
76  const RhoType& rho,
78  const surfaceScalarField& phiCorr
79 );
80 
81 template<class RhoType, class SpType>
82 void correct
83 (
84  const RhoType& rho,
86  const surfaceScalarField& phiCorr,
87  const SpType& Sp
88 );
89 
90 template<class RhoType, class PsiMaxType, class PsiMinType>
91 void correct
92 (
93  const control& controls,
94  const RhoType& rho,
96  const surfaceScalarField& phiBD,
97  surfaceScalarField& phiCorr,
98  const PsiMaxType& psiMax,
99  const PsiMinType& psiMin
100 );
101 
102 template
103 <
104  class RhoType,
105  class SpType,
106  class PsiMaxType,
107  class PsiMinType
108 >
109 void correct
110 (
111  const control& controls,
112  const RhoType& rho,
114  const surfaceScalarField& phiBD,
115  surfaceScalarField& phiCorr,
116  const SpType& Sp,
117  const PsiMaxType& psiMax,
118  const PsiMinType& psiMin
119 );
120 
121 template
122 <
123  class RhoType,
124  class SpType,
125  class PsiMaxType,
126  class PsiMinType
127 >
128 void correct
129 (
130  const control& controls,
131  const RhoType& rho,
133  const surfaceScalarField& phiBD,
135  const SpType& Sp,
136  const PsiMaxType& psiMax,
137  const PsiMinType& psiMin
138 );
139 
140 template
141 <
142  class RdeltaTType,
143  class RhoType,
144  class SpType,
145  class PsiMaxType,
146  class PsiMinType
147 >
148 void limitCorr
149 (
150  const control& controls,
151  const RdeltaTType& rDeltaT,
152  const RhoType& rho,
153  const volScalarField& psi,
154  const surfaceScalarField& phiBD,
155  surfaceScalarField& phiCorr,
156  const SpType& Sp,
157  const PsiMaxType& psiMax,
158  const PsiMinType& psiMin
159 );
160 
161 template
162 <
163  class RdeltaTType,
164  class RhoType,
165  class SpType,
166  class PsiMaxType,
167  class PsiMinType
168 >
169 void limitCorr
170 (
171  const control& controls,
172  const RdeltaTType& rDeltaT,
173  const RhoType& rho,
174  const volScalarField& psi,
175  const surfaceScalarField& phiBD,
177  surfaceScalarField& phiCorr,
178  const SpType& Sp,
179  const PsiMaxType& psiMax,
180  const PsiMinType& psiMin
181 );
182 
183 template
184 <
185  class RhoType,
186  class SpType,
187  class PsiMaxType,
188  class PsiMinType
189 >
190 void limitCorr
191 (
192  const control& controls,
193  const RhoType& rho,
194  const volScalarField& psi,
195  const surfaceScalarField& phiBD,
196  surfaceScalarField& phiCorr,
197  const SpType& Sp,
198  const PsiMaxType& psiMax,
199  const PsiMinType& psiMin
200 );
201 
202 
203 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204 
205 } // End namespace MULES
206 } // End namespace Foam
207 
208 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
209 
210 #ifdef NoRepository
211  #include "CMULESTemplates.C"
212 #endif
213 
214 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
215 
216 #endif
217 
218 // ************************************************************************* //
MULES: Multidimensional universal limiter for explicit solution.
Generic GeometricField class.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: UPtrList.H:66
const volScalarField & psi
rho
Definition: pEqn.H:1
void correct(const RdeltaTType &rDeltaT, const RhoType &rho, volScalarField &psi, const surfaceScalarField &phiCorr, const SpType &Sp)
void limitCorr(const control &controls, const RdeltaTType &rDeltaT, const RhoType &rho, const volScalarField &psi, const surfaceScalarField &phiBD, surfaceScalarField &phiCorr, const SpType &Sp, const PsiMaxType &psiMax, const PsiMinType &psiMin)
tmp< VolField< Type > > Sp(const volScalarField &sp, const VolField< Type > &vf)
Definition: fvcSup.C:67
Namespace for OpenFOAM.