Loading...
Searching...
No Matches
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-------------------------------------------------------------------------------
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
26Global
27 MULES
28
29Description
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
39SourceFiles
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
59namespace Foam
60{
61namespace MULES
62{
63
64// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65
66template<class RdeltaTType, class RhoType, class SpType, class SuType>
68(
69 const RdeltaTType& rDeltaT,
70 const RhoType& rho,
72 const surfaceScalarField& phiPsi,
73 const SpType& Sp,
74 const SuType& Su
75);
76
77template<class RhoType>
79(
80 const RhoType& rho,
82 const surfaceScalarField& phiPsi
83);
84
85template<class RhoType, class SpType, class SuType>
87(
88 const RhoType& rho,
90 const surfaceScalarField& phiPsi,
91 const SpType& Sp,
92 const SuType& Su
93);
94
95template<class RhoType, class PsiMaxType, class PsiMinType>
97(
98 const RhoType& rho,
100 const surfaceScalarField& phiBD,
101 surfaceScalarField& phiPsi,
102 const PsiMaxType& psiMax,
103 const PsiMinType& psiMin
104);
105
106
107template
108<
109 class RhoType,
110 class SpType,
111 class SuType,
112 class PsiMaxType,
113 class PsiMinType
114>
115void 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
128template
129<
130 class RdeltaTType,
131 class RhoType,
132 class SpType,
133 class SuType,
134 class PsiMaxType,
135 class PsiMinType
136>
137void 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
152template
153<
154 class RdeltaTType,
155 class RhoType,
156 class SpType,
157 class SuType,
158 class PsiMaxType,
159 class PsiMinType
160>
161void 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
176template
177<
178 class RhoType,
179 class SpType,
180 class SuType,
181 class PsiMaxType,
182 class PsiMinType
183>
184void 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
198void limitSum(UPtrList<scalarField>& phiPsiCorrs);
199
200template<class SurfaceScalarFieldList>
201void limitSum(SurfaceScalarFieldList& phiPsiCorrs);
202
203void limitSum
204(
205 const UPtrList<const scalarField>& alphas,
206 UPtrList<scalarField>& phiPsiCorrs,
207 const labelHashSet& fixed
208);
209
210template<class SurfaceScalarFieldList>
211void 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// ************************************************************************* //
const volScalarField & psi
zeroField Su
Definition alphaSuSp.H:1
zeroField Sp
Definition alphaSuSp.H:2
void explicitSolve(const RdeltaTType &rDeltaT, const RhoType &rho, volScalarField &psi, const surfaceScalarField &phiPsi, const SpType &Sp, const SuType &Su)
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)
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)
void limitSum(UPtrList< scalarField > &phiPsiCorrs)
Definition MULES.C:27
Namespace for OpenFOAM.
IOstream & fixed(IOstream &io)
Definition IOstream.H:591
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
Definition HashSet.H:85
GeometricField< scalar, fvPatchField, volMesh > volScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Forward declarations of the specialisations of Field<T> for scalar, vector and tensor.
Forwards and collection of common volume field types.