Parameterization of Serpent input data sets

New ideas for code development

Parameterization of Serpent input data sets

Postby armins » Tue Sep 25, 2018 5:03 pm

Recently, an extension has been made to the Serpent code (based on 2.1.29) that allows parameterization of the Serpent input files.

Using the delimiters < and >, numerical parameters can be specified by either numbers, arithmetic expressions or variables. The string between < and > is interpreted as an arithmetic expression which can be assigned to an arbitrary variable which may be used at other places in the input file and input files loaded by the "include" statement.

The extension is implemented by a very small modification of readtextfile.c, readinput.c and the new source file evaluate.c which contains the parser.

Below are parts of simple parameterized version of the BWR sample input taken from the NEA example directory.

% --- Asymmetric BWR assembly with Gd-pins -------------------

set title "BWR+Gd"

<@ p_pitch = 1.295> % @ means no echo
<@ a_pitch = 15.375>
<@ FuelDens = 10.424>
<@ FuelGdDens = 10.291>
<@ SteelDens = 6.55 >

% --- Fuel Pin definitions:

pin <i=1>
fuel1 <rfuel=0.867/2>
void <rgap=4.42000E-01>
clad <rclad=5.02500E-01>
cool

pin <i+1>
fuel2 <rfuel>
void <rgap>
clad <rclad>
cool

pin <i+2>
fuel3 <rfuel>
void <rgap>
clad <rclad>
cool


% --- Lattice (type = 1, pin pitch = 1.295):

lat 10 1 0.0 0.0 12 12 <p_pitch>
9 9 9 9 9 9 9 9 9 9 9 9
9 1 2 3 5 5 5 5 5 3 2 9
9 2 3 5 6 6 6 6 7 5 4 9
9 3 5 7 6 7 6 6 6 6 5 9
9 5 6 6 6 6 6 6 7 6 6 9
9 5 6 7 6 9 9 9 6 7 6 9
9 5 6 6 6 9 9 9 6 6 6 9
9 5 6 6 6 9 9 9 6 6 6 9
9 5 7 6 7 6 6 6 7 6 5 9
9 3 5 6 6 7 6 6 6 6 5 9
9 2 4 5 6 6 6 6 5 5 3 9
9 9 9 9 9 9 9 9 9 9 9 9

% --- Outer channel (assembly pitch = 15.375):

surf 1 sqc 0.0 0.0 6.70000
surf 2 sqc 0.0 0.0 6.93000
surf 3 sqc -0.233 -0.233 <a_pitch / 2>

% --- Fuel materials:

mat fuel1 <- FuelDens>
92235.09c -0.015867
92238.09c -0.86563
8016.09c -0.1185

mat fuel2 <- FuelDens>
92235.09c -0.018512
92238.09c -0.86299
8016.09c -0.1185

% --- Fuel with Gd:

mat fuel7 <-FuelGdDens>
92235.09c -3.13109E-02
92238.09c -8.14929E-01
64152.09c -6.70544E-05
64154.09c -7.13344E-04
64155.09c -5.06012E-03
64156.09c -7.08860E-03
64157.09c -5.43718E-03
64158.09c -8.64341E-03
64160.09c -7.69426E-03
8016.09c -1.19056E-01

% --- Cladding and channel box wall:

mat clad <-SteelDens>
40000.06c -0.98135
24000.06c -0.00100
26000.06c -0.00135
28000.06c -0.00055
50000.06c -0.01450
8016.06c -0.00125

mat box <-SteelDens>
40000.06c -0.98135
24000.06c -0.00100
26000.06c -0.00135
28000.06c -0.00055
50000.06c -0.01450
8016.06c -0.00125
armins
 
Posts: 1
Joined: Mon Aug 27, 2018 1:01 pm

Return to Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron