xGPT efunc file contents

Questions and discussion about applications, input, output and general user topics

xGPT efunc file contents

Postby keckler » Tue Oct 10, 2017 7:27 pm

Hello,

I am trying to use a custom perturbation with the new XGPT capabilities to generate the doppler coefficient for materials in my core. I seem to be having a hard time getting this to go, so I want to ask some questions to clarify a few points.

There is an example of using the XGPT capability here: http://serpent.vtt.fi/mediawiki/index.php/XGPT_example
I am trying to follow this example, but I find one aspect somewhat confusing. I would think that in the 'efunc' file that the user provides, the cross-section derivatives should be provided. For my case, I want the derivatives as a function of temperature. To do this, I am doppler broadening my cross sections from 600K to 605K. I would then think that I want to calculate (sigma(605) - sigma(600))/5 to approximate the derivative. In the example provided, it says to instead calculate (Sig_301 - Sig_300)/Sig_300. I suppose this is the derivative (since the temperature difference is simply 1) divided by the absolute temperature so that the resulting units are simply 1/K. Is this correct? I just would like clarification on this point.

Either way, when calculating these values, typically the values end up being quite small, on the order of 10^-4 or 10^-5. From what I understand, the typical values in these files should be on the order of 1, as that is what would be added or subtracted in the case that the 'efunc' file is not provided. This seems like a very large difference, so I want to get some validation that my thinking is correct.

Finally, I wanted to mention that I have a case running at the moment with the XGPT implemented, along with some other "standard" perturbations. Although the run is only ~25% complete at the moment, the results that have been printed so far indicate that I have done something wrong with the XGPT portion. I am receiving real values for all of the other perturbations, but all of the XGPT results so far are simply 0. This makes met think something is wrong, possibly because the values that I have in my 'efunc' file are so small.

Any help would be appreciated. Or point me to another example of how to use the XGPT. I can send my input via email if helpful, but it is too big to upload here. Thanks for your help!
keckler
 
Posts: 20
Joined: Fri Jun 30, 2017 11:48 pm
Location: Berkeley, CA

Re: xGPT efunc file contents

Postby Ville Valtavirta » Wed Oct 11, 2017 12:59 pm

Hi,

the "efunc" file should contain the relative perturbation applied to the cross section, so you'll want to divide the finite difference that you calculate with the base (unperturbed) cross section.

I think I can see from the wiki-description, why you got the impression that the values in the file should be around 1 or -1. Since the values in the file are relative perturbations to the cross section, I imagine that the typical values will be some small fractions of 1.0 (both positive and negative). However, around resonances you might get some larger than unity positive perturbations I guess.

You can probably calculate the relative perturbation to the cross section with (sigma(605) - sigma(600))/sigma(600) or even (sigma(650) - sigma(600))/sigma(600), then run the calculation using that data, read the sensitivity of the k-eff (I think you'll have to multiply the sensitivity that you get with your k-eff in order to get the perturbations effect on your k-eff since sensitivities are by definition relative quantities) and then divide by your temperature difference afterwards to get the unit of pcm/K.

As for getting zeros for the output, I think the XGPT results should only show in the energy integrated results, e.g. ADJ_PERT_KEFF_SENS_E_INT. Are you seeing zeros in those also?

Finally, I don't know how effective the XGPT is in actually reproducing Doppler coefficients since the implementation relies on first-order (e.g. linear) perturbation theory and the temperature effect on the cross section is probably quite non-linear.

-Ville
Ville Valtavirta
 
Posts: 138
Joined: Fri Sep 07, 2012 1:43 pm

Re: xGPT efunc file contents

Postby keckler » Wed Oct 11, 2017 6:56 pm

Thanks for the thorough reply!

From what you say, it seems like my 'efunc' file should be correct. However, I am still getting all zeros in my results of the custom perturbation, for both the energy integrated and the energy dependent values. Would you like me to send you my input?
keckler
 
Posts: 20
Joined: Fri Jun 30, 2017 11:48 pm
Location: Berkeley, CA

Re: xGPT efunc file contents

Postby Ville Valtavirta » Thu Oct 12, 2017 9:36 am

Yes,

you can post it here or send it to the serpent e-mail address found at top right of this page: http://montecarlo.vtt.fi/users.htm

-Ville
Ville Valtavirta
 
Posts: 138
Joined: Fri Sep 07, 2012 1:43 pm

Re: xGPT efunc file contents

Postby keckler » Thu Oct 12, 2017 7:56 pm

Hi Ville,

I have sent the input deck via email to the serpent email. Let me know if you find anything, and thanks for your help!

Chris
keckler
 
Posts: 20
Joined: Fri Jun 30, 2017 11:48 pm
Location: Berkeley, CA

Re: xGPT efunc file contents

Postby Ville Valtavirta » Fri Oct 13, 2017 2:21 pm

I do get some nonzero results for your input with Serpent 2.1.29:

Code: Select all
>> run input_sens
>> ADJ_PERT_KEFF_SENS_E_INT(iSENS_MAT_TOT, iSENS_ZAI_TOT, iSENS_PERT_nonvoidDoppler)
ans =    3.5149e-08


You should notice that the materials and ZAIs that the custom perturbations affect should be given in the definition of that perturbation and the results are written out using index iSENS_MAT_TOT for the material and iSENS_ZAI_TOT for the ZAI. That is to say that the custom perturbations only score the first material bin and the first ZAI bin.

Another thing that you should notice is that the custom perturbation are by default applied to all materials, all nuclides and all reaction modes and only the total effect over all different materials, nuclides and reaction modes can be calculated.

If you want to calculate the temperature effect separately for the different reaction modes (as you probably should) and for different materials, you'll need one custom perturbation for each (material, reaction mode) entry.

-Ville
Ville Valtavirta
 
Posts: 138
Joined: Fri Sep 07, 2012 1:43 pm

Re: xGPT efunc file contents

Postby keckler » Fri Oct 13, 2017 7:56 pm

Alright, so now I also see that there is a value printed for the index iSENS_MAT_TOT. So thank you for pointing that out. I was expecting there to be values for all of my materials.

My understanding was that the custom perturbation would be applied to all of the materials and ZAIs that are specified for the general perturbations, unless only a subset of those materials and ZAIs were specified in the custom perturbation. For example, for the following input, I would have expected all materials and the total ZAI to have been calculated for the custom perturbation as well as for the standard perturbation.

Code: Select all
% --- perturbation settings
sens resp keff 1
sens pert matlist all
sens pert zailist total
sens pert xs all
sens opt egrid pertgrid
sens pert custom nonvoidDoppler efunc efunc.txt

ene pertgrid 1 1E-10 1E3


But from what you are saying, if I want to get the custom perturbation applied to all of my materials, I should use something along the following lines:

Code: Select all
% --- perturbation settings
sens resp keff 1
sens pert custom nonvoidDopplerMat1 efunc efunc1.txt matlist Batch1 zailist 92235 realist fiss
sens pert custom nonvoidDopplerMat1 efunc efunc2.txt matlist Batch2 zailist 92235 realist fiss
sens pert custom nonvoidDopplerMat1 efunc efunc3.txt matlist Batch3 zailist 92235 realist fiss
...


And then the result for each custom perturbation will then be indexed under iSENS_MAT_TOT and iSENS_ZAI_TOT.

Looking at the example provided on the wiki, it is clear now that you've clarified a few points here, but thanks for helping guiding me through that.
keckler
 
Posts: 20
Joined: Fri Jun 30, 2017 11:48 pm
Location: Berkeley, CA

Re: xGPT efunc file contents

Postby Ville Valtavirta » Mon Oct 16, 2017 1:02 pm

I understand how it would be logical to assume that the custom perturbations are applied to all of the ZAIs and materials defined for the other perturbations too.

However, for most of the applications of the energy dependent custom perturbations I would imagine that it does not make much sense to apply the same perturbation to different materials or ZAIs: For example, when estimating the temperature effects (Doppler), the relative difference in the cross sections due to elevated temperature is completely different for U238 than for U235 so it does not make much sense to use the same energy dependent function to perturb both of them.

Likewise, the temperature effect on the total capture cross section of one fuel material may be quite different to the temperature effect on another fuel material if the compositions are different.

I would imagine that you'll want to generate separate energy dependent perturbations for each different material and also for their different reaction modes.

Your example should produce the sensitivity of k-eff to the perturbation of the fission cross section of U-235 separately in each of the three materials according to the energy dependent functions.

-Ville
Ville Valtavirta
 
Posts: 138
Joined: Fri Sep 07, 2012 1:43 pm

Re: xGPT efunc file contents

Postby keckler » Thu Oct 19, 2017 3:21 am

I just wanted to post a followup to this post to say that I got the calculations working correctly, I believe.

Here are the details and some feedback, for anybody else who might want to do the same thing:

1. I used xsplot to generate the cross sections at a couple different temperatures. I used a difference of 50C between the two points, because I found that using a difference of just 1C or even 5C was not enough. With these small temperature differences, the differences between the cross sections looked very noisy. In order to get sufficiently resolved cross sections, I had to use ~100 points per energy decade. In order to keep my file sizes small, I only printed the cross sections over the energy range from the lowest neutron energies in my core to the start of the unresolved resonance region (since the doppler broadening isn't performed in the unresolved resonance region anyways in Serpent).

A feedback on this: it would be nice if you could select which isotopes to print out using xsplot, as I was only interested in a few isotopes of my whole, but it still printed out cross sections for all of the isotopes over the whole energy range in my problem. This gave me a very large file!

2. I then calculated the values needed for the efunc file as (sigma(650)-sigma(600))/sigma(600)/50, where the '50' is for the difference that I used in point 1 above. Because some of the cross sections in the energy range that I printed were in the unresolved range and these cross sections are not broadened by Serpent, these differences were exactly zero. I repeated this process for each of the isotopes and reactions that I was interested in, and put each reaction/isotope combination in a separate efunc file.

Feedback on this: If I left these values that were exactly zero in the efunc file, the code threw an error. I had to remove these zero entries by hand before running.

3. I then constructed the sensitivity input lines for my problem. Because I wanted to get a map of the doppler coefficients, I had to add a lot of lines to my input deck. Generally, these look like the following:

Code: Select all
% --- perturbation settings
sens resp keff 1
sens opt egrid pertgrid
ene pertgrid 1 1E-10 1E3

% U238 fission and capture
sens pert custom Batch1Axial1_238fiss efunc 238fiss.txt matlist Batch1Axial1 zailist 922380 realist fiss
sens pert custom Batch1Axial2_238fiss efunc 238fiss.txt matlist Batch1Axial2 zailist 922380 realist fiss
sens pert custom Batch1Axial3_238fiss efunc 238fiss.txt matlist Batch1Axial3 zailist 922380 realist fiss
sens pert custom Batch1Axial4_238fiss efunc 238fiss.txt matlist Batch1Axial4 zailist 922380 realist fiss
sens pert custom Batch1Axial5_238fiss efunc 238fiss.txt matlist Batch1Axial5 zailist 922380 realist fiss
sens pert custom Batch1Axial6_238fiss efunc 238fiss.txt matlist Batch1Axial6 zailist 922380 realist fiss
sens pert custom Batch1Axial7_238fiss efunc 238fiss.txt matlist Batch1Axial7 zailist 922380 realist fiss
sens pert custom Batch1Axial8_238fiss efunc 238fiss.txt matlist Batch1Axial8 zailist 922380 realist fiss
sens pert custom Batch1Axial9_238fiss efunc 238fiss.txt matlist Batch1Axial9 zailist 922380 realist fiss
...
sens pert custom Batch1Axial1_238capt efunc 238capt.txt matlist Batch1Axial1 zailist 922380 realist capt
sens pert custom Batch1Axial2_238capt efunc 238capt.txt matlist Batch1Axial2 zailist 922380 realist capt
sens pert custom Batch1Axial3_238capt efunc 238capt.txt matlist Batch1Axial3 zailist 922380 realist capt
sens pert custom Batch1Axial4_238capt efunc 238capt.txt matlist Batch1Axial4 zailist 922380 realist capt
sens pert custom Batch1Axial5_238capt efunc 238capt.txt matlist Batch1Axial5 zailist 922380 realist capt
sens pert custom Batch1Axial6_238capt efunc 238capt.txt matlist Batch1Axial6 zailist 922380 realist capt
sens pert custom Batch1Axial7_238capt efunc 238capt.txt matlist Batch1Axial7 zailist 922380 realist capt
...


Feedback on this: It would be very nice to be able to combine some of these lines together! Also, even though I am only interested in a single energy bin for my results, I still am required to put something for the 'sens opt egrid' input, or else the code throws an error.

4. I then ran the code, and the results were printed out as explained in one of the prior posts.

Feedback on this: Because the names of my perturbations are kind of long, some of them ended up being longer than the standard length that is printed to the _sens.m output file. This caused a problem when reading the results into Matlab. For some reason Matlab requires all of the strings in a vector to be of the same length. So I had to manually go through and make all of the strings the same length by padding with spaces.

Also, because the XGPT results are all printed in the iSENS_MAT_TOT and iSENS_ZAI_TOT indices, it seems unnecessary for the results to be printed in a 4D array. The results could just be in a 2D array, with values and errors. Perhaps I am missing a reason that there should be the 4D array.

5. I get results that look like this for the 238 capture doppler map (see attached). The total value summed over the reactor is ~-4E-6. These results compare well against results for similar metallic, low leakage, very hard spectrum cores. For the other doppler coefficients that I calculated, the values are as I expect as well.

-----

So it looks like this is working somewhat well! Hopefully this short 'tutorial' can be useful to others as well.
Attachments
doppler.png
doppler.png (76.6 KiB) Viewed 97 times
keckler
 
Posts: 20
Joined: Fri Jun 30, 2017 11:48 pm
Location: Berkeley, CA

Re: xGPT efunc file contents

Postby Ville Valtavirta » Fri Oct 20, 2017 9:24 am

Thank you!

Descriptions of user applications for some of the new features are always extremely welcome as we can take the known applications in account when doing future development. I appreciate all of the good feedback too.

Do you remember which error you got if you tried to leave the zero entries in the efunc-file? That sounds like something that should have an easy fix.

As for the future of custom (XGPT) perturbations, I think it will be a good idea to separate them from the normal perturbations so that you don't need to define an energy grid for them and also would get the output of the custom perturbations separate from the 4-D array of the normal perturbations.

I would also like to remove the xsplot-step from the process and have Serpent calculate the cross section derivatives inside the code in the future.

-Ville
Ville Valtavirta
 
Posts: 138
Joined: Fri Sep 07, 2012 1:43 pm


Return to Users

Who is online

Users browsing this forum: No registered users and 1 guest

cron