idaes-pse
idaes-pse copied to clipboard
Liquid stream trapped in FTPx
I am using FTPx state variables in a generic property package for a Flash unit condensing water out of a hydrogen stream. I want to recycle this water stream. Since I know that flash calculations for FTPx variables are ill-posed for single-species phase equilibrium, I attempt to translate the stream into an appropriate property package (IAPWS95) using a Translator block. I create three constraints to define the new set of state variables:
def rule_flow_mol(blk,t):
return blk.properties_in[t].flow_mol == blk.properties_out[t].flow_mol
def rule_temperature(blk,t):
return blk.properties_in[t].temperature == blk.properties_out[t].temperature
def rule_pressure(blk,t):
return blk.properties_in[t].pressure == blk.properties_out[t].pressure
All properties needed from blk.properties_in[t] are state variables, so no calculations in the inlet block are needed. Nevertheless, flash equations are still set up and, unsurprisingly, fail.
My options, at this point, are to either:
- Directly write constraints at the flowsheet level, resulting in a stream that is invisible to the flowsheet visualizer and stream tables.
- Create an imitation
Translatorblock in which a port with appropriate variables is created but no state block for the inlet properties is created. - Create another FTPx property block with the same components but without phase equilibrium so I can avoid the offensive calculations in the translator block.
I think this is a user accessibility failure, and would like to give users a better way to proceed.