Question: I am trying to excute this code but I keep on getting error (circled in blue), What I am trying to do is connecting the

I am trying to excute this code but I keep on getting error (circled in blue), What I am trying to do is connecting the input data, where the user will have to enter in the input T and P, 10 values for both of them, as matrix (1x10), then I will get 10 output values for V in the last EQ function.

here is the actual question/description of what i am trying to apply :

The project will involve determining the roots of a virial equation of state with cubic order dependency on specific volume. This program can be used in the future for helping to determine phase transition on the PVT surface for any PEOS.

We want to do this in an object-oriented way, where the specific parameters will be supplied in separate functions apart from the main program.

Any PEOS can be put into virial form, so this program can be used for any specific PEOS, including RK, van der Walls, Peng Robinson, etc.

We will use the Redlich-Kwong parameters which will be supplied as separate functions.

Matlab or Python is permitted. NO EXCEL OR VBA allowed.

RK EOS: See Handout from class.

B(T) = b - a(T) / RT

C(T) =b2 + b a(T) / RT

where

a(T) = 0.472 R2 Tc2.5 / (T1/2 Pc)

and

b = 0.867 RTc / Pc

Program:

Main Program has the virial EOS in cubic form. B and C are provided as separate functions or modules.

Main program gives the roots across a range of temperatures and pressures corresponding to the saturated steam tables. Minimum root is the liquid and the maximum root is the vapor. The middle root is a metastable value that is not used here.

Show plots of computed values of Vhat versus T for vapor and liquid under the Results section of your report.

What is wrong with my code? Please Help!!

 I am trying to excute this code but I keep on

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 Databases Questions!