-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TTSE medium model doesn't work properly #29
Comments
|
I can confirm that I get the same output as you do. |
OK, I'll investigate more and try to figure out what is going wrong. BTW, do you have any idea where is the HOME directory under Windows 10? |
@jowr, I tested again the TTSE tables with 3.3.0, using the attached test model, which tests CO2 with TTSE, I figured out where the tables are, deleted them and restarted the process. The first time I run the simulation of
on the console, and occasionally something like
I guess these errors refer to supercritical conditions where there is no solution, so they are normal and handled by CoolProp. I hope they don't mean something's broken. Maybe you can comment on that. Eventually this ends, and I can see four files in the home/CoolProp directory:
I tried to open those files with 7zip, but they are not recognized, I don't know which format you used to store this data. The first one is really small, is it possible that something went wrong there, or are the sizes as you'd expect? Then, I can see the "Simulation terminated correctly" message in the dymosim.exe window, followed by some non-ASCII characters; I guess those mean that something goes wrong, e.g. because of some C array written past its end or something. In any case, the dymosim.exe terminates in an abnormal way, before writing anything onto the log file and before generating the .mat file, so that Dymola cannot proceed correctly. I'm still unsure where the problem is - maybe we could simply try to add a printf statement inside setState_ph, printing out some computed properties to the console, to check if the program can at least get correct values from the TTSE medium. If that is the case, we're a bit in trouble, because it means that for some reason the TTSE routine is interfering with Dymola's runtime memory management, which could be hard to debug. If it isn't, then the problem is within ExternalMedia's code, and we can try to investigate further. I can do this myself, but I am currently unable to compile the binaries on my pc, so I need to open a branch and use GitHub's CI to get the binaries. If you have times in the next few days to try this out, please let me know, otherwise I'll proceed this way. Thanks! |
@casella The file format and how to extract it using Python is described here. |
@jowr, I'm very interested at using the TTSE and bicubic interpolations for my simulations.
I tried the
TestStatesSupercritical
example in the attached package, which setsenable_TTSE=1
in the CO2 medium model. The first time I ran the program, the simulation executable ran for quite some time, generating a ludicrous amount of output. I understand it was generating the table file, but I suspect it spent most of the CPU time just sending the dump to the screen. I guess we may want to suppress this output, and give instead a message like "precomputing the tables, please wait, this will only be carried out the first time you use the TTSE properties", possibly with some explicit reference to where these tables are actually saved (to be honest, I don't have the slightest idea, which is kind of creepy).The second time I ran it, I briefly saw the message "Simulation successfully terminated" flashing in the executable command windows, followed by several garbled characters. Unfortunately, when the executable process exits, Dymola reports "Simulation in progress; use Simulation->Show Log if you want to see the actual log file. (It may initially be empty.)" and does not load any result file. In fact, there is no result .mat file at all in Dymola's output directory. Something fishy's happening, but I have little clue what it is.
Did you manage to run some TTSE or bicubic medium model successfully in ExternalMedia during your tests? Do you have any idea what is happening here?
Thanks!
The text was updated successfully, but these errors were encountered: