AguaClara / aguaclara

An open-source Python package for designing and performing research on AguaClara water treatment plants.
https://aguaclara.github.io/aguaclara/
MIT License
24 stars 13 forks source link

Unitless number in floc_model.gamma_coag #200

Closed HannahSi closed 5 years ago

HannahSi commented 5 years ago

@WPennock brought to our attention that with the new addition of units to the materials in aguaclara.research.floc_model.py, the gamma_coag() function in floc_model no longer works. This seems to be because the call to frac_vol_floc_initial() uses a unitless 0 instead of 0*u.kg/u.m**3.

@elenapertsalis Can you add these units in the function and write tests to make sure it works with new release?

elenapertsalis commented 5 years ago

I fixed this issue by adding the proper units to the unitless 0.

elenapertsalis commented 5 years ago

I just have to finalize the test cases for this function.

HannahSi commented 5 years ago

We'll be discarding our changes because Will found a lower level cause and solution to the problem: the u.wraps() wrapper functions preceding our functions are meant to

This causes a lot of problems with functions involving our floc_model.Material andfloc_model.Chemical objects, such as applying units on top of other units, so we'll be removing the wrapper functions altogether.

This fix will be in version 25 of the AguaClara package!