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

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

The Foil_flipper_magnet2 Component


  • Author: Erik B Knudsen
  • Origin: DTU Physics
  • Date: Sep. 2015
  • Version:(Unknown)
  • 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
foilthick um Thickness of the magnetized foil 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 Jan 12 15:13:31 2022

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