The Method of Characteristics ¶ Integral Surface ¶ Consider the general quasilinear first order PDE:
a ( x , y , u ) u x + b ( x , y , u ) u y = c ( x , y , u ) a(x,y,u)u_x + b(x,y,u)u_y = c(x,y,u) a ( x , y , u ) u x + b ( x , y , u ) u y = c ( x , y , u ) We note that the vector field ( − u x , − u y , 1 ) T (-u_x, -u_y, 1)^T ( − u x , − u y , 1 ) T would be orthogonal to the solution u ( x , y ) u(x,y) u ( x , y ) everywhere. Therefore the vector field ( a , b , c ) T (a, b, c)^T ( a , b , c ) T is perpendicular to ( − u x , − u y , 1 ) T (-u_x, -u_y, 1)^T ( − u x , − u y , 1 ) T thus must lie in the tangent plane of u ( x , y ) u(x,y) u ( x , y ) . Surfaces that are tangent to a vector space is called integral surfaces , hence to find the solution we want to find the integral surfaces of u ( x , y ) u(x,y) u ( x , y ) .
We do this by:
Parametrize the inital condition Γ ( r ) \Gamma(r) Γ ( r )
Find integral curves χ \chi χ starting from one instance of the initial condition(at some r r r ) by solving a system of ODE.
Concretely, suppose χ ( s ) = ( x ( s ) , y ( s ) , z ( s ) ) \chi(s) = (x(s),y(s),z(s)) χ ( s ) = ( x ( s ) , y ( s ) , z ( s )) is a parametrization of the integral curves, then it must satisfy that:
{ d x d s = a ( x , y , u ) d y d s = b ( x , y , u ) d z d s = c ( x , y , z ) \begin{cases}
\frac{dx}{ds}&=a(x,y,u) \\
\frac{dy}{ds}&=b(x,y,u) \\
\frac{dz}{ds}&=c(x,y,z) \\
\end{cases} ⎩ ⎨ ⎧ d s d x d s d y d s d z = a ( x , y , u ) = b ( x , y , u ) = c ( x , y , z ) on some small ∣ t − t 0 ∣ < δ |t-t_0|<\delta ∣ t − t 0 ∣ < δ . The resulting integral curves are functions of r , s r,s r , s where r r r specifies where the evolution start and s s s specifies how much the integral curve grow away from the Γ \Gamma Γ .
Compute the integral surface as a continuous union by replacing r , s r,s r , s with x , y x,y x , y
Consider the equation u t + c u x = 0 u_t+cu_x=0 u t + c u x = 0 with the initial condition u ( t , 0 ) = exp ( − x 2 ) u(t,0)=\exp(-x^2) u ( t , 0 ) = exp ( − x 2 ) . We parametrize the initial condition as ( t , x , z ) = ( 0 , r , exp ( − r 2 ) ) (t,x,z)=(0,r,\exp(-r^2)) ( t , x , z ) = ( 0 , r , exp ( − r 2 )) . Fix r r r , the system is:
{ d t d s = 1 d x d s = c d z d s = 0 ⟹ { t ( r , s ) = s + C ( r ) x ( r , s ) = c s + D ( r ) z ( r , s ) = E ( r ) \begin{cases}
\frac{dt}{ds}&=1 \\
\frac{dx}{ds}&=c \\
\frac{dz}{ds}&=0 \\
\end{cases}
\Longrightarrow
\begin{cases}
t(r,s)=s+C(r) \\
x(r,s)=cs+D(r)\\
z(r,s)=E(r) \\
\end{cases} ⎩ ⎨ ⎧ d s d t d s d x d s d z = 1 = c = 0 ⟹ ⎩ ⎨ ⎧ t ( r , s ) = s + C ( r ) x ( r , s ) = cs + D ( r ) z ( r , s ) = E ( r ) Substituting the initial condition, we get:
{ t ( r , s ) = s x ( r , s ) = c s + r z ( r , s ) = exp ( − r 2 ) \begin{cases}
t(r,s)=s \\
x(r,s)=cs+r\\
z(r,s)=\exp(-r^2) \\
\end{cases} ⎩ ⎨ ⎧ t ( r , s ) = s x ( r , s ) = cs + r z ( r , s ) = exp ( − r 2 ) But now r = x − c s = x − c t r=x-cs=x-ct r = x − cs = x − c t hence we get the solution:
u ( t , x ) = exp ( − ( x − c t ) 2 ) u(t,x)=\exp(-(x-ct)^2) u ( t , x ) = exp ( − ( x − c t ) 2 ) Visualizing the solution:
We showed the special case when c = 1 c=1 c = 1 , the lines are the integral curves above. In this special case the value of z = u ( x , y ) z=u(x,y) z = u ( x , y ) is fixed on the curve.
The Finite Volume Method ¶ Hyperbolic Conservation Law ¶ For simplicity, we consider the homogenous case:
u t + a ( t , x ) u x = 0 u_t + a(t,x)u_x = 0 u t + a ( t , x ) u x = 0 If we discretize the spatial domain into an array of contiguous cells called control volumes ,
we can see that the equation encapsulate a sense of conservation . Suppose [ a , b ] [a,b] [ a , b ] is a cell of interest, integrate the equation by parts results in :
d d t ∫ a b u d x = a ( t , a ) u ( t , a ) ⏟ flux in − a ( t , b ) u ( t , b ) ⏟ flux out − ∫ a b a x ( t , x ) u d x ⏟ source/disspation \frac{d}{dt}\int_{a}^b u dx = \underbrace{a(t,a)u(t,a)}_{\text{flux in}}-\underbrace{a(t,b)u(t,b)}_{\text{flux out}} - \underbrace{\int_a^b a_x(t,x)udx}_{\text{source/disspation}} d t d ∫ a b u d x = flux in a ( t , a ) u ( t , a ) − flux out a ( t , b ) u ( t , b ) − source/disspation ∫ a b a x ( t , x ) u d x In particular, if we have a ( t , x ) = a ( t ) a(t,x)=a(t) a ( t , x ) = a ( t ) , then we have no source and disspation. This motivates us to define:
For a simple strict conservation law we have:
d d t ∫ a b u = f ( u ( a , t ) ) ⏟ flux in − f ( u ( b , t ) ) ⏟ flux out \frac{d}{dt}\int_a^b u = \underbrace{f(u(a,t))}_{\text{flux in}}-\underbrace{f(u(b,t))}_{\text{flux out}} d t d ∫ a b u = flux in f ( u ( a , t )) − flux out f ( u ( b , t )) It is clear that:
The general homogenous transport equation u t + a ( x , t ) u x = 0 u_t+a(x,t)u_x=0 u t + a ( x , t ) u x = 0 is a strict conservation law iff a ( x , t ) = a ( t ) a(x,t)=a(t) a ( x , t ) = a ( t )
The idea behind finite volume ¶ Finite volume discretize the space into cells x i , i ∈ N x_i, i\in \mathbb{N} x i , i ∈ N being the cell center and x i − 1 / 2 , x i + 1 / 2 x_{i-1/2},x_{i+1/2} x i − 1/2 , x i + 1/2 being the faces of the cell.
Finite volume method utillise the conservation structure of the equation. Specifically, we enforce that conservation law holds at each cell [ x i − 1 / 2 , x i + 1 / 2 ] [x_{i-1/2},x_{i+1/2}] [ x i − 1/2 , x i + 1/2 ]
∫ t j t j + 1 { ∫ x i − 1 / 2 x i + 1 / 2 [ u t + ( f ( u ) ) x − g ] d x } d t = 0 \int_{t_j}^{t_{j+1}}\left\{ \int_{x_{i-1/2}}^{x_{i+1/2}} \left[ u_t + (f(u))_x -g\right]dx \right\}dt=0 ∫ t j t j + 1 { ∫ x i − 1/2 x i + 1/2 [ u t + ( f ( u ) ) x − g ] d x } d t = 0