Project

Breaking Ice with Air cushion Vehicle - Find minimum pressure with Newton-Raphson method

AIM:

To write a PYTHON program to solve for the minimum value of pressure using the Newton-Raphson method.

OBJECTIVES :

  1. Use the newton raphson method to find out the value of pressure for h = 0.6.
  2. Find the optimal relaxation factor for this problem with the help of a suitable plot.
  3. Tabulate the results of p for h = [0.6,1.2,1.8,2.4,3,3.6,4.2] assuming a suitable relaxation factor.

GOVERNING EQUATION USED :

where `p` denotes the cushion pressure,

`h` the thickness of the ice field,

`r` the size of the air cushion,

`σ` the tensile strength of the ice and

`β` is related to the width of the ice wedge.

THEORY :

Ice sheets can be broken into small slabs with a heavy air-cushion vehicle (ACV) traveling on the float ice sheet at the critical speed. Ice-breaking with ACV is a new ice-breaking method in the in-land river which has an important application in the prevention of ice jam flood in the Yellow River. Dependent on ice thickness, an ACV can readily break the ice in flexure by making depression and send cracks through the ice. Once a crack is made, the path of least resistance for the ACV's air curtain gets under the ice and reduces the supporting water under the ice. The ice then fails under its own weight. At speed, an ACV can setup a wave in the ice and send cracks through it. This would act similar to the dynamics of a transport truck on an ice road.

NEWTON RAPHSON METHOD:

Newton's method, also called the Newton-Raphson method, is a root-finding algorithm that uses the first few terms of the Taylor series of a function `f(x)` in the vicinity of a suspected root. Newton's method is sometimes also known as Newton's iteration, although in this work the latter term is reserved for the application of Newton's method for computing square roots.

SOLUTION STEPS:

  1. Necessary modules such as math, matplotlib, numpy are imported and required inputs are given. For the first part of code, an array of 'h' and an assumed value of 'alpha' is considered according to the challenge statement.
  2. Two different functions named 'f(x)' and 'fprime(x)' are defined according to the formula given, and an empty array of a number of iterations and pressure is created.
  3. For calculating minimum pressure for different values of ice thickness a for loop is executed taking an initial guessed value of pressure, tolerance, and a loop counter =1 which will increment after every iteration. Then a while loop is initiated inside the same for loop for checking whether all inputs in the formula if is greater than tolerance provided, a new value of pressure will be calculated according to the Newton Raphson method.
  4. The calculated values of pressure and number of iterations are stored in their respective arrays using 'append' command and necessary statements are printed in the command window.
  5. Graph of relaxation factor versus iterations is plotted using the calculated data set.
# Breaking Ice with Air cushion Vehicle, Finding minimum pressure with Newton-Raphson method
# Importing libraries

import math
import matplotlib.pyplot as plt
import numpy as np

#p denotes the cushion pressure 

#h the thickness of the ice field 
h=[0.6,1.2,1.8,2.4,3.0,3.6,4.2]

#r the size of the air cushion unit=feet
r=40

#σ the tensile strength of the ice unit=psf (pound per square foot)
sigma=150*144

#β is related to the width of the ice wedge
beta=0.5

#function
def f(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 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)))

# Performing newton iteration
p_guess=10

pressure=[]

# Tolerance
tol=1e-4

# Relaxation factor
alpha=0.5

for i in h:
	while(abs(f(p_guess,i))>tol):
		p_guess=p_guess-alpha*(f(p_guess,i)/fprime(p_guess,i))
	pressure.append(p_guess)

print("The minimum value of p for the value of pressure for h = 0.6 at relaxation factor 0.5 is : ",pressure[0])
print("Tabulation of the results of p for h = [0.6,1.2,1.8,2.4,3,3.6,4.2] for a  relaxation factor of 0.5.")
print("height : pressure")

for i in range(len(h)):
	print(h[i],"   :",pressure[i])

# To find the most suitable relaxation factor
h1=0.6
alpha_all=np.linspace(0.1,1.5,50)

#iterations
iterations=[]

for alpha in alpha_all:
	iter=1
	p_guess=10
	while(abs(f(p_guess,h1))>tol):
		p_guess=p_guess-alpha*(f(p_guess,h1)/fprime(p_guess,h1))
		iter=iter+1	
	iterations.append(iter)		

# Plotting
plt.plot(alpha_all,iterations)
plt.xlabel("Relaxation factor")
plt.ylabel("iterations")
plt.show()	

OUTPUT:

Command window:

CONCLUSION :

In this way we can observe that Newton Raphson method is a powerful tool for calculating solutions for non-linear functions as it is more fast technique and gives approximately close solutions in less iterations compared to other methods.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.