Coder Social home page Coder Social logo

Comments (5)

jowr avatar jowr commented on July 4, 2024
  • CoolProp stores the zipped data for tabular interpolation in: HOME/.CoolProp/Tables
  • You can always add "|debug=100" to the Medium definition to get more output

from externalmedia.

jowr avatar jowr commented on July 4, 2024

I can confirm that I get the same output as you do.

from externalmedia.

casella avatar casella commented on July 4, 2024

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?

from externalmedia.

casella avatar casella commented on July 4, 2024

@jowr, I tested again the TTSE tables with 3.3.0, using the attached test model, which tests CO2 with TTSE, substanceNames="CO2|enable_TTSE=1|debug=100".

I figured out where the tables are, deleted them and restarted the process. The first time I run the simulation of CO2CoolPropTTSE.TestStatesSupercritical, the dymosim.exe simulation executable runs for about a minute to compute the tables. I see lots of lines like

x: 20616.8 y: 4.77258e+08

on the console, and occasionally something like

unable to solve 1phase PY flash with Tmin=216.592, Tmax=1650 due to error: HSU_P_flash_singlephase_Brent could not find a solution because Hmolar [96714.8 J/mol] is above the maximum value of 92833.995887 J/mol

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:

phase_envelope.bin.z (1 KB)
pure_saturation.bin.z  (147 KB)
single_phase_logph.bin.z (6673 KB)
single_phase_logpT.bin.z (8749 KB)

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!

from externalmedia.

bilderbuchi avatar bilderbuchi commented on July 4, 2024

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?

@casella The file format and how to extract it using Python is described here.

from externalmedia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.