In blocks.rs, we need to generalize the approach to track all streams entering and leaving the block for mass and energy balances. The following can be done:
- Track all connectors, not just a single mass in-mass out value pairs
- Compare relative error, for example, the total difference as compared to the total input. This should be an adjustable parameter similar to
TOLERANCE_ENERGY and TOLERANCE_MASS, but should be dimensionless instead.
- The
mass_balance_check function should just take a &self reference, instead of actual value arguments. The blocks should contain references to Mconnectors and Econnectors (these I also believe should be revised, but that is a later issue).
I have included TODO's in the style-fix branch (to be uploaded in due time) that reference this issue.
In blocks.rs, we need to generalize the approach to track all streams entering and leaving the block for mass and energy balances. The following can be done:
TOLERANCE_ENERGYandTOLERANCE_MASS, but should be dimensionless instead.mass_balance_checkfunction should just take a&selfreference, instead of actual value arguments. The blocks should contain references toMconnectors andEconnectors (these I also believe should be revised, but that is a later issue).I have included TODO's in the style-fix branch (to be uploaded in due time) that reference this issue.