McStas logo McStas - A neutron ray-trace simulation package ILL; PSI; ESS Niels Bohr Institute DTU Physics NEXMAP

McStas

About McStas
 Conditions of use
 Authors/Contacts
 Project funding
 Screenshots

Download
 Components
 Linux Install (deb/rpm)
 Mac OS X Install
 Unix Install (src code)
 Windows Install
 Other Downloads (share)

Mailing list

Search web/mailinglist

Documentation
 McStas manual
 FAQ
 Known problems
 Publications
 C Compilers
 Other
 Tools
 Tutorial

Workshops/conferences

Developments

Links

Report bugs

Git

McStas Ubuntu live-dvd


McStas: Virtual_mcnp_ss_output Component

[ Identification | Description | Input parameters | Output parameters | Links ]

The Virtual_mcnp_ss_output Component

This component uses a Source Surface type file of recorded neutrons from the reactor monte carlo code MCNP as a source of particles.

Identification

Description

This component draws neutron events from a Source Surface file created using the
MCNP Monte Carlo code and converts them to make them suitable for a McStas simulation

Note that axes orientation may be different between MCNP and McStas!
Note also that the conversion of between McStas and MCNP units and parameters 
is done automatically by this component - but the user must ensure that
geometry description matches between the two Monte Carlo codes.

The verbose mode is highly recommended as it displays lots of useful informations.

This interface uses the MCNP Source Surface Read/Write format (SSW/SSR). 
Infomation transfer from(to) SSW files proceeds via a set of Fortran modules 
and subroutines collected in "subs.f"
For succesful compilation, it is required that these subroutines are compiled 
and linked to the instrument file:

 mcstas dummy.instr  -> generates dummy.c
 gfortran -c subs.f  -> generates subs.f
 gcc -o runme.out dummy.c subs.o -lm -lgfortran  -> generates runme.out

Note that this requires a fortran compiler (here gfortran) and gcc.

%BUGS
None known bugs so far. But surely this will change...
Caveat: when writing the header for the output wssa file, the number of histories and tracks are assumed to be that of the
        input MNCP run. This is generally not the case, due to losses in the McStas simulation step.
        In case of losses any subsequel MCNP run based on the McStas output, can be confused by inconsistency between
        header and file content. To resolve, either ensure that NPS is lower than the actual number of events in the McStas output.
        Or hardcode values of nhis & ntrk in either subs.f or Virtual_mcnp_ss_output.comp.

EXAMPLE of usage:
first a MCNP simulation is run
    and at a relevant surface, a Source Surface Write card is given (e.g. for MCNP surface #1, add the line:
    SSW 1 
    to the end of the input file.
    By this a ".w" file is produced, which then serves as input to the McStas simulation.
Present version: rename *.w to rssa, and make sure to put it in the dir from which McStas is run (or use symbolic links)
WARNING: This is a contributed Component.

Input parameters

Parameters in boldface are required; the others are optional.
Name Unit Description Default
file str Name of the MCNP SSW neutron input file. Not active: Name assumed to be 'rssa' "rssa"
verbose 1 Toggles debugging info on/off 1

Links

  • Source code for Virtual_mcnp_ss_output.comp.
  • MCNP
  • MCNP -- A General Monte Carlo N-Particle Transport Code, Version 5, Volume II: User's Guide, p177

[ Identification | Description | Input parameters | Output parameters | Links ]

Generated automatically by McDoc, Peter Willendrup <peter.willendrup@risoe.dk> / Fri Mar 17 20:40:07 2017


Last Modified: Friday, 17-Mar-2017 21:40:07 CET
Search website mailinglist archive GitHub repos