1 / 12

Hyperbolic Equations

This content details the implementation of the Lax-Wendroff method for solving hyperbolic equations in pure initial value problems (IVP). It covers preliminary inputs, grid definition, and time iteration processes necessary for conducting simulations. The explanation includes the initialization of conditions and source term functions, along with maintaining stability throughout computations. Additionally, the implicit Wendroff method is explored, focusing on aspects such as boundary conditions and numerical characteristics. The goal is to provide a comprehensive understanding of applying these numerical methods effectively while addressing stability and accuracy issues.

libra
Télécharger la présentation

Hyperbolic Equations

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Hyperbolic Equations Pure IVP: Lax-Wendroff method...

  2. Preliminaries: Input: Integer p, lower spatial index at tjmax Integer q, upper spatial index at tjmax Integer jmax, number of time steps real k, time step real h, space step real a, coefficient function f(x), initial condition function ss(x,t), source term functions (sx(x,t) and st(x,t), respectively)

  3. Define Grid: s = k/h check stability Initialize (outputting initial condition) t = 0 nmin = p – jmax nmax = q + jmax for n = nmin, nmin+1, …, nmax xn = n*h V(n) = f(xn) endloop output t for n = p, p+1, …, q output V(n) endloop

  4. Time Loop: for j = 1, 2, …, jmax nmin = nmin+1 nmax = nmax-1 for n = nmin, nmin+1, …, nmax U(n) = V(n)-0.5*s*a*(V(n+1)-V(n-1)) + s**2*a**2/2*(V(n-1)-2*V(n)+V(n+1) + k*ss(n*h,t)+k**2/2*(st(n*h,t)-a*sx(n*h,t)) endloop t = t + k for n = nmin, nmin+1, …, nmax V(n) = U(n) endloop output t for n = p, p+1, …, q output V(n) endloop endloop

  5. Wendroff implicit method for the IBVP Preliminaries: Input: Integer nmax, maximum x index Integer jmax, number of time steps real k, time step real h, space step real a, coefficient function f(x), initial condition function g(t), boundary condition function ss(x,t), source term

  6. Define Grid: s = k/h Initialize (outputting initial condition) t = 0 xmax = nmax*h for n = 0, 1, …, nmax xn = n*h V(n) = f(xn) endloop output t for n = p, p+1, …, q output V(n) endloop

  7. Time Loop: • for j = 1, 2, …, jmax • t = t + k • U(0) = g(t) • q = (1-s*a)/(1+s*a) • for n = 0, 1, …, nmax-1 • U(n+1) = V(n)+q*V(n+1)-q*U(n) • +2*k*ss(xmax+h/2, t-k/2)/(1+s*a) • endloop • for n = 0, 1, …, nmax • V(n) = U(n) • endloop • output t • for n = 0, 1, …, nmax • output U(n) • endloop • endloop

  8. The Wendroff method (among others) does not require specification of a downstream boundary condition, but others, like the Lax-Wendroff do. This can be done either numerically or with some physical reasoning. Numerical: characteristics (skip) finite difference approximation Issues: stability and accuracy

  9. Conservation Law Form recall...

  10. Conservation Law Form Conservation law form if FD equation can be cast as: where Q is a numerical approximation of the flux at “cell” boundaries:

  11. Conservation Law Form write eqn. as: Lax-Friedrichs method where

More Related