Talk:Drinking water chlorination efficiency

From Opasnet
Revision as of 12:55, 8 July 2019 by Jouni (talk | contribs) (Created page with "== How to interpret E(t) equation == The equation for E(t) is for total time that water spends in a contactor with n contains index i for different continuous stirred-tank r...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

How to interpret E(t) equation

The equation for E(t) is for total time that water spends in a contactor with n contains index i for different continuous stirred-tank reactors (CSTR)[1]. A problem with the equation is that it does not tell what should be done with index i as there is no aggregate function but still it does not appear in the output.

Wikipedia describes the function for a single CSTR and it is a lot easier:

E(t) = 1/τ exp(- t/τ)

And therefore I suggest that we build the code so that it uses the simpler equation and calculates Ei for each CSTR with τi separately and then sums those all up for the whole contactor system. We can do this with Monte Carlo by sampling from E(t):

sample(Times, openv$N, replace = TRUE, prob = Ei),

where Times is as in the original code and Ei is the output from the equation above when using Times as t and MRT as τ. openv$N is the variable for number of iterations when OpasnetUtils is used.

After this has been completed, we can numerically compare results from the original and this approach.