Skip to content

Bad stream table formatting for Flash with Modular Properties #1684

@dallan-keylogic

Description

@dallan-keylogic

Right now, if we try to generate a stream table for the Flash unit model with the modular properties, we get something like this:

                                     Units     Inlet  Vapor Outlet  Liquid Outlet
Total Molar Flowrate         mole / second       1.0           NaN            NaN
Total Mole Fraction benzene  dimensionless       0.5           NaN            NaN
Total Mole Fraction toluene  dimensionless       0.5           NaN            NaN
Temperature                         kelvin     368.0           NaN            NaN
Pressure                            pascal  101325.0           NaN            NaN
flow_mol                     mole / second       NaN          50.0           50.0
mole_frac_comp benzene       dimensionless       NaN           0.5            0.5
mole_frac_comp toluene       dimensionless       NaN           0.5            0.5
temperature                         kelvin       NaN         300.0          300.0
pressure                            pascal       NaN      100000.0       100000.0

The root problem appears to be in how the stream table is being generated:

        if self.config.ideal_separation:
            # If using ideal separation, get values from Ports and hope they map
            # to names in Inlet
            # TODO: Add a better way to map these if necessary

The values on the port are not mapped to names in Inlet, so they're getting values of NaN instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BacklogThings we'd like to get to somedayPriority:LowLow Priority Issue or PR

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions