SlideShare a Scribd company logo
1 of 9
BY:-
ABHINAV BHOSALE
SHUBHAM KUMAR
NAKUL SANADHYA
Klinkenberg Effect
Dept. of Petroleum Engineering,
Indian Institute of Petroleum and Energy,
Vizag(AP)
Course-TPM
Course Instructor- Dr. Sivasankar P.
Problem statement
To find the absolute permeability from the Newton-
Raphson method is very lengthy and time taking, so
for this we have developed a programme in which
we give some input and from this input an output
will be provided and this output will be absolute
permeability of a core sample.
OBJECTIVE
•Our Objective is to calculate the absolute permeability in
minimum time.
•Using the corelation between absolute permeability, mean
pressure and air permeability.
•6.9 kL*0.64 + pmkL -pm kg = 0
•pm = mean pressure,psi
•kg = air permeability at pm,psi
•kL = absolute permeability (k), md
Methodology
Step 1: read Kg,Ki,Pm,er and initialize
iteration counter
Step 2: Calculate f(Ki)
Step 3: if abs(f(Ki)/f’(Ki)) > = er
Then ki + 1 = Ki-f(Ki)/f’(Ki)
Step 4: increment counter
Step 5: print final Ki...(when f(Ki) < er
then loop will break and final ki value with
number of iteration performed get
printed in GUI window)
from tkinter import *
root = Tk()
root.geometry("700x500")
root.maxsize(700, 500)
root.title("Permeability calculator")
root.wm_iconbitmap("icon.ico")
def calculate():
kg = float(val1.get())
ki = float(val2.get())
pm = float(val3.get())
er = float(val4.get())
c = 0
while abs(6.9*(ki**0.64)+(pm*ki)-
(pm*kg)) >= er:
ki = ki - ((6.9*(ki*0.64)+(pm*ki)-
(pm*kg))/(4.416(ki**(- 0.36))+pm))
c = c + 1
val5.set(str(ki.real))
val6.set(str(c)) f
Results and Discussion
Clicking
calculate
button
Code output : GUI
Conclusion
from tkinter import *
root = Tk()
root.geometry("700x500")
root.maxsize(700, 500)
root.title("Permeability calculator")
root.wm_iconbitmap("icon.ico")
lbl = Label(text="Klinkenberg effect", fg="#2e1e42", bg="#f2edf7", relief="groove", font="Arial 20 bold")
lbl.grid(row=0, ipadx=60, ipady=10)
l1 = Label(text="Kg (air permeability in mD):", font="Arial 14 bold")
l1.grid(row=1, pady=15)
l2 = Label(text="Ki (Initial guess of Kl in mD):", font="Arial 14 bold")
l2.grid(row=2, pady=15)
l3 = Label(text="Pm (Mean pressure in Psi):", font="Arial 14 bold")
l3.grid(row=3, pady=15)
l4 = Label(text="Tolerable Error:", font="Arial 14 bold")
l4.grid(row=4, pady=15)
l5 = Label(text="Final permeability (in mD):", font="Arial 14 bold")
l5.grid(row=6, pady=15)
l6 = Label(text="Iterations performed:", font="Arial 14 bold")
l6.grid(row=7, pady=15)
val1 = DoubleVar()
val2 = DoubleVar()
val3 = DoubleVar()
val4 = DoubleVar()
val5 = StringVar()
val6 = StringVar()
entry1 = Entry(root, textvariable=val1, font="Arial 14 bold")
entry1.grid(row=1, column=2)
entry2 = Entry(root, textvariable=val2, font="Arial 14 bold")
entry2.grid(row=2, column=2)
entry3 = Entry(root, textvariable=val3, font="Arial 14 bold")
entry3.grid(row=3, column=2)
entry4 = Entry(root, textvariable=val4, font="Arial 14 bold")
entry4.grid(row=4, column=2)
entry5 = Entry(root, textvariable=val5, font="Arial 14 bold")
entry5.grid(row=6, column=2)
entry6 = Entry(root, textvariable=val6, font="Arial 14 bold")
entry6.grid(row=7, column=2)
def calculate():
kg = float(val1.get())
ki = float(val2.get())
pm = float(val3.get())
er = float(val4.get())
c = 0
while abs(6.9*(ki**0.64)+(pm*ki)-(pm*kg)) >= er:
ki = ki - ((6.9*(ki*0.64)+(pm*ki)-(pm*kg))/(4.416(ki**(-0.36))+pm))
c = c + 1
val5.set(str(ki.real))
val6.set(str(c))
b1 = Button(text="Calculate", width=20, relief="raised", font="Arial 14 bold", command=calculate)
b1.grid(row=5, pady=10, padx=100)
root.mainloop()
TPM.pptx

More Related Content

Similar to TPM.pptx

COMPARISON BETWEEN VARIOUS STEEL SECTION BY USING IS CODE AND EURO CODE
COMPARISON BETWEEN VARIOUS STEEL SECTION BY USING IS CODE AND EURO CODECOMPARISON BETWEEN VARIOUS STEEL SECTION BY USING IS CODE AND EURO CODE
COMPARISON BETWEEN VARIOUS STEEL SECTION BY USING IS CODE AND EURO CODEIRJET Journal
 
FPGA implementation of universal modulator using CORDIC algorithm for commun...
FPGA implementation of universal modulator using CORDIC  algorithm for commun...FPGA implementation of universal modulator using CORDIC  algorithm for commun...
FPGA implementation of universal modulator using CORDIC algorithm for commun...IJMER
 
FTP-Uploads.DS_Store__MACOSXFTP-Uploads._.DS_StoreFTP.docx
FTP-Uploads.DS_Store__MACOSXFTP-Uploads._.DS_StoreFTP.docxFTP-Uploads.DS_Store__MACOSXFTP-Uploads._.DS_StoreFTP.docx
FTP-Uploads.DS_Store__MACOSXFTP-Uploads._.DS_StoreFTP.docxhanneloremccaffery
 
008. PROGRAM EFFICIENCY computer science.pdf
008. PROGRAM EFFICIENCY computer science.pdf008. PROGRAM EFFICIENCY computer science.pdf
008. PROGRAM EFFICIENCY computer science.pdfomchoubey297
 
ACCURATE Q-PREDICTION FOR RFIC SPIRAL INDUCTORS USING THE 3DB BANDWIDTH
ACCURATE Q-PREDICTION FOR RFIC SPIRAL INDUCTORS  USING THE 3DB BANDWIDTHACCURATE Q-PREDICTION FOR RFIC SPIRAL INDUCTORS  USING THE 3DB BANDWIDTH
ACCURATE Q-PREDICTION FOR RFIC SPIRAL INDUCTORS USING THE 3DB BANDWIDTHIlango Jeyasubramanian
 
cruise control system
cruise control systemcruise control system
cruise control systemLusiana Diyan
 
Project seminar ppt_steelcasting
Project seminar ppt_steelcastingProject seminar ppt_steelcasting
Project seminar ppt_steelcastingRudra Narayan Paul
 
PID Tuning using Ziegler Nicholas - MATLAB Approach
PID Tuning using Ziegler Nicholas - MATLAB ApproachPID Tuning using Ziegler Nicholas - MATLAB Approach
PID Tuning using Ziegler Nicholas - MATLAB ApproachWaleed El-Badry
 
TCO in Python via bytecode manipulation.
TCO in Python via bytecode manipulation.TCO in Python via bytecode manipulation.
TCO in Python via bytecode manipulation.lnikolaeva
 
How to add an optimization for C# to RyuJIT
How to add an optimization for C# to RyuJITHow to add an optimization for C# to RyuJIT
How to add an optimization for C# to RyuJITEgor Bogatov
 
Pid tuninig with exact gain and phase margin
Pid tuninig with  exact gain and  phase marginPid tuninig with  exact gain and  phase margin
Pid tuninig with exact gain and phase marginMuhammad Younas
 
VLSI Design Final Project - 32 bit ALU
VLSI Design Final Project - 32 bit ALUVLSI Design Final Project - 32 bit ALU
VLSI Design Final Project - 32 bit ALUSachin Kumar Asokan
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)IJERD Editor
 
BALLANDBEAM_GROUP7.pptx
BALLANDBEAM_GROUP7.pptxBALLANDBEAM_GROUP7.pptx
BALLANDBEAM_GROUP7.pptxOthmanBensaoud
 
Elliptic curve scalar multiplier using karatsuba
Elliptic curve scalar multiplier using karatsubaElliptic curve scalar multiplier using karatsuba
Elliptic curve scalar multiplier using karatsubaIAEME Publication
 
The Ring programming language version 1.3 book - Part 48 of 88
The Ring programming language version 1.3 book - Part 48 of 88The Ring programming language version 1.3 book - Part 48 of 88
The Ring programming language version 1.3 book - Part 48 of 88Mahmoud Samir Fayed
 

Similar to TPM.pptx (20)

4. functions
4. functions4. functions
4. functions
 
COMPARISON BETWEEN VARIOUS STEEL SECTION BY USING IS CODE AND EURO CODE
COMPARISON BETWEEN VARIOUS STEEL SECTION BY USING IS CODE AND EURO CODECOMPARISON BETWEEN VARIOUS STEEL SECTION BY USING IS CODE AND EURO CODE
COMPARISON BETWEEN VARIOUS STEEL SECTION BY USING IS CODE AND EURO CODE
 
FPGA implementation of universal modulator using CORDIC algorithm for commun...
FPGA implementation of universal modulator using CORDIC  algorithm for commun...FPGA implementation of universal modulator using CORDIC  algorithm for commun...
FPGA implementation of universal modulator using CORDIC algorithm for commun...
 
FTP-Uploads.DS_Store__MACOSXFTP-Uploads._.DS_StoreFTP.docx
FTP-Uploads.DS_Store__MACOSXFTP-Uploads._.DS_StoreFTP.docxFTP-Uploads.DS_Store__MACOSXFTP-Uploads._.DS_StoreFTP.docx
FTP-Uploads.DS_Store__MACOSXFTP-Uploads._.DS_StoreFTP.docx
 
008. PROGRAM EFFICIENCY computer science.pdf
008. PROGRAM EFFICIENCY computer science.pdf008. PROGRAM EFFICIENCY computer science.pdf
008. PROGRAM EFFICIENCY computer science.pdf
 
ACCURATE Q-PREDICTION FOR RFIC SPIRAL INDUCTORS USING THE 3DB BANDWIDTH
ACCURATE Q-PREDICTION FOR RFIC SPIRAL INDUCTORS  USING THE 3DB BANDWIDTHACCURATE Q-PREDICTION FOR RFIC SPIRAL INDUCTORS  USING THE 3DB BANDWIDTH
ACCURATE Q-PREDICTION FOR RFIC SPIRAL INDUCTORS USING THE 3DB BANDWIDTH
 
cruise control system
cruise control systemcruise control system
cruise control system
 
Project seminar ppt_steelcasting
Project seminar ppt_steelcastingProject seminar ppt_steelcasting
Project seminar ppt_steelcasting
 
Precast driven pile 450 x450
Precast driven pile 450 x450Precast driven pile 450 x450
Precast driven pile 450 x450
 
PID Tuning using Ziegler Nicholas - MATLAB Approach
PID Tuning using Ziegler Nicholas - MATLAB ApproachPID Tuning using Ziegler Nicholas - MATLAB Approach
PID Tuning using Ziegler Nicholas - MATLAB Approach
 
TCO in Python via bytecode manipulation.
TCO in Python via bytecode manipulation.TCO in Python via bytecode manipulation.
TCO in Python via bytecode manipulation.
 
How to add an optimization for C# to RyuJIT
How to add an optimization for C# to RyuJITHow to add an optimization for C# to RyuJIT
How to add an optimization for C# to RyuJIT
 
Subquad multi ff
Subquad multi ffSubquad multi ff
Subquad multi ff
 
Pid tuninig with exact gain and phase margin
Pid tuninig with  exact gain and  phase marginPid tuninig with  exact gain and  phase margin
Pid tuninig with exact gain and phase margin
 
VLSI Design Final Project - 32 bit ALU
VLSI Design Final Project - 32 bit ALUVLSI Design Final Project - 32 bit ALU
VLSI Design Final Project - 32 bit ALU
 
HEpres2.ppt
HEpres2.pptHEpres2.ppt
HEpres2.ppt
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
 
BALLANDBEAM_GROUP7.pptx
BALLANDBEAM_GROUP7.pptxBALLANDBEAM_GROUP7.pptx
BALLANDBEAM_GROUP7.pptx
 
Elliptic curve scalar multiplier using karatsuba
Elliptic curve scalar multiplier using karatsubaElliptic curve scalar multiplier using karatsuba
Elliptic curve scalar multiplier using karatsuba
 
The Ring programming language version 1.3 book - Part 48 of 88
The Ring programming language version 1.3 book - Part 48 of 88The Ring programming language version 1.3 book - Part 48 of 88
The Ring programming language version 1.3 book - Part 48 of 88
 

Recently uploaded

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 

Recently uploaded (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

TPM.pptx

  • 1. BY:- ABHINAV BHOSALE SHUBHAM KUMAR NAKUL SANADHYA Klinkenberg Effect Dept. of Petroleum Engineering, Indian Institute of Petroleum and Energy, Vizag(AP) Course-TPM Course Instructor- Dr. Sivasankar P.
  • 2. Problem statement To find the absolute permeability from the Newton- Raphson method is very lengthy and time taking, so for this we have developed a programme in which we give some input and from this input an output will be provided and this output will be absolute permeability of a core sample.
  • 3. OBJECTIVE •Our Objective is to calculate the absolute permeability in minimum time. •Using the corelation between absolute permeability, mean pressure and air permeability. •6.9 kL*0.64 + pmkL -pm kg = 0 •pm = mean pressure,psi •kg = air permeability at pm,psi •kL = absolute permeability (k), md
  • 4. Methodology Step 1: read Kg,Ki,Pm,er and initialize iteration counter Step 2: Calculate f(Ki) Step 3: if abs(f(Ki)/f’(Ki)) > = er Then ki + 1 = Ki-f(Ki)/f’(Ki) Step 4: increment counter Step 5: print final Ki...(when f(Ki) < er then loop will break and final ki value with number of iteration performed get printed in GUI window) from tkinter import * root = Tk() root.geometry("700x500") root.maxsize(700, 500) root.title("Permeability calculator") root.wm_iconbitmap("icon.ico") def calculate(): kg = float(val1.get()) ki = float(val2.get()) pm = float(val3.get()) er = float(val4.get()) c = 0 while abs(6.9*(ki**0.64)+(pm*ki)- (pm*kg)) >= er: ki = ki - ((6.9*(ki*0.64)+(pm*ki)- (pm*kg))/(4.416(ki**(- 0.36))+pm)) c = c + 1 val5.set(str(ki.real)) val6.set(str(c)) f
  • 7. from tkinter import * root = Tk() root.geometry("700x500") root.maxsize(700, 500) root.title("Permeability calculator") root.wm_iconbitmap("icon.ico") lbl = Label(text="Klinkenberg effect", fg="#2e1e42", bg="#f2edf7", relief="groove", font="Arial 20 bold") lbl.grid(row=0, ipadx=60, ipady=10) l1 = Label(text="Kg (air permeability in mD):", font="Arial 14 bold") l1.grid(row=1, pady=15) l2 = Label(text="Ki (Initial guess of Kl in mD):", font="Arial 14 bold") l2.grid(row=2, pady=15) l3 = Label(text="Pm (Mean pressure in Psi):", font="Arial 14 bold") l3.grid(row=3, pady=15) l4 = Label(text="Tolerable Error:", font="Arial 14 bold") l4.grid(row=4, pady=15) l5 = Label(text="Final permeability (in mD):", font="Arial 14 bold") l5.grid(row=6, pady=15) l6 = Label(text="Iterations performed:", font="Arial 14 bold") l6.grid(row=7, pady=15) val1 = DoubleVar() val2 = DoubleVar() val3 = DoubleVar() val4 = DoubleVar() val5 = StringVar() val6 = StringVar()
  • 8. entry1 = Entry(root, textvariable=val1, font="Arial 14 bold") entry1.grid(row=1, column=2) entry2 = Entry(root, textvariable=val2, font="Arial 14 bold") entry2.grid(row=2, column=2) entry3 = Entry(root, textvariable=val3, font="Arial 14 bold") entry3.grid(row=3, column=2) entry4 = Entry(root, textvariable=val4, font="Arial 14 bold") entry4.grid(row=4, column=2) entry5 = Entry(root, textvariable=val5, font="Arial 14 bold") entry5.grid(row=6, column=2) entry6 = Entry(root, textvariable=val6, font="Arial 14 bold") entry6.grid(row=7, column=2) def calculate(): kg = float(val1.get()) ki = float(val2.get()) pm = float(val3.get()) er = float(val4.get()) c = 0 while abs(6.9*(ki**0.64)+(pm*ki)-(pm*kg)) >= er: ki = ki - ((6.9*(ki*0.64)+(pm*ki)-(pm*kg))/(4.416(ki**(-0.36))+pm)) c = c + 1 val5.set(str(ki.real)) val6.set(str(c)) b1 = Button(text="Calculate", width=20, relief="raised", font="Arial 14 bold", command=calculate) b1.grid(row=5, pady=10, padx=100) root.mainloop()