CalebBell / thermo

Thermodynamics and Phase Equilibrium component of Chemical Engineering Design Library (ChEDL)
MIT License
594 stars 114 forks source link

Refactor flash module to subpackage #73

Closed yoelcortes closed 3 years ago

yoelcortes commented 3 years ago

Hi Caleb,

This pull request simply refactors the flash module into a subpackage.

One minor change in the Flash class; the T_MIN_FIXED attribute (and similar parameters) were removed to be more consistent with the code (the code only uses the T_MIN_FIXED of phase objects, not the flash class).

This pull request is marked as a draft because not all tests are passing in my computer. It seems that thermo.numba is being loaded and making tests that were not supposed to run in numba fail. I believe this is happening because:

Still not sure why this is happening...

Thanks!

CalebBell commented 3 years ago

Hi Yoel, The bug seems to be occurring in fluids.numba, line 600-ish: image

I haven't developed a hypothesis for exactly what error is occurring. A single test in ht fails if they are taken out - test_hx_effectiveness_basic. Never mind, it is failing because of a new fun issue in numba.

This is really great work. I pushed a new version of fluids with those lines taken out. Hopefully we have enough test coverage to know if taking them out breaks something.

Let's check that the tests are working before moving forward with this!

yoelcortes commented 3 years ago

Hi Caleb,

I believe the problem was the flash submodules were not added to thermo.submodules to allow numba to recreate the modules. All tests passed after adding them.

I'll go ahead and merge.

Thanks!