Task 3 [Computer-based calculation] Calculate the molar volume and compressibility factor of gaseous CO2 at 0.001, 0.1, 1.0, 10.0, 70.0 and 75.0 bar using the Virial, RK and
3 views (last 30 days)
Show older comments
Need to use MATLAB to calculate molar volume and compressability factor but not sure how to as I'm a beginner
%%% Module 1
% Problem 1 Task 3
% Gaseous CO₂ at 35degC and 0.001, 0.1, 1.0, 70 and 75bar. Calculate V and Z for (a)
% Virial EOS, (b) RK EOS, (c) SRK EOS and (d) PR EOS
% Critical properties
Pc = 73.83; % in bar
Tc = 304.2;% in K
w = 0.224; % accentric factor
% System properties
T = 35. + 273.15; % in K
P = 75.; % in bar
R = 8.3145e-5; % in m3.bar/(K.mol)
%%
%% (a) Virial EOS
%%
B = -194.; % in cm^3/mol
C = 15300; % in cm^6/mol^2
% Calculating Vguess (assuming ideal gas)
R2 = R * 100.^3; % in cm3.bar/(mol.K)
Vguess = T * R2/ P % in cm3/mol
% Calculating the volume using the FZERO function
V_virial = fzero(@(V) P*V/(R2 * T) - (1.+B/V +C/(V^2)), Vguess) % in cm3/mol
% Calculating Z
Z = P * V_virial/(R2 * T)
3 Comments
Alex Hanes
on 24 Oct 2022
You should post your attempt at the solution. Start by identifying what equations and constants are required, then think about how you might use the virial coefficients (for example) to relate your equation of state to a compressibility factor.
KALYAN ACHARJYA
on 25 Oct 2022
@Candi Chevapravatdumrong Since the members of the MATLAB Answers community are from different subjects background, not necessarily from Chemistry. So it would be great if you provide all the details, please note that the language of mathematics is the same for everyone.
Answers (1)
Ayush Modi
on 9 Oct 2023
Hi Candi,
As per my understanding, you would like to calculate the molar volume and compressibility factor of gases CO2 different pressure conditions using Viral, RK, SRK and PR EOS methods.
Please refer the following MATLAB Answer to find the suggested solution:
After opening the link, go to the functions tab at the top of the page. You can refer to the two files named – “pressure_eos_solver.m” and “Z_Vm_EOS_Solver.m”.
I have tried at my end, and the solution is working. I hope this resolves the issue you were facing.
0 Comments
See Also
Categories
Find more on Chemical Process Design in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!