November 25, 2024, 03:22:39 PM
Forum Rules: Read This Before Posting


Topic: How can I create this water treatment program?  (Read 3110 times)

0 Members and 1 Guest are viewing this topic.

Offline MAJohnson

  • Very New Member
  • *
  • Posts: 1
  • Mole Snacks: +0/-0
How can I create this water treatment program?
« on: August 18, 2023, 05:29:11 PM »
How can I create a program where users can input contaminants found in some water source, then the program decides what and how much filter media we need?

Someone on our team found this for manganese contamination: https://www.e3s-conferences.org/articles/e3sconf/pdf/2021/36/e3sconf_aepee2021_01025.pdf

On the 3rd page:

Quote
Theoretically, 2.874 mg of KMnO4 is required to remove 1 mg Mn2+ and 1mg Fe2+. To ensure that Mn2+ in the water can be effectively removed, the amount of potassium permanganate added should satisfy [KMnO4]/[Mn2+][Fe2+]>2.874, taking into account manganese sand has a certain adsorption effect on iron and manganese, and the dosage of low potassium permanganate should be considered in the test

What chem/ChE knowledge would I need to translate this into code? I'm skilled in software engineering, not chem/ChE, so I'm not exactly sure where to start.

There is this package list that I think could help a lot, https://github.com/lmmentel/awesome-python-chemistry, but I'm not sure which packages would help and how.

Thanks in advance
« Last Edit: August 18, 2023, 05:54:55 PM by MAJohnson »

Offline Borek

  • Mr. pH
  • Administrator
  • Deity Member
  • *
  • Posts: 27864
  • Mole Snacks: +1813/-412
  • Gender: Male
  • I am known to be occasionally wrong.
    • Chembuddy
Re: How can I create this water treatment program?
« Reply #1 on: August 18, 2023, 06:13:16 PM »
A lot depends on the details, but this is basically a simple stoichiometry and some simple algebra, nothing more complicated than - say - calculating circle area from a given radius.

Ask for the concentrations of Mn2+ and Fe2+, add them, multiply by 3.9 as suggested, you have your answer (volume per volume, you may need some additional concentration calculations, again nothing more complicated).

Trick is, 3.9 is probably more or less optimal for a given Mn/Fe ratio in the incoming water, sadly I don;t see this information in the paper. I just skimmed though.
ChemBuddy chemical calculators - stoichiometry, pH, concentration, buffer preparation, titrations.info

Sponsored Links