New S(a,b) capabilities in Serpent 2.1.24

This category replaces the missing input manual
Post Reply
User avatar
Tuomas Viitanen
Posts: 65
Joined: Thu Mar 25, 2010 1:50 pm
Security question 2: 0
Location: VTT Technical Research Centre of Finland, Espoo

New S(a,b) capabilities in Serpent 2.1.24

Post by Tuomas Viitanen » Mon Jun 08, 2015 4:43 pm

Dear Serpent users,

The next Serpent update 2.1.24, which will be released in a couple of weeks, includes new capabilities for interpolating S(alpha,beta) data between temperatures. The S(a,b) data is required for accurate modelling of thermal scattering from bound atoms like H in water or C in graphite.

Just like in the previous versions of Serpent, the S(a,b) are applied for a certain nuclide by adding "moder <therm name> <za>" to the material definition. For example,

Code: Select all

mat water   -0.8  moder lwtr 1001 tmp 400
1001.03c 2.0
8016.03c 1.0

therm lwtr lwe7.04t 
defines a material for which the normal free-atom cross sections are at 400 K and S(a,b) data at 400 Kelvin (library lwe7.04t) is used to complete the bound atom scattering models of hydrogen at the thermal energy region.

From version 2.1.24 on, it is possible to interpolate the S(a,b) data by three different means. Interpolation is activated by replacing the "therm" input card using one of the following syntaxes:

Code: Select all

therm lwtr <temp in K, T> <lib below T> <lib above T>  % (1)
therm lwtr 0 <lib1> <lib2> <lib3> ... % (2)
thermstoch lwtr <temp in K, T> <lib below T> <lib above T> % (3)
for example:

Code: Select all

therm lwtr 423 lwe7.04t lwe7.06t % (1)
therm lwtr 0 lwe7.04t lwe7.06t lwe7.08t lwe7.10t  % (2)
thermstoch lwtr 423 lwe7.04t lwe7.06t % (3)
The first of these options (1) interpolates between the two nuclides (lwe7.04t @ 400 K and lwe7.06t @ 450 K) in the pre-processing phase. The interpolation methodology is the same as used in the makxsf cross section processing tool, distributed with MCNP. Basically, the cross sections and the secondary particle distributions are just linearly interpolated between the temperatures.

The second option (2) is based on the same makxsf methodology, but the interpolation is done on-the-fly and the temperature of the material is taken directly from the TMS temperature of the material ("tms xxx") or from the multi-physics interface. If the range of possible temperatures within a material is broad, it is possible to give several libraries in the input and the routine automatically interpolates between the libraries adjacent to the local material temperature for best accuracy.

The third option (3) corresponds to stochastic mixing between two material temperatures. Thus, when using the thermstoch option, there is actually no S(a,b) material at temperature 423 K in the system, but the interpolation is done by linearly mixing S(a,b) nuclides at temperatures 400 K and 450 K in the composition. This option has, in fact, been available in Serpent 2 for a while with the syntax of new option (1), but it was decided to change the syntax of the method in the 2.1.24 update since the makxsf methodology is currently the preferred method for S(a,b) interpolation.

A paper on the methodology and its accuracy will be sent to PHYSOR 2016. The preliminary calculations suggest that
  • The interpolation is quite but not fully accurate. Naturally, the accuracy increases as the spacing of the temperatures between the S(a,b) libraries decreases.
  • The makxsf and stochastic mixing methods are roughly similar in accuracy, but the makxsf methodology is preferred since is seemed to provide conservative estimates for the multiplication factor.
Tuomas

novako
Posts: 26
Joined: Sun Feb 15, 2015 1:01 pm
Security question 1: No
Security question 2: 92
Location: Prague, Czech Republic

Re: New S(a,b) capabilities in Serpent 2.1.24

Post by novako » Fri Jul 17, 2015 7:56 pm

Hi,
I use new version of serpent and I god this warning message:
Warning message from function CheckNuclideData:

Nuclide 1001.03s has S(a,b) flag but no data
what does it mean?

My input file contains this:

Code: Select all

mat water -0.7169 moder lwtr 1001   tms 578.0
1001.03c  4.79030E-02
8016.03c  2.39515E-02
5010.03c  4.17094E-06
5011.03c  1.67885E-05

%     lwe7.10t -- hydrogen at 550K (H-1)
therm lwtr 0  lwe7.10t lwe7.12t
%therm lwtr 	lwe7.10t 
% --- Cross section library file path: 
set acelib "sss_endfb7u.xsdata"
set nfylib "sss_endfb7.nfy"
set declib "sss_endfb7.dec"
Thanks
Ondrej

User avatar
Tuomas Viitanen
Posts: 65
Joined: Thu Mar 25, 2010 1:50 pm
Security question 2: 0
Location: VTT Technical Research Centre of Finland, Espoo

Re: New S(a,b) capabilities in Serpent 2.1.24

Post by Tuomas Viitanen » Thu Aug 06, 2015 9:57 am

Hi,

I looked more thoroughly the output from various calculations with S(a,b) data involved and it seems that the warning message is given always when using the new OTF S(a,b) methodology. I had somehow missed that warning when testing the new capability.

With the new capability the CheckNuclideData routine fails to recognize the OTF S(a,b) reactions as S(a,b) reactions since I used new mt numbers in the implementation, but failed to make the necessary changes in CheckNuclideData. You can just ignore the warning. In case you want to get rid of it, you can change the if-sentence after line 1011 in checknuclidedata.c to

Code: Select all

/* add to number of S(a,b) reactions */

if ((mt == 1002) || (mt == 1004) || (mt == 2002) || (mt == 2004))
        nsab++;
We will include this fix in the next update.

Thank you for reporting the problem!

Best regards,

Tuomas

User avatar
Tuomas Viitanen
Posts: 65
Joined: Thu Mar 25, 2010 1:50 pm
Security question 2: 0
Location: VTT Technical Research Centre of Finland, Espoo

Re: New S(a,b) capabilities in Serpent 2.1.24

Post by Tuomas Viitanen » Wed Aug 12, 2015 4:30 pm

The new S(a,b) capabilities provide consistent results only in optimization modes 2 and 4 in Serpent 2.1.24. This issue will hopefully be fixed in the next update.

Tuomas

User avatar
Tuomas Viitanen
Posts: 65
Joined: Thu Mar 25, 2010 1:50 pm
Security question 2: 0
Location: VTT Technical Research Centre of Finland, Espoo

Re: New S(a,b) capabilities in Serpent 2.1.24

Post by Tuomas Viitanen » Fri Aug 14, 2015 12:25 pm

The OTF S(a,b) interpolation capabilites can be fixed in optimization modes 1 and 3 by making the following changes in tmpmajorants.c:

1) Remove the following lines (near line 621)

Code: Select all

#ifdef DEBUG
	    
	    if(ne != (long)RDB[loc + REACTION_XS_NE] ||
	       i0 != (long)RDB[loc + REACTION_XS_I0])
	      Die(FUNCTION_NAME, "Energy grids differ");
#endif
2) Add the following lines after (line 632 in original .c)

Code: Select all

ptr = (long)RDB[loc + REACTION_PTR_XS];
:

Code: Select all

sabtot=&WDB[ptr]; 

/* Check if energy grid differ (opti modes 1 and 3) */

if(ne != (long)RDB[loc + REACTION_XS_NE] ||
      i0 != (long)RDB[loc + REACTION_XS_I0]) {
	      
/* Reconstruct totxs of S(a,b) nuclide on a temporary array */
/* (and change sabtot pointer) */ 
	      
sabtot = (double *)Mem(MEM_ALLOC, ne, sizeof(double));
      	      
/* Interpolate */
	      	      
n = InterpolateData(E0, sabtot, ne, E1, &WDB[ptr],
		(long)RDB[loc + REACTION_XS_NE], 0, &dum1, &dum2);
	      
}
3) Replace (near line 638 in original .c)

Code: Select all

 

for(i=0; i<ne; i++){

if(E1[i] > sab_Emax)
	break;
	      
if(maj[i] <= RDB[ptr + i])
         maj[i] = RDB[ptr + i];

}
with

Code: Select all


for(i=0; i<ne; i++){
	      	      
if(E0[i] > sab_Emax)
	break;
	      
if(maj[i] <= sabtot[i])
	maj[i] = sabtot[i];
	      
}
	    
	    /* Free temporary array */

if(ne != (long)RDB[loc + REACTION_XS_NE] ||
	  i0 != (long)RDB[loc + REACTION_XS_I0])
	  Mem(MEM_FREE, sabtot);


4) Replace

Code: Select all

if(E1[i] > sab_Emax)
	      break;
(line 655 in original .c)
with

Code: Select all

if(E0[i] > sab_Emax)
	      break;
5) Add declarations for

Code: Select all

double *sabtot;
long dum1, dum2;
in the beginning of the function.

This fix will be included in Serpent 2.1.25. You only need to apply this fix if you intend to use the new On-the-fly S(a,b) interpolation capabilities of Serpent 2.1.24 in optimization modes 1 or 3.

Tuomas
Last edited by Tuomas Viitanen on Fri Aug 14, 2015 12:58 pm, edited 1 time in total.

satkinson
Posts: 23
Joined: Thu Apr 09, 2015 6:14 pm
Security question 1: No
Security question 2: 92

Re: New S(a,b) capabilities in Serpent 2.1.24

Post by satkinson » Tue Dec 01, 2015 8:35 pm

Hi Tuomas,

In your example of the HTGR here http://virtual.vtt.fi/virtual/montecarl ... RNUP/prism the library used is for room temperature graphite. I was hoping there would be access to temperatures above 1000k? For a HTR. I tried gre7.08t but this loaded 500k and gre7.10t doesn't exist.

I am also interested if there is a library for BeO? Although this is a long shot

Cheers

User avatar
Tuomas Viitanen
Posts: 65
Joined: Thu Mar 25, 2010 1:50 pm
Security question 2: 0
Location: VTT Technical Research Centre of Finland, Espoo

Re: New S(a,b) capabilities in Serpent 2.1.24

Post by Tuomas Viitanen » Wed Dec 02, 2015 11:24 am

Hi,

The naming conventions for the thermal scattering libraries included in the Serpent 1.1.7 distribution package can be found here (you can find essentially the same data also by looking at / grepping the .xsdata header files, which is usually faster):

http://montecarlo.vtt.fi/download/SSS_THERMAL.pdf

For instance, graphite at 1000K from ENDF/B-VII (.0) is called gre7.20t in this XS package.

Thermal scattering data for BeO does not exist in the Serpent 1 cross section library. We are planning to include all available thermal scattering nuclides (including BeO) in the cross section library of Serpent 2, which will be published together with the distribution version of Serpent 2. Preparing the Serpent 2 package will, however, take some time (until end of 2016?).

Tuomas

Post Reply