How to get external source?

Questions and discussion about applications, input, output and general user topics
sergiyshaula
Posts: 8
Joined: Wed Feb 26, 2020 10:05 pm
Security question 1: No
Security question 2: 7
Location: Oakville, Ca

Re: How to get external source?

Post by sergiyshaula » Thu Apr 02, 2020 4:53 pm

Jaakko, thank you very much for a quick answer! Very appreciate it!
I used two input files: (1) with description of the experimental model, (2) with description of the inner part of the bigger experimental reactor, also, I included more than ten files with material compositions.
so, the input file for the inner part (2) is as follows:

surf 1 inf
%
surf 2 pz 265.0 % Level of D2O
%
surf 3 cylz 0 0 72.5 % D2O Tank IR
surf 4 cylz 0 0 72.5 0 265 % Source from outside; I used this surf as the "surface source"
surf 8 pz 0 % Tank floor
surf 34 pz 323 % PT/CT Top

% The universe outside
cell 1 0 outside 34
cell 2 0 outside -8
cell 3 0 outside 3
%
cell 77 1 m1 -1 % D2O below 265 cm - level introduced by surface 2
cell 78 2 m2 -1 % Atmospheric air above 265 cm - level introduced by surface 2
% ------------------------------------------------------------------------------
lat 999 9 0 0 2
0 1
265 2

% I added to check
cell 22ssh 0 fill 999 -3 6c_sec 8 -34 /* my interpretation. SEC is the inserted cylinder with the Model */
include "mat_ % Here is a list of the files with material compositions
% Nuclear Data Library
set acelib "/home/shared/Serpent/library/sss_jeff311u.xsdata"
set nbuf 100
set egrid 5e-3

% boundary conditions
% 1:black; 2:reflective 3:period
set bc 2
src 1 ss -4
src 2 se 0.625
% cyl 0 0 72.5 0 265
% set power 120.0
set flux 1E+9

% ------------------------------------------------------------------------------
% include the SSM1 model
% ------------------------------------------------------------------------------

include "SEC_with_SSM1.serp"

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: How to get external source?

Post by Jaakko Leppänen » Fri Apr 03, 2020 1:07 pm

If this is a full-core model, why do you need the reflective boundary condition?

The error on insufficient fissile material is most likely related to the sampling of initial fission source. Serpent samples source points uniformly throughout the geometry, and accepts the points that land on fissile material. There are two typical reasons why this sampling fails:

1) There is no fissile material in the system because of a geometry error (do you see the fuel in the geometry plot?)
2) The fissile material occupies such small volume of the geometry that all sampled points miss these regions. In such case you can define a bounding box around the fissile zone using the sx sy and sz entries of the src card

Also note that there is an overlap in the outside world region. Try redefining cell 3 as:

cell 3 0 outside 3 8 -34

I don't think this makes any difference, though.
- Jaakko

lovergar
Posts: 4
Joined: Tue Aug 25, 2020 2:28 am
Security question 1: No
Security question 2: 7

Re: How to get external source?

Post by lovergar » Fri Sep 04, 2020 3:13 am

Hi Jakko,

I am running a photon shielding calculation (with variance reduction) where the spent fuel is used as the photon source.
In simplified terms, my spent fuel is arranged in a cylinder surrounded by a lead cylindrical shell. I want to measure my quantities of interest on the outside of a lead cylinder, and I placed a detector there. When I use a small thickness for my cylinder, all works well. However, when the thickness gets larger, I have a "source sampling failed because of low efficiency" error.

I am already using a bounding cylinder for my source. My src card is:

Code: Select all

src spent_fuel p
sp 0 0 50
srad 0 15
sz 0 100
sg spentfuelmaterial 2  % Uses spent fuel as a photon source
I understand that my fissile geometry might be small if compared with the full case geometry. Is there any other workaround to increase sampling efficiency?

Thanks,
Lorenzo

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: How to get external source?

Post by Jaakko Leppänen » Fri Sep 04, 2020 11:36 am

The bounding cylinder should solve the problem. What are the dimensions of the source region?
- Jaakko

lovergar
Posts: 4
Joined: Tue Aug 25, 2020 2:28 am
Security question 1: No
Security question 2: 7

Re: How to get external source?

Post by lovergar » Wed Sep 09, 2020 12:35 am

Hi again,
I solved the problem. There was some problem with the volume of one of the materials.

My current problem is about the dose calculation with the GVR getting stuck after the message "Starting external source simulation".
My geometry consists in a simple hollow cylinder inside which I place my spent fuel. To give an idea on the geometry, the radius of the fuel is about 15 cm, the height is 200 cm and the thickness of my cylinder is 20 cm in both axial and radial directions (lead). I place my geometry in a bounding box (-200,200)*(-200,200)*(-250,400).
I am following the variance reduction tutorial.
I perform a first simulation to generate the mesh in my system. The source and mesh generation code is as follows.

Code: Select all

% --- Source:

src spent_fuel p
sp 0 0 50
srad 0 15
sz 0 100
sg spentfuelmaterial1 2  % Uses spent fuel as a photon source

set opti 1
set bala 1
set gcu -1
set nps 100000 100

% --- First weight window mesh (GVR):

wwgen 1                    % wwgen identifier
1E-9 10000                 % convergence criteria and maximum numbers of interaction
3 -1                       % global variance reduction, no energy binning
1						% evenly spaced cylinder
-200.01 200.01 2 					% x coordinate
-200.01 200.01 2 					% y coordinate
-250.01 400.01 2					% z coordinate

%--- Generation of Adaptive mesh and iterations

wwin 1
wi 2 4 1                   % run 4 iterations with adaptive mesh (2), using wwgen 1
2 2 2                      % split cells in half (x  y and z)
10 1000                    % 10 outer iterations 1000 tracks 
1E9 1000000                % importance and neighbor criteria
-1.0 2.0 2.0 2.0          % density criteria and minimum dimensions

Then, I perform a second simulation to optimize the mesh around two dose detectors, that are located on the radial surfce (det 1) and on top of the cylinder (det 2)

Code: Select all


<same material, src, geometry, settings, library>

% -- detectors to optimize

surf surfDet1 cyl 0.0 42 7 43 50
det d1 p dtl surfDet1  dr -245  VOID          
    dv 1077.5662801812991

surf surfDet2 cyl 0.0 0.0 7 120 127
det d2 p dtl surfDet2  dr -245  VOID          
    dv 1077.5662801812991
	
% --- Second weight window mesh (GVR):

wwgen 1                    % wwgen identifier
1E-8 100000                 % convergence criteria and maximum numbers of interaction
2 -1                       % multiple detector, no energy binning
-1                         % use mesh from file
d1 1.0 
d2 1.0

% --- Generation of Adaptive mesh and iterations

wwin 1
wf "file1.inp.wwd3" 1           % read last mesh from previous iteration

Finally, I perform my dose calculation in the third file:

Code: Select all

<same material, src, geometry, settings, library>

%--detectors

surf surfDet1 cyl 0.0 42 7 43 50
det d1 p dtl surfDet1  dr -245  VOID          
    dv 1077.5662801812991

surf surfDet2 cyl 0.0 0.0 7 120 127
det d2 p dtl surfDet2  dr -245  VOID          
    dv 1077.5662801812991

% --- Generation of Adaptive mesh and iterations

wwin 1
wf "file2.inp.wwd" 1           % read last mesh from previous iteration
The first simulation proceeds rapidly and without issues. The second one manages to get to the end as well, but I have a lot of "Warning: excessive source splitting" messages. Finally, the third simulation starts but after having loaded nuclides, libraries, energy grids, activities, gets stuck in "Starting external source simulation".

Any suggestions on how to troubleshoot this? I read your paper at M&C 2017 and there you mention to adapt the importances of the detectors. Do you think this is what I need here?
Last edited by lovergar on Fri Sep 18, 2020 1:01 am, edited 1 time in total.

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: How to get external source?

Post by Jaakko Leppänen » Wed Sep 09, 2020 12:19 pm

This could be related to the source sampling efficiency. If most of your source is in a region where the importance is low, the routine rejects most of the sampled points.

Could you post the full input (including the geometry and material definitions)?
- Jaakko

s.pelka
Posts: 2
Joined: Fri Sep 24, 2021 11:47 pm
Security question 1: No
Security question 2: 7

Re: How to get external source?

Post by s.pelka » Mon Sep 27, 2021 7:56 pm

Hello!

This thread is a bit old, but I am hoping to get some advice! I am having a similar problem as @lovergar, in that my simulation gets stuck at "Starting external source simulation" until I finally cancel it and have to run the simulation using the Global Variance Reduction weight windows instead. Are there any ideas for how to "push" the simulation along so I can use the detector specific weight windows file?

Ana Jambrina
Posts: 682
Joined: Tue May 26, 2020 5:32 pm
Security question 1: No
Security question 2: 7

Re: How to get external source?

Post by Ana Jambrina » Mon Sep 27, 2021 8:47 pm

Could you describe in more detail the (input) calculation and/or post here the input?
- Ana

s.pelka
Posts: 2
Joined: Fri Sep 24, 2021 11:47 pm
Security question 1: No
Security question 2: 7

Re: How to get external source?

Post by s.pelka » Mon Sep 27, 2021 9:56 pm

Hi Ana!

I am trying to measure the dose in a detector after the particles go through a relatively thick shield: 30-80 cm of neutron absorbing shielding material and 1-10 cm of photon shielding. For that I have a reactor within a cylinder and a spherical detector located 5 meters away from the center of the reactor.

I divide the simulation series into four stages, similar to @lovergar:
1. First I set up a run to get a source file for the reactor without any shielding, which works fine.

2. Then I add the shields and I use the source file to generate Global Variance Reduction weight windows.

Code: Select all

set bc 1 1 1 
set nps 20000000 
set egrid 0.0
set ures 1 1 0 92235.82c 92238.82c
set bala 1  % OMP load balancing
set nbuf 99900

%  --- Neutron Source
src 1 sf "./neutron.src" -1
%  --- Fissions off
set nphys 0

% --- Weight window generation:
wwgen 1  % identifier
    5e-11 50000 % convergence criteria: tolerance and iterations
    3 -1  % global variance reduction. No energy binning
    1  %  mesh
    -209.935611 209.935611 4  % x mesh
    -209.935611 209.935611 4  % y mesh
    -60.01 530.01 401              % z mesh

wwin 1
wi 3 4 1                % run 4 iterations with adaptive mesh, track based
  2 1 2                 % split cells in half (x and z only)
  10 50                 % 10 outer iterations 50 tracks
  1E9 50                % importance and neighbor criteria
  -1.0 1.0 1.0 0.1      % density criteria and minimum dimensions
This produces four weight window files and four _detn.m files.

3. Detector specific weight window file production
I use the same input file as from step 2 to generate a weight window file for my detector, reading in the last GVR weight window.

Code: Select all

% --- Weight window generation:
wwgen 1  % identifier
   1e-12 50000 % convergence criteria: tolerance and iterations
   1 -1  % detector variance reduction. No energy binning
  -1  % read in a file
   PhantomDose 1.0

wwin 1
wf "reactor.i.wwd3" 1
This simulation also runs without a hitch, and it produces a .wwd file that should be specific to my detector.
So far, none of the steps produce any warnings or errors.

4. Finally run the simulation with the detector specific weight window file .wwd
I use the same input file as from step 2 and 3, reading in the final weight window.

Code: Select all

set nps 80000000 

wwin 1
wf "reactor.i.wwd" 1
It's at this stage that the simulations tend to get stuck. Sometimes the simulation will proceed as normal, but more frequently the simulation gets to the "Starting external source simulation..." section and stays there for a long time until I cancel it.

Ana Jambrina
Posts: 682
Joined: Tue May 26, 2020 5:32 pm
Security question 1: No
Security question 2: 7

Re: How to get external source?

Post by Ana Jambrina » Mon Sep 27, 2021 10:06 pm

Have you tracked the calculation in terms of splitting/rejection/etc.? Have you checked the mesh resolution? Have you added a bounding box to improve the source sampling efficiency? How did you define the detector? - this behaviour might be a consequence of a low sampling efficiency.
Could you post the full input to be able to reproduce the calculation? Which Serpent version are you running?
- Ana

Post Reply