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

Add counter-current liquid flow #7

Closed sashahafner closed 1 year ago

sashahafner commented 1 year ago

This should be pretty easy now that we have liquid flow.

sashahafner commented 1 year ago

Would require change in sign in advec calculation and change in position of where clin ("fresh" liquid concentration, not yet an input) is appended to concentration vector.

sashahafner commented 1 year ago

See around L 92 in mod_funcs.py

   # Liquid phase derivatives (g/s)
   # Includes transport and reaction
   rxn = k * mcl
   if not counter:
      cvec = np.insert(ccl, 0, clin)
   else:
      v_l = - v_l
      cvec = np.insert(ccl, nc, clin)

That's from ef4771cc96eb74f6c78d536973d62c8ab7fcdecb

So it works by changing sign of liquid flow and putting liquid inlet concentration at the end of the cell/layer stack instead of the beginning.

sashahafner commented 1 year ago

Maybe use "countercur" instead? "count" seems like a count of iterations etc.