BioSTEAMDevelopmentGroup / thermosteam

BioSTEAM's Premier Thermodynamic Engine
Other
57 stars 12 forks source link

Setting a MultiStream with mass units other than kg/hr produces wrong results #51

Closed fwitte closed 2 years ago

fwitte commented 2 years ago

Describe the bug On instanciation of a MultiStream, setting mass flow units other than 'kg/hr' (because factor is 1 in this case) produces wrong data on the MultiStream instance.

To Reproduce

from thermosteam import MultiStream, settings

settings.set_thermo(['Water', 'KOH', 'H2', 'O2'], cache=True)

s1 = MultiStream(ID='s1', l=[('Water', 1), ('KOH', 2)], g=[('H2', 3)], units='g/s')
s1.show(flow='kg/s')

Actual behavior

Data are incorrect:

MultiStream: s1
 phases: ('g', 'l'), T: 298.15 K, P: 101325 Pa
 flow (g/s): (g) H2     0.231
             (l) Water  0.0772
                 KOH    0.154

Additional context Will be fixed by PR #50.