Modelling Simulation Assignment Help
Modelling Simulation Assignment Help
3V
f (h) = h3 − 3Rh2 + =0
π
6
R= 2
= 3 ft (radius of the spherical tank, given the diameter is 6 ft)
V = 60 ft3 (volume of oil in the tank)
Now, we will solve for h using three numerical methods (Bisection, Secant, and Newton-Raphson),
performing three iterations for each method.
1st iteration:
Choose a = 0 and b = 3.
180 180
f (0) = ≈ 57.2958, f (3) = 33 − 9(3)2 + = −54 + 57.2958 = 3.2958
π π
Since f (0) > 0 and f (3) > 0, we need to choose a better interval. Let’s try a = 2.
f (2) = 23 − 9(2)2 + 180
π
= −38.7042.
Now, we have f (2) < 0 and f (3) > 0. Hence, the root lies between a = 2 and b = 3.
a+b 2+3
c1 = = = 2.5
2 2
180
f (2.5) = 2.53 − 9(2.5)2 + ≈ −16.2042
π
Since f (2.5) < 0, update a = 2.5.
2.5 + 3
c2 = = 2.75
2
180
f (2.75) = 2.753 − 9(2.75)2 + ≈ −7.2042
π
Update a = 2.75.
2.75 + 3
c3 = = 2.875
2
180
f (2.875) = 2.8753 − 9(2.875)2 + ≈ −1.4542
π
Update a = 2.875.
After three iterations, the estimated root is around 2.875 ft. Continue iterations until the desired
precision is reached.
f (hn ) − f (hn−1 )
1st iteration:
f (3)(3 − 2) 3.2958(1)
h2 = 3 − =3− ≈ 2.918
f (3) − f (2) 3.2958 + 38.7042
f (hn )
hn+1 = hn −
f ′ (hn )
Start with h0 = 3.
1st iteration:
f (3) 3.2958
h1 = 3 − = 3 − ≈ 2.8
f ′ (3) 3(3)2 − 18(3)
dx
= 37.5 − 3.5x
dt
We’ll use Euler’s method and Runge-Kutta methods (2nd and 4th order) with a step size h = 1.5
min.
Euler's Method
Euler’s method is:
xn+1 = xn + h ⋅ f (tn , xn )
k1 = h ⋅ f (tn , xn )
h k1
k2 = h ⋅ f ( t n + , xn + )
2 2
xn+1 = xn + k2
k1 = h ⋅ f (tn , xn )
h k1
k2 = h ⋅ f ( t n + , xn + )
2 2
h k2
k3 = h ⋅ f ( t n + , xn + )
2 2
k4 = h ⋅ f (tn + h, xn + k3 )
k1 + 2k2 + 2k3 + k4
xn+1 = xn +
6
After applying these methods for three iterations, you'll have the salt concentration after 3 minutes.
Let me know if you need further calculations or clarifications!