Specifications
Customization FAQ A-31
A-31
•Pressure Drop
•Outlet Temperature
The Cooler calculates its Duty and Outlet Pressure based on
these values. If the inlet temperature is changed, the Cooler
will get a Forget, in which the inlet temperature appears
<empty>, but the inlet pressure is available. If the Cooler
does not calculate anything, the outlet Pressure will be
forgotten, and the Forget will propagate through all objects
downstream of the Cooler. If, however, the Cooler re-
calculates its outlet pressure during the Forget, the outlet
stream will remain fully calculated, and will not receive any
Execute calls. Only the Cooler’s duty will be forgotten.
It is important for any unit operation to avoid using variables
that it has previously calculated for the calculation of other
variables. In the above example, the Cooler can “see” its
outlet temperature and its duty (which it had calculated)
during its Forget. These two values can (erroneously) be
used to calculate its inlet temperature. In this case, this
would cause an inconsistency error, as the calculated value
would not match the new specified value. Often, the problem
is subtler, and results in the two values being calculated,
each thinking that the other is a specification. To avoid this,
the Cooler must check that it is not a variable’s “CalcBy”
object, before using that variable’s value to calculate other
variables.
20. Why do I get Three Execute calls?
First-time extension writers are almost always surprised to
receive a second non-Forgetting Execute call from HYSYS. In
fact, non-Extension unit operations only receive two Execute
passes. An additional Execute is necessary for some
extensions that need to see the results of the Balance calls
they make during their Execute.
When a unit operation calculates a value to a stream’s
variable, the unit operation cannot then “see” the value until
the stream has recalculated. If the unit operation calculates
a stream’s temperature during its Execute, and needs to use
the stream’s temperature later in the Execute, it will not be
able to ask the stream for the value. When the unit
operation’s Execute knows the value (as in this case), it can
simply keep the value itself as long as it needs to.