[mcstas-users] [BULK] Virtual source with fixed-m divergence

Voigt, Jörg j.voigt at fz-juelich.de
Thu Mar 11 11:09:28 CET 2021


Hi Thierry,

can one realize this by a source that selects the transverse momentum k_x and k_y by a Monte Carlo choice?
Simply “Extending” the source component?

Regards

Jörg

> On 11. Mar 2021, at 10:20, Andrew Wildes <wildes at ill.fr> wrote:
> 
> 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 <mailto: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
> 
> _______________________________________________
> mcstas-users mailing list
> mcstas-users at mcstas.org
> https://mailman2.mcstas.org/mailman/listinfo/mcstas-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20210311/19b85e61/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5209 bytes
Desc: not available
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20210311/19b85e61/attachment.p7s>


More information about the mcstas-users mailing list