SlideShare uma empresa Scribd logo
1 de 13
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

Mais conteúdo relacionado

Mais procurados

Fundamentals of heat exchanger design
Fundamentals of heat exchanger designFundamentals of heat exchanger design
Fundamentals of heat exchanger design
Juan Guillermo
 
Episode 39 : Hopper Design
Episode 39 :  Hopper Design Episode 39 :  Hopper Design
Episode 39 : Hopper Design
SAJJAD KHUDHUR ABBAS
 
Introduction To Distillation
Introduction To DistillationIntroduction To Distillation
Introduction To Distillation
Edward Dobson
 

Mais procurados (20)

Fundamentals of heat exchanger design
Fundamentals of heat exchanger designFundamentals of heat exchanger design
Fundamentals of heat exchanger design
 
Radial Heat conduction.docx
Radial Heat conduction.docxRadial Heat conduction.docx
Radial Heat conduction.docx
 
batch distillation, multi stage batch distillation
batch distillation, multi stage batch distillationbatch distillation, multi stage batch distillation
batch distillation, multi stage batch distillation
 
Episode 39 : Hopper Design
Episode 39 :  Hopper Design Episode 39 :  Hopper Design
Episode 39 : Hopper Design
 
Heat exchanger design
Heat exchanger designHeat exchanger design
Heat exchanger design
 
Heat exchanger design
Heat exchanger designHeat exchanger design
Heat exchanger design
 
1-D Steady State Heat Transfer With Heat Generation
1-D Steady State Heat Transfer With Heat Generation1-D Steady State Heat Transfer With Heat Generation
1-D Steady State Heat Transfer With Heat Generation
 
Design of packed columns
Design of packed columnsDesign of packed columns
Design of packed columns
 
types of heat exchangers.pdf
types of heat exchangers.pdftypes of heat exchangers.pdf
types of heat exchangers.pdf
 
Design and Rating of Packed Distillation Columns
Design and Rating of Packed Distillation ColumnsDesign and Rating of Packed Distillation Columns
Design and Rating of Packed Distillation Columns
 
pipe stress analysis for piping engineering
pipe stress analysis for piping engineeringpipe stress analysis for piping engineering
pipe stress analysis for piping engineering
 
CEDB201 REBOILER DESIGN_2022.pptx
CEDB201 REBOILER DESIGN_2022.pptxCEDB201 REBOILER DESIGN_2022.pptx
CEDB201 REBOILER DESIGN_2022.pptx
 
Introduction To Distillation
Introduction To DistillationIntroduction To Distillation
Introduction To Distillation
 
Fundamentals of Heat Exchanger Design
Fundamentals of Heat Exchanger DesignFundamentals of Heat Exchanger Design
Fundamentals of Heat Exchanger Design
 
02 part5 energy balance
02 part5 energy balance02 part5 energy balance
02 part5 energy balance
 
Ch 6- fugacidad mezcla
Ch 6- fugacidad mezclaCh 6- fugacidad mezcla
Ch 6- fugacidad mezcla
 
Thermal Design Margins for Heat Exchangers
Thermal Design Margins for Heat ExchangersThermal Design Margins for Heat Exchangers
Thermal Design Margins for Heat Exchangers
 
Centrifugal pump sizing tutorial
Centrifugal pump sizing   tutorialCentrifugal pump sizing   tutorial
Centrifugal pump sizing tutorial
 
Steel stacks guide
Steel stacks guideSteel stacks guide
Steel stacks guide
 
Material & Energy Balance for Distillation
Material & Energy Balance for DistillationMaterial & Energy Balance for Distillation
Material & Energy Balance for Distillation
 

Semelhante a Cubic root using excel

Analysis Of Algorithms Ii
Analysis Of Algorithms IiAnalysis Of Algorithms Ii
Analysis Of Algorithms Ii
Sri Prasanna
 
Matrix 2 d
Matrix 2 dMatrix 2 d
Matrix 2 d
xyz120
 
Kittel c. introduction to solid state physics 8 th edition - solution manual
Kittel c.  introduction to solid state physics 8 th edition - solution manualKittel c.  introduction to solid state physics 8 th edition - solution manual
Kittel c. introduction to solid state physics 8 th edition - solution manual
amnahnura
 

Semelhante a Cubic root using excel (20)

Solution manual for introduction to nonlinear finite element analysis nam-h...
Solution manual for introduction to nonlinear finite element analysis   nam-h...Solution manual for introduction to nonlinear finite element analysis   nam-h...
Solution manual for introduction to nonlinear finite element analysis nam-h...
 
Analysis Of Algorithms Ii
Analysis Of Algorithms IiAnalysis Of Algorithms Ii
Analysis Of Algorithms Ii
 
Statistics Homework Help
Statistics Homework HelpStatistics Homework Help
Statistics Homework Help
 
Multiple Linear Regression Homework Help
Multiple Linear Regression Homework HelpMultiple Linear Regression Homework Help
Multiple Linear Regression Homework Help
 
Matrix 2 d
Matrix 2 dMatrix 2 d
Matrix 2 d
 
final15
final15final15
final15
 
Maths formulas
Maths formulasMaths formulas
Maths formulas
 
TABREZ KHAN.ppt
TABREZ KHAN.pptTABREZ KHAN.ppt
TABREZ KHAN.ppt
 
Ijetr011923
Ijetr011923Ijetr011923
Ijetr011923
 
THE TEMPERATURE PROFILE SOLUTION IN NATURAL CONVECTION SOLVED MATHEMATICALLY.pdf
THE TEMPERATURE PROFILE SOLUTION IN NATURAL CONVECTION SOLVED MATHEMATICALLY.pdfTHE TEMPERATURE PROFILE SOLUTION IN NATURAL CONVECTION SOLVED MATHEMATICALLY.pdf
THE TEMPERATURE PROFILE SOLUTION IN NATURAL CONVECTION SOLVED MATHEMATICALLY.pdf
 
THE RATE OF COOLING IN NATURAL CONVECTION EXPLAINED AND SOLVED.pdf
THE RATE OF COOLING IN NATURAL CONVECTION EXPLAINED AND SOLVED.pdfTHE RATE OF COOLING IN NATURAL CONVECTION EXPLAINED AND SOLVED.pdf
THE RATE OF COOLING IN NATURAL CONVECTION EXPLAINED AND SOLVED.pdf
 
THE COOLING CURVE SOLUTION IN NATURAL CONVECTION EXPLAINED.pdf
THE COOLING CURVE SOLUTION IN NATURAL CONVECTION EXPLAINED.pdfTHE COOLING CURVE SOLUTION IN NATURAL CONVECTION EXPLAINED.pdf
THE COOLING CURVE SOLUTION IN NATURAL CONVECTION EXPLAINED.pdf
 
Btech admission in india
Btech admission in indiaBtech admission in india
Btech admission in india
 
Probability and Entanglement
Probability and EntanglementProbability and Entanglement
Probability and Entanglement
 
Series_Solution_Methods_and_Special_Func.pdf
Series_Solution_Methods_and_Special_Func.pdfSeries_Solution_Methods_and_Special_Func.pdf
Series_Solution_Methods_and_Special_Func.pdf
 
Kittel c. introduction to solid state physics 8 th edition - solution manual
Kittel c.  introduction to solid state physics 8 th edition - solution manualKittel c.  introduction to solid state physics 8 th edition - solution manual
Kittel c. introduction to solid state physics 8 th edition - solution manual
 
Form 5 Additional Maths Note
Form 5 Additional Maths NoteForm 5 Additional Maths Note
Form 5 Additional Maths Note
 
matrices and determinantes
matrices and determinantes matrices and determinantes
matrices and determinantes
 
Equation of second degree
Equation of second degreeEquation of second degree
Equation of second degree
 
Lemh104
Lemh104Lemh104
Lemh104
 

Último

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 

Último (20)

ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 

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