Track plotter

This category replaces the missing input manual
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:

Track plotter

Post by Jaakko Leppänen » Wed May 09, 2012 2:02 pm

The geometry plotter can be used to visualize neutron tracks starting from the source distribution. The track output is produced when the code is run with command line option:

Code: Select all

sss2 -tracks <n> input
Paramater <n> is the number of sampled source points, from which the tracks start. The tracks are plotted in all geometry plots defined in the input file.

The feature is available from version 2.1.5 on.
- 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: Track plotter

Post by Jaakko Leppänen » Fri Jul 10, 2015 11:56 am

The more recent updates also have an option to split the track plot into separate time frames, which can be composed into an animation. This requires a few additional parameters in the input: (syntax corresponds to version 2.1.24)

Code: Select all

set tpa  
<tmin> <tmax>
<l>
<nf>
<max_events>
where <tmin> and <tmax> are the starting and end time of the simulation, <l> is the lenght of the plotted particle tracks in each frame (in cm) and <nf> is the number of frames. The last parameter <max_events> defines the lenght of a buffer used to store collision events, and it must be sufficiently large to cover all events occuring within the given time interval. The track plotter is called with the same command line option.

The simulation produces a number of track plots named "<input>_trck<n>_frame<m>.png". I've used Imagemagick to compose the frames into a gif animation:

Code: Select all

convert *.png anim.gif
Here's an example input of a prompt super-critical system with track point animation:

Code: Select all

pin 1
fuel 2.82306E+01
air

surf 1 sqc 0.0 0.0 3.10537E+01
cell 1 0 fill 1  -1
cell 2 0 outside  1

mat fuel -19.4 rgb 100 200 100
92235.03c 0.375
92238.03c 0.625

mat air -1E-9 rgb 200 250 250
2004.03c 1.0

set nps 1 1
src 1 sp 0.0 0.0 0.0

plot 3 500 500
set nbuf 50000000

set tcut 6E-7
set tpa
0.0 5.5E-7  % minimum and maximum time
1.0         % tail length (cm)
500         % number of frames
200000000
The resulting track plot animation can be downloaded here (file size about 5.5 MB).

Note that simulating super-critical systems requires setting a time cut-off with the "set tcut" option, to terminate the infinite prompt fission chains. Getting the simulation running may also require some adjustments to the "set nbuf" parameter and the last value in the "set tpa" card.

The plotter still has a few bugs, which I'm hoping to correct in future updates.
- Jaakko

sprogg77
Posts: 2
Joined: Tue Oct 27, 2015 2:36 pm
Security question 1: No
Security question 2: 92

Re: Track plotter

Post by sprogg77 » Tue Jan 10, 2017 3:19 pm

Jaakko, how much memory is required to run this simulation? As is, during allocation of memory for particle structures, Serpent's memory consumption swells to 30 or 40GB on my machine, many times what is available. If I reduce the tmax and tcut by several orders of magnitude I still get the same behaviour. I have tried reducing max_events and nbuf but to no avail.

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: Track plotter

Post by Jaakko Leppänen » Wed Jan 11, 2017 12:14 am

Unfortunately I haven't come up with easy answers. Running track plot animations always takes trial error.

Memory consumption depends on the <nbuf> parameter, <max_events>, and possibly the number of histories defined by "set nps" (not sure about the last one). The number of OpenMP threads also affects the allocated memory size, at least to some extent, so try running the simulation without any parallelization.

If you have a high-multiplying system, <nbuf> is probably more important than <max_events>. If you have a system with long neutron histories, <max_events> is more important.

Start with a very short time interval (not only <tmax> but also time cut-off using "set tcut"). Try setting the memory allocation options in such way that the transport simulation is run (no more memory is allocated after that point). Then gradually increase the simulated time interval.

The population grows exponentially in super-critical systems, so the number of events can be very sensitive to time cut-off. It's also a random process, so the time the rapid growth starts cannot really predicted.
- Jaakko

jblokker
Posts: 7
Joined: Tue Jun 06, 2017 3:40 pm
Security question 1: No
Security question 2: 40

Re: Track plotter

Post by jblokker » Wed Aug 02, 2017 1:41 pm

Hi Jaakko, I want to use the track plotter to see if my neutron sources are distributed correctly in the geometry, but when I try to run my code with the command line to do this I get the following error in my output:

''Fatal error in function EventFromBank:

Event bank is empty

Simulation aborted.''

which I don't understand because I have used it before and it worked fine then. Do you have an idea what might be wrong?

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: Track plotter

Post by Jaakko Leppänen » Wed Aug 02, 2017 4:29 pm

Try adjusting the last parameter in the "set tpa" card. That increases the size of the event buffer. The production of new fission chains is a random process, and sometimes you get more particles that can fit into the memory.
- Jaakko

jblokker
Posts: 7
Joined: Tue Jun 06, 2017 3:40 pm
Security question 1: No
Security question 2: 40

Re: Track plotter

Post by jblokker » Fri Aug 04, 2017 2:31 pm

Thank you, it is working now. The only strange thing is that I didn't use the ''set tpa'' card until you recommended it and the track plotter worked fine without it in the past.

Francesco.mt
Posts: 5
Joined: Thu Jan 07, 2021 9:38 pm
Security question 1: No
Security question 2: 7

Re: Track plotter

Post by Francesco.mt » Wed Jun 23, 2021 12:15 am

Hello Jaakko,
I'm testing the script you posted here in 2015. I report it hereafter:

Code: Select all

pin 1
fuel 2.82306E+01
air

surf 1 sqc 0.0 0.0 3.10537E+01
cell 1 0 fill 1  -1
cell 2 0 outside  1

mat fuel -19.4 rgb 100 200 100
92235.03c 0.375
92238.03c 0.625

mat air -1E-9 rgb 200 250 250
2004.03c 1.0

set nps 1 1
src 1 sp 0.0 0.0 0.0

plot 3 500 500
set nbuf 50000000

set tcut 6E-7
set tpa
0.0 5.5E-7  % minimum and maximum time
1.0         % tail length (cm)
500         % number of frames
200000000
The issue is that, with Serpent 2.1.32, fission neutrons (i.e. neutrons generated from fission collisions) are no longer tracked (as it appears from the video you shared in 2015 instead). It seems that neutrons die with a capture and, if fission neutrons arise, they are not visualized in the printed images.
Am I missing something? Should I include some missing input cards?

Thank you in advance for your response,
Francesco

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

Re: Track plotter

Post by Ana Jambrina » Wed Jun 23, 2021 7:44 am

Have you checked whether the discrepancy comes from Serpent and not from the animation generation?
- Ana

Francesco.mt
Posts: 5
Joined: Thu Jan 07, 2021 9:38 pm
Security question 1: No
Security question 2: 7

Re: Track plotter

Post by Francesco.mt » Wed Jun 23, 2021 9:39 am

Thank you so much Ana for your quick answer.
Could you explain me better what do you mean by checking Serpent discrepancy?
I performed a criticality calculation and the system is far beyond criticality.

Francesco

Post Reply