Load cell temperatures from HDF5 file indicated by new XML element#3807
Load cell temperatures from HDF5 file indicated by new XML element#3807gonuke wants to merge 4 commits intoopenmc-dev:developfrom
Conversation
… all choose true for all cases
…lectively read temperatures based on whether this is anything other than the emptry string
|
I like it as a potential solution! 🧠 💯 Maybe prompts us (in a separate effort) to revisit the existence of the Quick hits:
|
|
Why not just use the c-api from python to load the properties? |
The round-trip through XML is a quirk of the way that depletion problems are setup. The depletion integrator writes XML and then calls OpenMC init through the c-api that then loads the XML. There are certainly other solutions to this particular problem, but in general it seemed like a good idea for XML to be able to drive the process of reading data from the The proposed solution may not be the best approach, but it was a way to demonstrate something heading in the right (?) direction. |
I'm happy to discuss and modify this in many ways. I threw this up as a demonstration that there may be a solution that is not far away and it's probably a valuable feature outside of the immediate need. |
Makes sense, should be a straightforward shift.
Yep... my variable name came from the immediate need, but better to generalize.
I think there are interesting questions about how this interacts with other ways to set this info, esp. does this override cell-by-cell temperature entries? Or vice versa? |
If the properties file path is in the settings... should the |
I'm not sure I understand. I was thinking of something like this. <settings>
<properties>
<filepath>properties.h5</filepath>
<temperatures>true</temperatures>
<materials>false</materials>
</properties>
</settings>To support the updates to the functionality in Are you maybe suggesting we'd check for an optional bool value on each cell/material element in the XML? |
|
I meant to say ... but this makes sense, too. |
|
Closing in favor of cleaner #3808 |
Description
Currently, to read cell properties from a
properties.h5file, the data is read in python and written to XML and then read from XML by the OpenMC executable. When there are many cells, e.g. O(1e8), then it is possible to exceed the allowable size of an XML element (4GB = 2 giga characters). This is also a relatively inefficient way to transfer data that is already stored in a convenient form.This PR attempts to introduce a new XML card that is the name of a properties file from which to read the temperature data directly from the
properties.h5at the time of problem initialization in the OpenMC executable.Notably, since there may be circumstances when the
properties.h5file only has data that matches the geometry and not the materials, this also introduces two flags for the generalimport_propertiesmethod to indicate whether cell data and material data should be imported.This is currently a draft for comment...
Fixes # (issue)
Checklist