Introduction To The Method of Characteristics: June 2019
Introduction To The Method of Characteristics: June 2019
net/publication/333985264
CITATIONS READS
0 10,280
1 author:
Brian G Higgins
University of California, Davis
178 PUBLICATIONS 2,416 CITATIONS
SEE PROFILE
All content following this page was uploaded by Brian G Higgins on 24 June 2019.
Introduction
First order partial differential equations in chemical engineering arise in
models of processes that are dominated by convection rather than by dissi-
pative processes. For example, consider a process that can be described by
the 1-D convective diffusion equation with chemical reaction
∂c ∂c ∂2c
+V = D 2 + f (c, k) (1)
∂t ∂x ∂x
This process involves multiple time scales. There is a diffusive time scale:
τD = L2 /D, a convective time scale: τC = L/V , and a reaction time scale
τR = 1/k. When diffusion and convection are important, the ratio of the
respective time scales gives the Peclet number Pe = V L/D. When reaction
and diffusion are important, the corresponding dimensionless group is the
Thiele modulus φ2 = kL2 /D, and when convection and reaction are im-
portant, the ratio of time scales gives the Damkler number Da = Lk/D.
Thus in the limit of large Peclet numbers with finite Damkler numbers, the
system is described by a first order PDE, which when expressed in suitable
dimensionless variables takes the form
∂c ∂c
+ Pe = f (c) (2)
∂t ∂x
In these notes we discuss the solution of first order PDEs described by
∂u ∂u
a +b =c (3)
∂x ∂y
∗
email: [email protected]
1
In particular, we use the above equation to motivate the basic solution
method we will used, called the method of characteristics. Seven example
calculations will be presented to illustrate the solution technique. And when
necessary, we will make use of Mathematica to show graphically how the
solution families evolve in time and space.
Method of Characteristics
Consider the following first order PDE
∂u ∂u
a +b =c (4)
∂x ∂y
where a, b, c are in general functions of x and y, and possibly also u(x, y).
Suppose we have found a solution to Eq. (4), then tuple {x, y, u(x, y)}
defines a surface S in a Cartesian coordinate system, where the position
vector r to any point on the surface is given by
From calculus we know that the unit normal n to the surface u(x, y) is given
by the following formula
∂r ∂r
∂x × ∂y
n = ∂r ∂r (6)
| ∂x × ∂y |
A simple calculation shows that
∂r ∂r ∂u ∂u ∂u ∂u
× = i+ k × j+ k = i+ j −k (7)
∂x ∂y ∂x ∂y ∂x ∂y
Suppose now that u(x, y) is a solution to Eq. (4). Then we construct the
following vector p = a i + b j + c k , where the coefficients a, b, c are the same
as those in Eq. (4). It follows then that the scalar product
∂u ∂u
∂x i + ∂y j − k
p · n = (a i + b j + c k ) ·
| ∂x × ∂∂yr |2
∂r
(8)
∂u ∂u
=a +b −c≡0
∂x ∂y
Thus we can conclude that the vector p that we constructed must lie in the
tangent plane of the solution surface S with unit normal n . So our task to
2
finding a solution to Eq. (4) is equivalent to finding a surface S such that
at every point on the surface, the vector p lies in the tangent plane.
Now consider a curve C that lies in the surface S. Let its position vector
r(
r(x, y) be defined as in Eq. (5). It will be convenient to parameterize the
curve in terms of arc length s along the curve, i.e.,
Example 1
Suppose we have the following PDE
∂u ∂u
+C =0
∂t ∂x
where C is a constant. Note this equation is a special case of Eq. (4) where
the variable t is used instead of y and a = 1, c = 0. To solve this equation,
we introduce the parameter s along the curve such that the origin of the
curve (at s = 0) satisfies
C: x = x0 , t = t0 , at s = 0
3
From Eq. (11) we know that a solution curve C that satisfies the PDE must
satisfy the following characteristic ODEs
dx dt du
= C, = 1, =0
ds ds ds
Integrating the above equations gives
x = C s + K1 , t = s + K2 , u = K3
x = C s + x0 , t = s + t0 , u = K3
x = C(t − t0 ) + x0 , =⇒ x0 = x − C(t − t0 )
Since u(x, y) is a constant along the solution curve C (recall du/ds = 0).
This means that u(x, y) must be some function of the ”initial condition”
specified for the solution curve C. Thus we can write
u = F (x0 , t0 )
Initial-Value Problem
The initial-value or Cauchy problem is define as follows
∂u ∂u
a +b =c (12)
∂x ∂t
subject to the initial condition
4
A more general IC can be constructed by defining a curve Γ parameter-
ized by ŝ such that
Γ: x = p(ŝ), t = q(ŝ), u = u(ŝ), ŝ1 < ŝ < ŝ2 (14)
The initial data curve Γ is subject to the constraint that
dp dq
a − b 6= 0 along Γ (15)
dŝ dŝ
This ensures that {p(ŝ), q(ŝ)} is not a characteristic ground curve of PDE
(4). We then refer to Γ as the initial data curve for the PDE (19). Thus our
problem statement becomes
∂u ∂u
a +b =c
∂x ∂t (16)
IC: u(x, t) = u(p(ŝ), q(ŝ)) = f (ŝ)
Thus the solution to our initial value problem is a surface with the following
parametric representation:
x = x(s, ŝ), t = t(s, ŝ), u = u(s, ŝ) (17)
Here ŝ is the parameter that establishes the curve Γ that defines the initial
data for the problem. Along the solution curve C, the parameter s varies
and is assigned the value s = 0 on Γ. Thus the surface u(x, t) is found by
solving the following system of ODEs
dx
= a, x(0, ŝ) = p(ŝ)
ds
dt
= b, t(0, ŝ) = q(ŝ) (18)
ds
du
= a, u(0, ŝ) = f (ŝ)
ds
In the neighborhood of Γ we have x = x(s, ŝ), and t = t(s, ŝ). We can
then ask whether we can solve these two equations to find s = s(x, t) and
ŝ = ŝ(x, t). This can be answered using the implicit function theorem,
namely
∂x ∂x
∂s ∂ŝ
det 6= 0 (19)
∂t ∂t
∂s ∂ŝ
5
Expanding Eq. (26) we get
∂x ∂t ∂x ∂t ∂t ∂x
− =a −b 6= 0 (20)
∂s ∂ŝ ∂ŝ ∂s ∂ŝ ∂ŝ
This is nothing more than the constraint that the initial data curve must
satisfy. If this constraint is not satisfied then the solution to the initial value
problem may not exist or have multiple solutions.
Suppose our initial data is given by
For this initial data, the parameter ŝ represents the positive x-axis at t = 0
and we denote values along the x-axis by x0 and our system of equations
becomes
dx
= a, x(0, x0 ) = x0
ds
dt
= b, t(0, x0 ) = 0 (22)
ds
du
= c, u(0, x0 ) = f (x0 ) = cos(x0 )
ds
Suppose our initial data is given by
For this initial data the parameter ŝ represents the positive t-axis and we
denote values along the t-axis by t0 and our system of equations becomes
dx
= a, x(0, t0 ) = 0
ds
dt
= b, t(0, x0 ) = t0 (24)
ds
du
= c, u(0, x0 ) = g(t0 )
ds
In the next series of examples we will show how these ideas can be applied
to different problems.
6
Example 2
Let us define the following initial value problem (IVP)
∂u ∂U
+C = 0, −∞ < x < ∞, t>0
∂t ∂x
u(x, 0) = f (x)
u(x, t) = f (x − Ct)
Example 3
Consider the following PDE that describes the function u(t, x):
∂u ∂u
2xt + = u, where − ∞ < x < ∞, t > 0
∂x ∂t
IC: u(0, x) = x
7
In this example the function u(t, x) is not constant along characteristic
curves C. Thus our solution strategy is to first solve for t then use the
result to eliminate t from the equation for x as follows
dt
= 1 =⇒ t = s, as t = 0 at s = 0
ds
Since we now know how t is related to s, we can solve for x = x(s)
dx
= 2xt = 2xs =⇒ x = x0 exp(s2 ), with x = x0 at s = 0
ds
Finally we solve for u along the characteristic to get
du
=u =⇒ u = A exp(s)
ds
Evaluating at t = 0 (s = 0) we have
u(0, x0 ) = x0 =⇒ A = x0
Example 4
In this example we consider an initial boundary value problem (IBVP)
∂u ∂u
u2 + = 0, x > 0, t > 0
∂x ∂t
subject to the following conditions
√
u(0, x) = x, x>0
u(t, 0) = 0, t>0
8
This is called an initial-boundary value problem. The characteristic equa-
tions for the parametric functions x(s, ŝ), t(s, ŝ), u(s, ŝ) are:
dx dt du
= u2 , = 1, =0
ds ds ds
subject to the initial conditions at s = 0 along the positive x-axis:
√
x(0, x0 ) = x0 , t(0, x0 ) = 0, u(0, x0 ) = x0
The last equation shows that along characteristics u is a constant that de-
pends on the initial condition
√
u(s, x0 ) = F (x0 ) = x0
This is an implicit equation for u. We can square both sides and then solve
for u2 to get
x
u2 = x − u2 t, =⇒ u2 =
1+t
Note that this function automatically satisfies the BC at x = 0. Let us use
Mathematica to check that this expression satisfies the PDE.
9
Example 5
Consider the following nonlinear first order PDE
1 ∂u ∂u
+ u2 =u
x ∂x ∂y
subject to the following initial data
Thus our initial data lies on the ”curve” Γ along the x-axis. Our goal then is
to find the following parametric equations x(s, ŝ), y(s, ŝ), u(s, ŝ) by solving
the characteristic equations:
dx 1 dy du
= , = u2 , =u
ds x ds ds
subject to the initial conditions at s = 0 along the x-axis:
10
Thus we can write
x2 = 2 log u + x20 − 2 log(x0 )
x2 u2
y= 0 −1
2 x20
(u2 − 1)
x2 = 2 log(u) + 1, y=
2
In Figure 1 we plot of the characteristic that passes through x0 = 1 and
y0 = 0, using u as a parameter. The Mathematica code for the plot is given
below.
Example 6
We will consider a plug flow reactor in which a first-order, irreversible re-
action takes place. If the density and temperature of the reaction mixture
remain uniform and constant, the species balance for the reactant at a dis-
tance x from the inlet and at time t is given by
∂c ∂c
+V = −k c
∂t ∂x
in which c is the molar concentration of the reactant and V is the superficial
velocity of the reactant mixture and k is the reaction rate constant. The
IC-BC for this problem are
11
Figure 1: Characteristic curve for Example 5 through x0 = 1, y0 = 0
12
Applying these ICs to the characteristic curves determined above gives
K1 = t0 , K2 = 0, K3 = g(t0 )
Solving for s and t0 gives
x x
s= , t0 = (t − )
V V
Thus the concentration along these characteristics is given by
x k x
c(t, x) = g(t − ) exp(− x), for t >
V V V
Consider next the IC. Along the x-axis at t = 0 we set ŝ = x0 . Then for each
of the characteristic variables at s = 0 viz., x(s, ŝ), t(s, ŝ), c(s, ŝ) we have
x(0, x0 ) = x0 , t(0, x0 ) = 0, c(0, x0 ) = f (x0 )
Applying these ICs to the characteristic curves determined above gives
K1 = 0, K2 = x0 , K3 = f (x0 )
Solving for s and x0 gives
s = t, x0 = (x − V t)
Thus the concentration along the characteristics emanating from the x-axis
is given by
c(t, x) = f (x − V t) exp(−k t), for x > V t
In summary: the reactant concentration profile along the reactor is given by
the following two equations:
c(t, x) = f (x − V t) exp(−k t), for x>Vt
x k
c(t, x) = g(t − ) exp(− x), for x < V t
V V
The slope of any characteristic curve C is V as shown in Figure 2. The blue
characteristic passing through (0, 0) divides the plane into two regions. The
characteristics that intersect the x-axis have an initial value given by f (x0 ),
while those that intersect the t-axis have an initial value given by g(t0 ). Let
us suppose that the functions g(t0 ) and f (x0 ) are given by
(t0 − 2)2
1
f (x0 ) = tanh(x0 ), g(t0 ) = √ exp −
0.7 2π 2 × 0.72
A three dimensional plot of the concentration profile is shown in Figure
4. The vertical plane at t = 4 gives a cross section of the profile along the
reactor as seen in Figure 3.
13
Figure 2: Characteristic curves for Example 6
Example 7
In this example we consider the following problem
∂u ∂u
+ = 0, 0 < x < ∞, t > 0
∂t ∂x
subject to the conditions
BC: u(0, t) = t, t>0
x2 , 0 ≤ x ≤ 2
IC: u(x, 0) =
x, 2 ≤ x
The characteristics for this problem are
dt dy du
= 1, = 1, =0
ds ds ds
14
Figure 3: Concentration profiles along reactor in Example 6 for select
times
x = s + K1 , t = s + K2 , u = K3
For each BC-IC we have a set of initial conditions for the characteristic
equations. We consider first the BC which represents the t-axis at x = 0.
Along this axis we set ŝ = t0 . Then for each of the characteristic variables
at s = 0 viz., x(s, ŝ), t(s, ŝ), u(s, ŝ) we have
K1 = 0, k2 = t0 , K3 = t0
This means that the characteristic curves emanating from the t-axis at x = 0
are
x = s, t = s + t0 , u = t0
Eliminating t0 gives
u(x, t) = t − x
15
Figure 4: Concentration profiles along reactor in Example 6 as a func-
tion of t and x
Consider next the initial conditions for characteristics emanating from the
x-axis. The initial conditions for x(s, ŝ), t(s, ŝ), u(s, ŝ) at s = 0 are
x(0, x0 ) = x0 , t(0, x0 ) = 0
u(0, x0 ) = x0 , for 2 ≤ x0
x0 = K1 , K2 = 0, u = K3 = x20
Thus
x = s + x0 , t = s, u = x20
16
This gives after eliminating x0 and s the solution on all characteristics pass-
ing through 0 ≤ x ≤ 2, t = 0
u(x, t) = (x − t)2
x = s + x0 , t = s, u = x0
This gives after eliminating x0 and s the solution on all characteristics pass-
ing through x > 2, t = 0
u(x, t) = (x − t)
Note that all characteristics have slope dx/dt = 1, and hence do not inter-
sect. Here is a plot of the characteristics defined for the various zones. Also
show is the line at t0 = 1.25
17
Figure 6: Profile for u(1.25, x) superimposed on the characteristic
curves for Example 7
18
profile calculated as described above on the t-x plane
Final Comments
The method of characteristics is covered in most textbooks on PDEs, though
the detail of presentation might vary a lot. The references listed below were
helpful in preparing these notes:
References
[1] C. Pozrikidis, Numerical Computation in Science and Engineering, Ox-
ford University Press, 1998
Appendix
The Mathematica code for generating the plots in Figure 3 is shown below
19
myfuncC4[t_, x_, V_, k_] := Tanh[x - V t] Exp[-k t] /; x > V t
myfuncC4[t_, x_, V_, k_] :=
1/(0.7 Sqrt[2 \[Pi]]) Exp[-((t - x/V) - 2)^2/(2 0.7^2)] Exp[-k x/V] /;
x <= V t
Plot[{myfuncC4[1, x, 1, 0.3], myfuncC4[2, x, 1, 0.3],
myfuncC4[4, x, 1, 0.3], myfuncC4[6, x, 1, 0.3]}, {x, 0, 10},
PlotStyle -> Thick, Frame -> True,
FrameLabel -> {Style["x", 16], Style["c(t,x}", 16]},
PlotRange -> {0, 1},
Epilog -> {Text[Style["t=1", 14], {4, 0.78}],
Text[Style["t=2", 14], {6, 0.58}],
Text[Style["t=4", 14], {7, 0.34}],
Text[Style["t=6", 14], {9, 0.2}]},
FrameTicksStyle -> Directive[Black, 16],
FrameStyle -> Directive[Black, Thickness[0.0028]]]
The Mathematica code for generating the plots in Figure 4 is shown below
20
Text[StyleForm["u(0,x)=x", FontSize -> 16], {3, .15}],
Text[
StyleForm["u(t,x)=(x-t\!\(\*SuperscriptBox[\()\), \(2\)]\)",
FontSize -> 16], {2.5, 1.5}],
Text[StyleForm["u(t,x)=(x-t)", FontSize -> 16], {4, 1}],
Text[StyleForm["u(t,x)=(t-x)", FontSize -> 16], {1, 2.5}],
Dashing[{0.02, 0.02}], Line[{{0, 1.25}, {5, 1.25}}],
AbsolutePointSize[8], Black, Point[{1.25, 1.25}],
Point[{3.25, 1.25}]},
FrameTicksStyle -> Directive[Black, 16],
FrameStyle -> Directive[Black, Thickness[0.0025]]];
plt2 = Plot[Evaluate[u[x, 1.25]], {x, 0, 5},
PlotStyle -> {Gray, Thick}, Frame -> True,
FrameLabel -> {"x", "u(x,t)"}, RotateLabel -> False];
Show[plt1, plt2]
21