Content deleted Content added
Corrected the formulation of the Lax-Wendroff scheme; the flux at the midpoints results from a central difference on the flux f plus a diffusive term on the conserved variable u, not the other way around (as it was written). |
Added image and caption Tags: Mobile edit Mobile app edit iOS app edit App suggested edit App image add top |
||
(27 intermediate revisions by 20 users not shown) | |||
Line 1:
{{Short description|Numerical methods for partial differential equations}}
The '''Lax–Wendroff method''', named after [[Peter Lax]] and [[Burton Wendroff]], is a [[numerical analysis|numerical]] method for the solution of [[hyperbolic partial differential equation]]s, based on [[finite difference]]s. It is second-order accurate in both space and time. This method is an example of [[temporal discretization|explicit time integration]] where the function that defines governing equation is evaluated at the current time.▼
[[File:Advection_equation_solution_comparison.png | thumb | right | Graphs that show different Lax–Wendroff methods]]
▲The '''Lax–Wendroff method''', named after [[Peter Lax]] and [[Burton Wendroff]],<ref>{{ cite journal | author1 = P.D Lax | author2 =B. Wendroff | year = 1960 | title = Systems of conservation laws | journal = Commun. Pure Appl. Math. | volume = 13 | pages = 217–237 | doi = 10.1002/cpa.3160130205 | issue = 2 | url = https://apps.dtic.mil/sti/pdfs/ADA385056.pdf | archive-url = https://web.archive.org/web/20170925220837/http://www.dtic.mil/get-tr-doc/pdf?AD=ADA385056 | url-status = live | archive-date = September 25, 2017 }}</ref> is a [[numerical analysis|numerical]] method for the solution of [[hyperbolic partial differential equation]]s, based on [[finite difference]]s. It is second-order accurate in both space and time. This method is an example of [[temporal discretization|explicit time integration]] where the function that defines the governing equation is evaluated at the current time.
== Definition ==
Suppose one has an equation of the following form:
where
=== Linear case ===
▲: <math> \frac{\partial u(x,t)}{\partial t}=\frac{\partial f(u(x,t))}{\partial x}\,</math>
In the linear case, where {{math|1=''f''(''u'') = ''Au''}}, and {{math|''A''}} is a constant,<ref>{{cite book |last=LeVeque |first=Randall J. |title=Numerical Methods for Conservation Laws |___location=Boston |publisher=Birkhäuser |year=1992 |isbn=0-8176-2723-5 |page=125 |url=http://tevza.org/home/course/modelling-II_2016/books/Leveque%20-%20Numerical%20Methods%20for%20Conservation%20Laws.pdf#page=138 }}</ref>
Here <math>n</math> refers to the <math>t</math> dimension and <math>i</math> refers to the <math>x</math> dimension.
This linear scheme can be extended to the general non-linear case in different ways. One of them is letting
<math display="block"> A(u) = f'(u) = \frac{\partial f}{\partial u}</math>
=== Non-linear case ===
▲where ''x'' and ''t'' are independent variables, and the initial state, u(''x'', 0) is given.
The conservative form of Lax-Wendroff for a general non-linear equation is then:
<math display="block"> u_i^{n+1} = u_i^n - \frac{\Delta t}{2\Delta x} \left[ f(u_{i+1}^{n}) - f(u_{i-1}^{n}) \right] + \frac{\Delta t^2}{2\Delta x^2} \left[ A_{i+1/2} \left(f(u_{i+1}^{n}) - f(u_{i}^{n})\right) - A_{i-1/2}\left( f(u_{i}^{n})-f(u_{i-1}^{n})\right) \right].</math>
where <math>A_{i\pm 1/2}</math> is the Jacobian matrix evaluated at <math display="inline">\frac{1}{2} (u^n_i + u^n_{i\pm 1})</math>.
== Jacobian free methods ==
The first step in the Lax–Wendroff method calculates values for u(''x'', ''t'') at half time steps, ''t''<sub>''n'' + 1/2</sub> and half grid points, ''x''<sub>''i'' + 1/2</sub>. In the second step values at ''t''<sub>''n'' + 1</sub> are calculated using the data for ''t''<sub>''n''</sub> and ''t''<sub>''n'' + 1/2</sub>.▼
To avoid the Jacobian evaluation, use a two-step procedure.
=== Richtmyer method ===
First (Lax) steps:▼
▲What follows is the Richtmyer two-step Lax–Wendroff method. The first step in the Richtmyer two-step Lax–Wendroff method calculates values for {{math|''f''(''u''(''x'',
▲First (Lax) steps:
: <math> f(u_{i+1/2}^{n+1/2}) = \frac{1}{2}(f(u_{i+1}^n) + f(u_{i}^n)) - \frac{\Delta t}{2\,\Delta x}( u_{i+1}^n - u_{i}^n ),</math>▼
▲
Second step:
<math display="block"> u_i^{n+1} = u_i^n - \frac{\Delta t}{\Delta x} \left[ f(u_{i+1/2}^{n+1/2}) - f(u_{i-1/2}^{n+1/2}) \right].</math>
=== MacCormack method ===
▲: <math> u_i^{n+1} = u_i^n - \frac{\Delta t}{\Delta x} \left[ f(u_{i+1/2}^{n+1/2}) - f(u_{i-1/2}^{n+1/2}) \right].</math>
{{Main|MacCormack method}}
Another method of this same type was proposed by MacCormack. MacCormack's method uses first forward differencing and then backward differencing:
First step:
<math display="block"> u_{i}^{*}= u_{i}^n - \frac{\Delta t}{\Delta x}( f(u_{i+1}^n) - f(u_{i}^n) ).</math>
Second step:
<math display="block"> u_i^{n+1} = \frac{1}{2} (u_{i}^n + u_{i}^*) - \frac{\Delta t}{2 \Delta x} \left[ f(u_{i}^{*}) - f(u_{i-1}^{*}) \right].</math>
Alternatively,
First step:
<math display="block"> u_{i}^{*} = u_{i}^n - \frac{\Delta t}{\Delta x}( f(u_{i}^n) - f(u_{i-1}^n) ).</math>
Second step:
<math display="block"> u_i^{n+1} = \frac{1}{2} (u_{i}^n + u_{i}^*) - \frac{\Delta t}{2 \Delta x} \left[ f(u_{i+1}^{*}) - f(u_{i}^{*}) \right].</math>
==References==
{{Reflist}}
* Michael J. Thompson, ''An Introduction to Astrophysical Fluid Dynamics'', Imperial College Press, London, 2006.
*{{Cite book | last1=Press | first1=WH | last2=Teukolsky | first2=SA | last3=Vetterling | first3=WT | last4=Flannery | first4=BP | year=2007 | title=Numerical Recipes: The Art of Scientific Computing | edition=3rd | publisher=Cambridge University Press | publication-place=New York | isbn=978-0-521-88068-8 | chapter=Section 20.1. Flux Conservative Initial Value Problems | chapter-url=http://apps.nrbook.com/empanel/index.html#pg=1040 | page=1040}}
Line 30 ⟶ 58:
[[Category:Numerical differential equations]]
[[Category:Computational fluid dynamics]]
|