Skip to content
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

error when material density < 1 #95

Closed
LukeLabrie opened this issue May 23, 2022 · 13 comments
Closed

error when material density < 1 #95

LukeLabrie opened this issue May 23, 2022 · 13 comments

Comments

@LukeLabrie
Copy link

when I run openmc-plotter, if any material in my materials.xml file has a density < 1.0 g/cm3, I get

 ERROR: Need to specify a positive density on material [material_id]

I first noticed on a helium material (density on the order of 1e-4 g/cm3), but while debugging I noticed that I still get it even at 0.99 g/cm3, but not at 1.0 g/cm3. Not sure if this is by design perhaps.

@pshriwise
Copy link
Collaborator

Hi @LukeLabrie,

Thanks for reporting this! It's definitely not intended behavior. I tried changing a couple of material densities in my model, but I didn't see this error show up. Could you let us know what version of the plotter you're using when you have a chance?

@LukeLabrie
Copy link
Author

Hi @pshriwise , apologies for the late response. I'm actually having a hard time figuring that out. Tried openmc-plotter --version, and tried clicking around the GUI a little bit. Where can I see the version?

To install initially I just used pip install openmc-plotter

@pshriwise
Copy link
Collaborator

Hrmmm you're right @LukeLabrie. There isn't an easy way to get that info once you've installed the tool. I've just added an option for that in #98. That might not help us here though. I think you'll need to reinstall and look through the output of the pip install command to find the version number of the package. Sorry about that.

@pshriwise
Copy link
Collaborator

@LukeLabrie are you still having problems with this?

@LukeLabrie
Copy link
Author

Hi @pshriwise, I uninstalled and reinstalled. Looks like I have version 0.2.0

Installing collected packages: openmc-plotter
Successfully installed openmc-plotter-0.2.0

I still run into the same issue:

 Reading settings XML file...
 Reading cross sections XML file...
 Reading materials XML file...
 ERROR: Need to specify a positive density on material 7.
QObject::~QObject: Timers cannot be stopped from another thread

Here is the .xml entry for reference:

  </material>
  <material id="7" name="helium" temperature="911.15">
    <density units="g/cm3" value="0.00103" />
    <nuclide ao="2e-06" name="He3" />
    <nuclide ao="0.999998" name="He4" />

@pshriwise
Copy link
Collaborator

I'm still having trouble reproducing this... The type of error you're seeing looks like it's coming from the OpenMC executable itself. Is it the case that you can run this model, but you cannot view it in the plotter?

@LukeLabrie
Copy link
Author

LukeLabrie commented Jun 7, 2022

Yes and no. I can run the model but it fails due to lost neutrons. Was hoping to use the plotter to identify overlaps, which I can as long as I go in and raise the densities where needed.

@letibdesneiges
Copy link

Hi,

I encountered the same problem with a model containing air with a density of 1.293e-3 g/cm3. It request a density >0. Changing the density in the xml file to >=1 g/cm3 fixed it and openmc-plotter launched without error.

Attached the model.xml file causing the problem on my side.
model.xml.zip

openmc-plotter 0.3.1 installed via conda on Debian 11.

@paulromano
Copy link
Contributor

@letibdesneiges Very strange -- when I throw your model into the plotter on my end, I don't get any such error 😕 I also tried installing the plotter through conda-forge and still no problems.

@letibdesneiges
Copy link

@paulromano Yes, I tried again with a fresh conda install using python 3.10 (the previous one was with python 3.9).
Still the same problem with the xml file linked above.
Here is a screenshot of the error while loading. The same file can be used by openmc. Could it be encoding or locale related ?

Screenshot 2023-04-11 at 21 50 33

@paulromano
Copy link
Contributor

@letibdesneiges That's an interesting hypothesis and could explain why you are seeing it but not me. If you try to run OpenMC using this model, do you get the same error about positive density, or does this only occur when you load the model in the plotter?

@shimwell
Copy link
Member

I sat in the adjacent seat at the NEA and can confirm this bug only occurred when plotting with the plotter. The model ran fine with openmc and produced nice mesh tally plots. I also saw the changes to the XML file and the plotter working afterwards

@paulromano
Copy link
Contributor

This same issue was discussed in #124 and already resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants