[mcstas-users] resonant spin echo flipper in McStas 3.4

Peter Kjær Willendrup pkwi at dtu.dk
Mon Oct 23 20:16:31 CEST 2023


Dear Lukas Vogl,


Thank you for reporting this issue.

With my current understanding of the precession algorithm, there shouldn’t be any explicit limitation preventing relatively high-frequency fields, but you may have run into an implicit one. As you point out, there are thresholds for “field change” and time-resolution available which “should” allow to circumvent such resolution issues.

/*Threshold below which two magnetic fields are considered to be
 * in the same direction.*/
#ifndef mc_pol_angular_accuracy
#define mc_pol_angular_accuracy (1.0*DEG2RAD)
#endif

/*The maximal timestep taken by neutrons in a const field*/
#ifndef mc_pol_initial_timestep
#define mc_pol_initial_timestep 1e-5;
#endif

I will looking further into the details within the next coming weeks - and potentially contact you off-list for more detailed discussions.


Best,
Peter Willendrup

On 18 Oct 2023, at 22.44, Lukas Vogl <Lukas.Vogl at frm2.tum.de> wrote:

Hi McStas Team,

At the neutron resonance spin echo instrument RESEDA (FRM II), we are working on implementing a virtual clone of the instrument, which combines our instrument control software with a McStas simulation in the background.

At the heart of the instrument are radio frequency spin flippers in a longitudinal field geometry. The static field is parallel for the neutron fight path and the rotating RF-field perpendicular to it.
The build-in McStas functionality for neutron spin evolution seems to work up to circular frequencies of 2pi*500 1/s. We want to perform simulations with frequencies in the MHz range.


The particular problem we see, is that the spin is no longer flipped by Pi for higher frequencies, and only a partial polarisation in the opposite direction after the flipper is seen.


I have attached the necessary files to reproduce this problem.
pol-lib.c, pol-lib.h and Pol_Bfield.comp have to be placed in the corresponding folders (share, resp. optics) of the McStas installation version 3.4.

pol-lib.* and Pol_Bfield.comp are modified to implement a rotating B-field, which is not yet present in the current McStas version.

I already have tried to change the threshold condition for the time step calculation to allow smaller time steps but this did not help.
Changing the length of the flipper does seem to influence the performance which should also not happen.

Thus our question is, if the current McStas spin propagation code is at all capable to handle RF-fields with such frequencies and if so what we have to change in our implementation.


Best Regards

Lukas Vogl

Working student at
RESEDA - FRM II
<pol-lib.h><pol-lib.c><Pol_Bfield.comp><rf_flipper.instr>_______________________________________________
mcstas-users mailing list
mcstas-users at mcstas.org
https://mailman2.mcstas.org/mailman/listinfo/mcstas-users


Peter Kjær Willendrup
Forskningsingeniør, Specialkonsulent

DTU Physics
[image001.gif]


Technical University of Denmark


[image002.gif]


Department of Physics
Fysikvej
Building 307
DK-2800 Kongens Lyngby

Main office at
ESS DMSC
COBIS, Ole Maaløes vej 3, 2200 København N, Denmark

Direct +45 2125 4612
Mobil +45 2125 4612
Fax +45 4593 2399
pkwi at fysik.dtu.dk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20231023/9ad645cd/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 58 bytes
Desc: image001.gif
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20231023/9ad645cd/attachment-0002.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.gif
Type: image/gif
Size: 1055 bytes
Desc: image002.gif
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20231023/9ad645cd/attachment-0003.gif>


More information about the mcstas-users mailing list