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: Foil_flipper_magnet Component

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

The Foil_flipper_magnet Component


  • Author: Erik B Knudsen
  • Origin: DTU Physics
  • Date: Sep. 2015
  • Version: 0.01
  • Modification history:


A magnet with a spin-flip foil inside

This component models a magnet with a constant magnetic field and a slanted 
magnetized foil inside acting as a spin-flipper. This arrangement may be used to
target the geometry of a Spin-Echo SANS instrument (Rekveldt, NIMB, 1997 || Rekveldt, Rev Sci Instr. 2005).
In its most basic form a SE-SANS instrument nrelies  on inclined field regions of
constant magnetic field, which can be difficult to realize. Instead it is possible to emulate
such regions using a magnetized foil.

In this component th emagntzied foil is modelled as a canted (by the angle phi) mathematical plane inside a region
of constant magnetic field of dimensions (xwidth,yheight,zdepth). Furthermore, exponetially decaying stray fields from
the constant field region may be specified by giving parameters (Bxwidth,Byheight,Bzdepth) > (xwidth,yheight,zdepth).

WARNING: This is a contributed Component.

Input parameters

Parameters in boldface are required; the others are optional.
Name Unit Description Default
field_function const_magnetic_field
stray_field_function NULL
xwidth m width of the magnet  
yheight m height of the magnet  
zdepth m thickness of the magnet  
Bxwidth m width of the B-field of thev component -1
Byheight m height of the B-field of the component -1
Bzdepth m thickness of the B-field of the component -1
phi rd angle (from the xz-plane) of the foil-spinflipper inside the magnet 0.0
Bx T Parameter used for x composant of field.  
By T Parameter used for y composant of field.  
Bz T Parameter used for z composant of field.  
foil_in 1
verbose 0

Output parameters

Name Unit Description Default


[ 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