MINIMUM PRESSURE REQUIRED TO BREAK ICE BY AIR CUSHION VEHICLE USING NEWTON-RAPHSON METHOD.
AIM: MINIMUM PRESSURE REQUIRED TO BREAK ICE BY AIR CUSHION VEHICLE USING NEWTON-RAPHSON METHOD.
THEORY AND GOVERNING EQUATION:
When there is the pressure acting on Ice, stress developed in it is given by,
This is how stress (sigma) changes with applied pressure. When the stress level inside the Ice reaches a maximum tensile strength of the ice, it breaks. This pressure which causes maximum tensile stress in the ice is the minimum pressure required to it.
Now, to calculate the minimum pressure value, we convert the above equation in pressure form.
Given: β = 0.5, r = 40 feet and σ = 150 pounds per square inch (psi).
This is a non-linear equation in p. Our objective is to find the root of the above equation which gives us the value of minimum pressure.
NEWTON-RAPHSON METHOD:
Newton-Raphson is a numerical method to approximate the roots of a real-valued function f(x)=0. This method gives the root of any function which is continuous and differentiable. It is an iterative method i.e. we get better results after several iterations.
HOW does IT work?
Suppose you need to find the root of a continuous, differentiable function f(x), and you know the root you are looking near the point x =x0. Then Newton's method tells us that a better approximation for the root is,
This process may be repeated as many times as necessary to get the desired accuracy. In general, for any x-value, Xn, the next value is given by,
We draw a tangent line to the graph of f(x) at the point x=xn. This line has slope f'(xn) and goes through the point (xn, f(xn)). Therefore it has the equation y = f'(xn)(x – xn) + f(xn). Now, we find the root of this tangent line by setting y = 0 and x=xn+1 for our new approximation. Solving this equation gives us our new approximation.
RELAXATION FACTOR (α):
xn+1 = xn – α*[f(xn) / f’(xn)]
α is a relaxation factor which controls the convergence of the newton-raphson method. Using the optimum value of α, we can converge the solution in minimum iterations and with minimum error.
PROGRAM:1 finding the optimum value of alpha (relaxation factor)
import math
import matplotlib.pyplot as plt
import numpy as np
s=150*144
b=0.5
r=40
h=0.6
def f(p,s,b,r,h):
A = pow(p,3)*(1-pow(b,2))
B = (0.4*h*pow(b,2) - ((s*pow(h,2))/pow(r,2)))*pow(p,2)
C = (pow(s,2)*pow(h,4)*p)/(3*pow(r,4))
d = (s*pow(h,2))/(3*pow(r,2))
D = pow(d,3)
return A + B + C - D
def f_dev(p,s,b,r,h):
A = 3*pow(p,2)*(1-pow(b,2))
B = (0.4*h*pow(b,2) - ((s*pow(h,2))/pow(r,2)))*2*p
C = (pow(s,2)*pow(h,4))/(3*pow(r,4))
return A + B + C
alpha = np.linspace(0.1,1.9,15)
no_iter=[]
f_val=[]
for alpha_i in alpha:
p_guess = 50
tolerance = 1e-5
iter = 1
while (abs(f(p_guess,s,b,r,h)) > tolerance):
p_guess = p_guess - (alpha_i*f(p_guess,s,b,r,h))/f_dev(p_guess,s,b,r,h)
iter=iter+1
f_val.append(abs(f(p_guess,s,b,r,h)))
no_iter.append(iter)
plt.figure(1)
plt.plot(alpha,no_iter,linewidth=3)
plt.xlabel('alpha')
plt.ylabel('No. of iterations')
plt.title('iterations vs relaxation factor')
plt.show()
plt.figure(2)
plt.plot(alpha,f_val,linewidth=3)
plt.xlabel('relaxation factor')
plt.ylabel('|f(p)|')
plt.show()
OUTPUT:
PROGRAM:2 Pressure vs height using the optimum value of alpha i.e. 1
import math
import matplotlib.pyplot as plt
import numpy as np
s=150*144
b=0.5
r=40
H=np.linspace(0.6,4.2,7)
p_val=[]
for h in H:
def f(p,s,b,r,h):
A = pow(p,3)*(1-pow(b,2))
B = (0.4*h*pow(b,2) - ((s*pow(h,2))/pow(r,2)))*pow(p,2)
C = (pow(s,2)*pow(h,4)*p)/(3*pow(r,4))
d = (s*pow(h,2))/(3*pow(r,2))
D = pow(d,3)
return A + B + C - D
def f_dev(p,s,b,r,h):
A = 3*pow(p,2)*(1-pow(b,2))
B = (0.4*h*pow(b,2) - ((s*pow(h,2))/pow(r,2)))*2*p
C = (pow(s,2)*pow(h,4))/(3*pow(r,4))
return A + B + C
alpha = 1
p_guess = 50
tolerance = 1e-5
iter = 1
while (abs(f(p_guess,s,b,r,h)) > tolerance):
p_guess = p_guess - (alpha*f(p_guess,s,b,r,h))/f_dev(p_guess,s,b,r,h)
iter=iter+1
p_val.append(p_guess)
#printing pressure vs height
print('Height= ',np.array(H))
print('pressure=',p_val)
#plotting pressure vs height
plt.plot(H,p_val,linewidth=3)
plt.xlabel('Height (feet)')
plt.ylabel('Pressure (Psf)')
plt.show()
OUTPUT:
STEPS:
- In program 1, the optimum value of relaxation factor is derived and we use it to find minimum pressure for different height in program2.
- Program 1, we define all the known variable and then create the first function which returns the value of f(p). In this function, we define the pressure equation.
- The second function calculates the value of f’(p) for a given value of p.
- After this, we create an array of alpha using np.linspace.
- for every value of alpha, we run newton-raphson method and find optimum pressure for which f(p)=0.
- For every alpha, no. of iteration and f(p) was calculated.
- on plotting no. of iterations and f(p) against alpha we can see that the optimum value of alpha is 1.
- After getting the optimum value of alpha, we create another program in which for every value of height, minimum pressure is calculated and plotted.
- In the second program also, we work similarly but first, we create an array of height and then for every value of height we run newton-raphson to get the value of p for which f(p)=0. In this way, we get p for every value of h.
- using plt.plot, pressure vs height was plotted
CONCLUSION:
In this project, using the newton-raphson method, non-linear pressure equation was solved to find the minimum pressure required to break the ice by air cushion vehicle. The optimum value of the relaxation factor was obtained to converge solution with minimum iterations and minimum error.