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

 Other Downloads (share)

Mailing list

Search web/mailinglist

 Wiki (GitHub)
 McStas manual


Report bugs (GitHub)

Code-repository (GitHub)

McStas: test_SSW_SSR Instrument at Tests_MCPL_etc

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

The test_SSW_SSR 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 SSRSSW_test.instr" gives: SSRSSW_test.c
 "gfortran -c subs.f" gives:  subs.f
 "gcc -o runme.out SSRSSW_test.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.instr.
  • A reference/HTML link for more information

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

Generated automatically by McDoc, Peter Willendrup <> / Wed Jan 12 15:13:32 2022

Last Modified: Wednesday, 12-Jan-2022 16:13:32 CET
Search website mailinglist archive GitHub repos