Method of characteristic lines: example

Directly to the input form

 
  • A characteristic curve of a PDE is a curve along which the initial value problem of this PDE cannot be solved uniquely or not at all (locally). The method of characteristics is based on the fact that a hyperbolic PDE can be transformed into a system of ODE's determining simultaneously its characteristic curves and the solution of the PDE along these curves. Initial information of the solution is moved along the characteristic curves. Here we use Eulers method to solve this system of ODE's. We present only one fixed example with analytically known solution here.
  • The PDE reads u=(u1,u2)
    (d/dy)u1 = (d/dx)u2
    (d/dy)u2 = f1(u)(d/dx)u1 + f2(u)(d/dx)u2 + f3(u)

    with initial values u(x,0) = ( 0 , exp(2x) ).
    f1(u)=-(1-u12)/(1-u22)
    f2(u)=2u1u2/(1-u22)
    f3(u)=-4u1exp(2x)/(1-u22)
    and the exact solution
    u(x,y)=2exp(x)(sin(y) , cos (y) ).
  • We restrict x to [0,1]. The interval [0,1] has as domain of determination a curvilinear triangle in the (x,y) plane over which the solution will be computed (the solution components depend exclusively on the initial values over [0,1]) .
  • This PDE is quasilinear. Hence the characteristic curves depend on the solution u(x,y).
  • We begin with an equidistant grid on [0,1]×{0}. Through each point (x,0) there go two characteristic curves and we compute the crossings of these curves for a small increment in y direction and the solution u there. These crossings lie on a new curve, which is our next initial curve and we repeat this process. Clearly we are loosing two outer grid points with every such step and finally end with one point approximating the top of the (curvilinear) triangle which is the domain of determination of our initial interval [0,1].
  • The advantage of the method of characteristics is the fact that it can approximate the analytical domain of determination quite good, and this easily. The satisfaction of the CFL is inherent in its construction and not an additional requirement as for the finite difference methods.
  • Its disadvantage, that for satisfactory precision the computational effort can be quite large and that in more than two dimensions (where characteristic surfaces replace the curves) its application is practically impossible.
 

Input

 
  • Since we deal with one fixed problem here the input is reduced to the choice of the variable n which leads to an initial grid of size 2n+1 with distance h=1/(2n).
  • There are two more parameters which determine the resolution of the graphical representation: p,q. Each p-th grid line of the characteristic net and on this every q-th point will be shown. These will be connected by the corresponding characteristic curves. The rules for choosing p,q are given on the input form.
 

Output

 
  • You get three plots: the characteristic net and the errors of the two solution components over this net.
 

Questions ?!

 
  • How develops the error with increasing n?
  • Where appear the largest errors and why?
 

To the input form

 
Back to the top!

20.07.2010