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

[Bug]: Fuel Material Temperature Hardcoded (maybe?) in saltproc_mat #146

Closed
kipk49 opened this issue Mar 10, 2022 · 9 comments · Fixed by #178
Closed

[Bug]: Fuel Material Temperature Hardcoded (maybe?) in saltproc_mat #146

kipk49 opened this issue Mar 10, 2022 · 9 comments · Fixed by #178

Comments

@kipk49
Copy link

kipk49 commented Mar 10, 2022

Expected behavior

Expected the run to finish normally and produce outputs.

Describe the bug

I'm trying to run a fast reactor model that is intended to operate at a high temperature - because of this, the model uses the ENDF 1200K cross sections (.12c on the isotope names).

When SaltProc is writing the "saltproc_mat" iteration material file, it's filling in the fuel material declaration with a "fix 09c 900" phrase. This is causing SERPENT to run out of RAM and abort the simulation run.

I believe I have isolated this line to be the issue: when I run a simple SERPENT .inp based on this SaltProc input, the simulation will run fine with "fix 12c 1200" in the fuel declaration but will run out of RAM and crash if I replace that with "fix 09c 900" (as is being written in the saltproc_mat currently).

To Reproduce

Steps to reproduce the behavior:

  1. Run the DFR SaltProc input (I know it's very simple at the moment and the objects are currently based off the MSBR example)
  2. Problem will emerge at run step 2, because it initially copies the prepr_ini file with the correct "fix 12c 1200" phrase, so step 1 will run fine
  3. Whilst attempting to run step 2 it will exceed the 13 GB RAM cap on my computer and kill the simulation

Supporting Informatioon

Standard SERPENT RAM overflow error: "Input error:

Out of memory error (allocating 12.4Gb, limit 12.4Gb = 0.80 * 15.5Gb)
"

System Specifications:

  • Software version: Unsure but I found "_version_major = 0 _version_minor = 3" in version.py
  • Platform/OS: Ubuntu 20.04
  • SERPENT: 2.1.32
    GitHub does not support the input file types, I can email them over.

How can this issue be closed?

@yardasol
Copy link
Contributor

yardasol commented Mar 10, 2022

Hi @kipk49, you can upload your files as gists and then link to them in the body of the issue. Please do so for the following:

  • Saltproc input file
  • Serpent model (fuel, geometry, settings, etc)
  • Iteration material file for the erroneous run

This way I can reproduce the behavior you are describing.

To find the saltproc version number, in an interactive python shell (i.e. a jupyter notebook or running python from your terminal)

import saltproc
saltproc.__version__

SaltProc version 0.3.0 is currently unsupported, and I'd highly recommend using the latest release if you can. Note that the input file structure has changed between 0.3.0 and 0.4.0.

It looks The code responsible for the behavior you are describing may still exist. Inspect the following code block starting at line 704 in saltproc/depcode.py in the write_mat_file function:

 for key, value in dep_dict.items():
            matf.write('mat  %s  %5.9E burn 1 fix %3s %4i vol %7.5E\n' %
                       (key,
                        -dep_dict[key].density,
                        '09c',
                        dep_dict[key].temp,
                        dep_dict[key].vol))

This block looks like it is indeed explicitly setting the temperature to 900K (that's the '09c' part). Good catch on this.

After today, I'll be unavailable till Monday the 21st so if you need to get this fixed ASAP I'd recommend you dig into the code and make a PR to fix this if you feel comfortable doing so. Otherwise I can get around to working on this when I get back.

If you do decide to make a PR, you'll need to modify the write_mat_file and read_dep_comp functions for the DepcodeSerpent class in depcode.py so that the cross section library spec doesn't get overwritten.

@kipk49
Copy link
Author

kipk49 commented Mar 22, 2022

Hi @yardasol,

Had to leave the office early for an unrelated issue today - will upload the relevant Serpent and Saltproc files tomorrow.

In the meantime, what's the recommended method for updating my Saltproc install?

@kipk49
Copy link
Author

kipk49 commented Mar 25, 2022

Update: here's the gist with the input files (and error-inducing saltproc_mat file).

@yardasol yardasol self-assigned this Mar 30, 2022
@yardasol
Copy link
Contributor

yardasol commented Apr 6, 2022

Hi @kipk49, sorry for the long wait on this. I'm waiting for another PR to get merged before this one. I'll try to checkout your test case later this week or next week and see if I can reproduce your results.

In the meantime, what's the recommended method for updating my Saltproc install?

Check the readme and online docs for installation instructions.

@yardasol
Copy link
Contributor

Hi @kipk49, sorry again for the long wait on this. I was at the ANS student conference last weekend and the days up to that were spent preparing. I'm gonna try to get to this before Friday.

@yardasol
Copy link
Contributor

Hi @kipk49, I've done some poking around and this looks like this is going to be a little more involved than I had initially thought.

From the Serpent wiki page on the mat card:

The nuclide identifier for nuclides with associated cross-sections corresponds to ZZAAA.ID and, for nuclides without associated cross-sections, e.g., decay nuclides, to ZZAAAI. The identifiers include Z, the atomic number; A, the mass number of the nuclide; I, the isomeric state (0 = ground state, 1 = metastable state); and ID, the library identifier. For nuclides without associated cross-sections, include the fix option to indicate the library and temperature of the given nuclides.

The fix card specifies cross section library information for decay-only nuclides, and accepts two parameters, LIB and TEMP. LIB is a library ID (the 09c), and TEMP is the temperature for the nuclide.

SaltProc doesn't actually retain fuel temperature or XS library ID information right now, so I'll need to add some machinery to do that.

@yardasol
Copy link
Contributor

Hi @kipk49m, taking a look at this today. Can you also upload the .dot and _objects.json files?

@yardasol
Copy link
Contributor

yardasol commented Jun 1, 2022

@kipk49 please upload .dot and _objects.json files when you get the chance

@kipk49
Copy link
Author

kipk49 commented Jul 27, 2022

Gist is updated with the objects file. I didn't see a way to upload the .dot file, but I was using a renamed copy of the msbr example .dot file. Apologies for the delay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment