SlideShare a Scribd company logo
How to get a
titration curve by
using Python
Strong acid-strong base
titrations
Example
▸ Considering the titration of 100 mL
of 2 M HCl with 1 M NaOH and
plotting the pH of the solution
being analyzed as a function of the
amount of titrant added.
○ equivalence point
○ x-axis values
○ y-axis values
2
Python example (1)
3
import pylab
a1 , b1 , a2 = 2 , 0.1 , 1
c , b2 = a1*b1 , a1*b1/a2
n , eps = 50 , 1.e-10
db = b2/n
# NaOH added in mL
bs1 = pylab.linspace(db,b2,n)
bs2 = pylab.linspace(b2,2*b2,n)
# compute pH
as1 = -pylab.log10( (c - a2*bs1 + eps)/(b1 + bs2) )
as2 = 14 + pylab.log10( (a2*bs2 - c + eps)/(b1 + bs2) )
Python example (2)
4
# plot figure
# the curve before equivalence point
pylab.plot(bs1,as1,color='r')
# the curve near equivalence point
pylab.plot([bs1[-1],bs2[1]],[as1[-1],as2[1]],color='r')
# the curve after equivalence point
pylab.plot(bs2[1:],as2[1:],color='r')
# setup figure property
pylab.title("The Titration Curve")
pylab.xlabel("Vol of NaOH added (L)")
pylab.ylabel("pH")
pylab.grid()
# display figure
pylab.show()
Result
The titration curve
5

More Related Content

What's hot

2019年度チュートリアルBPE
2019年度チュートリアルBPE2019年度チュートリアルBPE
2019年度チュートリアルBPE
広樹 本間
 
競技プログラミングで便利な外部ツールを大量紹介
競技プログラミングで便利な外部ツールを大量紹介競技プログラミングで便利な外部ツールを大量紹介
競技プログラミングで便利な外部ツールを大量紹介
xryuseix
 
ローマと道に関するいくつかの問題とその解決
ローマと道に関するいくつかの問題とその解決ローマと道に関するいくつかの問題とその解決
ローマと道に関するいくつかの問題とその解決
at_akada
 
電路學Chapter5
電路學Chapter5電路學Chapter5
電路學Chapter5
Fu Jen Catholic University
 
AtCoder Regular Contest 032 解説
AtCoder Regular Contest 032 解説AtCoder Regular Contest 032 解説
AtCoder Regular Contest 032 解説
AtCoder Inc.
 
Emc & safety 符號介紹
Emc & safety 符號介紹Emc & safety 符號介紹
Emc & safety 符號介紹
horngyuh
 
電路學 - [第三章] 網路定理
電路學 - [第三章] 網路定理電路學 - [第三章] 網路定理
電路學 - [第三章] 網路定理
Simen Li
 
電路學Chapter6-1
電路學Chapter6-1電路學Chapter6-1
電路學Chapter6-1
Fu Jen Catholic University
 
Agilent ADS 模擬手冊 [實習1] 基本操作與射頻放大器設計
Agilent ADS 模擬手冊 [實習1] 基本操作與射頻放大器設計Agilent ADS 模擬手冊 [實習1] 基本操作與射頻放大器設計
Agilent ADS 模擬手冊 [實習1] 基本操作與射頻放大器設計
Simen Li
 
CMSI計算科学技術特論C (2015) OpenMX とDFT①
CMSI計算科学技術特論C (2015) OpenMX とDFT①CMSI計算科学技術特論C (2015) OpenMX とDFT①
CMSI計算科学技術特論C (2015) OpenMX とDFT①
Computational Materials Science Initiative
 
AtCoder Beginner Contest 002 解説
AtCoder Beginner Contest 002 解説AtCoder Beginner Contest 002 解説
AtCoder Beginner Contest 002 解説
AtCoder Inc.
 
電路學 - [第五章] 一階RC/RL電路
電路學 - [第五章] 一階RC/RL電路電路學 - [第五章] 一階RC/RL電路
電路學 - [第五章] 一階RC/RL電路
Simen Li
 
AtCoder Beginner Contest 015 解説
AtCoder Beginner Contest 015 解説AtCoder Beginner Contest 015 解説
AtCoder Beginner Contest 015 解説
AtCoder Inc.
 
射頻電子 - [第五章] 射頻放大器設計
射頻電子 - [第五章] 射頻放大器設計射頻電子 - [第五章] 射頻放大器設計
射頻電子 - [第五章] 射頻放大器設計
Simen Li
 
高速シリアル通信を支える技術
高速シリアル通信を支える技術高速シリアル通信を支える技術
高速シリアル通信を支える技術Natsutani Minoru
 
AtCoder Beginner Contest 017 解説
AtCoder Beginner Contest 017 解説AtCoder Beginner Contest 017 解説
AtCoder Beginner Contest 017 解説
AtCoder Inc.
 
射頻電子 - [實驗第四章] 微波濾波器與射頻多工器設計
射頻電子 - [實驗第四章] 微波濾波器與射頻多工器設計射頻電子 - [實驗第四章] 微波濾波器與射頻多工器設計
射頻電子 - [實驗第四章] 微波濾波器與射頻多工器設計
Simen Li
 
AtCoder Beginner Contest 013 解説
AtCoder Beginner Contest 013 解説AtCoder Beginner Contest 013 解説
AtCoder Beginner Contest 013 解説
AtCoder Inc.
 
AtCoder Beginner Contest 012 解説
AtCoder Beginner Contest 012 解説AtCoder Beginner Contest 012 解説
AtCoder Beginner Contest 012 解説
AtCoder Inc.
 

What's hot (20)

2019年度チュートリアルBPE
2019年度チュートリアルBPE2019年度チュートリアルBPE
2019年度チュートリアルBPE
 
競技プログラミングで便利な外部ツールを大量紹介
競技プログラミングで便利な外部ツールを大量紹介競技プログラミングで便利な外部ツールを大量紹介
競技プログラミングで便利な外部ツールを大量紹介
 
ローマと道に関するいくつかの問題とその解決
ローマと道に関するいくつかの問題とその解決ローマと道に関するいくつかの問題とその解決
ローマと道に関するいくつかの問題とその解決
 
電路學Chapter5
電路學Chapter5電路學Chapter5
電路學Chapter5
 
耶穌受審
耶穌受審耶穌受審
耶穌受審
 
AtCoder Regular Contest 032 解説
AtCoder Regular Contest 032 解説AtCoder Regular Contest 032 解説
AtCoder Regular Contest 032 解説
 
Emc & safety 符號介紹
Emc & safety 符號介紹Emc & safety 符號介紹
Emc & safety 符號介紹
 
電路學 - [第三章] 網路定理
電路學 - [第三章] 網路定理電路學 - [第三章] 網路定理
電路學 - [第三章] 網路定理
 
電路學Chapter6-1
電路學Chapter6-1電路學Chapter6-1
電路學Chapter6-1
 
Agilent ADS 模擬手冊 [實習1] 基本操作與射頻放大器設計
Agilent ADS 模擬手冊 [實習1] 基本操作與射頻放大器設計Agilent ADS 模擬手冊 [實習1] 基本操作與射頻放大器設計
Agilent ADS 模擬手冊 [實習1] 基本操作與射頻放大器設計
 
CMSI計算科学技術特論C (2015) OpenMX とDFT①
CMSI計算科学技術特論C (2015) OpenMX とDFT①CMSI計算科学技術特論C (2015) OpenMX とDFT①
CMSI計算科学技術特論C (2015) OpenMX とDFT①
 
AtCoder Beginner Contest 002 解説
AtCoder Beginner Contest 002 解説AtCoder Beginner Contest 002 解説
AtCoder Beginner Contest 002 解説
 
電路學 - [第五章] 一階RC/RL電路
電路學 - [第五章] 一階RC/RL電路電路學 - [第五章] 一階RC/RL電路
電路學 - [第五章] 一階RC/RL電路
 
AtCoder Beginner Contest 015 解説
AtCoder Beginner Contest 015 解説AtCoder Beginner Contest 015 解説
AtCoder Beginner Contest 015 解説
 
射頻電子 - [第五章] 射頻放大器設計
射頻電子 - [第五章] 射頻放大器設計射頻電子 - [第五章] 射頻放大器設計
射頻電子 - [第五章] 射頻放大器設計
 
高速シリアル通信を支える技術
高速シリアル通信を支える技術高速シリアル通信を支える技術
高速シリアル通信を支える技術
 
AtCoder Beginner Contest 017 解説
AtCoder Beginner Contest 017 解説AtCoder Beginner Contest 017 解説
AtCoder Beginner Contest 017 解説
 
射頻電子 - [實驗第四章] 微波濾波器與射頻多工器設計
射頻電子 - [實驗第四章] 微波濾波器與射頻多工器設計射頻電子 - [實驗第四章] 微波濾波器與射頻多工器設計
射頻電子 - [實驗第四章] 微波濾波器與射頻多工器設計
 
AtCoder Beginner Contest 013 解説
AtCoder Beginner Contest 013 解説AtCoder Beginner Contest 013 解説
AtCoder Beginner Contest 013 解説
 
AtCoder Beginner Contest 012 解説
AtCoder Beginner Contest 012 解説AtCoder Beginner Contest 012 解説
AtCoder Beginner Contest 012 解説
 

Similar to 化學系 python 教學

化學系 python 練習
化學系 python 練習化學系 python 練習
化學系 python 練習
hungchiayang1
 
Vector Products Revisited: A New and Efficient Method of Proving Vector Ident...
Vector Products Revisited: A New and Efficient Method of Proving Vector Ident...Vector Products Revisited: A New and Efficient Method of Proving Vector Ident...
Vector Products Revisited: A New and Efficient Method of Proving Vector Ident...
Jeffrey Gold
 
Unicamp 2017 - aberta
Unicamp 2017 - abertaUnicamp 2017 - aberta
Unicamp 2017 - aberta
KalculosOnline
 
5.7 poisson regression in the analysis of cohort data
5.7 poisson regression in the analysis of  cohort data5.7 poisson regression in the analysis of  cohort data
5.7 poisson regression in the analysis of cohort data
A M
 
Binomial Theorem
Binomial TheoremBinomial Theorem
Binomial Theoremitutor
 
Lecture 11 (Digital Image Processing)
Lecture 11 (Digital Image Processing)Lecture 11 (Digital Image Processing)
Lecture 11 (Digital Image Processing)
VARUN KUMAR
 
P R E L I M R E V I S I O N U N I T 1
P R E L I M   R E V I S I O N    U N I T 1P R E L I M   R E V I S I O N    U N I T 1
P R E L I M R E V I S I O N U N I T 1mrmcdowall
 
Tìm tòi sáng tạo - SOME POLYNOMIAL PROBLEMS ARE BUILT ON IDENTITIES
Tìm tòi sáng tạo - SOME POLYNOMIAL PROBLEMS ARE BUILT ON IDENTITIESTìm tòi sáng tạo - SOME POLYNOMIAL PROBLEMS ARE BUILT ON IDENTITIES
Tìm tòi sáng tạo - SOME POLYNOMIAL PROBLEMS ARE BUILT ON IDENTITIESTùng Thanh
 
Analysis Of Algorithms Ii
Analysis Of Algorithms IiAnalysis Of Algorithms Ii
Analysis Of Algorithms IiSri Prasanna
 
Função afim resumo teórico e exercícios - celso brasil
Função afim   resumo teórico e exercícios - celso brasilFunção afim   resumo teórico e exercícios - celso brasil
Função afim resumo teórico e exercícios - celso brasil
Celso do Rozário Brasil Gonçalves
 
Information Security Seminar #2
Information Security Seminar #2Information Security Seminar #2
Information Security Seminar #2
Alexander Kolybelnikov
 
DIP_Lecture-35_36_RKJ_Interpolation_Resampling_Unitary_Transformations1.pptx
DIP_Lecture-35_36_RKJ_Interpolation_Resampling_Unitary_Transformations1.pptxDIP_Lecture-35_36_RKJ_Interpolation_Resampling_Unitary_Transformations1.pptx
DIP_Lecture-35_36_RKJ_Interpolation_Resampling_Unitary_Transformations1.pptx
SubhKr1
 
1.trigonometry Further Mathematics Zimbabwe Zimsec Cambridge
1.trigonometry Further Mathematics Zimbabwe Zimsec Cambridge1.trigonometry Further Mathematics Zimbabwe Zimsec Cambridge
1.trigonometry Further Mathematics Zimbabwe Zimsec Cambridge
alproelearning
 
Binomial theorem
Binomial theorem Binomial theorem
Binomial theorem
Harshit Sharma
 

Similar to 化學系 python 教學 (15)

化學系 python 練習
化學系 python 練習化學系 python 練習
化學系 python 練習
 
Vector Products Revisited: A New and Efficient Method of Proving Vector Ident...
Vector Products Revisited: A New and Efficient Method of Proving Vector Ident...Vector Products Revisited: A New and Efficient Method of Proving Vector Ident...
Vector Products Revisited: A New and Efficient Method of Proving Vector Ident...
 
Unicamp 2017 - aberta
Unicamp 2017 - abertaUnicamp 2017 - aberta
Unicamp 2017 - aberta
 
5.7 poisson regression in the analysis of cohort data
5.7 poisson regression in the analysis of  cohort data5.7 poisson regression in the analysis of  cohort data
5.7 poisson regression in the analysis of cohort data
 
Binomial Theorem
Binomial TheoremBinomial Theorem
Binomial Theorem
 
Lecture 11 (Digital Image Processing)
Lecture 11 (Digital Image Processing)Lecture 11 (Digital Image Processing)
Lecture 11 (Digital Image Processing)
 
P R E L I M R E V I S I O N U N I T 1
P R E L I M   R E V I S I O N    U N I T 1P R E L I M   R E V I S I O N    U N I T 1
P R E L I M R E V I S I O N U N I T 1
 
Tìm tòi sáng tạo - SOME POLYNOMIAL PROBLEMS ARE BUILT ON IDENTITIES
Tìm tòi sáng tạo - SOME POLYNOMIAL PROBLEMS ARE BUILT ON IDENTITIESTìm tòi sáng tạo - SOME POLYNOMIAL PROBLEMS ARE BUILT ON IDENTITIES
Tìm tòi sáng tạo - SOME POLYNOMIAL PROBLEMS ARE BUILT ON IDENTITIES
 
Analysis Of Algorithms Ii
Analysis Of Algorithms IiAnalysis Of Algorithms Ii
Analysis Of Algorithms Ii
 
Função afim resumo teórico e exercícios - celso brasil
Função afim   resumo teórico e exercícios - celso brasilFunção afim   resumo teórico e exercícios - celso brasil
Função afim resumo teórico e exercícios - celso brasil
 
Information Security Seminar #2
Information Security Seminar #2Information Security Seminar #2
Information Security Seminar #2
 
DIP_Lecture-35_36_RKJ_Interpolation_Resampling_Unitary_Transformations1.pptx
DIP_Lecture-35_36_RKJ_Interpolation_Resampling_Unitary_Transformations1.pptxDIP_Lecture-35_36_RKJ_Interpolation_Resampling_Unitary_Transformations1.pptx
DIP_Lecture-35_36_RKJ_Interpolation_Resampling_Unitary_Transformations1.pptx
 
1.trigonometry Further Mathematics Zimbabwe Zimsec Cambridge
1.trigonometry Further Mathematics Zimbabwe Zimsec Cambridge1.trigonometry Further Mathematics Zimbabwe Zimsec Cambridge
1.trigonometry Further Mathematics Zimbabwe Zimsec Cambridge
 
Binomial theorem
Binomial theorem Binomial theorem
Binomial theorem
 
Formular
FormularFormular
Formular
 

More from hungchiayang1

Exercise 1 3
Exercise 1 3Exercise 1 3
Exercise 1 3
hungchiayang1
 
P127 135 new
P127 135 newP127 135 new
P127 135 new
hungchiayang1
 
Python p.193 197
Python p.193 197Python p.193 197
Python p.193 197
hungchiayang1
 
Python differential equation
Python differential equationPython differential equation
Python differential equation
hungchiayang1
 
化學系 python 習題
化學系 python 習題化學系 python 習題
化學系 python 習題
hungchiayang1
 
Ppt 120-126
Ppt 120-126Ppt 120-126
Ppt 120-126
hungchiayang1
 
Ppt 151-151
Ppt 151-151Ppt 151-151
Ppt 151-151
hungchiayang1
 
Ppt 136-136
Ppt 136-136Ppt 136-136
Ppt 136-136
hungchiayang1
 
Ppt 143-143
Ppt 143-143Ppt 143-143
Ppt 143-143
hungchiayang1
 
Ppt 137-137
Ppt 137-137Ppt 137-137
Ppt 137-137
hungchiayang1
 
Ppt 150-150
Ppt 150-150Ppt 150-150
Ppt 150-150
hungchiayang1
 
Ppt 26-50
Ppt 26-50Ppt 26-50
Ppt 26-50
hungchiayang1
 
Ppt 145-149
Ppt 145-149Ppt 145-149
Ppt 145-149
hungchiayang1
 
Ppt 138-142
Ppt 138-142Ppt 138-142
Ppt 138-142
hungchiayang1
 
Ppt 174-174
Ppt 174-174Ppt 174-174
Ppt 174-174
hungchiayang1
 
Ppt 1-25
Ppt 1-25Ppt 1-25
Ppt 1-25
hungchiayang1
 
Ppt 144-144
Ppt 144-144Ppt 144-144
Ppt 144-144
hungchiayang1
 
Ppt 167-173
Ppt 167-173Ppt 167-173
Ppt 167-173
hungchiayang1
 
Ppt 152-155
Ppt 152-155Ppt 152-155
Ppt 152-155
hungchiayang1
 
Ppt 156-156
Ppt 156-156Ppt 156-156
Ppt 156-156
hungchiayang1
 

More from hungchiayang1 (20)

Exercise 1 3
Exercise 1 3Exercise 1 3
Exercise 1 3
 
P127 135 new
P127 135 newP127 135 new
P127 135 new
 
Python p.193 197
Python p.193 197Python p.193 197
Python p.193 197
 
Python differential equation
Python differential equationPython differential equation
Python differential equation
 
化學系 python 習題
化學系 python 習題化學系 python 習題
化學系 python 習題
 
Ppt 120-126
Ppt 120-126Ppt 120-126
Ppt 120-126
 
Ppt 151-151
Ppt 151-151Ppt 151-151
Ppt 151-151
 
Ppt 136-136
Ppt 136-136Ppt 136-136
Ppt 136-136
 
Ppt 143-143
Ppt 143-143Ppt 143-143
Ppt 143-143
 
Ppt 137-137
Ppt 137-137Ppt 137-137
Ppt 137-137
 
Ppt 150-150
Ppt 150-150Ppt 150-150
Ppt 150-150
 
Ppt 26-50
Ppt 26-50Ppt 26-50
Ppt 26-50
 
Ppt 145-149
Ppt 145-149Ppt 145-149
Ppt 145-149
 
Ppt 138-142
Ppt 138-142Ppt 138-142
Ppt 138-142
 
Ppt 174-174
Ppt 174-174Ppt 174-174
Ppt 174-174
 
Ppt 1-25
Ppt 1-25Ppt 1-25
Ppt 1-25
 
Ppt 144-144
Ppt 144-144Ppt 144-144
Ppt 144-144
 
Ppt 167-173
Ppt 167-173Ppt 167-173
Ppt 167-173
 
Ppt 152-155
Ppt 152-155Ppt 152-155
Ppt 152-155
 
Ppt 156-156
Ppt 156-156Ppt 156-156
Ppt 156-156
 

Recently uploaded

Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 

Recently uploaded (20)

Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 

化學系 python 教學

  • 1. How to get a titration curve by using Python
  • 2. Strong acid-strong base titrations Example ▸ Considering the titration of 100 mL of 2 M HCl with 1 M NaOH and plotting the pH of the solution being analyzed as a function of the amount of titrant added. ○ equivalence point ○ x-axis values ○ y-axis values 2
  • 3. Python example (1) 3 import pylab a1 , b1 , a2 = 2 , 0.1 , 1 c , b2 = a1*b1 , a1*b1/a2 n , eps = 50 , 1.e-10 db = b2/n # NaOH added in mL bs1 = pylab.linspace(db,b2,n) bs2 = pylab.linspace(b2,2*b2,n) # compute pH as1 = -pylab.log10( (c - a2*bs1 + eps)/(b1 + bs2) ) as2 = 14 + pylab.log10( (a2*bs2 - c + eps)/(b1 + bs2) )
  • 4. Python example (2) 4 # plot figure # the curve before equivalence point pylab.plot(bs1,as1,color='r') # the curve near equivalence point pylab.plot([bs1[-1],bs2[1]],[as1[-1],as2[1]],color='r') # the curve after equivalence point pylab.plot(bs2[1:],as2[1:],color='r') # setup figure property pylab.title("The Titration Curve") pylab.xlabel("Vol of NaOH added (L)") pylab.ylabel("pH") pylab.grid() # display figure pylab.show()