[mcstas-users] [BULK] Virtual source with fixed-m divergence
Andrew Wildes
wildes at ill.fr
Thu Mar 11 10:20:28 CET 2021
Hi Thierry,
I’m a big fan of making relative comparisons using the simplest possible source. I first simulate a “reference” instrument before playing with parameters. So long as the source characteristics stay the same, any changes in performance can be expressed by dividing the monitor counts for the modified instrument by the monitor counts for the reference instrument.
Consequently, I’d solve your problem by using the Source_div component and have the focus as a variable defined in the INITIALIZE section, e.g.:
DEFINE INSTRUMENT Thierry(lambda=6, dlambda=0.1,m=1)
DECLARE
%{
double DivSource_m;
double SourceWid = 0.1;
double SourceHi = 0.1;
%}
INITIALIZE
%{
DivSource_m=m*0.1*lambda;
%}
TRACE
COMPONENT Centre = Progress_bar()
AT (0, 0, 0) ABSOLUTE
/*******************************************************/
/******************* Source ****************************/
/*******************************************************/
COMPONENT source = Source_div(
xwidth = SourceWid,
yheight = SourceHi,
focus_aw = DivSource_m,
focus_ah = DivSource_m,
lambda0 = lambda,
dlambda = dlambda,
gauss = 0)
AT (0,0,0) ABSOLUTE
END
(Please forgive any direct programming errors).
I suspect that there might be a problem with my relative comparisons if you change the source divergence between instruments as the flux at your target might change. Someone might be able to advise on that.
Cheers,
Andrew
> On 10 Mar 2021, at 16:46, Thierry Bigault <bigault at ill.fr> wrote:
>
> Dear McStas,
>
> Here is my problem:
> I would like to simulate the exit of a cold neutron guide with a source. The aim is to concentrate on the instrument optics, without having to calculate all the guide from the reactor.
> A simplified and quite general description of a guide exit is a beam with a fixed "m-value" divergence: for a given wavelength, the width of the angular divergence (either box-type, Gaussian or whatever) is essentially proportional to the m-value of the guide coating and to the wavelength.
> If the guide has different supermirror coatings on horizontal and on vertical faces, this leads to different angular widths.
> I assume the beam characteristics does not depend on the position at the guide exit in this approach.
> My question is : what is the simplest way to simulate such a secondary (or virtual) source in McStas ? I only found components where the angular width is geometrically fixed (in degrees), therefore wavelength-independent.
> Ideally I would also like to include a non-flat wavelength intensity distribution, but this can probably be done by adding a Filter_gen after the source.
> I am thinking of making several calculations at different wavelengths, but if anyone knows a all-in-one solution I am interested.
>
> Thierry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20210311/1b52fc18/attachment-0001.html>
More information about the mcstas-users
mailing list