D3DEnergetic / FIDASIM

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

Geometry and beamgrid aligment #258

Open kudav opened 1 year ago

kudav commented 1 year ago

Dear FIDASIM team,

I'm having an issue with the beam geometry and beam grid specifications. When I compare this FIDASIM version to the one maintained at AUG there is a wavelength mismatch of ~0.05nm between the BES components when using the same geometry inputs (which I confirmed are the same by over-plotting them), see the light red lines in the two plots. I'm not sure where this discrepancy could be coming from, but I tried varying the beamgrid parameters in the input namelist and got slightly varying results. I e.g. changed signs and magnitude of the beta angle and also alpha, but sadly lost the input files for the individual runs. To my knowledge, the beamgrid alignment used by the code is not recoverable from the outputs alone. Quickly looking into the code it seemed like maybe the determining input for the NBI geometry are not the 'src' and 'axis' field in the _geometry.h5 file, but rather the beamgrid origin and alpha, beta, gamma angles in the input namelist? I've not looked to deeply, so I may well be missing something.

Left: FIDASIM version 2.0.0, right: FIDASIM4 maintained at AUG, red is simulation output, black is data (sorry for the different styles)

To the same end, I cannot make sense of the output regarding the alpha and beta angles of the prefida python function. It gives me rotation angles (converted to rad) of -1.38 and -0.60 for alpha and beta, while _beamgrid calculated 2.21 and -0.085 respectively, which are used as input. Are the angles given by prefida somehow in a different convention or to be applied in a different way?

Best regards, David

lstagner commented 1 year ago

The beam grid definitions shouldn't effect the wavelength grid. There are some differences last time I checked the AUG version of FIDASIM (the comparison was done in the most recent FIDASIM paper). Differences in how FIDASIM handles the gyromotion can affect spectra as well as the magnetic field. It could also be a binning issue.

I would try playing around with the different options in the fidasim namelist. I would also try changing the wavelength resolution to see if its a binning issue.

lstagner commented 1 year ago

Also if you are currently using the master branch. The master branch treats the stark-zeemann splitting more accurately which I am not sure was implemented in the EU version.