-
-
Couldn't load subscription status.
- Fork 119
Description
Is your feature request related to a problem? Please describe.
Yes. I'm always frustrated when trying to perform design-oriented optimization for thermodynamic cycles, because I cannot directly control for the most critical design parameter of a heat exchanger: the Minimum Temperature Approach (Pinch Point). The current Adjust block only allows targeting properties on Material or Energy Streams (like outlet temperature), not calculated results within a unit operation.
For example, when optimizing an Organic Rankine Cycle, the Pinch Point Temperature Difference (PPTD) is a key decision variable that balances capital cost against thermal efficiency. The goal is to set a target PPTD (e.g., 10 K) and have the simulator calculate the required utility flow rate to meet this target. Currently, there is no direct way to do this in DWSIM, which makes robust optimization difficult and forces complex workarounds.
Describe the solution you'd like
I would like the Adjust Logical Operation block to be enhanced so it can target calculated properties that are part of a Unit Operation's results, not just stream properties.
Specifically for the Heat Exchanger unit operation, I would like to be able to select it as a "Target Object" in the Adjust block and then choose a new, exposed property like Minimum Approach Temperature or Pinch Point Temperature Difference as the "Target Property".
This would allow me to set up the optimization as follows:
Adjusted Variable: The mass flow of the utility stream (e.g., Cooling_Water.MassFlow).
Target Object: The Heat Exchanger itself (e.g., HEX-01).
Target Property: Minimum Approach Temperature.
Target Value: The desired pinch value (e.g., 10.0 K), which could be linked to a Spreadsheet for optimization studies.
The solver would then find the exact utility flow rate that results in this minimum temperature difference anywhere inside the heat exchanger.
Describe alternatives you've considered
I have considered a few alternatives, but they are all suboptimal:
Targeting End-Point Differences: The current method is to use the Adjust block to control the temperature difference at either the hot end or the cold end of the exchanger. This is not robust because the true pinch point often occurs at an intermediate point (like the onset of phase change), meaning the actual minimum approach could be much lower than the target, leading to physically incorrect designs.
Using Multiple Adjust Blocks: One could set up two Adjust blocks—one for the hot end and one for the cold end—and then use a spreadsheet to choose the scenario that requires the larger utility flow rate. This is cumbersome, slow, and still doesn't capture pinch points that occur in the middle of the exchanger profile.
External Scripting: The most accurate alternative is to write a Python script that uses a root-finding algorithm (e.g., from scipy.optimize). The script would iteratively call DWSIM, check the heat exchanger's internal temperature profile, and adjust the flow rate until the true minimum approach matches the target. While this works, it moves a core simulation task outside of DWSIM's integrated environment and adds significant complexity.
Additional context
This feature would be incredibly valuable for anyone doing process synthesis, design, and optimization, especially in fields like power generation (Rankine/Brayton cycles), cryogenics, and heat integration. It would elevate DWSIM's capability from a purely analysis/simulation tool to a more powerful process design tool, aligning it with the functionalities often found in commercial simulators.
Thank you for your consideration