Titration of base with a strong acid

Titration of base with a strong acid preview image

1 collaborator

Screen_shot_2018-02-02_at_12.53.50_pm lin xiang (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by the author
Model was written in NetLogo 6.2.2 • Viewed 110 times • Downloaded 18 times • Run 0 times
Download the 'Titration of base with a strong acid' 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 presents the differences in titrating a strong base (NaOH) and a weak base (Ammonia). Students are able to observe the changes in pH when titrating a strong/weak base with a HCl solution. Students may also change the concentrations of bases and the titrant and then observe the corresponding results.

HOW IT WORKS

The pH of the solution is calculated based on the equation: C1V1=C2V2.

This model can be used to address a range of misconceptions about pH, titration, and dissociation.

Both the molarities of the conjugate acid and titrant are used to calculate pH at the beginning of the titration (titration volume < approx 10 ml). Then, only the titrant's molarity is used to calculate pH.

HOW TO USE IT

How to use:

  1. Choose a base
  2. Set the base concentration
  3. Set HCi concentration
  4. Set dose of HCl added per tick
  5. Set the total amount of HCl added
  6. Click "Set up"
  7. Click "Titration"
  8. Observe outpts in the monitors and plots.

Note: -Don't change HCl's concentration and dose during titration. -Use switches to hide some molecules or ions to help observations.

THINGS TO NOTICE

  • Dissociation of the strong base and weak base.
  • The pH changes in the titration processes of the strong base and weak base.
  • The equivalent points of the titration of the strong base and weak base.

THINGS TO TRY

  • Choose different bases
  • Adjust base and/or titrant concentration
  • Adjust the titratant does
  • Hide some ions to help observations

RELATED MODELS

See more chemistry models at https://sites.google.com/view/3d-science-abm/physics-chemistry

CREDITS AND REFERENCES

Dr. Lin Xiang created this module at the University of Kentucky in 2022. If you mention this model in a publication, we ask that you include the citations below.

Xiang, L. (2022). Titration of base with a strong acid. Department of STEM Education, University of Kentucky, Lexington, KY.

CC BY-NC-SA 4.0

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 License. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/4.0/.

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

breed [Bs B]
breed [BHs BH]
breed [OHs OH]
breed [H3OS H30]
breed [legends legend]

turtles-own[ ]
globals [
  mode
  kb
  ka
  Num-H Num-OH num-B num-BH
  vol-1 vol-titrant
  current-conc-H
  current-conc-OH
  current-conc-B
  current-conc-BH
  current-ph
  current-pOH
  M-H
  M-T
  M-OH
  M-BH
  M-B
  M-B-1
  unit-num-b
   ]

to setup
  ca

  set-bk
  set-legends
  (ifelse
    Choose-a-base = "Sodium hydroxide" [set mode 1 set-NaOH]
    Choose-a-base = "Ammonia" [set mode 2 set-NH3])


  plot-ion-concentrations-log
  reset-ticks
end 

to set-bk
  ask patches [set pcolor 91.5 + random-float 0.5]
  ask patches with [ pycor = max-pycor or pycor < 4] [set pcolor 101]
  ask patches with [ pxcor = min-pxcor or pxcor = max-pxcor] [set pcolor 101]
end 

to set-NaOH
  set-default-shape ohs "ab-oh-1"
  set-default-shape h3os "ab-h3o-1"
  set-default-shape bs "ab-b-1"
  set-default-shape bhs "ab-b-2"

  set vol-1 Base-volume
  set vol-titrant 0
  set current-conc-OH Base-concentration
  set current-ph 14 - (-1 * (log current-conc-OH 10))
  set M-OH Base-concentration * vol-1 * 0.001   ;determine the mole of hydroxide
  set M-B M-OH
  set M-BH M-OH
  set current-conc-BH (M-BH / (vol-1 * 0.001))  ;determine initial conjugate acid concentration
  set current-conc-B 0                       ;there is no base molecule
  set current-Conc-H 10 ^ (-14) / current-conc-OH          ;calculate the concentration of H+
  set M-H current-Conc-H * vol-1 * 0.001                 ;calculate exisitng mole of H+

  set num-H round (1000 * (1.3895 ^ (-1 * current-ph)))     ;find the amount of visual H+
  set num-OH round (10000 / (num-H))                        ;find the amount of visual OH-

  if Hide-base-molecule-and-conjugate-acid? = false
   [create-BHs num-OH [set-tt-properties set size 1.25 set color 62]]

  if Hide-hydronium-and-hydroxide? = false
  [set num-H round (1000 * (1.3895 ^ (-1 * current-ph)))     ;find the amount of visual H+
   set num-OH round (10000 / (num-H))                        ;find the amount of visual OH-
   create-h3os num-H [set-tt-properties set size 1.25 ]
   create-ohs num-OH [set-tt-properties set size 1.25 set color 85]]
end 

to set-NH3
  set-default-shape ohs "ab-oh-1"
  set-default-shape h3os "ab-h3o-1"
  set-default-shape Bs "ab-b-1"
  set-default-shape BHs "ab-b-2"

  set kb 1.8 * (10 ^ -5)
  set vol-1 Base-volume
  set vol-titrant 0
  set current-conc-OH (-0.5 * (kb - sqrt (kb * kb + 4 * kb * Base-concentration)))
  set current-ph 14 - (-1 * (log current-conc-OH 10))
  set M-B Base-concentration * vol-1 * 0.001   ;determine the mole of base
  set M-OH current-conc-OH * vol-1 * 0.001   ;determine the mole of OH-
  set M-BH M-OH
  set current-conc-B ((M-B - M-OH) / (vol-1 * 0.001))  ;determine initial base concentration
  set current-conc-BH (M-BH / (vol-1 * 0.001))  ;determine initial conjugate acid concentration

  if Hide-base-molecule-and-conjugate-acid? = false
  [set num-B round (2500 * sqrt (sqrt (M-B)))
   set num-BH round (100 * sqrt (sqrt (M-BH)))
   create-Bs num-B [set-tt-properties set size 1.25 set color 42]
   create-BHs num-BH[set-tt-properties set size 1.25 set color 62]
   set unit-num-b (M-b / num-b)]

  if Hide-hydronium-and-hydroxide? = false
  [set num-H round (1000 * (1.3895 ^ (-1 * current-ph)))     ;find the amount of visual H+
   set num-OH round (10000 / (num-H))                        ;find the amount of visual OH-
   create-h3os num-H [set-tt-properties set size 1.25 ]
   create-ohs num-OH [set-tt-properties set size 1.25 set color 85]]
end 

to set-tt-properties
   setxy 1 + random-float (max-pxcor - 2) 4 + random-float (max-pycor - 5)
end 

to set-legends
 create-legends 8

 ask legend 0
  [set shape "ab-h3o-1"
    set size 1.75
    setxy 1.5 2]

  ask legend 1
  [set shape "blank"
    set size 1.5
    set label "Hydronium (H3O+)"
    set label-color white
    setxy 8.5 1.2]

  ask legend 2
   [set shape "ab-OH-1"
    set size 1.75
    set color 85
    setxy 12 2]

  ask legend 3
  [set shape "blank"
    set size 1.5
    set label "Hydroxide (OH-)"
    set label-color white
    setxy 18 1.2]

  ask legend 4
   [set shape "ab-b-1"
    set size 1.75
    set color 42.5
    setxy 22.5 2]

  ask legend 5
  [set shape "blank"
    set size 1.5
    set label "Base molecule"
    set label-color white
    setxy 27 1.2]

  ask legend 6
   [set shape "ab-b-2"
    set size 1.75
    set color 62.5
    setxy 32 2]

  ask legend 7
  [set shape "blank"
    set size 1.5
    set label "Conjugate acid"
    set label-color white
    setxy 37.5 1.2]
end 

to go
if vol-titrant >= (Total-mL-of-HCl-added - 0.05) [user-message "Have added the specified amount of titrant." stop]

  move

  (ifelse
    Choose-a-base = "Sodium hydroxide" [if mode = 2 [setup] titration-NaOH]
    Choose-a-base = "Ammonia" [if mode = 1 [setup] titration-NH3])


  (ifelse
    Hide-base-molecule-and-conjugate-acid? = true and count BHs > 0
      [if any? BHs [ask BHs [die]] if any? Bs [ask Bs [die]]]
    Hide-base-molecule-and-conjugate-acid? = false and count BHs > 0
    [if Choose-a-base = "Ammonia" [dissociation]]
    Hide-base-molecule-and-conjugate-acid? = false and count BHs <= 0
    [ifelse Choose-a-base = "Ammonia"
      [set M-B-1 (current-conc-B * vol-1 * 0.001)
        let num-B-to-be round (M-B-1 / unit-num-b)
        create-bs num-b-to-be [set-tt-properties set size 1.25 set color 42]
        create-BHs (num-b - num-b-to-be + num-BH)[set-tt-properties set size 1.25 set color 62]]
      [create-BHs round (1000 * (1.3895 ^ (-1 * Base-concentration))) [set-tt-properties set size 1.25 set color 62]]])

   (ifelse
    Hide-hydronium-and-hydroxide? = true and count OHs > 0
    [ask h3os [die] ask ohs [die]]
    Hide-hydronium-and-hydroxide? = false and count ohs > 0
    [acid-base-equilibrium]
    Hide-hydronium-and-hydroxide? = false and count ohs <= 0
    [set num-H round (1000 * (1.3895 ^ (-1 * current-pH)))
     set num-OH round (10000 / (num-H))
     create-h3os num-H [set-tt-properties set size 1.25 ]
      create-ohs num-OH [set-tt-properties set size 1.25 set color 85]])


  plot-ion-concentrations-log

  tick
end 

to move
  ask turtles with [breed != legends]    ;ask non-legend turtles
  [rt random 360                            ;rotate
    if [pcolor] of patch-at dx dy <= 92 and [pcolor] of patch-at dx dy >= 91.5    ;if the patch-ahead has the proper color
      [fd 0.5                                                                      ;move forward
       if ycor < 4 [set ycor 4]                                                   ;if ycor is low, put ycor higher
  ]]
end 

to acid-base-equilibrium

  set num-H round (1000 * (1.3895 ^ (-1 * current-pH)))
  set num-OH round (10000 / (num-H))

  let current-H count H3Os
  let current-OH count OHs

  (ifelse
    (num-H) > current-H
     [create-h3os abs ((num-H) - current-H) [set-tt-properties set size 1.25]]
    (num-H) < current-H
    [ask n-of abs ((num-H) - current-H) h3os [die]])

   (ifelse
    (num-OH) > current-OH
    [create-ohs abs ((num-OH) - current-OH) [set-tt-properties set size 1.25 set color 85]]
    (num-OH) < current-OH
    [ask n-of abs ((num-OH) - current-OH) OHs [die]])
end 

to dissociation
  set M-B-1 (current-conc-b * vol-1 * 0.001)
  let num-b-to-be round (M-b-1 / unit-num-b)
  let current-num-b count bs

  if current-num-b > num-b-to-be
   [if any? bs
      [ask up-to-n-of (current-num-b - num-b-to-be) bs [set breed bhs set color 62]]]

  let T-of-tick HCl-concentration * 0.001 * HCl-dose   ;calculate the added mole of H+ in this tick
  if M-B - M-T <= -0.5 * t-of-tick
    [if any? bs [ask bs [set breed bhs set color 62]]]
end 

to titration-NaOH
     set current-Conc-H 10 ^ (-14) / current-conc-OH      ;calculate the concentration of H+
     set M-H current-Conc-H * (vol-1) * 0.001             ;calculate exisitng mole of H+
     set vol-titrant vol-titrant + HCl-dose               ;increase Titrant volume
     set vol-1 vol-1 + HCl-dose                           ;increase total volume
     let T-of-tick HCl-concentration * 0.001 * HCl-dose   ;calculate the added mole of H+ in this tick
     set M-T (M-T + t-of-tick)                                ;update total mole of titant

    (ifelse
       current-conc-OH >= 10 ^ (-7)                         ;if base + acid
        [(ifelse
          M-B > M-T                                          ;if more OH- than H+
          [set current-conc-OH (M-B - M-T) / (vol-1 * 0.001)              ;calculate the concentration of OH-
           set current-conc-BH (M-B / (vol-1 * 0.001))                    ;update BH concentration
           ifelse current-conc-OH > 10 ^ (-6)
            [set current-ph (14 - (- log current-conc-OH 10))]                   ;calculate the ph
            [set current-conc-OH (10 ^ (-7) + current-conc-OH)          ;consider water self-ionizaiton
             set current-ph (14 - (- log current-conc-OH 10))]]                 ; find current pH

          M-B < M-T
          [set M-H (M-T - M-B)                              ;if more H+ than OH-,calculate left mole of H+
           set current-conc-H M-H / (vol-1 * 0.001)             ;calculate the concentration of OH-
           set current-conc-BH (M-B / (vol-1 * 0.001))                    ;update BH concentration
           ifelse current-conc-H > 10 ^ (-6)
            [set current-ph (- log current-conc-H 10)]       ;calculate the concentration of H+
            [set current-conc-H ((10 ^ (-7) + current-conc-H))  ;consider water self-ionizaiton
             set current-ph (- log current-conc-H 10)]]         ;calculate the concentration of H+

          M-B = M-T
          [set current-conc-BH (M-B / (vol-1 * 0.001))                    ;update BH concentration
           set current-conc-H 10 ^ (-7) set current-ph (- log current-conc-H 10)])
        ]

       current-conc-OH < 10 ^ (-7)                                 ;if acid + acid
        [set current-conc-BH (M-B / (vol-1 * 0.001))                    ;update BH concentration
         let total-H (M-H + T-of-tick)                                ;calculate the total mole of H+
         set current-conc-H total-H / (vol-1 * 0.001)           ;calculate the concentration of OH-
        set current-ph (- log current-conc-H 10)])               ;Find ph
end 

to titration-NH3
     set vol-titrant vol-titrant + HCl-dose               ;increase Titrant volume
     set vol-1 vol-1 + HCl-dose                           ;increase total volume
     let T-of-tick HCl-concentration * 0.001 * HCl-dose   ;calculate the added mole of OH- in this tick
     set M-T (M-T + t-of-tick)                                ;update total mole of titant


 (ifelse
      (M-B - M-T)  >= T-of-tick * 0.5                                     ;if more base (half tick mole) than H+, i.e., before the equivalent point
      [set current-conc-B (M-B - M-T) / (vol-1 * 0.001)             ;update base concentration
      ifelse  ((M-BH + M-T) / (vol-1 * 0.001)) -  (M-T / (vol-1 * 0.001)) > 0.001     ;update BH concentration. consider the initial BH concentration
        [set current-conc-BH ((M-BH + M-T) / (vol-1 * 0.001))]
        [set current-conc-BH (M-T / (vol-1 * 0.001))]
       set current-conc-OH (kb * current-conc-B / current-conc-BH)  ;find current OH- concentration
       set current-ph (14 - (- log current-conc-OH 10))]                 ; find current pH

      M-B - M-T < T-of-tick * 0.5  and  M-B - M-T > -0.5 * T-of-tick                    ;if at the equivalent point
      [set current-conc-BH ((Base-concentration * Base-volume * 0.001) / (vol-1 * 0.001))  ;update A- concentration
       set ka (10 ^ (-14) / kb)
       set current-conc-H (-0.5 * (ka - sqrt (ka * ka + 4 * ka * current-conc-BH)))  ;find H+ concentration using Ka
       set current-pH (- log current-conc-H 10)                                      ;find current ph using pH
       set current-conc-b current-conc-h]                                    ;update Base molecule concentration

      M-B - M-T <= -0.5 * T-of-tick                                          ; if after the equivalent point
      [set current-conc-b 0                                              ;update Base molecule concentration
       set current-conc-BH ((Base-concentration * Base-volume * 0.001) / (vol-1 * 0.001))   ;update BH concentration
       set current-conc-H ((M-T - M-B) / (vol-1 * 0.001))                ; find H+ concentration
       set current-ph (- log current-conc-H 10)])                        ;find current ph using pOH
end 

to plot-ion-concentrations-log ;; this creates the bar graph

    set-current-plot "Base/Conjugate acid Concentrations"
    clear-plot
    set-plot-x-range 0 1
    set-plot-y-range 0 0.1
    plot-pen-down
    set-current-plot-pen "Base"
    plotxy 0 current-conc-B
    set-current-plot-pen "Conjugate acid"
    plotxy 1 current-conc-BH
end 

There are 4 versions of this model.

Uploaded by When Description Download
lin xiang about 2 years ago Fix info typos Download this version
lin xiang about 2 years ago Fix plotting bugs Download this version
lin xiang about 2 years ago Minor adjustment Download this version
lin xiang about 2 years ago Initial upload Download this version

Attached files

File Type Description Last updated
Titration of base with a strong acid.png preview Preview for 'Titration of base with a strong acid' about 2 years ago, by lin xiang Download

This model does not have any ancestors.

This model does not have any descendants.