Is there a way to cache or prefetch heat capacity data for an offline session of Wolfram System Modeler and Wolfram Mathematica?
ThermodynamicData
may be what you are looking for, it produces data for all the substances in the list ThermodynamicData[]
. For example, you can gather isochoric and isobaric specific heat capacities in a list of associations with
substances = ThermodynamicData[];
data = Function[substance,
Association[
Prepend[Map[
Function[property,
property ->
ThermodynamicData[substance,
property]], {"IsobaricHeatCapacity",
"IsochoricHeatCapacity"}], "Substance" -> substance]]] /@
substances;
cleanData = Select[data, FreeQ[#, Missing] &];
Gathering this data will take a while. Afterwards, you can explore this data in a dataset with Dataset[cleanData]
. Then you can either choose to move your project fully to System Modeler or maintain a mixed WL & System Modeler approach. But given the scope of your project I suspect using this data is not the main issue or possibly the ideal approach, so I won't go into too much detail about it (for instance, you can always pass parameter values to functions such as SystemModelSimulate
, SystemModelPlot
, CreateSystemModel
and ConnectSystemModelComponents
, as shown in their documentation pages, or you can also directly pass numeric data to CreateDataSystemModel
).
Unfortunately, your exercise explicitly has mixed phases (water and vapor) and phase transitions, which means you can't handle heat capacity as a parameter that does not change in time. Hence, I think in this case you may need to resort to more advanced libraries such as Modelica.Media
as @Ankit Naik suggested. This library already contains a ton of media data, which would mean you would not need the WL to gather it. He may be able to give you more details.