Automation of TBP Cut Point Configuration in Component Splitter Using VBA in Aspen HYSYS
Project Description
This project focuses on automating the process of setting True Boiling Point (TBP) cut points in a Component Splitter within Aspen HYSYS using VBA (Visual Basic for Applications). Normally, the Component Splitter is not directly accessible through the HYSYS object library because it has not been fully “wrapped” for OLE automation. As a result, standard automation methods cannot be used to modify its properties.
To overcome this limitation, the project utilizes a “Backdoor” method that allows access to internal HYSYS variables through specific identifiers known as monikers. These monikers represent internal variable paths and enable users to read and modify properties such as temperature cut points. By using VBA code, users can automate the process of assigning TBP cut temperatures, reducing manual effort and improving efficiency
The implementation involves linking to an active HYSYS case, accessing the Component Splitter operation, retrieving the array of cut point temperatures, modifying the values, and then writing them back into the system. Although this approach is powerful, it requires careful handling since monikers may change between software versions, making validation and testing essential.
Process Flow Diagarm
Optimization Strategy
The operational strategy of this project is centered on enabling automation in areas where direct access is not available through standard HYSYS interfaces. By leveraging VBA and backdoor variable access, the system bypasses limitations of the object library and provides a flexible method to control internal parameters such as TBP cut points. This approach significantly enhances productivity, especially when working with multiple cases or repetitive tasks.
Another key aspect of the strategy is ensuring stability and compatibility while using backdoor methods. Since these methods rely on internal variable identifiers, careful validation and version control are required. The strategy emphasizes testing, script recording, and verification to ensure accurate and reliable automation results.
Backdoor Variable Access Implementation
This strategy involves using HYSYS Backdoor variables to access internal properties of the Component Splitter. By identifying the correct moniker (e.g., temperature array), users can retrieve and modify TBP cut point values programmatically
VBA-Based Automation Workflow
In this approach, VBA code is used to connect to the active HYSYS simulation, locate the Component Splitter, and update its cut point temperatures. This automated workflow reduces manual input and allows consistent application of process parameters.
Script Recording and Moniker Identification
This strategy focuses on using HYSYS Script Manager to record manual changes and identify the correct monikers for variables. These monikers are then used in VBA code to ensure accurate access to required properties
Projects Insight
Limitation of HYSYS Object Library
- Component Splitter not directly accessible
- Requires alternative automation methods
- Limits standard OLE functionality
Importance of Backdoor Methods
- Enables access to hidden properties
- Provides flexibility in automation
- Useful when no direct method exists
Role of Monikers
- Represent internal variable paths
- Used to identify specific properties
- May vary across versions
Benefits of VBA Automation
- Reduces manual work
- Ensures consistency
- Saves time in repetitive tasks
Risks and Limitations
- Monikers may change with updates
- Requires careful validation
- Not officially supported method
Practical Applications
- Process optimization
- Batch simulations
- Industrial automation tasks
Conclusion
The automation of TBP cut point configuration in Aspen HYSYS using VBA and backdoor variable access provides a powerful solution to overcome limitations of the standard object library. By enabling programmatic control of internal parameters, this approach improves efficiency, accuracy, and consistency in simulation workflows. However, due to its reliance on internal identifiers, careful testing and validation are essential to ensure reliable performance across different software versions.