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

Add focal_length property to the Beam #419

Open
vsnever opened this issue Aug 10, 2023 · 2 comments
Open

Add focal_length property to the Beam #419

vsnever opened this issue Aug 10, 2023 · 2 comments
Assignees

Comments

@vsnever
Copy link
Member

vsnever commented Aug 10, 2023

Currently Beam has it's minimum width at Z = 0. However, I came across a problem where a focused beam was injected into the plasma, having a minimum width in the region of the central plasma. Since it seems natural that Z=0 in the beam coordinates corresponds to the entry point of the beam into the plasma, I suggest adding the focal_length property, which defaults to 0.

This will change how the beam width is calculated. Instead of this:

sigma0_sqr = self._beam.get_sigma()**2
sigma_x = sqrt(sigma0_sqr + (z * self._tanxdiv)**2)
sigma_y = sqrt(sigma0_sqr + (z * self._tanydiv)**2)

we'll have this:

sigmaf_sqr = self._beam.get_sigma()**2  # sigma at beam focus
z_to_focal = z - self._beam.get_focal_length()
sigma_x = sqrt(sigmaf_sqr + (z_to_focal * self._tanxdiv)**2)
sigma_y = sqrt(sigmaf_sqr + (z_to_focal * self._tanydiv)**2)

This change also affects the _generate_geometry() method.

I already have this implemented in the fork, so I can make a PR with this feature and the the changes discussed in #414.

@Mateasek, @jacklovell, what do you think of this feature?

@vsnever vsnever self-assigned this Aug 10, 2023
@Mateasek
Copy link
Member

Having beam foci inside plasma is something this model doesn't support and is it's limitation.

I would personally wait with such changes for the new beam model which won't have backwards compatibility.

In the new architecture of the beam I implement the beam description through the DistributionFunction. One of the implementation will allow users to implement simply their profiles through Raysect's function framework, as it is done in the laser's case.

The basic beam profile model will be based on the Gaussian beam, which is in fact generalisation of the model we have now and allows users to place beam waists in arbitrary positions.

@vsnever
Copy link
Member Author

vsnever commented Aug 10, 2023

I would personally wait with such changes for the new beam model which won't have backwards compatibility.

I agree. Also, currently the beam's dispersion is calculated as a sum:

sigma_x = self._beam.get_sigma() + z * self._tanxdiv
sigma_y = self._beam.get_sigma() + z * self._tanydiv

instead of:

sigma0_sqr = self._beam.get_sigma()**2
sigma_x = sqrt(sigma0_sqr + (z * self._tanxdiv)**2)
sigma_y = sqrt(sigma0_sqr + (z * self._tanydiv)**2)

I think this is just an error, but if we allow an arbitrary beam waist position, then we have to fix that too, which means it will be a different beam model.

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

2 participants