New source routines in update 2.1.4

This category replaces the missing input manual
Post Reply
User avatar
Jaakko Leppänen
Site Admin
Posts: 2354
Joined: Thu Mar 18, 2010 10:43 pm
Security question 2: 0
Location: Espoo, Finland
Contact:

New source routines in update 2.1.4

Post by Jaakko Leppänen » Wed Apr 04, 2012 10:46 am

The following new source routines were implemented in version 2.1.4:

1) Reading source distribution from file
2) User-defined subroutine usersrc.c

The syntax for reading a source files is:

Code: Select all

src <name> sf <file> <type>
where <file> is the file name where the distribution is read and <type> is the file type. At the moment the code supports only ASCII format, with one source point per line, consisting of the coordinates, direction cosines, energy, weight and time:

Code: Select all

x1 y1 z1 u1 v1 w1 E1 wgt1 t1
x2 y2 z2 u2 v2 w2 E2 wgt2 t2
...
xn yn zn un vn wn En wgtn tn
The direction cosines must be normalized to 1. Setting the type flag to 1 means that the weight and time are read as-is. Type 2 sets all times to zero and weights to 1.0.

A user-defined source distribution can be added in subroutine "usersrc.c", which also includes the instructions for the coding. The subroutine is called by adding "si" in the source definition:

Code: Select all

src <name> si <np> <v1> <v2> ...
where <np> is the number of parameters passed to the subroutine, followed by the values.
- Jaakko

jesse.johns
Posts: 114
Joined: Wed Apr 20, 2011 5:19 am

Re: New source routines in update 2.1.4

Post by jesse.johns » Sat Aug 23, 2014 8:14 am

Hello:

I couldn't find where the change was addressed, but it looks like the options for <type> are 1 and 2 as of version 2.1.21.

I tried finding out what the types were, it looks like 1 is the basic type and type 2 simply reset the time and weight?

Thanks.

Ville Valtavirta
Posts: 455
Joined: Fri Sep 07, 2012 1:43 pm
Security question 1: No
Security question 2: 92

Re: New source routines in update 2.1.4

Post by Ville Valtavirta » Tue Aug 26, 2014 4:53 pm

Hi,

that's correct. Type 2 just sets the time coordinate of the neutron to zero and assigns equal weight of 1.0 to each of the source points. With type 2 you should be able to use the Serpent generated source files as an initial source for a dynamic calculation without setting these yourself.

-Ville

jesse.johns
Posts: 114
Joined: Wed Apr 20, 2011 5:19 am

Re: New source routines in update 2.1.4

Post by jesse.johns » Sat Aug 30, 2014 11:12 pm

Hello,

I think the initial post should be editted to relflect this. The code errors out with if the type is set = 0 as the post indicates you should do.

Thanks,

Jesse

User avatar
Jaakko Leppänen
Site Admin
Posts: 2354
Joined: Thu Mar 18, 2010 10:43 pm
Security question 2: 0
Location: Espoo, Finland
Contact:

Re: New source routines in update 2.1.4

Post by Jaakko Leppänen » Mon Sep 01, 2014 5:31 pm

Edited.
- Jaakko

jesse.johns
Posts: 114
Joined: Wed Apr 20, 2011 5:19 am

Re: New source routines in update 2.1.4

Post by jesse.johns » Tue Jul 21, 2015 8:40 pm

Are there any plans to extend the "sd" option for directional biasing at a range of solid angles?

User avatar
Jaakko Leppänen
Site Admin
Posts: 2354
Joined: Thu Mar 18, 2010 10:43 pm
Security question 2: 0
Location: Espoo, Finland
Contact:

Re: New source routines in update 2.1.4

Post by Jaakko Leppänen » Tue Jul 21, 2015 10:03 pm

At the moment there are no particular plans, but including some directional biasing should be relatively easy to do. There is a source routine usersrc.c, that is basically a template (with instructions) for implementing new source types.
- Jaakko

Post Reply