Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

CE 509 COMPUTATIONAL METHODS IN CIVIL ENGINEERING

ASSIGNMENT #5 DUE DATE: May 2, 2024

Submit your work as an Excel file

Problem #1
Solve the following initial value problem over the interval from t = 0 to 2 where y (0)=1. Display
all your results on the same graph.
𝑑𝑦
= 𝑦𝑡 3 − 1.5𝑦
𝑑𝑡
a) Analytically, b) Euler’s method with h = 0.5 and 0.25, c) Midpoint method with h =0.5, and d)
Fourth-order RK method with h =0.5.

Problem #2
Use (a) Euler’s method and (b) the fourth-order RK method to solve
𝑑𝑦
= −2𝑦 + 4𝑒 −𝑥
𝑑𝑥
𝑑𝑧 𝑦𝑧 2
=−
𝑑𝑥 3
over the range x = 0 to 1 using a step size of 0.2 with y(0)=2 and z (0)=4.

Problem 3
Solve the following initial-value problem over the interval t =2 through 3:
𝑑𝑦
= −0.5𝑦 + 𝑒 −𝑡
𝑑𝑡
Use Heun’s method with a step size of 0.5 and initial condition of y (2) =4.143883. Iterate the
corrector to s = 0.5%. Compute the true error t based on the analytical solution.

Problem #4
A 3-m diameter tank has a 6-cm-diameter circular orifice in its bottom through which water
drains at a rate:
𝑸 = 𝑪𝑨√𝟐𝒈𝑯
where Q is outflow rate (m /s), C is constant taken equal to 0.55, A is orifice area (m2), g is
3

acceleration due to gravity (=9.81 m/s2), H is depth of liquid (initially 2.75m). The liquid depth
is given by the first-order equation:
𝑑𝐻 𝐶𝐴√2𝑔𝐻
=−
𝑑𝑡 2𝜋𝑟𝐻 − 𝜋𝐻 2

Use fourth-order RK method with a step size of 6 seconds to


determine how long it will take before the tank drains. Show only
results for first and last five time steps in any print out.

You might also like