xrt icon indicating copy to clipboard operation
xrt copied to clipboard

Double-crystal bent Laue geometry simulations

Open Zeelyne opened this issue 1 year ago • 6 comments

Dear developer,

I am new to XRT community and find it so powerful in raytracing. Recently, I've been trying to build a beamline with double-crystal bent Laue geometry, as presented in the following picture. My goal is to study the transmission efficiency of the monochromator in relatively high energy.

XRTGlow result

So, I tried to understand the examples (01_bentLaueSCM.py and 02_bentLaueDCM_RC.py) that you have kindly provided. The final code I've constructed is attached to this message, named bentLaueDCM01.py. The XRT Glow result is the previous picture.

The first results seem reasonable (and encouraging!) for me. For the first Laue crystal, the incidence flux is about 810e14 phs/s; the exiting flux is 110e13 phs/s. For the second Laue crystal, the incidence flux is in the order of 10e13phs/s, the exit flux is 10e12phs/s. At my first sight, the exiting flux for the first crystal seemed low. Do you have any suggestions, please?

I suggest maybe the rmats.CrystalSi si in my code DLMtest01.py is not well configurated? So, I studied another example you provided (test_laue_bent.py) and tried to modify my material setting with the useTT=true and calcBorrmann=uniform commands. However, I have come to some segment problems when I add them. The code constructed is attached to this message, named bentLaueDCM02.py. I wonder if there is somewhere not well set in my code or if this is related to the computer's performance.

In fact, I can run test_laue_bent.py (if I make calcBorrmann=TT, I have to reduce the crystal thickness to 0.05mm or the N_ray, to avoid bugs; if I usecalcBorrmann=uniform, it is less challenging). I use a Workstation computer.

I have been working on this for a few days and still cannot find a clue. Would you please give me some suggestions?

And here is the attached file: test.zip

Thank you very much for reading my message, and have a nice day!

Best regards,

Zeelyne

Zeelyne avatar Sep 20 '22 08:09 Zeelyne

Would you please give me some suggestions?

Yes. Please make your point clearer.

kklmn avatar Sep 20 '22 16:09 kklmn

Hello, Theoretically, the exiting flux of the first crystal should be in the order of 10e14phs/s, now it is just 10e13phs/s. Do you think that, in order to improve higher transmission effeciency of the crystal,I need to further specify the useTT and calcBorrmann commands, in the rmats.CrystalSi si in my code DLMtest01.py? Or do you think something else should be checked instead?

Thanks a lot!

Best regards, Zeelyne

Zeelyne avatar Sep 21 '22 01:09 Zeelyne

Theoretically, the exiting flux of the first crystal should be in the order of 10e14phs/s

How did you find this value? Was it for the same conditions as in your ray-tracing: angular spread, energy spread?

kklmn avatar Sep 21 '22 06:09 kklmn

Hello,

This theoretical value (1.11 e14phs/s) is obtained by multiplying the incoming flux and the reflectivity for the designed bent crystal (approximately 25%, calculated using XOP).

I have tried to improve my code recently. It is found that: the low outcoming flux is indeed due to the rmats.CrystalSi function setting. If I make useTT=TT and calcBorrmann=uniform, I can get a flux near the theoretical value (7 e13phs/s) . So the question above is resolved.

In fact, there is an interesting point: my beamline is composed of a wiggler source, a slit, two filters, and two bent laue crystals (as presented by the picture up above, sorry I didn't label the slit at 25m from the source in this pic). Before, when I make useTT=TT and calcBorrmann=uniform, an error appears, i.e., in the figure below. It seemed that the ray number was not consistent. Then I have tried several methods to avoid this error. I found that, by eliminating the slit (rapts.RectangularAperture), this error was avoided and the calculation could be executed. It is in this way, I got a flux near the theoretical value. The python file is attached to this message. 1010 100w eV 0.5% bent laue.zip

So far, this is not a problem, as I can substitute the slit by directly modifying the divergence in the wiggler source. But still, I wonder why the rapts.RectangularAperture influences the calculation of the reflectivity of bent crystal reflectivity.

Thank you very much for your help, and looking forwards to your indication.

Best regards, Zeelyne Capture

Zeelyne avatar Oct 11 '22 02:10 Zeelyne

This theoretical value (1.11 e14phs/s) is obtained by multiplying the incoming flux and the reflectivity for the designed bent crystal (approximately 25%, calculated using XOP).

The incoming flux depends on the energy bandwidth you're using. If you take it 10 times larger, your flux will be also ~10 times higher. In ray-tracing, the selected bandwidth does not matter unless it is too small. In your rough estimations, the result directly depends on your choice of bandwidth. So, what was it?

kklmn avatar Oct 11 '22 10:10 kklmn

Yes, indeed, by varying the bandwidth of the incoming flux, the outcoming flux and the bandwidth vary as well. Here my estimation is like the following (pics in the .zip file case): for the source, i imposed a bandwidth of 149.4eV, then the incoming flux for the crystal is 6.65e14 phs/s (ie. SiC size. png). The outcoming flux of the crystal showed a bandwidth of 100.8eV (ie. MeriLaue size1. png). So, i roughly estimated the theoretical value by : 6.65e14 * 25%/149.4*100.8 =1.12e14phs/s. The factor 149.4*100.8 is added to reduce the impact of the bandwidth on this estimation.

Best regards, Zeelyne

Zeelyne avatar Oct 19 '22 02:10 Zeelyne