Question: Problem 2 - Linearized Model: Cubic Equation of State ( 1 5 pts ) The van der Waals ( vdW ) cubic equation of state

Problem 2- Linearized Model: Cubic Equation of State (15 pts)
The van der Waals (vdW) cubic equation of state is a model that describes the thermody-
namic properties of a non-ideal gas using two parameters a and b :
P=RTVm-b-aVm2
where P is the pressure, R is the gas constant, T is the temperature, and Vm is the molar vol-
ume.
We would like to use linear regression to solve for the parameters of the model in the case of
methane gas. Experimental data for the pressure as a function of molar volume is provided in
the "eos-data.dat" file. All data was collected at T=300K. However, since the equation of
state is not linear with respect to the parameters, a linearized version should be derived first.
(a) Derive a linearized form of the vdW equation of state shown above. There are several
ways to linearize the equation of state. However, some methods are better than
others; aim for three unknowns where one is technically a function of the other two. Fi-
nally, rewrite into general matrix form (Ax=b) where x is the vector of unknowns.
(b) Using Python and the matrix method for linear least squares regression, solve and re-
port the model parameters for a and b. Sanity check that your third unknown is close
to its expected value based on the fit values of a and b.
(c) Code a function in Python that computes an array of pressures given an array of molar
volumes and the model parameters a and b. Use this function to plot the model predic-
tions against the experimental data for the pressure of methane.
(d) Finally, discuss if other direct solvers, e.g., Gaussian Elimination, and iterative solvers,
e.g., Gauss-Seidel, would be appropriate for this problem. Explain your reasoning with
evidence.
"eos-data.dat" file content:
# Vm(L/mol) P(bar)
0.100207.621
0.127154.076
0.162121.974
0.20798.645
0.26480.085
0.33664.848
0.42852.274
0.54641.941
0.69533.509
0.88626.677
1.12921.175
1.43816.769
1.83313.254
2.33610.460
2.9768.245
3.7936.493
4.8335.109
6.1584.018
7.8483.159
10.0002.482Problem 2- Linearized Model: Cubic Equation of State (15 pts)
The van der Waals (vdW) cubic equation of state is a model that describes the thermody-
namic properties of a non-ideal gas using two parameters a and b :
P=RTVm-b-aVm2
where P is the pressure, R is the gas constant, T is the temperature, and Vm is the molar vol-
ume.
We would like to use linear regression to solve for the parameters of the model in the case of
methane gas. Experimental data for the pressure as a function of molar volume is provided in
the "eos-data.dat" file. All data was collected at T=300K. However, since the equation of
state is not linear with respect to the parameters, a linearized version should be derived first.
(a) Derive a linearized form of the vdW equation of state shown above.
Let's define a new variable, (z=VV-b). So,
the equation becomes:
P=RTz-1-a(z-1)2
(=aR2T2) and ,(=bRT).
The equation now reads:
P=RTz-1-a(z-1)2=RTz-az2
Create new variables:
(x1=Tz),(x2=z), and ,(x3=1z)
The equation can be rewritten as follows:
P=Rx1+x2+x3
This equation is now linear in relation to the
parameters alpha, beta, and R.
Finally, rewrite this equation in the general
matrix form (Ax=b),
Start Answering from here using the equation above
(b) Using Python and the matrix method for linear least squares regression, solve and re-
port the model parameters for a and b. Sanity check that your third unknown is close
to
 Problem 2- Linearized Model: Cubic Equation of State (15 pts) The

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!