The pH of Solution

The pH of Solution preview image

1 collaborator

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

Tags

acid and base 

Tagged by lin xiang about 2 years ago

chemical reactions 

Tagged by lin xiang about 2 years ago

chemistry;[ 

Tagged by lin xiang about 2 years ago

Visible to everyone | Changeable by the author
Model was written in NetLogo 6.2.2 • Viewed 179 times • Downloaded 28 times • Run 0 times
Download the 'The pH of Solution' modelDownload this modelEmbed this model

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


Info tab cannot be displayed because of an encoding error

Comments and Questions

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

Click to Run Model

;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). The pH of Solution. Department of STEM Education, University of Kentucky, Lexington, KY.
;![CC BY-NC-SA 4.0](http://ccl.northwestern.edu/images/creativecommons/byncsa.png)
;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/.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

breed [OHs OH]
breed [H3OS H30]
breed [legends legend]

turtles-own[ ]
globals [Num-H Num-OH]

to setup
  ca
  set-bk
  set-legends
  set-item-pH
  set-tt
  plot-ion-concentrations
  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-tt
  set-default-shape ohs "ab-oh-1"
  set-default-shape h3os "ab-h3o-1"


  set num-H round (1000 * (1.3895 ^ (-1 * pH)))
  set num-OH round (1000 * (1.3895 ^ (-1 * (14 - pH))))



  create-h3os num-H [set-tt-properties ]
  create-ohs num-OH [set-tt-properties ]
end 

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

to set-legends
 create-legends 4

 ask legend 0
   [set shape "ab-oh-1"
    set size 1.75
    setxy 14 2]

  ask legend 1
  [set shape "blank"
    set size 1.5
    set label "hydroxide(OH-)"
    set label-color white
    setxy 16.8 1.2]

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

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

to go
  set Choose-an-item "None" clear-output
  move
  ionization
  plot-ion-concentrations
  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 < 5 [set ycor 5]                                                   ;if ycor is low, put ycor higher
  ]]
end 

to ionization

  set num-H round (1000 * (1.3895 ^ (-1 * pH)))
  set num-OH round (1000 * (1.3895 ^ (-1 * (14 - pH))))

  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 color 82.5]]
    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 color 82.5]]
    num-OH < current-OH
    [ask n-of abs (num-OH - current-OH) OHs [die]])
end 

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

    set-current-plot "Ion Concentrations"
    clear-plot
    set-plot-x-range 0 1
    set-plot-y-range 0 0.01
    plot-pen-down
    set-current-plot-pen "Hydronium (H3O)"
    plotxy 0 10 ^ (-1 * ph)
    set-current-plot-pen "Hydroxide (OH)"
    plotxy 1 10 ^ (-1 * (14 - ph))
end 

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

    set-current-plot "Negative log of Ion Concentrations"
    clear-plot
    set-plot-x-range 0 1
    set-plot-y-range 0 14
    plot-pen-down
    set-current-plot-pen "pH"
    plotxy 0 ph
    set-current-plot-pen "pOH"
    plotxy 1 (14 - ph)
end 

to set-item-pH
(ifelse
Choose-an-item = "None"
    [set ph ph
      output-print "Use the model in two ways:"
      output-print ""
      output-print "1. Select an item from the list, then"
      output-print ""
      output-print "click the set up button to view"
      output-print ""
      output-print "the concentrations of H3O+ and OH-."
      output-print ""
      output-print "2. Run the model and change the ph"
      output-print ""
      output-print "slider to view the general relative"
      output-print ""
      output-print "concentrations of H3O+ and OH-."

    ]
Choose-an-item = "Hydrochloric Acid(1M)"
    [
      set ph 0
      output-print "Hydrochloric acid (HCl) is the "   ;cite from https://www.chemicalsafetyfacts.org/chemicals/hydrochloric-acid/
      output-print ""
      output-print "aqueous solution of hydrogen "
      output-print ""
      output-print "chloride gas and the main component"
      output-print ""
      output-print "of gastric acid, an acid produced "
      output-print ""
      output-print "naturally in the human stomach to "
      output-print ""
      output-print "help digest food. Hydrochloric acid "
      output-print ""
      output-print "is synthetically produced for a "
      output-print ""
      output-print "variety of industrial and commercial "
      output-print ""
      output-print "applications. HCl is corrosive."
      output-print ""
      output-print "Personal protective equipment"
      output-print ""
      output-print "such as vapor respirators,"
      output-print ""
      output-print "rubber gloves, splash goggles and"
      output-print ""
      output-print "and face shields when handling HCl."
      output-print ""
      output-print "  --Chemistrysafetyfacts.org"
    ]

Choose-an-item = "Battary acid"
    [
      set ph 0.8
      output-print "Battery acid is the acid used in"   ;cite from https://www.chemicals.co.uk/blog/what-is-battery-acid
      output-print ""
      output-print "rechargeable lead-acid batteries,"
      output-print ""
      output-print "like the ones used in cars."
      output-print ""
      output-print "Battery acid is made of sulphuric"
      output-print ""
      output-print "acid that has been deluted to a"
      output-print ""
      output-print "concentration of about 30-50%."
      output-print ""
      output-print "In this context, battery acid has "
      output-print ""
      output-print "an acidic pH of 0.8, which is highly"
      output-print ""
      output-print "corrosive. Therefore,it needs to be"
      output-print ""
      output-print "handled with caution."
      output-print ""
      output-print "--www.chemicals.co.uk/blog/what-"
      output-print ""
      output-print "is-battery-acid"
    ]

Choose-an-item = "Stomach acid"
    [set ph 1.5
      output-print "Stomach acid, or gastric acid, is"   ;cite from https://www.healthline.com/health/how-strong-is-stomach-acid
      output-print ""
      output-print "produced by our stomach's lining."
      output-print ""
      output-print "Stomach acid has a pH between 1"
      output-print ""
      output-print "and 2. This very acidic liquid"
      output-print ""
      output-print "helps break down food for earlier"
      output-print ""
      output-print "digestion. It also helps defend"
      output-print ""
      output-print "against pathogens and microbes"
      output-print ""
      output-print "that could make us sick."
      output-print ""
      output-print "Stomach acid’s low pH level is"
      output-print ""
      output-print "largely due to hydrochloric acid."
      output-print ""
      output-print ""
      output-print "--www.healthline.com/health/how-"
      output-print ""
      output-print "strong-is-stomach-acid"
    ]

Choose-an-item = "Lemon juice"
    [set ph 2
      output-print "Lemon juice in its natural state"  ;cite from https://www.thoughtco.com/the-ph-of-lemon-juice-608890
      output-print ""
      output-print "has a pH ranging from 2 to 3,"
      output-print ""
      output-print "because lemons contain citric"
      output-print ""
      output-print "acid and ascorbic acid, also"
      output-print ""
      output-print "known as vitamin C."
      output-print ""
      output-print "Lemons are not only acidic but"
      output-print ""
      output-print "also contain a surprisingly high"
      output-print ""
      output-print "amount of natural sugars, so"
      output-print ""
      output-print "dentists typically caution"
      output-print ""
      output-print "patients about eating them"
      output-print ""
      output-print "as biting into lemons can "
      output-print ""
      output-print "damage tooth enamel."
      output-print ""
       output-print ""
      output-print "--www.thoughtco.com/the-ph-of-"
      output-print ""
      output-print "lemon-juice-608890"
    ]

Choose-an-item = "Vinegar"
    [set ph 2.5
      output-print "Vinegar’s pH level varies based"       ;cite from https://www.healthline.com/health/ph-of-vinegar
      output-print ""
      output-print "upon the type of vinegar it is."
      output-print ""
      output-print "White distilled vinegar, the"
      output-print ""
      output-print "kind best suited for household"
      output-print ""
      output-print "cleaning, typically has a pH"
      output-print ""
      output-print "of around 2.5. Through a two-part"
      output-print ""
      output-print "fermentation process, yeast and"
      output-print ""
      output-print "bacteria are used to turn the"
      output-print ""
      output-print "sugar into ethanol (ethyl alcohol),"
      output-print ""
      output-print "which is then processed into"
      output-print ""
      output-print "acetic acid. It is the acetic acid"
      output-print ""
      output-print "in vinegar that makes it acidic."
      output-print ""
       output-print ""
      output-print "--www.healthline.com/health/"
      output-print ""
      output-print "ph-of-vinegar"
    ]

Choose-an-item = "Coke and Pepsi"
    [set ph 2.5
      output-print "Coke and Pepsi have a pH of 2.5,"       ;cite from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4808596/
      output-print ""
      output-print "which is mainly due to the"
      output-print ""
      output-print "phosphoric acid is added to cola "
      output-print ""
      output-print "drinks to impart tartness, reduce"
      output-print ""
      output-print "growth of bacteria and fungi,"
      output-print ""
      output-print "and improve shelf-life. "
      output-print ""
      output-print "The acidities of Coke and Pepsi"
      output-print ""
      output-print "are comparable to white vinegar."
      output-print ""
       output-print ""
      output-print "--www.ncbi.nlm.nih.gov/pmc/articles"
      output-print ""
      output-print "/PMC4808596/"
    ]

Choose-an-item = "Tomato"
    [set ph 4.3
      output-print "Tomatoes are acidic in nature."           ; cite from https://techiescientist.com/ph-of-tomato/
      output-print ""
      output-print "The pH of fresh tomatoes is in"
      output-print ""
      output-print "the range of 4.3 – 4.9. Different"
      output-print ""
      output-print "forms of tomato products will"
      output-print ""
      output-print "have different pH because of the"
      output-print ""
      output-print "additives added as well as the"
      output-print ""
      output-print "cooking process. The pH for canned"
      output-print ""
      output-print "tomatoes, in the range of 3.5-4.7,"
      output-print ""
      output-print "is lower as compared to the fresh"
      output-print ""
      output-print "tomato because of the preservation"
      output-print ""
      output-print "agent added to make increase its"
      output-print ""
      output-print "shelf life. For tomato puree and"
      output-print ""
      output-print "juice, the pH ranges between 4.1-4.6."
      output-print ""
      output-print ""
      output-print "--Techiescientist.com/ph-of-tomato/"
    ]

Choose-an-item = "Acid rain"
    [set ph 4.3
      output-print "Acid rain is caused by the release"            ; Cite from https://www.des.nh.gov/sites/g/files/ehbemt341/files/documents/2020-01/bb-8.pdf
      output-print ""
      output-print "of sulfur dioxide and nitrogen "
      output-print ""
      output-print "oxides into the atmosphere, where "
      output-print ""
      output-print "they react with water, oxygen, and "
      output-print ""
      output-print "other chemicals to become sulfuric"
      output-print ""
      output-print "and nitric acid respectively. The pH"
      output-print ""
      output-print "and acid rain is generally below 4.5."
      output-print ""
      output-print "Acid rain can be formed by natural"
      output-print ""
      output-print "causes, such as volcanic eruptions."
      output-print ""
      output-print "More commonly,however, acid rain is"
      output-print ""
      output-print "due to human activities. Burning"
      output-print ""
      output-print "fossil fuels, manufacturing, oil"
      output-print ""
      output-print "refineries, electricity generation,"
      output-print ""
      output-print "and vehicles all release sulfur and"
      output-print ""
      output-print "nitrogen oxides into the atmosphere."
      output-print ""
      output-print ""
      output-print "--www.des.nh.gov"
    ]

Choose-an-item = "Black coffee"
    [set ph 5
      output-print "The pH values of the cold and hot"                    ;cite from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6207714/
      output-print ""
      output-print "brew samples were found to range"
      output-print ""
      output-print "from 4.85 to 5.13."
      output-print ""
      output-print "The brewing process releases acids"
      output-print ""
      output-print "from coffee beans, giving coffee a"
      output-print ""
      output-print "acidic pH."
      output-print ""
      output-print ""
      output-print "--www.ncbi.nlm.nih.gov/pmc/articles"
      output-print ""
      output-print "/PMC6207714/"
    ]

Choose-an-item = "Clean rain"
    [set ph 5.6
      output-print "Uncontaminated precipitation is"      ; Cite from https://www.des.nh.gov/sites/g/files/ehbemt341/files/documents/2020-01/bb-8.pdf
      output-print ""
      output-print "naturally acidic. Water contains"
      output-print ""
      output-print "atmospheric gases as well as"
      output-print ""
      output-print "carbon dioxide, and when the"
      output-print ""
      output-print "carbon dioxide dissolves it forms"
      output-print ""
      output-print "carbonic acid, which makes the"
      output-print ""
      output-print "pH of normal rain about a 5.6"
      output-print ""
      output-print "on the pH scale. "
      output-print ""
      output-print ""
      output-print "--www.des.nh.gov"

    ]
Choose-an-item = "Milk"
    [set ph 6.6
      output-print "Milk is slightly acidic or close"       ;cite from https://www.thoughtco.com/what-is-the-ph-of-milk-603652
      output-print ""
      output-print "to neutral pH. The pH of a glass"
      output-print ""
      output-print "of cow milk ranges from 6.4 to "
      output-print ""
      output-print "6.8. Milk fresh from the cow"
      output-print ""
      output-print "typically has a pH between 6.5"
      output-print ""
      output-print "and 6.7. This is because it "
      output-print ""
      output-print "contains lactic acid. The pH of"
      output-print ""
      output-print "milk changes over time. As milk"
      output-print ""
      output-print "goes sour, it becomes more"
      output-print ""
      output-print "acidic and the pH gets lower."
      output-print ""
      output-print ""
      output-print "--www.thoughtco.com/what-is-"
      output-print ""
      output-print "the-ph-of-milk-603652"
    ]

Choose-an-item = "Distilled water"
    [set ph 7
      output-print "The process for distillation"        ;Cite from https://sciencing.com/ph-distilled-water-4623914.html
      output-print ""
      output-print "involves boiling the water,"
      output-print ""
      output-print "allowing the steam to condense"
      output-print ""
      output-print "in a tube and collecting the"
      output-print ""
      output-print "condensation in a container."
      output-print ""
      output-print "Sophisticated distillation"
      output-print ""
      output-print "techniques may produce water"
      output-print ""
      output-print "free of any solutes. If you"
      output-print ""
      output-print "measure the pH of distilled water"
      output-print ""
      output-print "immediately after distillation,"
      output-print ""
      output-print "the pH is 7. But, it soon changes"
      output-print ""
      output-print "as it absorbs CO2 from air."
      output-print ""
      output-print ""
      output-print "--sciencing.com/ph-distilled-"
      output-print "water-4623914.html"
    ]

Choose-an-item = "Blood"
    [set ph 7.4
      output-print "The pH of blood in the arteries"     ;Cite from https://www.medicalnewstoday.com/articles/ph-of-blood
      output-print ""
      output-print "should be between 7.35 and 7.45"
      output-print ""
      output-print "for the body’s metabolic processes"
      output-print ""
      output-print "and other systems to work well."
      output-print ""
      output-print "Certain situations and medical"
      output-print ""
      output-print "conditions can occur if the blood"
      output-print ""
      output-print "pH is lower than 7.35 or higher"
      output-print ""
      output-print "than 7.45. The human body has a"
      output-print ""
      output-print "complex system of feedback and"
      output-print ""
      output-print "regulation to maintain this"
      output-print ""
      output-print "healthy pH levels."
      output-print ""
      output-print ""
      output-print "--www.medicalnewstoday.com/"
      output-print "articles/ph-of-blood"
    ]

Choose-an-item = "Sea water"
    [set ph 8.1
      output-print "Prior to the Industrial Revolution,"            ;Cite from https://www.epa.gov/ocean-acidification/understanding-science-ocean-and-coastal-acidification
      output-print ""
      output-print "average ocean pH was about 8.2."
      output-print ""
      output-print "Today, average ocean pH is about"
      output-print ""
      output-print "8.1. This might not seem like"
      output-print ""
      output-print "much of a difference, but the"
      output-print ""
      output-print "relationship between pH and acidity"
      output-print ""
      output-print "is not direct. Each decrease of one"
      output-print ""
      output-print "pH unit is a ten-fold increase in"
      output-print ""
      output-print "acidity. This means that the acidity"
      output-print ""
      output-print "of the ocean today, on average, is"
      output-print ""
      output-print "about 25% greater than it was"
      output-print ""
      output-print "during preindustrial times."
      output-print ""
      output-print ""
      output-print "--www.epa.gov/ocean-acidification/"
      output-print "understanding-science-ocean-and-"
      output-print "coastal-acidification"
    ]

Choose-an-item = "Baking soda"
    [set ph 8.3
      output-print "Baking soda, also known as sodium"   ; Cite from https://pubchem.ncbi.nlm.nih.gov/compound/Sodium-Bicarbonate
      output-print ""
      output-print "bicarbonate appears as odorless"
      output-print ""
      output-print "white crystalline powder or lumps."
      output-print ""
      output-print "Baking soda has a pH of 8.3 if"
      output-print ""
      output-print "freshly prepared 0.1 molar aqueous"
      output-print ""
      output-print "solution. Baking soda is often"
      output-print ""
      output-print "used to make buffer and in"
      output-print ""
      output-print "many cleansing solutions."
      output-print ""
      output-print ""
      output-print "--pubchem.ncbi.nlm.nih.gov/compound"
      output-print "/Sodium-Bicarbonate"
    ]

Choose-an-item = "Milk of magnesia"
    [set ph 10.5
      output-print "Milk of magnesia is made from "     ;Cite from https://www.healthgrades.com/right-care/digestive-health/milk-of-magnesia; ph from chem.libretexts.org/
      output-print ""
      output-print "magnesium hydroxide, a chemical "
      output-print ""
      output-print "compound present in a naturally  "
      output-print ""
      output-print "occurring mineral called brucite."
      output-print ""
      output-print "Milk of magnesia is an alkaline"
      output-print ""
      output-print "mineral and can neutralize stomach"
      output-print ""
      output-print "acid. It is meant for occasional, "
      output-print ""
      output-print "short-term use to help with"
      output-print ""
      output-print "certain digestive problems."
      output-print ""
      output-print ""
      output-print "--www.healthgrades.com/right-care/"
      output-print "digestive-health/milk-of-magnesia"
    ]

Choose-an-item = "Ammonia solution"
    [set ph 12
      output-print "Aqua ammonia (ammonium hydroxide) is"    ; Cite from https://airgasspecialtyproducts.com/wp-content/uploads/2016/02/Physical_Properties-1.pdf
      output-print ""
      output-print "classified as a weak base."
      output-print ""
      output-print "It ionizes much less completely"
      output-print ""
      output-print "in water than does a strong"
      output-print ""
      output-print "base such as sodium hydroxide."
      output-print ""
      output-print "Typically, the pH of an ammonia"
      output-print ""
      output-print "solution will be between 11 and"
      output-print ""
      output-print "12, compared with a pH of about"
      output-print ""
      output-print "14 for sodium hydroxide solutions."
      output-print ""
      output-print "Aqua ammonia is a clear, colorless"
      output-print ""
      output-print "liquid having a strong pungent"
      output-print ""
      output-print "ammonia odor."
      output-print ""
      output-print ""
      output-print "--airgasspecialtyproducts.com/"
      output-print "wp-content/uploads/2016/02/"
      output-print "Physical_Properties-1.pdf"
    ]

Choose-an-item = "Bleach"
    [set ph 13
      output-print "Bleach is an alkali. The pH value"       ; Cite from https://techiescientist.com/is-bleach-an-acid-or-base/
      output-print ""
      output-print "of sodium hypochlorite ranges between"
      output-print ""
      output-print "11 and 13. In an aqueous solution,"
      output-print ""
      output-print "it dissociates into hypochlorite"
      output-print ""
      output-print "anion and sodium ions. The"
      output-print ""
      output-print "hypochlorite ions formed to accept"
      output-print ""
      output-print "a proton from water thereby causing"
      output-print ""
      output-print "the release of OH- ions in the"
      output-print ""
      output-print "solution, thus, making the solution"
      output-print ""
      output-print "basic."
      output-print ""
      output-print ""
      output-print "--techiescientist.com/is-bleach-an-acid-or-base/"
    ]

Choose-an-item = "Sodium Hydroxide(1M)"
    [set ph 14
      output-print "Sodium hydroxide (NaOH), also called"               ;Cite from https://www.britannica.com/science/sodium-hydroxide
      output-print ""
      output-print "caustic soda or lye, a corrosive"
      output-print ""
      output-print "white crystalline solid that contains"
      output-print ""
      output-print "the Na+ (sodium) cation and the"
      output-print ""
      output-print "OH− (hydroxide) anion. Sodium hydroxide"
      output-print ""
      output-print "is the most widely used industrial"
      output-print ""
      output-print "alkali and is often used in drain and"
      output-print ""
      output-print "oven cleaners. It is highly corrosive"
      output-print ""
      output-print "to animal and vegetable tissue."
      output-print ""
      output-print "Contact may severely irritate skin, "
      output-print ""
      output-print "eyes, and mucous membranes."
      output-print ""
      output-print ""
      output-print "--www.britannica.com/science/"
      output-print "sodium-hydroxide"
    ]

    )
end 

There are 5 versions of this model.

Uploaded by When Description Download
lin xiang about 2 years ago adjust the interface Download this version
lin xiang about 2 years ago Add examples of items Download this version
lin xiang about 2 years ago Fix info typos 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
The pH of Solution.png preview Preview for 'The pH of Solution' about 2 years ago, by lin xiang Download

This model does not have any ancestors.

This model does not have any descendants.