AU-BCE-EE / tric-fil-mod

A trickling filter model to simulate air treatment, written in Python
GNU General Public License v3.0
0 stars 0 forks source link

Temperatur dependence of pKa #28

Open AnneMortensen opened 1 month ago

AnneMortensen commented 1 month ago

Trying to use Vant Hoff equation to estimate pKa as a function of temperature

AnneMortensen commented 1 month ago

Code here: https://github.com/AU-BCE-EE/tric-fil-mod/tree/5262e7d485bdfafc2600c04de070e2131574e611/applications/Lab%20experiments/New%20structure/Tasks/4.3%20temp%20change%20visualizations

Plots from the script "Temp change variations" appear in the "Plots" folder. Let me know if you have issues saving plots or finding the correct code.

AnneMortensen commented 1 month ago

From Anders: Look at the sign (positive or negative) before the enthalpy change due to reaction, or change the order of the temperatures

AnneMortensen commented 1 month ago

Negative enthalpy of reaction gives these pKa values image

Changing the order of the temperatures has the same effect, so the two options are these image For temperatures: 10,15,18,21,25 (degrees Celsius)

Possible unit problem?

AnneMortensen commented 1 month ago

Think I found the reason, the enthalpy of reaction is in the gas phase. https://webbook.nist.gov/cgi/cbook.cgi?ID=C15035720%2BC12408025%3DC7783064&IDType=Reac&Type=HREACT

AnneMortensen commented 1 month ago

I can't find the enthaply of vaporization for the ions H+ and SH-, then we could have converted it to the liquid phase reaction enthalpy change. Also can't find an enthalpy of reaction for a liquid phase. Any good ideas?

AnneMortensen commented 1 month ago

From https://books.google.dk/books?hl=da&lr=&id=U3DgAAAAMAAJ&oi=fnd&pg=PR5&dq=U.S.+Environmental+Protection+Agency+~U.S.+EPA!.+~1974!.+%E2%80%98%E2%80%98Process+de-+sign+manual+for+sulfide+control+in+sanitary+sewerage+systems.%E2%80%99%E2%80%99+U.S.+EPA+Technology+Transfer,+U.S.+EPA,+Washington,+D.C&ots=_qjFPy3oih&sig=9RZS0Ad-Qy8FvjVtbipH0tI5ZOw&redir_esc=y#v=onepage&q=U.S.%20Environmental%20Protection%20Agency%20~U.S.%20EPA!.%20~1974!.%20%E2%80%98%E2%80%98Process%20de-%20sign%20manual%20for%20sulfide%20control%20in%20sanitary%20sewerage%20systems.%E2%80%99%E2%80%99%20U.S.%20EPA%20Technology%20Transfer%2C%20U.S.%20EPA%2C%20Washington%2C%20D.C&f=false

We get this, where I think drinking water has the conductivity around the green mark

image

Can we use that?

sashahafner commented 1 month ago

Think I found the reason, the enthalpy of reaction is in the gas phase. https://webbook.nist.gov/cgi/cbook.cgi?ID=C15035720%2BC12408025%3DC7783064&IDType=Reac&Type=HREACT

Well that is strange! At least it seems strange to me. Ions in the gas phase? But I see in the original table "gas phase" below row 1 as well.

sashahafner commented 1 month ago

From https://books.google.dk/books?hl=da&lr=&id=U3DgAAAAMAAJ&oi=fnd&pg=PR5&dq=U.S.+Environmental+Protection+Agency+~U.S.+EPA!.+~1974!.+%E2%80%98%E2%80%98Process+de-+sign+manual+for+sulfide+control+in+sanitary+sewerage+systems.%E2%80%99%E2%80%99+U.S.+EPA+Technology+Transfer,+U.S.+EPA,+Washington,+D.C&ots=_qjFPy3oih&sig=9RZS0Ad-Qy8FvjVtbipH0tI5ZOw&redir_esc=y#v=onepage&q=U.S.%20Environmental%20Protection%20Agency%20~U.S.%20EPA!.%20~1974!.%20%E2%80%98%E2%80%98Process%20de-%20sign%20manual%20for%20sulfide%20control%20in%20sanitary%20sewerage%20systems.%E2%80%99%E2%80%99%20U.S.%20EPA%20Technology%20Transfer%2C%20U.S.%20EPA%2C%20Washington%2C%20D.C&f=false

We get this, where I think drinking water has the conductivity around the green mark

image

Can we use that?

Nice find! I will check my water chemistry book too, but have to wait a few hours. Yes, I think you should use these. You can create a regression equation from them. See how a linear model fits. Let me know if you need help with that in Python. p 17 in https://github.com/AU-BCE-EE/OAC-course/blob/main/lecture-notes/02_data_analysis.pdf has example, but in your case it is simpler because the predictor variable is numeric, so you don't need the C( bit.

sashahafner commented 1 month ago

The dependence on electrical conductance is actually the effect of "ionic strength", which is the overall effect of other ions. So far we have not included it, and you probably shouldn't spend time adding it now. But you can consider how it affects the pKa, especially for the buffer.

sashahafner commented 1 month ago

@AnneMortensen here is an alternative. How does this compare to other values?

image

From Blanes-Vidal, V., Sommer, S., Nadimi, E., 2009. Modelling surface pH and emissions of hydrogen sulphide, ammonia, acetic acid and carbon dioxide from a pig waste lagoon. Biosystems Engineering 104, 510–521. https://doi.org/10.1016/j.biosystemseng.2009.09.008

The original references cited are:

Broderius S J; Smith L L (1977). Direct Determination and Calculation of Aqueous Hydrogen Sulfide. Analytical Chemistry 49, 424–428.

Hershey J P; Plese T; Millero F J (1988). The pK1* for the dissociation of H2S in various ionic media. Geochimica et Cosmochimica Acta, 52, 2047–2051.

I am not sure how they get one equation from two papers. I would start with the second one if you want to check these, but it might not be a priority--you could just use the equation for now if the values look correct.

AnneMortensen commented 1 month ago

I think it is safe to say that both of the new references (my link and your book) agree fairly well. At least a lot better than a pKa value of 20. image Will use one of them to remake the sensitivity analysis with respect to temperature tomorrow.

AnneMortensen commented 1 month ago

Implemented Sashas reference, since it was easier to not have to make a linear regression.

image https://github.com/AU-BCE-EE/tric-fil-mod/blob/6bf157088d701350d127f14f1d8f8fbbdb7f507a/applications/Lab%20experiments/New%20structure/Tasks/4.3%20temp%20change%20visualizations/temp%20loop.py

Experiment new temp change 2 liq

Experiment new temp change 2