If you want to predict the values on the energy stream, it must be an output stream.
Please note that the sign in work should change in that case. A positive sign on work on an inlet energy stream means energy consumed. A positive sign on work on an outlet energy stream means work produced.
Also, the parameter that actually contains work is provided by the stream object connected to the unit operation. So
- change the port to an OUTLET port
- from the object connected to the port, get the "work" parameter
- set its value
- do the same for the temperature limits, in case of a thermal energy stream
In CAPE-OPEN v1.1, the port object merely exposes a parameter specification. As in CAPE-OPEN 1.2 the parameter specification no longer exists, the port itself exposes a parameter, but the only aspects used of this parameter is the meta information (name, description, unit of measure ...)