Question: Please submit a simple MatLab code that follows ALL the directions bellow. I will upvote your response. Thank you. And please show the code in





Find the specific volume v (in m/kg) of ammonia (NH3) at a pressure P= 1 MPa and temperature T = 30C using the Lee-Kesler equation of state. D PV B C Z= = 1+ + Ty V 12 + + CA B + T, V 2 ws V2 B = b - TTT? b b ba TT2 T3 C C = C1 - Tit d D = d+ T. in which T, Il RT/PC The set of constants is a follows: Constant Simple Fluids Constant Simple Fluids bi 0.1181193 C3 0.0 b2 0.265728 C4 0.042724 b3 0.154790 dix 10" 0.155488 be 0.030323 d2 x 10" 0.623689 ci 0.0236744 B 0.65392 C2 0.0186984 Y 0.060167 Please submit the following: 1) A plot which shows the location all real roots vof the equation for the given values of P and T. 2) Calculate each of the real roots v' of the equation for the given values of P and T using solve or fzero. Using these values, calculate the specific volume v (in m /kg) values and compare them with the value reported in ammonia tables, 0.13206 m/kg. a. All codes must use the following stopping criteria until an accuracy of at least 8 significant figures is reached. Approximate Percent Relative Error = * 100% Txutxil c. Calculate the specific volume v (in m/kg) using the Lee-Kesler equation of state and the ideal gas equation of state, and the relative error of each based on the value reported in ammonia tables (0.13206 m/kg). Calculated - Real| Relative Percent Error = * 100% Real d. Display the results using fprintf: Using ### Method, the specific volume is ### after ## iterations, vielding a relative percent error ### Find the specific volume v (in m/kg) of ammonia (NH3) at a pressure P= 1 MPa and temperature T = 30C using the Lee-Kesler equation of state. D PV B C Z= = 1+ + Ty V 12 + + CA B + T, V 2 ws V2 B = b - TTT? b b ba TT2 T3 C C = C1 - Tit d D = d+ T. in which T, Il RT/PC The set of constants is a follows: Constant Simple Fluids Constant Simple Fluids bi 0.1181193 C3 0.0 b2 0.265728 C4 0.042724 b3 0.154790 dix 10" 0.155488 be 0.030323 d2 x 10" 0.623689 ci 0.0236744 B 0.65392 C2 0.0186984 Y 0.060167 Please submit the following: 1) A plot which shows the location all real roots vof the equation for the given values of P and T. 2) Calculate each of the real roots v' of the equation for the given values of P and T using solve or fzero. Using these values, calculate the specific volume v (in m /kg) values and compare them with the value reported in ammonia tables, 0.13206 m/kg. a. All codes must use the following stopping criteria until an accuracy of at least 8 significant figures is reached. Approximate Percent Relative Error = * 100% Txutxil c. Calculate the specific volume v (in m/kg) using the Lee-Kesler equation of state and the ideal gas equation of state, and the relative error of each based on the value reported in ammonia tables (0.13206 m/kg). Calculated - Real| Relative Percent Error = * 100% Real d. Display the results using fprintf: Using ### Method, the specific volume is ### after ## iterations, vielding a relative percent error ###
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
