Repository navigation
Replies: 2 comments
|
I guess you have to solve the op once so the list is populated |
0 replies
|
Thank you very much for your reply. Your comment helped me understand how the Python Script UO output variables are populated and exposed to the Dynamic Manager. Using this information, I was able to successfully run a dynamic simulation model with persistent state variables inside DWSIM. I appreciate the continuous development and support of DWSIM. Best regards, |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I am using a Python Script Unit Operation in DWSIM Dynamic Mode.
The Python script maintains several numerical state variables between dynamic time steps. The dynamic simulation itself runs correctly.
For example, at each time step I assign:
The elapsed simulation time is obtained from the Dynamics Manager:
The important observation is:
I checked the current PythonScriptUO.vb source and noticed that the Python Script UO has an OutputVariables dictionary and exposes those variables through GetProperties(PropertyType.RO).
What is the correct way to make Python Script UO OutputVariables available as selectable variables in the Dynamic Manager / Dynamic Simulation Recorder?
Is there an additional registration or property mechanism required?
A minimal example would be very helpful.
Thank you.
All reactions