Closed bas-rustenburg closed 9 years ago
I re-derived the equations while writing the tests and implemented them. I'm confident that the ones in the test are correct. The ones in the SimpleMixture class don't sum to one... I should just be able to take the correct code out of the test.
This bug makes me think. It would be good to put the mass and volume fraction calculations in separate functions. Modular structure makes things easier to test, and easier to read.
Good idea!
This has been fixed in #24.
See https://github.com/bas-rustenburg/itctools/blob/tests/itctools/materials.py#L231-L262
And for the test:
https://github.com/bas-rustenburg/itctools/blob/tests/tests/test_materials.py#L192-L251