xrt icon indicating copy to clipboard operation
xrt copied to clipboard

power density calculation based on ray tracing results

Open yangfg-bsrf opened this issue 3 years ago • 5 comments

Hi, now I want to evaluate the heating-load on the mirror. The beam data for the following image has been exported , then I am not sure how to calculate the power density profile, because the N_good is equal to the N_all. Can you give me some advices? Thanks!

B3_HKBLocal

yangfg-bsrf avatar Apr 16 '21 08:04 yangfg-bsrf

Hi, Please see this example for how to make power plots with power density isolines. Search the examples for fluxKind='power' in py files.

kklmn avatar Apr 16 '21 08:04 kklmn

yea, the total power is shown in the result. B3_HKBLocal -0 00196

Further, I want to get the map of the power density distribution along the mirror. is there any example for this function? In addition, I am some confused by the intensity in XYCPlot, I try to find code for its calculation, but failed.

def _get_flux(self): self.flux = float(self.intensity) / self.nRaysAll *\ self.nRaysSeededI / self.nRaysSeeded

`def _get_power(self):
    self.power = self.intensity / self.nRaysAll`

yangfg-bsrf avatar Apr 16 '21 14:04 yangfg-bsrf

Further, I want to generate the map of the power density distribution along the mirror.

The 2D and 1D histograms give you this distribution as plot.total2D and ax.total1D for ax in [plot.xaxis, plot.yaxis, plot.caxis]. The normalization constant = plot.power. Do you need something more?

kklmn avatar Apr 16 '21 14:04 kklmn

we want to evaluate the thermal deformation of the mirror, so the 2D heating-load distribution is necessary. For this case, I believe plot.total2D is enough because the energy bandwidth is small. does it consider the power difference among the rays with different energy? that is why I want to know how the intensity is calculated.

yangfg-bsrf avatar Apr 16 '21 14:04 yangfg-bsrf

does it consider the power difference among the rays with different energy?

No. This would need 3D histogramming, which we don't do. If you need it, you should compose it manually from 2D histograms.

that is why I want to know how the intensity is calculated.

plot.intensity is only the sum of ray intensity values (Jss^2 + Jpp^2) over the 2D histogram. The name came from Shadow. The physical intensity (the flux density) is calculated by 2D histogramming in the module xrt.multipro.py

kklmn avatar Apr 19 '21 09:04 kklmn