SlideShare a Scribd company logo
Finding
Cubic equation solution
Peng-Robinson
• Given: R, Tc, Pc, a
Ω 𝑎 = 0.457235
Ω 𝑏 = 0.077796
1. Calculate ac and b using equation
𝑎 = 𝑎 𝑐α(𝑇) =
Ω 𝑎(𝑅T 𝐶)2
P 𝑐
α(T)
𝑏 =
Ω 𝑏 𝑅T 𝐶
P 𝑐
α(T)= 1 + 𝑚 1 − 𝑇𝑟0.5
2
m= 0.37464 + 1.54226 ∗ ꙍ − 0.26992 ∗ ꙍ2
For heavier compound(ꙍ>0.49)
m=0.3796 + 1.485 ∗ ꙍ − 0.1644 ∗ ꙍ2
+ 0.01667 ∗ ꙍ3
2. Calculate A and B from equation
𝐴 =
𝑎𝑃
(𝑅𝑇)2 Z=
𝑝𝑣
𝑅𝑇
𝐵 =
𝑏𝑃
𝑅𝑇
2 2
2
RT a
P
v b v bv b
 
  
3. Writing equation in terms of Z factor, A and B from PR equation
𝑃 =
𝑅𝑇
𝑣−𝑏
−
𝑎
𝑣 𝑣+𝑏 +𝑏 𝑣−𝑏
𝑃 v − b v2
+ 2bv − b2
= RT v2
+ 2bv − b2
− av + ab
𝑃 𝑣3
+ 𝑏𝑣2
− 3𝑏2
𝑣 + 𝑏3
= 𝑅𝑇𝑣2
+ 2 𝑅𝑇 𝑏𝑣 − 𝑅𝑇𝑏2
− 𝑎𝑣 + 𝑎𝑏
multiplying both side of equation by(
𝑃2
𝑅𝑇 3) and then rearranging the equation: -
𝑍3
+ 𝐵 − 1 𝑍2
+ 𝐴 − 3𝐵2
− 2𝐵 𝑍 + 𝐵3
+ 𝐵2
− 𝐴𝐵 = 0
We can have three possibilities
• Three distinct real values of Z, from which we will take the extreme 2 values.
• One real and two complex values, from which we will consider the real one.(weather
compressibility is for liquid or gas will be based on density of fluid)
• Three equal values of Z, which means single phase.
Finding 1st root 𝑥3 + 𝑎𝑥2 + 𝑏𝑥 + 𝑐 = 0
q =
3𝑏−𝑎2
3
r =
2𝑎3−9𝑎𝑏+27𝑐
27
d =
𝑞3
27
+
𝑟2
4
case 1: d=0
𝑥1 = 2 −
𝑟
2
1
3
−
𝑎
3
case 2: d>0
𝑥1 = −
𝑟
2
+ 𝑑
1
2
1
3
+ −
𝑟
2
− 𝑑
1
2
1
3
−
𝑎
3
case 3: d<0
𝑥1 = 2 −
𝑞
3
1
2
𝑐𝑜𝑠
Ɵ
3
−
𝑎
3
& cos(Ɵ) =
3𝑟
2𝑞
−
3
𝑞
1
2
Equation box
Let α be first root of the equation: -
Then above equation can be reduced to
(x-α)(𝑎1 𝑥2
+ 𝑏1 𝑥 + 𝑐1)
Expanding the equation: –
𝑎1 𝑥3 + (𝑏1−α𝑎1)𝑥2 + (𝑐1−α𝑏1)𝑥 − α𝑐1
Comparing above equation with the previous one: -
𝑥3
+ 𝑎𝑥2
+ 𝑏𝑥 + 𝑐 = 0
We have
𝑎1 = 1 𝑏1 =a+α 𝑐1 = −
𝑐
α
New quadratic equation obtained is: -
𝑥2
+ 𝑎 + α 𝑥 − 𝑐/α
𝑥 = (−
𝑏
+
−
𝑏2−4𝑎𝑐
1
2
2𝑎
) if 𝑏2
− 4𝑎𝑐 > 0 the roots are real and unequal
if 𝑏2 − 4𝑎𝑐 = 0 the roots are real and equal
if 𝑏2 − 4𝑎𝑐 < 0 the roots are imaginary
Example case 1
A B C D
1 3 3 1
Enter coefficient here
Ax3+Bx2+Cx+D=0
Comparing d for
different cases
a b c q r d Cos(Ɵ) Ɵ α(root)
3 3 1 0 0 0 #DIV/0! #DIV/0! -1.000000
𝑎1 𝑏1 𝑐1 𝑏2
− 4𝑎𝑐 Root 1 Root 2
1 2 1 0 -1 -1
Comparing d for
different casesSolving Cubic equation
D=0
Solving quadratic equation
Case 1
Example case 2
A B C D
125 -100 25 -2
Enter coefficient here
Ax3+Bx2+Cx+D=0
a b c q r d Cos(Ɵ) Ɵ α (root)
-0.8 0.2 -0.016 -0.013333 -0.000592 5.558E-22 1 #NUM! 0.4
𝑎1 𝑏1 𝑐1 𝑏2
− 4𝑎𝑐 Root 1 Root 2
1 -0.6 0.08 0 0.2 0.2
Comparing d for
different casesSolving Cubic equation
D>0
Solving quadratic equation
Case 2
Example case 2
A B C D
1 -0.25 -1.23 -2.35
Enter coefficient here
Ax3+Bx2+Cx+D=0
Comparing d for
different cases
a b c q r d Cos(Ɵ) Ɵ α (root)
-0.25 -1.23 -2.35 -1.25083 -2.45366 1.4326593 4.56 #NUM! 1.736997
𝑎1 𝑏1 𝑐1 𝑏2
− 4𝑎𝑐 Root 1 Root 2
1 1.48699 1.352909 -3.20047 FALSE FALSE
Comparing d for
different cases
D>0
Solving quadratic equation
Solving Cubic equation
Case 2
Example case 3
A B C D
1 -1 0.32 -0.032
Enter coefficient here
Ax3+Bx2+Cx+D=0
Comparing d for
different cases
a b c q R d Cos(Ɵ) Ɵ α (root)
-1 0.32 -0.032 -0.013333 0.0005925 -1.28E-21 -1.00 3.1415925 0.4000000
𝑎1 𝑏1 𝑐1 𝑏2
− 4𝑎𝑐 Root 1 Root 2
1 -0.5999 0.079999 0.039999 0.399999 0.2
Comparing d for
different casesSolving Cubic equation
D<0
Solving quadratic equation
Case 3
Saturation pressure calculation
The fugacity of a component in the vapor phase and the liquid phase is basically a
measure of the potential for transfer of component between the phases. For example,
a higher fugacity of a component in the vapor phase compared to liquid phase
indicates that liquid accepts the component from vapour phase. The equality of
component fugacities in the vapor phase and liquid means zero net transfer of
component between the two phases. Therefore, a zero net transfer for all the
components or the equality of component fugacities in the two phases implies
thermodynamic equilibrium of a hydrocarbon system(saturation pressure), which is
mathematically expressed as :
𝑓𝑙= 𝑓𝑣
Fugacity –
• A thermodynamic property of a real gas which if substituted for the pressure or
partial pressure in the equations for an ideal gas gives equations applicable to the
real gas.
𝑓 = 𝑝 ∗ 𝑒𝑥𝑝 𝑍 − 1 − 𝑙𝑛 𝑍 − 𝐵 +
𝐴
80.5 ∗ 𝐵
𝑙𝑛
𝑍 + 𝐵 1 − 20.5
𝑍 + 𝐵 1 + 20.5
Start
Input data Tc,Pc,Ꙍ
Specify T
Calculate a=(ac*α)
Solve EOS to get Zv , ZL(refer eq on slide no 3)
Calculate fv , fL(refer eq on slide no 10)
𝐴𝐵𝑆 1 −
𝑓𝑙
𝑓𝑣
2
= 0
Record Psaturation
Stop
Yes
No
Adjust P
1 root or 3
equal roots
Then single
phase exist
Minimum root is ZV
Middle root is
neglected
Maximum root is
ZL
3 roots
1 roots
initial guess of P
Calculate A,B
Calculate b,m,ac
Calculate α(T)
The molar gibbs energy and fugacity of pure
component
Starting from equality of molar gibbs energies in coexisting phases
𝐺 L(T,P)= 𝐺 v(T,P)………….1
Since : d 𝐺 = - 𝑆 dT+𝑉dP
So that
𝜕𝐺
𝜕𝑇 𝑃
= −𝑆..................2
And
𝜕𝐺
𝜕𝑃 𝑇
= 𝑉………………….3
We presume that we have equation of state from which we can compute V as a function of T and P, only equation 3 will
be considered further.
Integration of equation 3 between any two pressure P1 and P2(at constant temperature) yields
𝐺(T1,P2)- 𝐺(T1,P1)=∫ 𝑃1
𝑃2
(𝑉𝑑𝑃)……4
If the fluid consideration were an ideal gas, then 𝑉 𝐼𝐺
=RT/P, so that
𝐺 𝐼𝐺
(T1,P2)-GIG(T1,P1)=∫ 𝑃1
𝑃2 𝑅𝑇
𝑃
𝑑𝑃……5
Subtracting eq 5 from 4 gives
[𝐺(T1,P2)- 𝐺 IG(T1,P2)]-[𝐺(T1,P1)- 𝐺 IG(T1,P1)]=∫ 𝑃1
𝑃2
𝑉 −
𝑅𝑇
𝑃
𝑑𝑃……..6
Now setting P1=0 equal to zero , (2) recognizing that at P=0 all fluids are ideal gases so that
𝐺(T1,P=0)= 𝐺 IG(T1,P=0), and equation 4 omitting all subscript yields
𝐺(T,P)- 𝐺 IG(T,P)= ∫0
𝑃
𝑉 −
𝑅𝑇
𝑃
𝑑𝑃……….7
Definition of Fugacity
𝑓 = 𝑃 exp
𝐺 T,P −𝐺
IG
T,P
RT
= 𝑃𝑒𝑥𝑝
1
𝑅𝑇
∫
0
𝑃
𝑉 −
𝑅𝑇
𝑃
𝑑𝑃 …..8
Definition of fugacity coefficient
𝜙 =
𝑓
𝑃
exp
𝐺 T,P −𝐺
IG
T,P
RT
= 𝑒𝑥𝑝
1
𝑅𝑇
∫
0
𝑃
𝑉 −
𝑅𝑇
𝑃
𝑑𝑃 …..9
In fact, all these equations of states are in form in which pressure is explicit function of volume and
temperature. Therefore, it is useful to have equation relating the fugacity to an integral over volume (rather
than pressure).
We obtain such an equation by starting with equation 9 and Equation 𝑑𝑃 =
1
𝑉
𝑑 𝑃𝑉 −
𝑃
𝑉
𝑑𝑉 at constant
temperature in form
𝑑𝑃 =
1
𝑉
𝑑 𝑃𝑉 −
𝑃
𝑉
𝑑𝑉 =
𝑃
𝑍
𝑑𝑍 −
𝑃
𝑉
𝑑𝑉……10
To change the variable of integration we obtain:
ln
𝑓 𝑇,𝑃
𝑃
= ln 𝜙 =
1
𝑅𝑇
∫ 𝑉=∞
𝑉 𝑅𝑇
𝑉
− 𝑃 𝑑𝑣 − ln 𝑍 + 𝑍 − 1 …….11

More Related Content

PDF
ρυθμιστικά διαλύματα
PPT
Ονοματολογία οργανικών ενώσεων
PDF
ΔΟΜΗ ΤΟΥ ΑΤΟΜΟΥ - ΟΙ ΚΒΑΝΤΙΚΟΙ ΑΡΙΘΜΟΙ ΚΑΙ ΤΑ ΤΡΟΧΙΑΚΑ
PDF
ΑΣΚΗΣΕΙΣ 2ου ΚΕΦΑΛΑΙΟΥ ΧΗΜΕΙΑΣ Β΄ ΛΥΚΕΙΟΥ ΑΠΟ ΤΡΑΠΕΖΑ ΘΕΜΑΤΩΝ
PPTX
Molecular orbital theory(mot) of SF6/CO2/I3-/B2H6
PDF
Οργανική Χημεία - Εισαγωγή
PDF
ΤΡΑΠΕΖΑ ΘΕΜΑΤΩΝ ΦΥΣΙΚΗΣ Β ΛΥΚΕΙΟΥ ΓΕΝ.ΠΑΙΔΕΙΑΣ (ΟΛΑ ΣΕ ΕΝΑ ΑΡΧΕΙΟ)
DOC
Ερωτήσεις επανάληψης Χημεία Β Λυκείου 2013.
ρυθμιστικά διαλύματα
Ονοματολογία οργανικών ενώσεων
ΔΟΜΗ ΤΟΥ ΑΤΟΜΟΥ - ΟΙ ΚΒΑΝΤΙΚΟΙ ΑΡΙΘΜΟΙ ΚΑΙ ΤΑ ΤΡΟΧΙΑΚΑ
ΑΣΚΗΣΕΙΣ 2ου ΚΕΦΑΛΑΙΟΥ ΧΗΜΕΙΑΣ Β΄ ΛΥΚΕΙΟΥ ΑΠΟ ΤΡΑΠΕΖΑ ΘΕΜΑΤΩΝ
Molecular orbital theory(mot) of SF6/CO2/I3-/B2H6
Οργανική Χημεία - Εισαγωγή
ΤΡΑΠΕΖΑ ΘΕΜΑΤΩΝ ΦΥΣΙΚΗΣ Β ΛΥΚΕΙΟΥ ΓΕΝ.ΠΑΙΔΕΙΑΣ (ΟΛΑ ΣΕ ΕΝΑ ΑΡΧΕΙΟ)
Ερωτήσεις επανάληψης Χημεία Β Λυκείου 2013.

What's hot (20)

PPTX
Some basic concepts in industrial chemistry
PPTX
Photocatalytic
DOC
Επανάληψη οργανικής Χημείας και ασκήσεις για τεστ.
PPTX
3. ΔΥΝΑΜΗ Laplace (νέο 2021).pptx
PDF
ΠΡΟΣΘΕΤΙΚΕΣ ΙΔΙΟΤΗΤΕΣ - ΩΣΜΩΣΗ
PPTX
ο γεν.κωδικας ειναι η αντιστοιχηση
PDF
Δομικά σωματίδια της ύλης - Δομή του ατόμου
PDF
Παρασκευή σαπουνιού 2 -1
PPTX
Στοιχειομετρικοι υπολογισμοι.pptx
PDF
Γραφικές παραστάσεις βασικών συναρτήσεων με βασικές ιδιότητες
PDF
Ερωτήσεις πολλαπλής επιλογής στην ιοντική ισορροπία
PPT
4 θερμοχημεια
PPTX
reactivity in chemisorption and catalysis of monometallic particles
PPTX
Στοιχειομετρία.pptx
PPTX
10Vector-coupling-of-angular-momentum.pptx
PDF
Ο πρώτος νόμος του Νεύτωνα / Newton's First Law
PDF
ΠΕΡΙΟΔΙΚΟΣ ΠΙΝΑΚΑΣ - ΠΕΡΙΟΔΙΚΕΣ ΙΔΙΟΤΗΤΕΣ
PDF
μεταβολή ορισμένων περιοδικών ιδιοτήτων
PPT
νόμοι νεύτωνα
PPT
Ομοιοπολικός Δεσμός
Some basic concepts in industrial chemistry
Photocatalytic
Επανάληψη οργανικής Χημείας και ασκήσεις για τεστ.
3. ΔΥΝΑΜΗ Laplace (νέο 2021).pptx
ΠΡΟΣΘΕΤΙΚΕΣ ΙΔΙΟΤΗΤΕΣ - ΩΣΜΩΣΗ
ο γεν.κωδικας ειναι η αντιστοιχηση
Δομικά σωματίδια της ύλης - Δομή του ατόμου
Παρασκευή σαπουνιού 2 -1
Στοιχειομετρικοι υπολογισμοι.pptx
Γραφικές παραστάσεις βασικών συναρτήσεων με βασικές ιδιότητες
Ερωτήσεις πολλαπλής επιλογής στην ιοντική ισορροπία
4 θερμοχημεια
reactivity in chemisorption and catalysis of monometallic particles
Στοιχειομετρία.pptx
10Vector-coupling-of-angular-momentum.pptx
Ο πρώτος νόμος του Νεύτωνα / Newton's First Law
ΠΕΡΙΟΔΙΚΟΣ ΠΙΝΑΚΑΣ - ΠΕΡΙΟΔΙΚΕΣ ΙΔΙΟΤΗΤΕΣ
μεταβολή ορισμένων περιοδικών ιδιοτήτων
νόμοι νεύτωνα
Ομοιοπολικός Δεσμός
Ad

Similar to Cubic root using excel (20)

PDF
Lecture 4 f17
PPT
Chemical eng thermodynamic Solution Lecture.ppt
PDF
Mathcad explicit solution cubic equation examples
PPTX
W3 Example 4 Answers
DOCX
Numerical methods and analysis problems/Examples
DOCX
digital fourier transform and cubic equations.docx
PDF
Mc ty-cubicequations-2009-1
PDF
Mc ty-cubicequations-2009-1
PDF
Concept of fugacity02.pdf
PPT
Fugacity & fugacity coefficient
PDF
Advanced Mass Transfer Rachford Rice Equation
PPT
Research Presentation Spring 2008
PDF
Concept of fugacity.pdf
PDF
schluter_presentation (1).pdf
PDF
Redlich,1975
PDF
Ece4510 notes05
PDF
Control Systems - Stability Analysis.
PDF
Redlich kwong, 1949
PDF
Elliot & Lira slides 10 fugacities eos.pdf
PPTX
Quadratic equation
Lecture 4 f17
Chemical eng thermodynamic Solution Lecture.ppt
Mathcad explicit solution cubic equation examples
W3 Example 4 Answers
Numerical methods and analysis problems/Examples
digital fourier transform and cubic equations.docx
Mc ty-cubicequations-2009-1
Mc ty-cubicequations-2009-1
Concept of fugacity02.pdf
Fugacity & fugacity coefficient
Advanced Mass Transfer Rachford Rice Equation
Research Presentation Spring 2008
Concept of fugacity.pdf
schluter_presentation (1).pdf
Redlich,1975
Ece4510 notes05
Control Systems - Stability Analysis.
Redlich kwong, 1949
Elliot & Lira slides 10 fugacities eos.pdf
Quadratic equation
Ad

Recently uploaded (20)

PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
01-Introduction-to-Information-Management.pdf
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Cell Types and Its function , kingdom of life
PDF
Classroom Observation Tools for Teachers
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Complications of Minimal Access Surgery at WLH
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
01-Introduction-to-Information-Management.pdf
GDM (1) (1).pptx small presentation for students
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Supply Chain Operations Speaking Notes -ICLT Program
Cell Types and Its function , kingdom of life
Classroom Observation Tools for Teachers
Anesthesia in Laparoscopic Surgery in India
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Microbial diseases, their pathogenesis and prophylaxis
Microbial disease of the cardiovascular and lymphatic systems
Abdominal Access Techniques with Prof. Dr. R K Mishra
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Complications of Minimal Access Surgery at WLH
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Final Presentation General Medicine 03-08-2024.pptx
202450812 BayCHI UCSC-SV 20250812 v17.pptx
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Chinmaya Tiranga quiz Grand Finale.pdf

Cubic root using excel

  • 2. Peng-Robinson • Given: R, Tc, Pc, a Ω 𝑎 = 0.457235 Ω 𝑏 = 0.077796 1. Calculate ac and b using equation 𝑎 = 𝑎 𝑐α(𝑇) = Ω 𝑎(𝑅T 𝐶)2 P 𝑐 α(T) 𝑏 = Ω 𝑏 𝑅T 𝐶 P 𝑐 α(T)= 1 + 𝑚 1 − 𝑇𝑟0.5 2 m= 0.37464 + 1.54226 ∗ ꙍ − 0.26992 ∗ ꙍ2 For heavier compound(ꙍ>0.49) m=0.3796 + 1.485 ∗ ꙍ − 0.1644 ∗ ꙍ2 + 0.01667 ∗ ꙍ3 2. Calculate A and B from equation 𝐴 = 𝑎𝑃 (𝑅𝑇)2 Z= 𝑝𝑣 𝑅𝑇 𝐵 = 𝑏𝑃 𝑅𝑇 2 2 2 RT a P v b v bv b     
  • 3. 3. Writing equation in terms of Z factor, A and B from PR equation 𝑃 = 𝑅𝑇 𝑣−𝑏 − 𝑎 𝑣 𝑣+𝑏 +𝑏 𝑣−𝑏 𝑃 v − b v2 + 2bv − b2 = RT v2 + 2bv − b2 − av + ab 𝑃 𝑣3 + 𝑏𝑣2 − 3𝑏2 𝑣 + 𝑏3 = 𝑅𝑇𝑣2 + 2 𝑅𝑇 𝑏𝑣 − 𝑅𝑇𝑏2 − 𝑎𝑣 + 𝑎𝑏 multiplying both side of equation by( 𝑃2 𝑅𝑇 3) and then rearranging the equation: - 𝑍3 + 𝐵 − 1 𝑍2 + 𝐴 − 3𝐵2 − 2𝐵 𝑍 + 𝐵3 + 𝐵2 − 𝐴𝐵 = 0 We can have three possibilities • Three distinct real values of Z, from which we will take the extreme 2 values. • One real and two complex values, from which we will consider the real one.(weather compressibility is for liquid or gas will be based on density of fluid) • Three equal values of Z, which means single phase.
  • 4. Finding 1st root 𝑥3 + 𝑎𝑥2 + 𝑏𝑥 + 𝑐 = 0 q = 3𝑏−𝑎2 3 r = 2𝑎3−9𝑎𝑏+27𝑐 27 d = 𝑞3 27 + 𝑟2 4 case 1: d=0 𝑥1 = 2 − 𝑟 2 1 3 − 𝑎 3 case 2: d>0 𝑥1 = − 𝑟 2 + 𝑑 1 2 1 3 + − 𝑟 2 − 𝑑 1 2 1 3 − 𝑎 3 case 3: d<0 𝑥1 = 2 − 𝑞 3 1 2 𝑐𝑜𝑠 Ɵ 3 − 𝑎 3 & cos(Ɵ) = 3𝑟 2𝑞 − 3 𝑞 1 2 Equation box
  • 5. Let α be first root of the equation: - Then above equation can be reduced to (x-α)(𝑎1 𝑥2 + 𝑏1 𝑥 + 𝑐1) Expanding the equation: – 𝑎1 𝑥3 + (𝑏1−α𝑎1)𝑥2 + (𝑐1−α𝑏1)𝑥 − α𝑐1 Comparing above equation with the previous one: - 𝑥3 + 𝑎𝑥2 + 𝑏𝑥 + 𝑐 = 0 We have 𝑎1 = 1 𝑏1 =a+α 𝑐1 = − 𝑐 α New quadratic equation obtained is: - 𝑥2 + 𝑎 + α 𝑥 − 𝑐/α 𝑥 = (− 𝑏 + − 𝑏2−4𝑎𝑐 1 2 2𝑎 ) if 𝑏2 − 4𝑎𝑐 > 0 the roots are real and unequal if 𝑏2 − 4𝑎𝑐 = 0 the roots are real and equal if 𝑏2 − 4𝑎𝑐 < 0 the roots are imaginary
  • 6. Example case 1 A B C D 1 3 3 1 Enter coefficient here Ax3+Bx2+Cx+D=0 Comparing d for different cases a b c q r d Cos(Ɵ) Ɵ α(root) 3 3 1 0 0 0 #DIV/0! #DIV/0! -1.000000 𝑎1 𝑏1 𝑐1 𝑏2 − 4𝑎𝑐 Root 1 Root 2 1 2 1 0 -1 -1 Comparing d for different casesSolving Cubic equation D=0 Solving quadratic equation Case 1
  • 7. Example case 2 A B C D 125 -100 25 -2 Enter coefficient here Ax3+Bx2+Cx+D=0 a b c q r d Cos(Ɵ) Ɵ α (root) -0.8 0.2 -0.016 -0.013333 -0.000592 5.558E-22 1 #NUM! 0.4 𝑎1 𝑏1 𝑐1 𝑏2 − 4𝑎𝑐 Root 1 Root 2 1 -0.6 0.08 0 0.2 0.2 Comparing d for different casesSolving Cubic equation D>0 Solving quadratic equation Case 2
  • 8. Example case 2 A B C D 1 -0.25 -1.23 -2.35 Enter coefficient here Ax3+Bx2+Cx+D=0 Comparing d for different cases a b c q r d Cos(Ɵ) Ɵ α (root) -0.25 -1.23 -2.35 -1.25083 -2.45366 1.4326593 4.56 #NUM! 1.736997 𝑎1 𝑏1 𝑐1 𝑏2 − 4𝑎𝑐 Root 1 Root 2 1 1.48699 1.352909 -3.20047 FALSE FALSE Comparing d for different cases D>0 Solving quadratic equation Solving Cubic equation Case 2
  • 9. Example case 3 A B C D 1 -1 0.32 -0.032 Enter coefficient here Ax3+Bx2+Cx+D=0 Comparing d for different cases a b c q R d Cos(Ɵ) Ɵ α (root) -1 0.32 -0.032 -0.013333 0.0005925 -1.28E-21 -1.00 3.1415925 0.4000000 𝑎1 𝑏1 𝑐1 𝑏2 − 4𝑎𝑐 Root 1 Root 2 1 -0.5999 0.079999 0.039999 0.399999 0.2 Comparing d for different casesSolving Cubic equation D<0 Solving quadratic equation Case 3
  • 10. Saturation pressure calculation The fugacity of a component in the vapor phase and the liquid phase is basically a measure of the potential for transfer of component between the phases. For example, a higher fugacity of a component in the vapor phase compared to liquid phase indicates that liquid accepts the component from vapour phase. The equality of component fugacities in the vapor phase and liquid means zero net transfer of component between the two phases. Therefore, a zero net transfer for all the components or the equality of component fugacities in the two phases implies thermodynamic equilibrium of a hydrocarbon system(saturation pressure), which is mathematically expressed as : 𝑓𝑙= 𝑓𝑣 Fugacity – • A thermodynamic property of a real gas which if substituted for the pressure or partial pressure in the equations for an ideal gas gives equations applicable to the real gas. 𝑓 = 𝑝 ∗ 𝑒𝑥𝑝 𝑍 − 1 − 𝑙𝑛 𝑍 − 𝐵 + 𝐴 80.5 ∗ 𝐵 𝑙𝑛 𝑍 + 𝐵 1 − 20.5 𝑍 + 𝐵 1 + 20.5
  • 11. Start Input data Tc,Pc,Ꙍ Specify T Calculate a=(ac*α) Solve EOS to get Zv , ZL(refer eq on slide no 3) Calculate fv , fL(refer eq on slide no 10) 𝐴𝐵𝑆 1 − 𝑓𝑙 𝑓𝑣 2 = 0 Record Psaturation Stop Yes No Adjust P 1 root or 3 equal roots Then single phase exist Minimum root is ZV Middle root is neglected Maximum root is ZL 3 roots 1 roots initial guess of P Calculate A,B Calculate b,m,ac Calculate α(T)
  • 12. The molar gibbs energy and fugacity of pure component Starting from equality of molar gibbs energies in coexisting phases 𝐺 L(T,P)= 𝐺 v(T,P)………….1 Since : d 𝐺 = - 𝑆 dT+𝑉dP So that 𝜕𝐺 𝜕𝑇 𝑃 = −𝑆..................2 And 𝜕𝐺 𝜕𝑃 𝑇 = 𝑉………………….3 We presume that we have equation of state from which we can compute V as a function of T and P, only equation 3 will be considered further. Integration of equation 3 between any two pressure P1 and P2(at constant temperature) yields 𝐺(T1,P2)- 𝐺(T1,P1)=∫ 𝑃1 𝑃2 (𝑉𝑑𝑃)……4 If the fluid consideration were an ideal gas, then 𝑉 𝐼𝐺 =RT/P, so that 𝐺 𝐼𝐺 (T1,P2)-GIG(T1,P1)=∫ 𝑃1 𝑃2 𝑅𝑇 𝑃 𝑑𝑃……5 Subtracting eq 5 from 4 gives [𝐺(T1,P2)- 𝐺 IG(T1,P2)]-[𝐺(T1,P1)- 𝐺 IG(T1,P1)]=∫ 𝑃1 𝑃2 𝑉 − 𝑅𝑇 𝑃 𝑑𝑃……..6
  • 13. Now setting P1=0 equal to zero , (2) recognizing that at P=0 all fluids are ideal gases so that 𝐺(T1,P=0)= 𝐺 IG(T1,P=0), and equation 4 omitting all subscript yields 𝐺(T,P)- 𝐺 IG(T,P)= ∫0 𝑃 𝑉 − 𝑅𝑇 𝑃 𝑑𝑃……….7 Definition of Fugacity 𝑓 = 𝑃 exp 𝐺 T,P −𝐺 IG T,P RT = 𝑃𝑒𝑥𝑝 1 𝑅𝑇 ∫ 0 𝑃 𝑉 − 𝑅𝑇 𝑃 𝑑𝑃 …..8 Definition of fugacity coefficient 𝜙 = 𝑓 𝑃 exp 𝐺 T,P −𝐺 IG T,P RT = 𝑒𝑥𝑝 1 𝑅𝑇 ∫ 0 𝑃 𝑉 − 𝑅𝑇 𝑃 𝑑𝑃 …..9 In fact, all these equations of states are in form in which pressure is explicit function of volume and temperature. Therefore, it is useful to have equation relating the fugacity to an integral over volume (rather than pressure). We obtain such an equation by starting with equation 9 and Equation 𝑑𝑃 = 1 𝑉 𝑑 𝑃𝑉 − 𝑃 𝑉 𝑑𝑉 at constant temperature in form 𝑑𝑃 = 1 𝑉 𝑑 𝑃𝑉 − 𝑃 𝑉 𝑑𝑉 = 𝑃 𝑍 𝑑𝑍 − 𝑃 𝑉 𝑑𝑉……10 To change the variable of integration we obtain: ln 𝑓 𝑇,𝑃 𝑃 = ln 𝜙 = 1 𝑅𝑇 ∫ 𝑉=∞ 𝑉 𝑅𝑇 𝑉 − 𝑃 𝑑𝑣 − ln 𝑍 + 𝑍 − 1 …….11