# Peng-Robinson 3 equations of state to find the number of moles

45 Ansichten (letzte 30 Tage)
Mckale Grant am 15 Feb. 2022
Kommentiert: Mckale Grant am 15 Feb. 2022
It is proposed to use a steel tank to store carbon dioxide at 300 K. The tank is 2.5 m3 in volume (V) and the maximum pressure (p) it can safely withstand is 100 atm.
Determine the maximum number of moles (n) of CO2 that can be stored in the tank using the Peng-Robinson (PR) equations given below (each uses the molar volume Vm = V/n).
use: R = 0.08205616 L atm/mol K, Tc = 304.2 K, Pc = 72.9 atm, and w = 0.225.
Need help solving for Vm
My code:
% Peng-Robinson (PR)
T = 300; % Temp in K
V = 2.5; % Volume in m^3
p = 100; % Max Pressure in atm
R = 0.08205616; % Gas constant in L*atm/mol*K
Tc = 304.2; % Crictial Temp in K
Pc = 72.9; % Crictial Pressure in atm
w = 0.225;
% Define Equations
alpha = (1+(0.37464+1.54226*w-0.26992*w^2)*(1-(T/Tc)^0.5))^2;
a = (0.45724*R^2*Tc^2)/Pc;
b = (0.07780*R*Tc)/Pc;
% Define Function (set p equation = 0)
syms Vm
F = ((R*T)/(Vm-b))-((a*alpha)/(Vm^2+2*b*Vm-b^2))-p == 0;
n = V/Vm
##### 0 Kommentare-2 ältere Kommentare anzeigen-2 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

### Antworten (1)

Torsten am 15 Feb. 2022
Bearbeitet: Torsten am 15 Feb. 2022
syms Vm
F = ((R*T)/(Vm-b))-((a*alpha)/(Vm^2+2*b*Vm-b^2))-p == 0;
Vmzero= double(solve(F));
Vmzero = Vmzero(abs(imag(Vmzero))<eps);
n = V./Vmzero
##### 1 Kommentar-1 ältere Kommentare anzeigen-1 ältere Kommentare ausblenden
Mckale Grant am 15 Feb. 2022
Thank you so much

Melden Sie sich an, um zu kommentieren.

### Kategorien

Mehr zu Thermodynamics & Statistical Physics finden Sie in Help Center und File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by