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 | Copyright (C) 2011-2016 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  MULES: Multidimensional universal limiter for explicit solution.
29 
30  Solve a convective-only transport equation using an explicit universal
31  multi-dimensional limiter.
32 
33  Parameters are the variable to solve, the normal convective flux and the
34  actual explicit flux of the variable which is also used to return limited
35  flux used in the bounded-solution.
36 
37 SourceFiles
38  MULES.C
39  MULESTemplates.C
40 
41 \*---------------------------------------------------------------------------*/
42 
43 #ifndef MULES_H
44 #define MULES_H
45 
46 #include "volFieldsFwd.H"
47 #include "surfaceFieldsFwd.H"
48 #include "primitiveFieldsFwd.H"
49 #include "geometricOneField.H"
50 #include "zero.H"
51 #include "zeroField.H"
52 #include "UPtrList.H"
53 
54 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 
56 namespace Foam
57 {
58 namespace MULES
59 {
60 
61 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62 
63 template<class RdeltaTType, class RhoType, class SpType, class SuType>
64 void explicitSolve
65 (
66  const RdeltaTType& rDeltaT,
67  const RhoType& rho,
69  const surfaceScalarField& phiPsi,
70  const SpType& Sp,
71  const SuType& Su
72 );
73 
74 template<class RhoType, class SpType, class SuType>
75 void explicitSolve
76 (
77  const RhoType& rho,
79  const surfaceScalarField& phiPsi,
80  const SpType& Sp,
81  const SuType& Su
82 );
83 
84 template<class RhoType, class SpType, class SuType>
85 void explicitSolve
86 (
87  const RhoType& rho,
89  const surfaceScalarField& phiBD,
90  surfaceScalarField& phiPsi,
91  const SpType& Sp,
92  const SuType& Su,
93  const scalar psiMax,
94  const scalar psiMin
95 );
96 
97 void explicitSolve
98 (
100  const surfaceScalarField& phiBD,
101  surfaceScalarField& phiPsi,
102  const scalar psiMax,
103  const scalar psiMin
104 );
105 
106 template<class RdeltaTType, class RhoType, class SpType, class SuType>
107 void limiter
108 (
109  scalarField& allLambda,
110  const RdeltaTType& rDeltaT,
111  const RhoType& rho,
112  const volScalarField& psi,
113  const surfaceScalarField& phiBD,
114  const surfaceScalarField& phiCorr,
115  const SpType& Sp,
116  const SuType& Su,
117  const scalar psiMax,
118  const scalar psiMin
119 );
120 
121 template<class RdeltaTType, class RhoType, class SpType, class SuType>
122 void limit
123 (
124  const RdeltaTType& rDeltaT,
125  const RhoType& rho,
126  const volScalarField& psi,
127  const surfaceScalarField& phi,
128  surfaceScalarField& phiPsi,
129  const SpType& Sp,
130  const SuType& Su,
131  const scalar psiMax,
132  const scalar psiMin,
133  const bool returnCorr
134 );
135 
136 
137 void limitSum(UPtrList<scalarField>& phiPsiCorrs);
138 
139 template<class SurfaceScalarFieldList>
140 void limitSum(SurfaceScalarFieldList& phiPsiCorrs);
141 
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 } // End namespace MULES
146 } // End namespace Foam
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 #ifdef NoRepository
151  #include "MULESTemplates.C"
152 #endif
153 
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 
156 #endif
157 
158 // ************************************************************************* //
surfaceScalarField & phi
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 scalar psiMax, const scalar psiMin)
tmp< GeometricField< Type, fvPatchField, volMesh > > Sp(const volScalarField &sp, const GeometricField< Type, fvPatchField, volMesh > &vf)
Definition: fvcSup.C:67
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
Forward declarations of the specialisations of Field<T> for scalar, vector and tensor.
void limitSum(UPtrList< scalarField > &phiPsiCorrs)
Definition: MULES.C:51
void explicitSolve(const RdeltaTType &rDeltaT, const RhoType &rho, volScalarField &psi, const surfaceScalarField &phiPsi, const SpType &Sp, const SuType &Su)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const volScalarField & psi
void limit(const RdeltaTType &rDeltaT, const RhoType &rho, const volScalarField &psi, const surfaceScalarField &phi, surfaceScalarField &phiPsi, const SpType &Sp, const SuType &Su, const scalar psiMax, const scalar psiMin, const bool returnCorr)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
tmp< GeometricField< Type, fvPatchField, volMesh > > Su(const GeometricField< Type, fvPatchField, volMesh > &su, const GeometricField< Type, fvPatchField, volMesh > &vf)
Definition: fvcSup.C:44
Namespace for OpenFOAM.