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

Analytical solutions for comparison #29

Open AnneMortensen opened 6 months ago

AnneMortensen commented 6 months ago

Some steady state solutions with either mass transfer or reaction rate as the limiting factor and the other assumed instantaneous.

AnneMortensen commented 6 months ago

I will start looking at making simulations for either situation: Reaction or mass transfer limiting, at steady state.

sashahafner commented 6 months ago

@AnneMortensen see #29 for a bit of background.

Closed-form solutions are here

https://github.com/AU-BCE-EE/tric-fil-mod/blob/dff49cfa8746a13176f06a2fc2cd8e11087a6259/demos/13_transport_comparison/demo.py#L73

and here

https://github.com/AU-BCE-EE/tric-fil-mod/blob/dff49cfa8746a13176f06a2fc2cd8e11087a6259/demos/14_reaction_comparison/demo.py#L75

AnneMortensen commented 6 months ago

First attempt on instant mass transfer: image https://github.com/AU-BCE-EE/tric-fil-mod/blob/6bf157088d701350d127f14f1d8f8fbbdb7f507a/applications/Lab%20experiments/New%20structure/Tasks/4.1%20k%20change%20visualizations/k%20loop%20Steady%20state%20large%20kl%20analytical%20gas.py

k steady state kl 1 + analytical

AnneMortensen commented 6 months ago

And for instant reaction: image

https://github.com/AU-BCE-EE/tric-fil-mod/blob/6bf157088d701350d127f14f1d8f8fbbdb7f507a/applications/Lab%20experiments/New%20structure/Tasks/4.0%20kl%20change%20visualizations/kl%20loop%20Steady%20state%20large%20k%20analytical%20gas.py

k steady state kl 1 + analytical

sashahafner commented 6 months ago

First attempt on instant mass transfer: image https://github.com/AU-BCE-EE/tric-fil-mod/blob/6bf157088d701350d127f14f1d8f8fbbdb7f507a/applications/Lab%20experiments/New%20structure/Tasks/4.1%20k%20change%20visualizations/k%20loop%20Steady%20state%20large%20kl%20analytical%20gas.py

k steady state kl 1 + analytical

Hmm, it looks good that the two models are similar, but is the difference what you would expect? What value did you use for Kga in the numerical model? I would expect that the two models become more similar when Kga is higher (because mass transfer is closer to "instan") or when k is lower (because reaction not mass transfer becomes rate-limiting).

AnneMortensen commented 6 months ago

First attempt on instant mass transfer: image https://github.com/AU-BCE-EE/tric-fil-mod/blob/6bf157088d701350d127f14f1d8f8fbbdb7f507a/applications/Lab%20experiments/New%20structure/Tasks/4.1%20k%20change%20visualizations/k%20loop%20Steady%20state%20large%20kl%20analytical%20gas.py

k steady state kl 1 + analytical

Kga was 3.82 (I adjusted kl, thus the weird number). Tried setting Kga to 10 and 100, and I did not see a difference in the steady state concentration of either of the models. I was for sure not expecting the intermediate reaction rate to be the one that was the furthest off. Not sure I have an explanation for that, but will think about it.

AnneMortensen commented 6 months ago

First attempt on instant mass transfer: image https://github.com/AU-BCE-EE/tric-fil-mod/blob/6bf157088d701350d127f14f1d8f8fbbdb7f507a/applications/Lab%20experiments/New%20structure/Tasks/4.1%20k%20change%20visualizations/k%20loop%20Steady%20state%20large%20kl%20analytical%20gas.py k steady state kl 1 + analytical

Hmm, it looks good that the two models are similar, but is the difference what you would expect? What value did you use for Kga in the numerical model? I would expect that the two models become more similar when Kga is higher (because mass transfer is closer to "instan") or when k is lower (because reaction not mass transfer becomes rate-limiting).

Each of the situations you describe has a separate plot, separate comment in this thread and separate analytical solutions. For instant reaction, k=0.1 s^-1 was chosen (too big makes negative concentrations) and for instant mass transfer, Kga = 3.82 was chosen (arbitrarily as long as it is very large).

AnneMortensen commented 6 months ago

Should we open separate issues for each situation?