Energy deposition mode 3: failure with burnup calculations

Report any suspected bugs and unexpected behavior here
Post Reply
nicolas.martin
Posts: 21
Joined: Fri Oct 04, 2019 5:48 pm
Security question 1: No
Security question 2: 19

Energy deposition mode 3: failure with burnup calculations

Post by nicolas.martin » Sat Nov 02, 2019 1:26 am

Hello,
The following issue shows up in burnup calculations with edepmode 3 activated, at some point in the depletion calculation (2.1.31 version).
It happens only when the burnable regions contain isotopes that are also present in non-burnable regions (here, as an example, Zr, present in both the fuel and the cladding).
It doesn't show up for the first transport calculation, but only later.
Attached is an input based on the 2D PWR assembly case, taken from one the examples, and the result:

Code: Select all

***** Fri Nov  1 15:31:34 2019:

 - MPI task         = 0
 - OpenMP thread    = 3
 - RNG parent seed  = 1572643595011
 - RNG history seed = 2506919101001949955
 - RNG history idx  = 5280000

Fatal error in function TrackMode:

Total exceeds majorant (E = 5.109989E-01, f = 1.714415E-04, mat = fuelz36)

Simulation aborted.

The case runs fine when edepmode is set to 0,1 or 2. So I am guessing it might be due to the photon transport part.
I tried disabling the delta tracking (set dt 0.) but the same issue showed up.
Using optimization mode 1 made it to work, but the calculation becomes really slow. Optimization modes 2,3,4 lead to the same failure.

Do you have any suggestions on how to get the case to run with a better optimization mode than 1?
Thanks,
Nicolas
Attachments
pwr_edep3.inp.zip
(3.92 KiB) Downloaded 97 times

User avatar
Jaakko Leppänen
Site Admin
Posts: 2446
Joined: Thu Mar 18, 2010 10:43 pm
Security question 2: 0
Location: Espoo, Finland
Contact:

Re: Energy deposition mode 3: failure with burnup calculations

Post by Jaakko Leppänen » Wed Nov 06, 2019 7:43 pm

I cannot reproduce the error with my photon data, so it's most likely photon-related. Could you try changing lines 84-94 of trackmode.c from:

Code: Select all

if ((mat > VALID_PTR) && (totxs/majorant - 1.0 > 1E-6))
    {
      /* Check reaction lists */

      CheckReaListSum(mat, PARTICLE_TYPE_NEUTRON, E, NO, id);

      /* Exit */

      Die(FUNCTION_NAME, "Total exceeds majorant (E = %E, f = %E, mat = %s)",
          E, totxs/majorant - 1.0, GetText(mat + MATERIAL_PTR_NAME));
    }
to:

Code: Select all

if ((mat > VALID_PTR) && (totxs/majorant - 1.0 > 1E-6))
    {
      /* Check particle type */

      if ((long)RDB[part + PARTICLE_TYPE] == PARTICLE_TYPE_NEUTRON)
        {
          /* Check reaction lists */

          CheckReaListSum(mat, PARTICLE_TYPE_NEUTRON, E, NO, id);

          /* Exit */

          Die(FUNCTION_NAME,
              "Neutron total exceeds majorant (E = %E, f = %E, mat = %s)",
              E, totxs/majorant - 1.0, GetText(mat + MATERIAL_PTR_NAME));
        }
      else
        {
          /* Check reaction lists */

          CheckReaListSum(mat, PARTICLE_TYPE_GAMMA, E, NO, id);

          /* Exit */

          Die(FUNCTION_NAME,
              "Photon total exceeds majorant (E = %E, f = %E, mat = %s)",
              E, totxs/majorant - 1.0, GetText(mat + MATERIAL_PTR_NAME));
        }
    }
and rerunning the calculation?
- Jaakko

nicolas.martin
Posts: 21
Joined: Fri Oct 04, 2019 5:48 pm
Security question 1: No
Security question 2: 19

Re: Energy deposition mode 3: failure with burnup calculations

Post by nicolas.martin » Thu Nov 07, 2019 8:36 am

The code now stops due to an issue with the photon majorant:

Code: Select all

***** Wed Nov  6 21:56:06 2019:

 - MPI task         = 0
 - OpenMP thread    = 10
 - RNG parent seed  = 1573102268732
 - RNG history seed = 3317565072202641724
 - RNG history idx  = 248810

Fatal error in function TrackMode:

Photon total exceeds majorant (E = 9.506600E-02, f = 4.269576E-06, mat = fuelz17)


Reproducing the error has been really tricky. It only shows up after a depletion, after the initial cycles are done. It can show up at the first depletion point, or at a later point, or sometimes the case will run just fine.
Attached is a simplified new input leading to the above error, with the log file so you can see exactly where it stops. Running it again and again will lead to a failure, eventually.
On a side note, the -replay option doesn't reproduce the error all the time.

From this analysis, it has nothing to do with edepmode 3 (commented out in the new input), but only with the photon transport used in burnup calculations, and seem to show up randomly in threads.
Thanks for the help,
Nicolas
Attachments
pwr_edep3.inp.seed.zip
(194 Bytes) Downloaded 122 times
pwr_edep3.inp.zip
(3.92 KiB) Downloaded 90 times
pwr_edep3.inp.log.zip
(41.62 KiB) Downloaded 83 times

User avatar
Jaakko Leppänen
Site Admin
Posts: 2446
Joined: Thu Mar 18, 2010 10:43 pm
Security question 2: 0
Location: Espoo, Finland
Contact:

Re: Energy deposition mode 3: failure with burnup calculations

Post by Jaakko Leppänen » Thu Nov 07, 2019 10:47 am

Since this seems like a rare event, you can probably get through the calculation by running with the "-nofatal" command line option.

Where exactly did you get the photon library used in the calculation?
- Jaakko

nicolas.martin
Posts: 21
Joined: Fri Oct 04, 2019 5:48 pm
Security question 1: No
Security question 2: 19

Re: Energy deposition mode 3: failure with burnup calculations

Post by nicolas.martin » Thu Nov 07, 2019 6:46 pm

Using -nofatal does the trick. I see the same errors showing up but the job keeps on running.

The photon library is from the MCNP6.2 package, MCNP_DATA/xdata/mcplib84.

I don't see how it could be related to the library, though. Restarting from a burned fuel composition and performing a neutron/photon transport calculation does not lead to the issue, so everything works fine with non-fresh fuel with many fission products.

The error shows up when performing a photon transport after a burnup calculation (ie in a single job sequence).
In my case, it shows up randomly at some point in the burnup sequence. But it always showed up at some point. I could not get a valid depletion run.

Does anyone in the Serpent community has successfully used ngamma 1 with burnup calculations?

Obviously performing gamma transport in burnup is rarely needed, unless used with edepmode 3?

thanks,
Nicolas

User avatar
Jaakko Leppänen
Site Admin
Posts: 2446
Joined: Thu Mar 18, 2010 10:43 pm
Security question 2: 0
Location: Espoo, Finland
Contact:

Re: Energy deposition mode 3: failure with burnup calculations

Post by Jaakko Leppänen » Fri Nov 08, 2019 10:32 am

I got the same error now. I'll get back to you.
- Jaakko

User avatar
Jaakko Leppänen
Site Admin
Posts: 2446
Joined: Thu Mar 18, 2010 10:43 pm
Security question 2: 0
Location: Espoo, Finland
Contact:

Re: Energy deposition mode 3: failure with burnup calculations

Post by Jaakko Leppänen » Fri Nov 08, 2019 2:54 pm

As a quick fix, try commenting out lines 36-37:

Code: Select all

  if ((xs = TestValuePair(rea0 + REACTION_PTR_PREV_XS, E, id)) > -INFTY)
    return xs;
in photonmacroxs.c
- Jaakko

nicolas.martin
Posts: 21
Joined: Fri Oct 04, 2019 5:48 pm
Security question 1: No
Security question 2: 19

Re: Energy deposition mode 3: failure with burnup calculations

Post by nicolas.martin » Mon Nov 11, 2019 7:12 am

It works fine on my cases. Thank you.
Nicolas

User avatar
Jaakko Leppänen
Site Admin
Posts: 2446
Joined: Thu Mar 18, 2010 10:43 pm
Security question 2: 0
Location: Espoo, Finland
Contact:

Re: Energy deposition mode 3: failure with burnup calculations

Post by Jaakko Leppänen » Mon Nov 11, 2019 10:00 am

OK. This is actually a valid fix to the problem. The root cause is that Serpent uses intermediate variables to store cross sections and other values that may be frequently re-used during the transport simulation. In this case the value is carried over from previous burnup step, and it is no longer valid since the isotopic composition has changed.
- Jaakko

Post Reply