D3DEnergetic / FIDASIM

A Neutral Beam and Fast-ion Diagnostic Modeling Suite
http://d3denergetic.github.io/FIDASIM/
Other
29 stars 19 forks source link

Improved Stark-Zeeman Splitting #242

Closed gardner-chris closed 3 years ago

gardner-chris commented 3 years ago

I have added the effect of zeeman splitting to the calculation of the spectra in FIDASIM. An example below shows the result in a uniform 5T B-field on the spectrum on the half energy part of a 1keV beam(so 0.5keV). In magenta is the spectra calculated taking into account both the Stark and Zeeman effect. The black dashed line is the result of only considering the Stark effect.

image_2021-05-18_151455

I verified the accuracy of the wavelengths in fidasim for both cases by comparing the wavelengths of the peaks to values calculated in python for 5T, 0.5keV.

5T1keV half bes spectral lines

I also added the stokes parameters to the spectra outputs. I verified that they were calculated correctly by comparing the first stokes parameter, s0, to the intensity since they should be the same. An example half bes stokes parameters calculated using a uniform B=1T and e_inj=1keV is in the image below. I also note that s1 for the pi lines should be the negative of s0 as another check. Currently s2 and s3 are always zero but I left them in incase we ever need to add some effect that will somehow cause them to be nonzero in the future.

half beam emission 4T1KeV stokes parameters

For details on the physics and derivations I also wrote this document: https://www.overleaf.com/read/nbwgnpfhsswb

heidbrin commented 3 years ago

I saw lambda_0=656.1 nm (the deuterium value) in your writeup. Does your code use the correct value for a hydrogen neutral?

gardner-chris commented 3 years ago

I saw lambda_0=656.1 nm (the deuterium value) in your writeup. Does your code use the correct value for a hydrogen neutral?

I did not input a new value for the wavelength. The spectrum subroutine has "lambda0" as an input and I used that. I believe the values are set with "line_lambda0 = [ 656.28d0, 656.104d0, 656.045d0 ] " in the subroutine identify_transition.

lstagner commented 3 years ago

I noticed your tests have a lot of repeated code. It would be a good idea to consolidate the tests into a single module. Also a little documentation for the tests is warranted.

lstagner commented 3 years ago

Any updates when I can merge this in?

gardner-chris commented 3 years ago

Any updates when I can merge this in?

Right now I am working on some corrections to the Lyman-Alpha stokes parameters and I still need to replace the do loops that you commented on. I'm nearly done with the corrections so it should be ready by the end of the week at the latest.

gardner-chris commented 3 years ago

By the Way, I think this is ready to merge unless you have more suggestions.

lstagner commented 3 years ago

The Travis CI is failing. Checkout the errors and see if you can fix them. https://travis-ci.org/github/D3DEnergetic/FIDASIM/builds/772793773

lstagner commented 3 years ago

All right everything is passing now. I will merge this tomorrow unless you have anything further to add.

alvin-garcia commented 3 years ago

Attached is the report by @gardner-chris for this PR. stark_zeeman.pdf