FreeFOAM The Cross-Platform CFD Toolkit
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) 1991-2010 OpenCFD Ltd.
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 Namespace
25  Foam::MULES
26 
27 Description
28  Multidimensional universal limiter with 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 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef MULES_H
43 #define MULES_H
44 
45 #include <finiteVolume/volFields.H>
48 #include <OpenFOAM/zeroField.H>
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 
56 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 
58 namespace MULES
59 {
60 
61 template<class RhoType, class SpType, class SuType>
62 void explicitSolve
63 (
64  const RhoType& rho,
66  const surfaceScalarField& phiBD,
67  surfaceScalarField& phiPsi,
68  const SpType& Sp,
69  const SuType& Su,
70  const scalar psiMax,
71  const scalar psiMin
72 );
73 
74 void explicitSolve
75 (
77  const surfaceScalarField& phiBD,
78  surfaceScalarField& phiPsi,
79  const scalar psiMax,
80  const scalar psiMin
81 );
82 
83 template<class RhoType, class SpType, class SuType>
84 void implicitSolve
85 (
86  const RhoType& rho,
87  volScalarField& gamma,
88  const surfaceScalarField& phi,
89  surfaceScalarField& phiCorr,
90  const SpType& Sp,
91  const SuType& Su,
92  const scalar psiMax,
93  const scalar psiMin
94 );
95 
96 void implicitSolve
97 (
98  volScalarField& gamma,
99  const surfaceScalarField& phi,
100  surfaceScalarField& phiCorr,
101  const scalar psiMax,
102  const scalar psiMin
103 );
104 
105 template<class RhoType, class SpType, class SuType>
106 void limiter
107 (
108  scalarField& allLambda,
109  const RhoType& rho,
110  const volScalarField& psi,
111  const surfaceScalarField& phiBD,
112  const surfaceScalarField& phiCorr,
113  const SpType& Sp,
114  const SuType& Su,
115  const scalar psiMax,
116  const scalar psiMin,
117  const label nLimiterIter
118 );
119 
120 } // End namespace MULES
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 } // End namespace Foam
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 #ifdef NoRepository
130 #endif
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 #endif
135 
136 // ************************ vim: set sw=4 sts=4 et: ************************ //