Hello Daniel,
I'm currently trying to create a dynamic simulation with the newest version of DWSIM (5.7) and came accross your tutorial (http://dwsim.inforside.com.br/wiki/index.php?title=Dynamic_Simulation_Tutorial_with_DWSIM_and_Python,_Part_2:_Building_the_Dynamic_Model).
I followed all the instructions, but I get the following error report:
[13.09.2019 13:32:39] Error running script: Traceback (most recent call last):
File "<string>", line 16, in <module>
File "<string>", line 21, in <module>
AttributeError: 'NoneType' object has no attribute 'ExtraProperties'</module></string></module></string>
I tried the simulation in both DWSIM and DWSIM (New UI) but get the same error.
Can you help me solve this problem?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've fixed the article and the associated files for v5.7 Update 14. Remember to open the files on the Cross-Platform UI, the Classic UI won't handle it correctly.
Thanks!
Daniel
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks, I downloaded the files you uploded on the page 2 and 3 respectively.
The simulation runs succesfully, but two new problems emerged.
The graph for Outlet.Temperature(t) that gets displayed after the simulation, doesn't show a change in temperature for either fluid. Both Outlet Temperatures stay at Pre-Pertubation-Temperature. This problem is found in both files on page 2 and 3.
The other problem concerns the calculation of the cold water mass flow, which diverges to infinity. This solely happens in the program containing the PID controler (file on page 3) .
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Does the progam actually calculate Outlet Temperatures with this formula, or does it get the value directly from HX-01?
if (deltat <= delay1 and t0 > 0.0):
hx.ColdSideOutletTemperature = hx.ExtraProperties.ColdFluidPrePerturbationOutletTemperature + (deltat/delay1)**2 * (hx.ColdSideOutletTemperature - hx.ExtraProperties.ColdFluidPrePerturbationOutletTemperature)
It seems as if by calculating the Outlet.Temperatures this way, the start value ColdFluidPrePerturbationOutletTemperature isn't changed and therefore displayed throughout the whole time interval.
Or in other words, could you explain what this calculation achives?
If it works in your version of DWSIM it may have to do with my current software v5.7 Update 14.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Good times Mr. "Daniel Medeiros', How are you sir!
I am new to this tool, I have faced issue from the first download and trying a tutorials, the property package division does not show the option of "Flash Algorithms". Is this a technical issue? or it is missing file in the software?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
DWSIM is always being updated and enhanced. the Flash Algorithm is not a direct selection anymore as it has been moved to the property package settings.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Daniel,
I'm currently trying to create a dynamic simulation with the newest version of DWSIM (5.7) and came accross your tutorial (http://dwsim.inforside.com.br/wiki/index.php?title=Dynamic_Simulation_Tutorial_with_DWSIM_and_Python,_Part_2:_Building_the_Dynamic_Model).
I followed all the instructions, but I get the following error report:
[13.09.2019 13:32:39] Error running script: Traceback (most recent call last):
File "<string>", line 16, in <module>
File "<string>", line 21, in <module>
AttributeError: 'NoneType' object has no attribute 'ExtraProperties'</module></string></module></string>
I tried the simulation in both DWSIM and DWSIM (New UI) but get the same error.
Can you help me solve this problem?
Which script is the one giving you this error?
It's the script "RunDynamicProcess_OpenLoop". The error immeadiatly appears when I press "Update and Run (Asynch)".
I've fixed the article and the associated files for v5.7 Update 14. Remember to open the files on the Cross-Platform UI, the Classic UI won't handle it correctly.
Thanks!
Daniel
Thanks, I downloaded the files you uploded on the page 2 and 3 respectively.
The simulation runs succesfully, but two new problems emerged.
The graph for Outlet.Temperature(t) that gets displayed after the simulation, doesn't show a change in temperature for either fluid. Both Outlet Temperatures stay at Pre-Pertubation-Temperature. This problem is found in both files on page 2 and 3.
The other problem concerns the calculation of the cold water mass flow, which diverges to infinity. This solely happens in the program containing the PID controler (file on page 3) .
Are you running the scripts asynchronously (Run Async)?
Yes.
I run RunDynamicProcess_OpenLoop asynchyronously.
Sorry, try downloading the files again. Basically you'll have to change
by
in the loops as the first one runs asynchronously on Windows... this will be fixed in the next release.
I downloaded the new file and checked if
Flowsheet.RequestCalculation()
is replaced by
Flowsheet.SolveFlowsheet2()
Still the same problem. The Outlet Temperatures don't change.
They worked here in v5.7 Update 13.
Are you running DWSIM on Windows? What is your system language?
Does the progam actually calculate Outlet Temperatures with this formula, or does it get the value directly from HX-01?
if (deltat <= delay1 and t0 > 0.0):
hx.ColdSideOutletTemperature = hx.ExtraProperties.ColdFluidPrePerturbationOutletTemperature + (deltat/delay1)**2 * (hx.ColdSideOutletTemperature - hx.ExtraProperties.ColdFluidPrePerturbationOutletTemperature)
It seems as if by calculating the Outlet.Temperatures this way, the start value ColdFluidPrePerturbationOutletTemperature isn't changed and therefore displayed throughout the whole time interval.
Or in other words, could you explain what this calculation achives?
If it works in your version of DWSIM it may have to do with my current software v5.7 Update 14.
Output of the closed loop in part 3
This is my result of "RunDynamicProcess_ClosedLoop" with "Update and Run Asynch"
Your PID parameters are not the correct ones. Perhaps your internet provider hasn't updated the links to the files on my server.
This is the output on v5.7 Update 14, so it should work ok on yours. Try the attached files.
Thank you Daniel, the files you sent me worked perfectly.
You're welcome!
Hi. I am trying to plot using classic UI. I found this example but the window just hangs for a while then closes. http://dwsim.inforside.com.br/wiki/index.php?title=IronPython_Script_Snippets#Create_and_Display_a_Two-Dimensional_Plot_.28Classic_UI.29
Ok...just figured out one way...use 'form1.ShowDialog()' rather than 'form1.Show()'
...although that pauses the code
Last edit: Jens Wallevik 2019-09-19
Good times Mr. "Daniel Medeiros', How are you sir!
I am new to this tool, I have faced issue from the first download and trying a tutorials, the property package division does not show the option of "Flash Algorithms". Is this a technical issue? or it is missing file in the software?
DWSIM is always being updated and enhanced. the Flash Algorithm is not a direct selection anymore as it has been moved to the property package settings.
Thank you so much sir! I appreciate your time!!