-
Notifications
You must be signed in to change notification settings - Fork 9
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
BBNBI beam divergence and verification #48
Comments
Based on the model in the old BBNBI (in ASCOT4), the beam divergence and halo fraction will be implemented as Here |
Great! We already have all those 5 parameters in the input so this is just a matter of implementing that in the code. Shouldn't be an issue. I will write an algorithm that:
|
@rui-coelho I think I found the reason why the beam bends. The momentum in cylindrical basis was not updated. My bad but luckily this issue is not present in the 5.4 release. And it won't be in 5.5. |
Is it possible to have it fixed in the main ? |
And regarding the definition of the beam divergence, what the Japanese provide as half-divergence angle is the same as in Pietro's figure labeled as "divergence angle" (misleading...). In ASCOT4/old-BBNBI formulae, i'm not so sure if the "divergence" is rather the half divergence angle multiplied by sqrt(2). Dr. Google sent me to some sites on optics and lasers and in all of them it is widely accepted that : tan(half-divergence angle) = (difference in radii of two beam cross sections along propagating path) / (distance of the two cross sections along propagating path) And the "radius" of the beam is usually defined as the width at 1/e^2 of the beam intensity. In your definition of the "probability"/power the "radius" of the beam will get 1/e^2 if we use and angle of half-divergence * sqrt(2). It is thus very important to clarify if:
|
I pushed a fix for the bending issue and implemented the divergence. Also BBNBI is now part of the automatic testing which checks that both the beam divergence is correct and the ionization rate based on how the ionized markers are distributed. The code needs some polishing but you can already try it out in branch https://github.com/ascot4fusion/ascot5/tree/hotfix/48-bbnbi-beam-divergence-and-verification The divergence angle is exactly as it is defined in the equation I posted, which is the same as in the figure Pietro posted. So if I understood correctly, it should be called "the half-divergence angle"? I can put that graph from the BBNBI paper to the documentation to make it clear. |
and why the factor 1/2 in the gaussian ? In Eq.1 from the paper of Otto it is absent.... |
I had a typo in the equation I posted: it shouldn't be but As for the factor of However, if my reasoning was incorrect and the factor of |
So we just have to define what the exponential should look like and that defines our |
the point is really making sure the definition of half-divergence angle is consistent with the values we are given by the engineers. We need to ensure that they provide is:
Your probability gives intensity or power equivalent ? |
Now we have tests for the BBNBI and now I can say with confidence what the divergence is right now. The top two plots show the vertical and horizontal divergencies. The blue curve is the fraction of particles at each angle, i.e. power (not intensity), and the black curve (and red) is the bi-Gaussian (halo+core) where both have the form: This means that the divergence that BBNBI5 uses:
Do you guys agree with me? If you want to verify it yourself, just run the BBNBI in this branch (I rebased this on the main so all the other fixes are now here as well). |
so, in theory i should only use the half-divergence angle and NOT apply an additional sqrt(2) ? I just raise this since it is a tricky point when we compare our NBI beams to usual laser beams. In laser beam optics the electric field goes like E(x,y,z)~e^( - (x^2+y^2)/w(z)^2 ) w=beam "radius", easier to define once we define beam Intensity Beam "intensity" is defined in W/m^2 and relates to the power in the electric field so I(x,y,z)~e^( - 2*(x^2+y^2)/w(z)^2 ) So, the beam width (w) at any point of the propagation path (z) is defined as the radius at width the intensity reduces to 1/e^2 of the on-axis value. So, i am tempted to believe we need the 1/sqrt(2) in the divergence if we want to explain the matching curves you provided but please someone prove me wrong otherwise..... @pietrovincenzi what do you think ? |
Yes right now as the code currently is, you shouldn't apply sqrt(2). Just give the half-divergence as is. Note that this was not the case earlier as I adjusted the definition in the code. |
Right now BBNBI ignores the halo component and assumes isotropic divergence using only the horizontal value. All relevant parameters are in the input already, so implementing this is just a few lines of code. (I label this as a bug right now.)
For the verification test, we could have a single beamlet and verify from the beam deposition that the divergence and halo were properly implemented (the distribution should be bivariate double Gaussian).
We could also inject the beam into an uniform plasma and using the mean-free-path for the beam ionization we would have analytical estimate for the beam deposition.
The text was updated successfully, but these errors were encountered: