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


About McStas
 Conditions of use
 Project funding

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

Mailing list

Search web/mailinglist

 McStas manual
 Known problems
 C Compilers




Report bugs


McStas Ubuntu live-dvd

McStas: Test_SSW_SSR_Guide Instrument at Tests_optics

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

The Test_SSW_SSR_Guide Instrument

Test instrument for SSW/SSR interface between McStas and MCNP



This instrument 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.
Assumes a file called 'rssa' is present in the run dir (or a symbolic link to a file).
To produce 'rssa' file a MCNP simualtion must by run, using a SSW card. See 'MCNP_test_write'
in the /examples
After passing a slit at z=2m, events are written to the same format

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 Test_SSR_SSW_Guide.instr" gives: Test_SSR_SSW_Guide.c
 "gfortran -c subs.f" gives:  subs.f
 "gcc -o runme.out Test_SSR_SSW_Guide.c subs.o -lm -lgfortran" gives: runme.out
 "./runme.out" runs the simulation example

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

Input parameters



  • Source code for Test_SSW_SSR_Guide.instr.
  • A reference/HTML link for more information

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

Generated automatically by McDoc, Peter Willendrup <> / Wed Apr 19 10:57:33 2017

Last Modified: Wednesday, 19-Apr-2017 12:57:33 CEST
Search website mailinglist archive GitHub repos