Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal to carry on the absolute flux in shadow4 beam #27

Open
srio opened this issue Mar 5, 2024 · 0 comments
Open

proposal to carry on the absolute flux in shadow4 beam #27

srio opened this issue Mar 5, 2024 · 0 comments

Comments

@srio
Copy link
Member

srio commented Mar 5, 2024

In shadow3 the calculation of the flux (also the heat load) needs additional information and calculations.
I propose to store this information for calculating this in a standalone way.

The typical calculation of flux requires DE_1 and I_1 (intensity) at the image plane. Knowing DE_0 and I_0 at the source, and knowing also the number of photons N_0 we have at the source, the flux at the image is N_0 (I_1/DE_1) / (I_0/DE_0) photons/s/eV or N_0 (I_1/DE_1) / (I_0/DE_0) D_E1 = N_0 I_1 / (I_0/DE_0) photons/s.

To do it automatically, we need to store DE_0, I_0, and N_0 at the source, and pass (copy it) in the trace process.

I propose to store in the beam: E_min in eV, E_max in eV, N_rays, and N_0 in photons/s/eV. Now, we do not store anything more than the rays, so N_0=rays.shape[0], E_min=col26.min(), E_max=col26.max(), but it is required to store them as the beam can be "cleaned" (removed lost rays) so this information is lost.

Another way to do it is to store it in the lightsource (at the time of its creation), not in the beam. But this requires to access the lightsource instance at any time we want to calculate flux.

It could be possible to store also the initial power W_0 (sum of intensity * energy) directly in eV/s, or better in Watts [total]. This will allow at any point to compute the absolute power carried by the beam.

What do you think, what do you prefer? Any comment?

Any other idea to also improve the heat load loops?

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant