BioSTEAMDevelopmentGroup / biosteam

The Biorefinery Simulation and Techno-Economic Analysis Modules; Life Cycle Assessment; Chemical Process Simulation Under Uncertainty
Other
179 stars 35 forks source link

Unit z_mol_in and z_mol_out properties don't work #187

Closed sarangbhagwat closed 9 months ago

sarangbhagwat commented 9 months ago

Describe the bug Using Unit.z_mol_in or Unit.z_mol_out raises AttributeErrors.

To Reproduce

import biosteam as bst
import thermosteam as tmo

tmo.settings.set_thermo(['Water', 'Ethanol'])
s1 = tmo.Stream('s1', Water=10, Ethanol=20)
U101 = bst.Splitter('U101', ins=s1, split=0.5)
U101.simulate()
print(U101.z_mol_in, U101.z_mol_out)

Expected behavior See inlet and outlet mol fraction arrays.

Actual behavior

  File ~\untitled3.py:15
    print(U101.z_mol_in, U101.z_mol_out)

  File ~\biosteam\biosteam\_unit.py:2153 in z_mol_in
    return self._mol_in/self.F_mol_in

AttributeError: 'Splitter' object has no attribute '_mol_in'

Version

Additional context Add any other context about the problem here.