Question: visual basic Question 3: Newton Raphson (Soave-Redlich-Kwong Equation of State) Chemical engineering thermodynamics reveals the relationship of pressure - volume - temperature of real gases

visual basic  visual basic Question 3: Newton Raphson (Soave-Redlich-Kwong Equation of State) Chemical
engineering thermodynamics reveals the relationship of pressure - volume - temperature of
real gases using Equations of State (EoS). Among them, the Soave -

Question 3: Newton Raphson (Soave-Redlich-Kwong Equation of State) Chemical engineering thermodynamics reveals the relationship of pressure - volume - temperature of real gases using Equations of State (EoS). Among them, the Soave - Redlich - Kwong (SRK) EoS has been applied extensively in chemical engineering design and simulation. The SRK EoS can be expressed as: P=VbRTV(V+b)a Where P is the pressure (kPa),V is the specific volume (m3/kmol),T is the temperature (K),R is the universal gas constant (8.314kJ/kmolK), is a function of temperature, a and b are SRK EoS constant values specific for each gas. This equation can be expanded into cubic function and further be arranged into the canonical form for a polynomial expression as a function of compressibility factor, Z Z3Z2+(ABB2)ZAB=0 Where Z=PV/RT is the compressibility factor, A=aaP/R2T2 and B=bP/RT The equation constants - a and b can be calculated using: a=Pc0.4278R2Tc2b=Pc0.0867RTc Where Tc and Pc are the critical temperature and pressure, respectively. The variable is an empincal function of temperature: =[1+S(1TcT)]2 The value of S is a function of acentric factor, of the gas: Where Tc and Pc are the critical temperature and pressure, respectively. The variable is an empirical function of temperature =[1+S(1TcT)]2 The value of S is a function of acentric factor, of the gas: S=0.48508+1.551710.156132 Your task is to a. Develop the necessary VBA function(s) to calculate the specific volume of n-butane yapour using ideal gas law at 500K and at different range of pressure as stated in the spreadsheet. b. Develop the necessary VBA function(s) to calculate the specific volume of n-butane vapour using SRK EoS based on the same conditions of Question 3(a). B48BE Visual Basic c. Compare graphically between the two models and comment your findings. d. Calculate the volume of n-butane vapour in m3 if the mass of n-butane yapour at 500K and 500kPa is 250kg. (Excel/ VBA approach are acceptable) d. Calculate the volume of n-butane vapour in m3 if the mass of n-butane vapouc at 500K and 500kPa is 250kg. (Excel/ VBA approach are acceptable) Notes: Answer all cells that are highlighted in green and text boxes. - Provide a sensible assumption/ tolerance/ iteration run to produce a robust numerical solution from Newton Raphson iteration. - Initial guess for Z can be assumed as ideal gas bebaviour - For better graphical comparison, use log-scale on both axes. - The specific volume of gas by SRK EQS can be calculated using the compressibility factor, Z obtained from Newton Raphson method with Z= PVIRT. Physical properties for gaseous n-butane: Tc=425.2K,Pc=3797kPa,=0.1931 Marking \& Submission Marks will be awarded for the following categories: 1. Layout of the spreadsheet - how well the spreadsheet that defined the problem is set out, the comments used to describe what is happening, and where the result is. 2. Attention to units and appropriate rounding - the use of units on each calculated value, and that numbers are displayed to an appropriate number of significant figures. 3. Comments in the code - the use of comments to describe key steps in the code 4. Variable names - a good use of variable names. Variables should be defined (ie using the DIM statement) 5. Layout of Loops and IF statements - a good approach to setting up loops which makes the code easy to follow. 6. Accuracy

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Chemical Engineering Questions!