Fermer cette fenetre

Merci de télécharger les logos officiels de l'ILL ici


Pour utiliser sur le web

Pour imprimer en haute résolution

Logo blanc pour fonds foncés



Télécharger PNG

Télécharger TIF

Télécharger logo blanc PNG

Télécharger JPG

Télécharger EPS

Télécharger logo blanc EPS

Institut Laue-Langevin

The Computing for Science (CS) group supports ILL scientists, students and visitors in a number of activities including data analysis, instrument simulation and sample simulation.

Back to ILL Homepage
English French Deutsch 

All Software

McStas - What is it?

McStas - ILL - About
McStas is a computer program (written in C) that enables to modelize very precisely a neutron instrument described as a series of beamline components. A source component shoots off each neutron randomly (Monte-Carlo), and the particule is then propagated through the different instrument components. These latter act on the neutron characteristics (position, speed, direction, spin, etc...). Usually, one installs some virtual detectors along the neutron path, to monitor the characteristics and flux of the neutron beam at that position.

 

This project is part of the MCNSI European NMI3 JRA package. It has additionally been supported in the past through the RTD XENNI and SCANS networks

 

What is required on my computer to run McStas?
To install the McStas package, you will need a C compiler.
To create an instrument and run a single simulation, one only needs a C compiler. To perfrom series of simulations (scans), you will require perl. These two programs exist for all types of computers (PC, Mac, Unix) for free (see the McStas download/install page). In order to go further in McStas tools usage (graphic output and user interface), you will need to install support applications perl, perl-Tk and either Scilab/Matlab or pgplot, PgPerl, perlDL (not recommanded). Those packages can be installed from source code with the usual procedures (e.g. on Unix/Linux systems).
Look at the list of supported plateforms.

 

What is an instrument for McStas?
An instrument is written as a list of components in a simple text file using some dedicated meta language macros. It can have some input parameters (instrument configuration). Each component is specified with a position, an orientation (tilt) and some specific physical parameters.
 The sources are components that generate the initial neutrons to propagate into the instrument.
 The monitors are components that generate an output and analyze neutron characteristics (flux detector for instance).
Writing an instrument description is quite easy (see a basic template from the ILL IN14 tutorial). If you plan to use components that are not provided in McStas, you can also write them similarly (this will require a minimal C code to handle component action on neutron characteristics).

 

This description file will then have to be processed by the mcstas program, that will produce a standard C code source sent to the C compiler. The final instrument appears as a stand-alone executable program that will ask for the required instrument parameters, run the simulation and produce the various output (files, display, graphics...).

We provide some ILL instruments descriptions.


Is that all ? NO
McStas also enables to display the instrument geometry (3D space projections), and look separately at each neutron propagating into the instrument (mcdisplay). The simulation results (1D and 2D data) can be displayed by an external program (mcplot). A Graphic User Interface (mcgui) is now implemented in order to make instrument design, simulation runs and data viewing easier.

Geeting and Installing McStas

You may get McStas from the main web site http://www.mcstas.org. Sources may be obtained here. The package contains complete User and Component manuals as well as installation instructions.

More on McStas

Left: a short mpeg4 movie about the simulation of a neutron Time-Of-Flight spectrometer.

Right: Some simulation results showing various key characteristics of the neutron spectrum. A major benefit of simulations is that spectrum components can be easily distinguished while this is difficult with real experiments