MULES.H
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) 2011-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 Global
27  MULES
28 
29 Description
30  MULES: Multidimensional universal limiter for explicit solution.
31 
32  Solve a convective-only transport equation using an explicit universal
33  multi-dimensional limiter.
34 
35  Parameters are the variable to solve, the normal convective flux and the
36  actual explicit flux of the variable which is also used to return limited
37  flux used in the bounded-solution.
38 
39 SourceFiles
40  MULES.C
41  MULESTemplates.C
42 
43 \*---------------------------------------------------------------------------*/
44 
45 #ifndef MULES_H
46 #define MULES_H
47 
48 #include "volFieldsFwd.H"
49 #include "surfaceFieldsFwd.H"
50 #include "primitiveFieldsFwd.H"
51 #include "geometricOneField.H"
52 #include "zeroField.H"
53 #include "UPtrList.H"
54 #include "HashSet.H"
55 #include "UniformField.H"
56 
57 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
58 
59 namespace Foam
60 {
61 namespace MULES
62 {
63 
64 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 
66 template<class RdeltaTType, class RhoType, class SpType, class SuType>
67 void explicitSolve
68 (
69  const RdeltaTType& rDeltaT,
70  const RhoType& rho,
72  const surfaceScalarField& phiPsi,
73  const SpType& Sp,
74  const SuType& Su
75 );
76 
77 template<class RhoType>
78 void explicitSolve
79 (
80  const RhoType& rho,
82  const surfaceScalarField& phiPsi
83 );
84 
85 template<class RhoType, class SpType, class SuType>
86 void explicitSolve
87 (
88  const RhoType& rho,
90  const surfaceScalarField& phiPsi,
91  const SpType& Sp,
92  const SuType& Su
93 );
94 
95 template<class RhoType, class PsiMaxType, class PsiMinType>
96 void explicitSolve
97 (
98  const RhoType& rho,
100  const surfaceScalarField& phiBD,
101  surfaceScalarField& phiPsi,
102  const PsiMaxType& psiMax,
103  const PsiMinType& psiMin
104 );
105 
106 
107 template
108 <
109  class RhoType,
110  class SpType,
111  class SuType,
112  class PsiMaxType,
113  class PsiMinType
114 >
115 void explicitSolve
116 (
117  const RhoType& rho,
119  const surfaceScalarField& phiBD,
120  surfaceScalarField& phiPsi,
121  const SpType& Sp,
122  const SuType& Su,
123  const PsiMaxType& psiMax,
124  const PsiMinType& psiMin
125 );
126 
127 
128 template
129 <
130  class RdeltaTType,
131  class RhoType,
132  class SpType,
133  class SuType,
134  class PsiMaxType,
135  class PsiMinType
136 >
137 void limiter
138 (
139  scalarField& allLambda,
140  const RdeltaTType& rDeltaT,
141  const RhoType& rho,
142  const volScalarField& psi,
143  const surfaceScalarField& phiBD,
144  const surfaceScalarField& phiCorr,
145  const SpType& Sp,
146  const SuType& Su,
147  const PsiMaxType& psiMax,
148  const PsiMinType& psiMin
149 );
150 
151 
152 template
153 <
154  class RdeltaTType,
155  class RhoType,
156  class SpType,
157  class SuType,
158  class PsiMaxType,
159  class PsiMinType
160 >
161 void limit
162 (
163  const RdeltaTType& rDeltaT,
164  const RhoType& rho,
165  const volScalarField& psi,
166  const surfaceScalarField& phi,
167  surfaceScalarField& phiPsi,
168  const SpType& Sp,
169  const SuType& Su,
170  const PsiMaxType& psiMax,
171  const PsiMinType& psiMin,
172  const bool returnCorr
173 );
174 
175 
176 template
177 <
178  class RhoType,
179  class SpType,
180  class SuType,
181  class PsiMaxType,
182  class PsiMinType
183 >
184 void limit
185 (
186  const RhoType& rho,
187  const volScalarField& psi,
188  const surfaceScalarField& phi,
189  surfaceScalarField& phiPsi,
190  const SpType& Sp,
191  const SuType& Su,
192  const PsiMaxType& psiMax,
193  const PsiMinType& psiMin,
194  const bool returnCorr
195 );
196 
197 
198 void limitSum(UPtrList<scalarField>& phiPsiCorrs);
199 
200 template<class SurfaceScalarFieldList>
201 void limitSum(SurfaceScalarFieldList& phiPsiCorrs);
202 
203 void limitSum
204 (
205  const UPtrList<const scalarField>& alphas,
206  UPtrList<scalarField>& phiPsiCorrs,
207  const labelHashSet& fixed
208 );
209 
210 template<class SurfaceScalarFieldList>
211 void limitSum
212 (
213  const SurfaceScalarFieldList& alphas,
214  SurfaceScalarFieldList& phiPsiCorrs,
215  const labelHashSet& fixed
216 );
217 
218 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
219 
220 } // End namespace MULES
221 } // End namespace Foam
222 
223 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
224 
225 #ifdef NoRepository
226  #include "MULESTemplates.C"
227 #endif
228 
229 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
230 
231 #endif
232 
233 // ************************************************************************* //
void limit(const RdeltaTType &rDeltaT, const RhoType &rho, const volScalarField &psi, const surfaceScalarField &phi, surfaceScalarField &phiPsi, const SpType &Sp, const SuType &Su, const PsiMaxType &psiMax, const PsiMinType &psiMin, const bool returnCorr)
zeroField Su
Definition: alphaSuSp.H:1
Forwards and collection of common volume field types.
IOstream & fixed(IOstream &io)
Definition: IOstream.H:572
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:72
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
Definition: HashSet.H:85
Forward declarations of the specialisations of Field<T> for scalar, vector and tensor.
void limitSum(UPtrList< scalarField > &phiPsiCorrs)
Definition: MULES.C:27
void limiter(scalarField &allLambda, const RdeltaTType &rDeltaT, const RhoType &rho, const volScalarField &psi, const surfaceScalarField &phiBD, const surfaceScalarField &phiCorr, const SpType &Sp, const SuType &Su, const PsiMaxType &psiMax, const PsiMinType &psiMin)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const volScalarField & psi
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
void explicitSolve(const RdeltaTType &rDeltaT, const RhoType &rho, volScalarField &psi, const surfaceScalarField &phiPsi, const SpType &Sp, const SuType &Su)
Namespace for OpenFOAM.
zeroField Sp
Definition: alphaSuSp.H:2