Finding Minimum Pressure for Breaking Ice with an Air-Cushion Vehicle- Using Newton Raphson Method
Breaking Ice with Air Cushion using Newton-Raphson Method:-
The following equation is given which determines the minimum pressure required to break a given thickness of ice using an Air-Cushion Vehicle.
For using this equation, we need to differentiate it as well:-
so the differentitation is goven as:-
3p^2[1-beta^2] + 2p(0.4h*beta^2) - (sigma*h^2)/r^2 + (sigma^2*h^4)/3r^4
Now for the problem we have inputs for some of the values, which we defined already in our code. Other than these input functions we defined 2 functions. One function is \'func\' which has the given breaking ice function and the other function is \'fprime\' which has the differentiation of the function . We require this bcause according to NEwton-Raphson method the quickest way to find the solution is given as:-
[ p_new=p_guess - \'Alpha\'*[func(p_guess)/fprime(p_guess)] ]
Here, \'aplha\' is called the relaxation factor which determines how quickly we can achieve our required output.
Now this p is solved by a no. of iterations. We first take the value of p as a guess value and then keep on iterating by using the above formula till we get a value of p which then no longer have any deviation in the resulting value.
Now to have lesser values , we defined a tolerance, so that my result would be the one which is nearest to this value. So, to carry out the iterations, we defined a while loop which runs till the tolerance value is reached .
Now My problems don\'t end here. We have been given a task to find out pressure values for different \'h\' values. So, for that we defined pressure as an array and appended the minimum value for that particular value of h. To carry out iterations for different values of \'h\' we wrote a for loop which runs according to a counter value of \'c\' .
Now, after we got all the values of \'p\' for it\'s corresponding values of \'h\' , weplotted a table to show all these values along with that we plotted a graph between height and pressure to find out the \'h\' value for which the pressure required is the least .
The output table is given below:-
As we can see here, the minimum value of pressure is for the input h = \'1.2\'
The output graph is given below:-
The code for this program is given below:-
#Breaking ice with Air cushion using newton raphson method
import matplotlib.pyplot as plt
import math
#Given Function
def func(p,h):
return (pow(p,3)*(1-pow(beta,2))) + (((0.4*h*pow(beta,2))-(sigma*pow(h,2)/pow(r,2)))*pow(p,2)) + (((pow(sigma,2)*pow(h,4))/(3*pow(r,4)))*p) - (pow((sigma*pow(h,2)/(3*pow(r,2))),3))
#Derivative of the function
def fprime(p,h):
return (3*(pow(p,2)*(1-pow(beta,2)))) + (2*p*((0.4*h*pow(beta,2))-(sigma*pow(h,2)/pow(r,2)))) + ((pow(sigma,2)*pow(h,4))/(3*pow(r,4)))
# Given Inputs
beta = 0.5 # width of the ice edge
r = 40 # size of the air cushion
sigma = 150 # Tensile strength of the ice (psi)
height = [0.6,1.2,1.8,2.4,3.0,3.6,4.2]
p_guess = 0.1 # cushion pressure
alpha = 1 # relaxation factor
tol = 1e-4 # tolerance
pressure = []
c = 1 #Counter Variable
for h in height :
while(abs(func(p_guess,h))>tol):
p_guess = p_guess - ((func(p_guess,h)/fprime(p_guess,h))*alpha)
c=c+1
pressure.append(p_guess)
#For plotting table
for i in range (0,7) :
if i==0 :
print (\"No:Height : Pressure \")
print(i+1,\" \",height[i] , \"=\", pressure[i])
#Plotting graph
plt.plot(height,pressure)
plt.xlabel(\'Height\')
plt.ylabel(\'Pressure \')
plt.xlim([0,5])
plt.ylim([0,0.3])
plt.show()