File: PetscLimiterLimit.html

package info (click to toggle)
petsc 3.14.5%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 266,472 kB
  • sloc: ansic: 680,898; python: 33,303; cpp: 16,324; makefile: 14,022; f90: 13,731; javascript: 10,713; fortran: 9,581; sh: 1,373; xml: 619; objc: 445; csh: 192; pascal: 148; java: 13
file content (122 lines) | stat: -rw-r--r-- 3,880 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD> <link rel="canonical" href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/FV/PetscLimiterLimit.html" />
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>PetscLimiterLimit</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
   <div id="version" align=right><b>petsc-3.14.5 2021-03-03</b></div>
   <div id="bugreport" align=right><a href="mailto:petsc-maint@mcs.anl.gov?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: petsc-3.14.5 v3.14.5 docs/manualpages/FV/PetscLimiterLimit.html "><small>Report Typos and Errors</small></a></div>
<A NAME="PetscLimiterLimit"><H1>PetscLimiterLimit</H1></A>
Limit the flux 
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
#include "petscfv.h" 
<A HREF="../Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A> <A HREF="../FV/PetscLimiterLimit.html#PetscLimiterLimit">PetscLimiterLimit</A>(<A HREF="../FV/PetscLimiter.html#PetscLimiter">PetscLimiter</A> lim, <A HREF="../Sys/PetscReal.html#PetscReal">PetscReal</A> flim, <A HREF="../Sys/PetscReal.html#PetscReal">PetscReal</A> *phi)
</PRE>
<H3><FONT COLOR="#CC3333">Input Parameters</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lim  </B></TD><TD>- The <A HREF="../FV/PetscLimiter.html#PetscLimiter">PetscLimiter</A>
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>flim </B></TD><TD>- The input field
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#CC3333">Output Parameter</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>phi  </B></TD><TD>- The limited field
</TD></TR></TABLE>
<P>
Note: Limiters given in symmetric form following Berger, Aftosmis, and Murman 2005
<pre>
The classical flux-limited formulation is psi(r) where
</pre>
<pre>
</pre>
<pre>
r = (u[0] - u[-1]) / (u[1] - u[0])
</pre>
<pre>
</pre>
<pre>
The second order TVD region is bounded by
</pre>
<pre>
</pre>
<pre>
psi_minmod(r) = min(r,1)      and        psi_superbee(r) = min(2, 2r, max(1,r))
</pre>
<pre>
</pre>
<pre>
where all limiters are implicitly clipped to be non-negative. A more convenient slope-limited form is psi(r) =
</pre>
<pre>
phi(r)(r+1)/2 in which the reconstructed interface values are
</pre>
<pre>
</pre>
<pre>
u(v) = u[0] + phi(r) (grad u)[0] v
</pre>
<pre>
</pre>
<pre>
where v is the vector from centroid to quadrature point. In these variables, the usual limiters become
</pre>
<pre>
</pre>
<pre>
phi_minmod(r) = 2 min(1/(1+r),r/(1+r))   phi_superbee(r) = 2 min(2/(1+r), 2r/(1+r), max(1,r)/(1+r))
</pre>
<pre>
</pre>
<pre>
For a nicer symmetric formulation, rewrite in terms of
</pre>
<pre>
</pre>
<pre>
f = (u[0] - u[-1]) / (u[1] - u[-1])
</pre>
<pre>
</pre>
<pre>
where r(f) = f/(1-f). Not that r(1-f) = (1-f)/f = 1/r(f) so the symmetry condition
</pre>
<pre>
</pre>
<pre>
phi(r) = phi(1/r)
</pre>
<pre>
</pre>
<pre>
becomes
</pre>
<pre>
</pre>
<pre>
w(f) = w(1-f).
</pre>
<pre>
</pre>
<pre>
The limiters below implement this final form w(f). The reference methods are
</pre>
<pre>
</pre>
<pre>
w_minmod(f) = 2 min(f,(1-f))             w_superbee(r) = 4 min((1-f), f)
</pre>
<P>

<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
 <A HREF="../FV/PetscLimiterSetType.html#PetscLimiterSetType">PetscLimiterSetType</A>(), <A HREF="../FV/PetscLimiterCreate.html#PetscLimiterCreate">PetscLimiterCreate</A>()
<BR><P><B></B><H3><FONT COLOR="#CC3333">Level</FONT></H3>beginner<BR>
<H3><FONT COLOR="#CC3333">Location</FONT></H3>
</B><A HREF="../../../src/dm/dt/fv/interface/fv.c.html#PetscLimiterLimit">src/dm/dt/fv/interface/fv.c</A>
<BR><A HREF="./index.html">Index of all FV routines</A>
<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
<BR><A HREF="../singleindex.html">Index of all manual pages</A>
</BODY></HTML>