酸碱中和滴定

酸碱中和滴定 preview image

1 collaborator

Default-person Ying Li (Author)

Tags

chemical reactions 

Tagged by YI LONG JIAN 10 months ago

Visible to everyone | Changeable by the author
Model was written in NetLogo 6.4.0 • Viewed 339 times • Downloaded 19 times • Run 0 times
Download the '酸碱中和滴定' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


WHAT IS IT?

This model demonstrates how chemists and biologists measure the pH of a solution. The value of pH, like many other chemical measurements, emerges from the interactions and relative ratios of the composite molecules within a solution.

HOW IT WORKS

Specifically, pH is a measurement of the amount of hydronium ions (H+ or H3O+) that are present in a solution. Hydronium ions are generated when an acid molecule donates a proton to a water molecule. Bases have the opposite effect on water -- they take a hydrogen from a water molecule and generate hydroxide ions (OH-). These two reactions are listed below. Note the balance of charge and conversion of atoms. H-A denotes a strong acid and B denotes a strong base.

H2O + H-A —> H3O+ + A- B + H2O —> OH- + H-B+

It is important to note that this model simulates a strong acid and a strong base interacting. Acids and bases that are classified as strong dissociate completely in water. That means that all the H-A is converted to hydronium ions and all of the B is protonated, so that concentration of the original acid is equal to the concentration of hydronium ion. pH meters are capable of detecting how many hydronium ions or hydroxide ions are present in a solution. The formula for measuring pH is listed below. One can also calculate the pOH in a similar manner. [] indicates concentration in MOLARITY.

pH = -log [H+] pOH = -log [OH-]

Hydronium ions and hydroxide ions are oppositely charged and react readily together. When they react, a hydrogen atom is transferred and two water molecules are generated in the process. Chemists often titrate acids and bases together to determine how stable the pH of a particular acid or base is. This experiment is done by taking a known amount of acid and adding various amounts of base to it. The titration curve is generated by plotting the pH against the volume of base added.

HOW TO USE IT

Decide how much acid should be present at the start of the simulation with the VOL-ACID slider and press SETUP. Turtles will be distributed randomly across the world. BLUE turtles represent water molecules and GREEN turtles represent hydronium ions. A set amount of water molecules is added each time to the solution.

Press GO. The turtles will move randomly across the world and the pH of the solution will be plotted over time and displayed in the pH monitor.

To observe the effect of adding base to the solution, set the volume of base to be added with the VOL-BASE slider and press ADD-BASE to add the red base molecules.

To perform a titration experiment, set the sliders to desired values and press GO. While the model is running, press ADD-BASE. This will add VOL-BASE to the acid in the world. Wait for the pH to stabilize as you would in a real experiment and then press RECORD-PH. A point is then plotted on the curve with each addition of base so that the user can observe how the value of pH is related to the amount of base added to the solution.

THINGS TO NOTICE

Observe the shape of the titration curve, especially where the slope approaches one. Can you explain this phenomenon?

What are the minimum and maximum values of pH in this model? Can you think of a way to alter their values?

Why are there no acid molecules in the simulation? Similarly, why aren't A and H-B shown in the model?

THINGS TO TRY

Plot a titration curve using various settings of VOL-BASE. How does this affect the titration curve? Is it more advisable to use large or small amounts of base? Should you use constant amounts of base?

Hit ADD-BASE a few times and observe the pH vs. time plot. Do you feel this is a useful plot for experiments? What does it tell you?

Can you alter the pH of the solution without adding base to the solution?

EXTENDING THE MODEL

The code currently generates two water molecules every time a hydronium and hydroxide molecule collide. Alter the code to generate behavior for hydroxide and water collision, according to the chemical equation above. How does this change the model?

What if only one water molecule were generated and the hydroxide molecule were destroyed when the two collided? How would this affect the pH?

Add a button to add more acid to the solution at any point in time, can you use it to adjust the pH to a target value?

NETLOGO FEATURES

Notice that in the calculate-pH procedure the model makes use of the count primitive and some math to convert the number of turtles in the world into concentrations like those seen in the laboratory.

CREDITS AND REFERENCES

Thanks to Mike Stieff for his work on this model.

HOW TO CITE

If you mention this model or the NetLogo software in a publication, we ask that you include the citations below.

For the model itself:

Please cite the NetLogo software as:

COPYRIGHT AND LICENSE

Copyright 2001 Uri Wilensky.

CC BY-NC-SA 3.0

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at uri@northwestern.edu.

This model was created as part of the projects: PARTICIPATORY SIMULATIONS: NETWORK-BASED DESIGN FOR SYSTEMS LEARNING IN CLASSROOMS and/or INTEGRATED SIMULATION AND MODELING ENVIRONMENT. The project gratefully acknowledges the support of the National Science Foundation (REPP & ROLE programs) -- grant numbers REC #9814682 and REC-0126227.

Comments and Questions

檔案解壓縮失敗

您好: 我對您製作的模型非常感興趣,想將其作為學生的上課教材。然而,我在嘗試下載您的檔案時,發現解壓縮總是失敗,不知道是否有其他解決方法或能否提供我一個可以正常解壓縮的版本? 非常感謝您的協助!

Posted 10 months ago

Click to Run Model

; Li Ying created this module at Shaanxi Normal University in 2024. If you mention this model in a publication, we ask that you include the citations below.
;Ying, L. (2024). Acid-Base Neutralization Titration. School of Chemistry and Chemical Engineering, Shaanxi Normal University.
breed [ waters water ]                ;; water molecules
breed [ hydroxides hydroxide ]        ;; base molecules
breed [ hydroniums hydronium ]        ;; acid molecules
breed [mode2_ch3coo_s mode2_ch3coo_]  ;;ch3coo_ molecules
breed [mode2_ch3coohs mode2_ch3cooh]  ;;ch3cooh molecules
breed [mode2_cl_s mode2_cl_]  ;;ch3coo_ molecules
breed [mode2_h_s mode2_h_]  ;;ch3cooh molecules
breed [mode2_na_s mode2_na_]  ;;ch3coo_ molecules
breed [mode2_oh_s mode2_oh_]  ;;ch3cooh molecules
breed [mode2_waters mode2_water]  ;;ch3cooh molecules

globals [
  base-added
  pH
  Strong_Co
  Weak_Co
  Base_Co
  Strong_PH
  Weak_PH
  Max_acid      ;;当前的酸
  Max_base      ;;当前最大的碱量
  Cur_base      ;;当前加到的碱量
  Limit_base    ;;最大计算的量,与图的x_MAX保持一致,现在为40
  drowing?
  cHAc_v
  cAc_v
  cNa+
  cCl-
  cH+
  cOH-
]

to setup
  clear-all

  ;一起
  if acid_switch = "together"[
    set Strong_Co 0.1
    set Weak_Co 0.1
  ]
  ;初始化强酸、弱酸、碱、初始加的碱浓度
  set base-added 0
  set Base_Co 0.1
  ;初始化最大酸量、当前碱量、最大碱量
  set Limit_base 40
  set Max_acid vol-acid
  set Cur_base 0
  set Max_base 0

  ;;设置画布颜色白色
  ask patches [
    set pcolor white
  ]

  set-default-shape mode2_ch3coo_s "mode2_ch3coo_"
  set-default-shape mode2_ch3coohs "mode2_ch3cooh"
  set-default-shape mode2_cl_s "mode2_cl_"
  set-default-shape mode2_h_s "mode2_h_"
  set-default-shape mode2_na_s "mode2_na_"
  set-default-shape mode2_oh_s "mode2_oh_"
  set-default-shape mode2_waters "mode2_water"

  ;画图
  set drowing? false
  ;强酸部分
  if acid_switch = "Strong acid" [
    output-print "    HCl+NaOH=NaCl+H2O   "
    set Strong_Co 0.1
    calculate-pH
    ;创建酸
    ;    create-mode2_cl_s (5 * vol-acid)
    ;    [
    ;      setxy random-xcor random-ycor
    ;      set color (yellow - 0.4)
    ;      set size 0.8
    ;    ]
    create-mode2_h_s (5 * vol-acid)
    [
      setxy random-xcor random-ycor
      set size 2
    ]
  ]
  ;弱酸部分
  if acid_switch = "Weak acid"[
    output-print "CH3COOH+NaOH=CH3COONa+H2O"
    set Weak_Co 0.1
    calculate-pH
    ;初始化创建弱酸画图醋酸分子
    create-mode2_ch3coohs ((ceiling (5 * vol-acid * calculate_Weak_acid_HAC_derta)))
    [
      setxy random-xcor random-ycor
      set size 2
    ]
    create-mode2_ch3coo_s ((ceiling (5 * vol-acid * calculate_Weak_acid_AC_derta)))
    [
      setxy random-xcor random-ycor
      set size 2
    ]
    create-mode2_h_s ((ceiling (5 * vol-acid * calculate_Weak_acid_AC_derta)))
    [
      setxy random-xcor random-ycor
      set size 2
    ]
  ]

  reset-ticks
end 

to go
  if ticks mod 1 = 0 [
    ;强酸部分动态图
    if acid_switch = "Strong acid" [
      react
      ask turtles
      [ fd 1                                        ;; move turtles around randomly
        rt random 360
        lt random 360 ]    ;; around the world
    ]
    ;弱酸部分动态图
    if acid_switch = "Weak acid"[
      HAC_resolve
      react
      ask turtles
      [ fd 1                                        ;; move turtles around randomly
        rt random 360
        lt random 360 ]    ;; around the world
    ]
  ]

  calculate-pH

  ;画图部分动态增加
  ifelse Cur_base < Limit_base [;40最大限制
    ifelse ((Cur_base * 100) / 100) < Max_base[;加碱量限制
      set drowing? true
      ifelse ((round (Cur_base * 100) / 100)  mod 1 = 0) [
        add_base_turtle 5
      ][]
      set Cur_base  (Cur_base + 0.05)
    ][ set drowing? false ]
  ][set drowing? false]

  if acid_switch = "Weak acid"[
    set cHAc_v  ( (precision ((10 ^ (- Weak_PH)) / ((10 ^ (- Weak_PH)) + 0.0000175)) 30 )* ( (  Max_acid  * Weak_Co ) / ( Cur_base + Max_acid ) ) )
    set cAc_v ( (precision (0.0000175 / ((10 ^ (- Weak_PH)) + 0.0000175)) 30 )* ( (  Max_acid  * Weak_Co ) / ( Cur_base + Max_acid ) ) )
    set cNa+ ( (  Cur_base  * Base_Co ) / ( Cur_base + Max_acid ) )
    set cH+ (10 ^(- Weak_PH))
    set cOH- ((10 ^(-14))/ cH+ )
  ]

if acid_switch = "Strong acid"[
    set cNa+ ( (  Cur_base  * Base_Co ) / ( Cur_base + Max_acid ) )
    set cCl- ( (  Max_acid  * Strong_Co ) / ( Cur_base + Max_acid ) )
    set cH+ (10 ^(- Strong_PH))
    set cOH- ((10 ^(-14))/ cH+ )
  ]
  tick
end 

;; adds hydroxide molecules to the solution

to add-base
  ifelse (Max_base + vol-base) <= Limit_base[
    set Max_base Max_base + vol-base
    set drowing? true
  ][set drowing? false]
end 

to add_base_turtle [number]
  if acid_switch = "Strong acid"[
  create-mode2_oh_s number
  [ set size 2
    fd 1 ]
  ]
  if acid_switch = "Weak acid"[
  create-mode2_oh_s number
  [ set size 1.5
    fd 1 ]
  ]
end 

;; hydroxide procedure

to react
  if acid_switch = "Strong acid"[
    if ( Strong_PH < 1.5) [
      ask mode2_h_s [
        let meeting-mode2_oh_s mode2_oh_s in-radius 2
        if count meeting-mode2_oh_s > 0 [
          ; 在半径2的范围内相遇时,创建新的mode2_waters turtle
          let turtles-here-mode2_h_s turtles with [breed = mode2_h_s]
          let turtles-here-mode2_oh_s turtles with [breed = mode2_oh_s]
          let turtle_mode2_h_s one-of turtles-here-mode2_h_s in-radius 2
          let turtle_mode2_oh_s one-of turtles-here-mode2_oh_s in-radius 2
          if turtle_mode2_h_s != nobody and turtle_mode2_oh_s != nobody [
            ask turtle_mode2_h_s [
              set breed mode2_waters
              set size 2
            ]
            ; 删除原来的mode2_oh_s turtle
            ask turtle_mode2_oh_s [
              die
            ]
          ]
        ]
      ]
    ]
    if ( Strong_PH > 1.5) and ( Strong_PH < 6 )[
      ask mode2_h_s [
        let meeting-mode2_oh_s mode2_oh_s in-radius 10
        if count meeting-mode2_oh_s > 0 [
          ; 在半径2的范围内相遇时,创建新的mode2_waters turtle
          let turtles-here-mode2_h_s turtles with [breed = mode2_h_s]
          let turtles-here-mode2_oh_s turtles with [breed = mode2_oh_s]
          let turtle_mode2_h_s one-of turtles-here-mode2_h_s in-radius 5
          let turtle_mode2_oh_s one-of turtles-here-mode2_oh_s in-radius 5
          if turtle_mode2_h_s != nobody and turtle_mode2_oh_s != nobody [
            ask turtle_mode2_h_s [
              set breed mode2_waters
              set size 2
            ]
            ; 删除原来的mode2_oh_s turtle
            ask turtle_mode2_oh_s [
              die
            ]
          ]
        ]
      ]
    ]
    if ( Strong_PH > 6) and ( Strong_PH <= 7)[
      ask mode2_oh_s [
        set breed mode2_waters
        set size 2
      ]
      ask mode2_h_s [
        die
      ]
    ]
  ]
  if acid_switch = "Weak acid"[
    if ( Weak_PH < 3) [
      ask mode2_h_s [
        let meeting-mode2_oh_s mode2_oh_s in-radius 2
        if count meeting-mode2_oh_s > 0 [
          ; 在半径2的范围内相遇时,创建新的mode2_waters turtle
          let turtles-here-mode2_h_s turtles with [breed = mode2_h_s]
          let turtles-here-mode2_oh_s turtles with [breed = mode2_oh_s]
          let turtle_mode2_h_s one-of turtles-here-mode2_h_s in-radius 2
          let turtle_mode2_oh_s one-of turtles-here-mode2_oh_s in-radius 2
          if turtle_mode2_h_s != nobody and turtle_mode2_oh_s != nobody [
            ask turtle_mode2_h_s [
              set breed mode2_waters
              set size 1.5
            ]
            ; 删除原来的mode2_oh_s turtle
            ask turtle_mode2_oh_s [
              die
            ]
          ]
        ]
      ]
    ]
    if ( Weak_PH > 3) and ( Weak_PH < 6 )[
      ask mode2_h_s [
        let meeting-mode2_oh_s mode2_oh_s in-radius 10
        if count meeting-mode2_oh_s > 0 [
          ; 在半径2的范围内相遇时,创建新的mode2_waters turtle
          let turtles-here-mode2_h_s turtles with [breed = mode2_h_s]
          let turtles-here-mode2_oh_s turtles with [breed = mode2_oh_s]
          let turtle_mode2_h_s one-of turtles-here-mode2_h_s in-radius 5
          let turtle_mode2_oh_s one-of turtles-here-mode2_oh_s in-radius 5
          if turtle_mode2_h_s != nobody and turtle_mode2_oh_s != nobody [
            ask turtle_mode2_h_s [
              set breed mode2_waters
              set size 1.5
            ]
            ; 删除原来的mode2_oh_s turtle
            ask turtle_mode2_oh_s [
              die
            ]
          ]
        ]
      ]
    ]
    if ( Weak_PH > 6) and ( Weak_PH <= 8.3)[
      ask mode2_oh_s [
        set breed mode2_waters
        set size 1.5
      ]
      ask mode2_h_s [
        die
      ]
    ]
  ]
end 

;; calculates the pH from the amount of the various ions in solution;
;; note that for simplicity the calculations don't take the true molar
;; concentration of water into account, but instead use an arbitrarily
;; chosen factor of 1000 to produce numbers lying in a reasonable range

to calculate-pH
  ;强酸部分
  if acid_switch != "Weak acid" [
    ifelse Cur_base = 0 [
      calculate_Strong_acid_ph_VBase0
    ][]
    ifelse (Cur_base > 0) and (Cur_base < Max_acid - 0.05)[
      calculate_Strong_acid_ph_VBase_less_Vacid
    ][]
    ifelse (Cur_base > 0) and (Cur_base >= Max_acid - 0.05) and (Cur_base <= Max_acid + 0.05) [
      calculate_Strong_acid_ph_VBase_equ_Vacid
    ][]
    ifelse (Cur_base > 0) and (Cur_base > Max_acid + 0.05)[
      calculate_Strong_acid_ph_VBase_greater_Vacid
    ][]
  ]
  ;弱酸部分
  if acid_switch != "Strong acid"[
    ifelse Cur_base = 0 [
      calculate_Weak_acid_ph_VBase0
    ][]
    ifelse (Cur_base > 0) and (Cur_base < 0.3 - 0.05)[
      calculate_Weak_acid_ph_03_VBase_less_Vacid
    ][]
    ifelse (Cur_base >= 0.3) and (Cur_base < Max_acid - 0.05)[
      calculate_Weak_acid_ph_VBase_less_Vacid
    ][]
    ifelse (Cur_base >= 0.3) and (Cur_base >= Max_acid - 0.05) and (Cur_base <= Max_acid + 0.05)[
      calculate_Weak_acid_ph_VBase_equ_Vacid
    ][]
    ifelse (Cur_base >= 0.3) and (Cur_base > Max_acid + 0.05)[
      calculate_Weak_acid_ph_VBase_greater_Vacid
    ][]
  ]

  if acid_switch != "together" [
  if (Cur_base > (Max_acid + 0.04)) and (Cur_base < (Max_acid + 1))[
    ask patches [
      set pcolor pink + 4.7
    ]
  ]
  if (Cur_base > (Max_acid + 1.04)) and (Cur_base < (Max_acid + 1.04 + 1))[
    ask patches [
      set pcolor pink + 4.7 - 0.2
    ]
  ]
  if (Cur_base > (Max_acid + 2.04)) and (Cur_base < (Max_acid + 2.04 + 1))[
    ask patches [
      set pcolor pink + 4.7 - 0.4
    ]
  ]
  if (Cur_base > (Max_acid + 3.04)) and (Cur_base < (Max_acid + 3.04 + 1))[
    ask patches [
      set pcolor pink + 4.7 - 0.6
    ]
  ]
  if (Cur_base > (Max_acid + 4.04)) and (Cur_base < (Max_acid + 4.04 + 1))[
    ask patches [
      set pcolor pink + 4.7 - 0.8
    ]
  ]
  if (Cur_base > (Max_acid + 5.04)) and (Cur_base < (Max_acid + 5.04 + 1))[
    ask patches [
      set pcolor pink + 4.7 - 1
    ]
  ]
    ]
end 


;;强酸计算:初始

to calculate_Strong_acid_ph_VBase0
  set Strong_PH (- (ln (Strong_Co) / ln 10))
end 

;;弱酸计算:初始

to calculate_Weak_acid_ph_VBase0
  set Weak_PH (- (ln ((sqrt (0.0000175 * 0.0000175 + 4 * 0.0000175 * Weak_Co ) - 0.0000175) / 2)/ ln 10))
end 

;;强酸计算:Vbase < Vacid

to calculate_Strong_acid_ph_VBase_less_Vacid
  set Strong_PH  (- (ln( (((Max_acid - Cur_base) * Strong_Co) / (Max_acid + Cur_base))) / ln 10))
end 

;;弱酸计算:Vbase < Vacid 且 Vbase < 0.3

to calculate_Weak_acid_ph_03_VBase_less_Vacid
  set Weak_PH (- (ln ((sqrt (0.0000175 * 0.0000175 + 4 * 0.0000175 * ((Weak_Co * Max_acid) / (Max_acid + Cur_base))) - 0.0000175) / 2)/ ln 10))
end 

;;弱酸计算:Vbase < Vacid

to calculate_Weak_acid_ph_VBase_less_Vacid
  set Weak_PH  (-(ln(0.0000175) / ln 10 ) + (ln ( Cur_base / ( Max_acid - Cur_base ) ) / ln 10))
end 

;;强酸计算:Vbase = Vacid

to calculate_Strong_acid_ph_VBase_equ_Vacid
  set Strong_PH 7
end 

;;弱酸计算:Vbase = Vacid

to calculate_Weak_acid_ph_VBase_equ_Vacid
  set Weak_PH  (14 + (ln ((sqrt ((0.0000000005714 * 0.0000000005714) + 4 * 0.0000000005714 * ((Weak_Co * Max_acid) / (Max_acid + Cur_base))) - 0.0000000005714) / 2 ) / ln 10))
end 

;;强酸计算:Vbase > Vacid

to calculate_Strong_acid_ph_VBase_greater_Vacid
  set Strong_PH (14 + (ln ( ( ( Cur_base - Max_acid ) * Base_Co ) / ( Cur_base + Max_acid ) ) / ln 10))
end 

;;弱酸计算:Vbase > Vacid

to calculate_Weak_acid_ph_VBase_greater_Vacid
  set Weak_PH (14 + (ln ( ( ( Cur_base - Max_acid ) * Base_Co ) / ( Cur_base + Max_acid ) ) / ln 10))
end 

;;弱酸画图所需的HAC分布系数

to-report calculate_Weak_acid_HAC_derta
  report precision  ((10 ^ (- Weak_PH)) / ((10 ^ (- Weak_PH)) + 0.0000175)) 2
end 

;;弱酸画图所需的AC分布系数

to-report calculate_Weak_acid_AC_derta
  report precision  (0.0000175 / ((10 ^ (- Weak_PH)) + 0.0000175)) 2
end 

;依据分布系数更新醋酸的量使其变成醋酸分子和氢

to HAC_resolve
  ;依据分布系数计算HAC数量
  let number (ceiling (5 * vol-acid * calculate_Weak_acid_HAC_derta))
  let cur_number count mode2_ch3coohs
  if number < cur_number[
    let resolve_number (cur_number - number)
    ask n-of resolve_number mode2_ch3coohs [
      set breed mode2_ch3coo_s
      set size 2
    ]
    create-mode2_h_s (resolve_number)
    [
      set size 2
    ]
  ]
end 

There is only one version of this model, created over 1 year ago by Ying Li.

Attached files

File Type Description Last updated
酸碱中和滴定.png preview Preview for '酸碱中和滴定' over 1 year ago, by Ying Li Download

This model does not have any ancestors.

This model does not have any descendants.