MATLAB - Reservoir Engineering - Compositions and Densities of the Equilibrium Liquid and Gas

  1. Home
  2. Homework Library
  3. Engineering
  4. Petroleum Engineering
  5. MATLAB - Reservoir Engineering - Compositions and Densities of the Equilibrium Liquid and Gas

Question

Reservoir Engineering I
Generate a robust programming to solve the problem below. The program can be wrote by using any computer language, e.g., Matlab, C, VB, Julia, Python.
Problem:
Use the Peng-Robinson equation of state to calculate the compositions and densities of the equilibrium liquid and gas of the mixture given below at 160°F and 2000 psia. Use binary interaction coefficients of 0.02 for methane-n-butane, 0.035 for methane-n-decane, and 0.0 for n-butane-n-decane.
Component Composition, mole fraction
Methane             0.5532
n-Butane            0.2630
n-Decane          0.1838
                           1.0000
Compare your answer with experimental results shown below.
Component Composition, mole fraction
                                 liquid            gas
Methane                   0.458            0.856
n-Butane                   0.304            0.130
n-Decane                  0.238            0.0136
                                  1.000            0.9996

Solution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

%% Physical information
% This part is for all physical properties of components that are required
% for calculation.
% it is important the entry order in each varible because the position is
% related to the component, so the first position is for Methane,
% the second one for butane and the last one for decane.

%    C1   C4    C10
Tc = [343 765.3 1111.7];       % Critical temperature, R
Pc = [666.4 550.6 305.2];       % Critical pressure, psia
Omega = [0.0104 0.1995 0.4898]; % Acentric factor, dimensionless
R = 10.732;                     % Universal gas constant, ft3 psia/R/lbmol

%%
% Matrix of binary interaction coefficients
%%
%
% $$\left[\begin{array}{ccc}
% \delta_{11} & \delta_{12} & \delta_{13} \\
% \delta_{21} & \delta_{22} & \delta_{23} \\
% \delta_{31} & \delta_{32} & \delta_{33}
% \end{array} \right] = \left[\begin{array}{ccc}
% 0.000 & 0.020 & 0.035 \\
% 0.020 & 0.000 & 0.000 \\
% 0.035 & 0.000 & 0.000
% \end{array}\right]$$...

This is only a preview of the solution. Please use the purchase button to see the entire solution

Assisting Tutor

Related Homework Solutions

Petroleum Engineering Problems
Homework Solution
$20.00
Petroleum Engineering
Permeability
Flow Equations
Well Treatment
Steady Rate
Flow Rate
Production
Reservoir Data
Porosity
Compressor Size and Number of Well
Homework Solution
$35.00
Compressor
Size
Number
Well
Gas
Reservoir
Flowline
Separator
High
Pressure
Facilities
Liquid
Central
Point
Sale
Petroleum Engineering Questions
Homework Solution
$50.00
Petroleum
Engineering
Questions
Pipelines
Spill
Crude
Oil
Refinery
Gas
Chemical
Construction
Vacuum
Well Deliverability Questions
Homework Solution
$40.00
Petroleum
Well
Deliverability
Oil
Bottomhole
Pressure
Reservoir Production
Performance
Flow Rate
IPR
VLP Curve
Tube
Roughness
Diameter
Petroleum Engineering Questions
Homework Solution
$20.00
Petroleum Engineering
Oil Well
Pseudo-Steady
Conditions
Flow Rate
Equations
Pressure
Production Rate
Parameters
Reservoir
Porosity
Infinite Acting
Get help from a qualified tutor
Live Chats