Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Assignment.

Q. 1

%Steps

% Start

%Define the function

%Define the derivative function

% Read the variables

%Tc,Pc,w,R,T,P

%Read pressure drop in vector form

% Tr= T/Tc

%a=0.42747*(R*Tc)^2/Pc

% b=0.08664*(R*Tc)/Pc

% m = 0.48508 + 1.55171*w - 0.1561*w^2

%alfa=(1+m*(1-Tr^0.5))^25: videal=R*T/P

% v=videal

%e=vn-vo

% for (1 to n)

% Applying Newton Raphson formula

%h=f/df

%Vn=Vo-h

%Vo=Vn

%If abs(h>e)

%End

%Print(iteration of vn)
%plot both graph

%stop

You might also like