You are on page 1of 1

# Matlab Assignment 1 The Redlich-Kwong equation of state is given by p= RT a v b v (v + b) T

Where R = the universal gas constant [= 0.518 kJ/(kg K)], T = absolute temperature (K), p = absolute pressure (kPa), and v = the volume of a kg of gas (m3/kg). The parameters a and b are calculated by R 2Tc2.5 a = 0.427 pc b = 0.0866 R Tc pc

Where pc = 4600 kPa and Tc = 191 K. As a chemical engineer, you are asked to determine the amount of methane fuel in kg that can be held in a 3-m3 tank at a temperature of -40 C with a pressure of 65,000 kPa. By working individually or in a group of 2-4 people, solve the corresponding problem by using Matlab. Make a short report that detailing the steps of your solution. Your report should contain the statement of the problem, methodology and result. The step-by-step procedures of your Matlab execution should also be provided. Your deliverables should also contain the corresponding Matlab codes that you used for your Matlab calculations. You are given 2 weeks to submit your report.

T=-40+273.15; Tc=191; P=65000; Pc=4600; R=0.518; a=0.427*(R^2*Tc^2.5)/Pc; b=0.0866*(R*Tc)/Pc; x=[0.1:0.1:2]*(R*T)/P y=(R*T)./(x-b)-a./(x.*(x+b)*sqrt(T)); v=interp1(y,x,P) amount_of_methane=3/v The result will be: v = 0.0028 amount_of_methane = 1.0665e+003