1. Engineering
  2. Computer Science
  3. hw2 cbe 253 spring 2019 due 1292019 800 am reduced...

Question: hw2 cbe 253 spring 2019 due 1292019 800 am reduced...

Question details

HW2 CBE 253 Spring 2019 (due 1/29/2019 8:00 am) Reduced quantities are often used in thermodynamics: reduced temperature T, =-, reduced pressure P,--, and reduced volume V, =-, where Tc, P, and V, are the corresponding quantities at the critical point. The van der Waals equation of state can be expressed in terms of the T. reduced quantities as where V, 2 1. Write a script file HW2_1_YourLastName.m that (1) generates an array for V, in the range of 0.334 SV, S 3, (2) generates two arrays for P when T,-0.85 and T-1 by defining a function for P and (3) makes the plots of P (y-axis) versus V, (x-axis) for T-0.85 and T,-1 in a graph. Add axis titles and legends. The range of P and V in the graph should be 0sP S2.5 and 0sV, S 3. The colors for the plots of T-0.85 and T,-1 are red and blue, respectively. 2. Do the same as Problem 1 except that a function file is created to define the function for P Accordingly, two m-files should be created, one for a function file and the other for a script file. In the function file HW2_2_YourlastName.m, the input variables are V, and T,, and the output variable is P, The script file HW2_3_YourLastName.m (1) generates an array for V.(2) generates two arrays for P using HW2_2_YourLastName.m, and (3) makes the plots.
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution