Homework Exercise 6

CE305 Numerical Methods for Civil Engineers
2014 Fall
Homework Exercise VI
1. A relaxation experiment is carried out on the Maxwell model, shown in the figure below, at a
constant strain    0  0.01. The modulus of elasticity of the spring is E= 20 MPa and the
coefficient of viscosity of the Newtonian dashpot is   6 MPa s . The evolution equation of
the stress in the Maxwell model is given by the following ordinary differential equation .
d


  with  
dt

E
with initial stress condition  0   (t  0)  E 0  0.2 MPa
Figure 1 Maxwell model of viscoelasticity.
The exact solution of this stress evolution equation is
 (t )  E 0e

t

a) Integrate the evolution equation to compute the stress values at t =0.1, 0.3, and 0.5 s by using
the Euler method with the time step t = 0.1 s.
b) Integrate the evolution equation to compute the stress values at t =0.1, 0.3, and 0.5 s by using
the (single-correction) Heun method with the time step t = 0.1 s.
c) Calculate the local and global absolute true errors  AT at the time points t =0.1, 0.3, and 0.5 s
for the both methods. Comment on the results and make suggestions to improve the accuracy
of the methods.
2. Solve Problem 1 through the Mid-Point Rule (i.e. RK2 with a2=1) and the fourth-order
Runge- Kutta method (RK4).
3. Use the fourth-order Runge-Kutta method (RK4) to solve the following initial-value
problem
dy
y t

with y(0)  1
dt
2
on the interval [0,3] by taking t = 0.125, 0.25, 0.5, and 1 and compare the solutions.You
may want to write a computer code to conduct the calculations for the time steps t < 1.
4. A predator-prey problem is described by the Lotka–Volterra equations, a pair of firstorder non-linear differential equations. These equations are often used to describe the
dynamics of biological systems where two species (one as predator, the other as prey)
interact. The following system is an example for the Lotka-Volterra equations
1
CE305 Numerical Methods for Civil Engineers
2014 Fall
Homework Exercise VI
dx
 2 x  0.02 xy
dt
dy
 0.002 xy  0.8 y
dt
where the time-dependent variables x and y denote the population of rabbits and foxes,
respectively. Use the Euler method to solve this system over the time interval [0,1] using the
time step t = 0.1 for the following distinct initial conditions:
a) x(0)= 3000 rabbits and y(0)= 120 foxes,
b) x(0)= 2000 rabbits and y(0)= 50 foxes.
5. Solve Problem 3 through the (single-correction) Heun method and compare the results
with the ones obtained by using the Euler method.
6. The van der Pol oscillator whose motion is given by the following second-order of nonlinear ordinary differential equation forms the basis for many models of electrophysiology
describing the action potential transients in excitable neural and cardiac cells
d 2x
dx
 ( x 2  1)  x  0
2
dt
dt
a) Recast this second-order differential equation into two first-order differential equations.
b) Solve this first-order system through the Euler method for the initial conditions x(0)= 1 and
dx(0)/dt= 1 over the time interval [0,1] using the time step t = 0.1.
7. In a chemical reaction, two molecules combine to form one molecule of the chemical product
C. It is found that the concentration y(t) of the product C is the solution of the following
initial-value problem
dy
 0.01(70  y)(50  y) with y(0)  0.
dt
a) Solve the initial-value problem for the concentration values y(t) at t =1, 3, and 5 by using the
Euler method with the time step t = 1 s.
b) Solve the initial-value problem for the concentration values y(t) at t =1, 3, and 5 by using the
(single-correction) Heun method with the time step t = 1 s.
c) Calculate the global percent relative true error  RT % at the time points t =1, 3, and 5 s for the
both methods. Note that the exact solution of this differential equation is given by
y(t ) 
350  350e0.02t
7  5e0.2t
2