Closed Otsooni closed 8 months ago
Yes it should be pdiag.weight[i] /=hin[i];
. The reason why it is divided with hin
is that within the routines that update the distribution, the marker's contribution is weight*hin
. With BBNBI we want to have just weight
since the output will be in [particles/s], not [particles] like in ASCOT simulation.
It's my mistake that there's also mileage
since I didn't realize that only the last step is added to the distribution. You can go ahead and fix that.
(Things will get a bit more complicated once someone needs the neutral density from BBNBI as that will be again in units of [particles])
The results from the bbnbi simulation do not agree with eachother. According to the source code: ` pdiag.weight[i] /= p.mileage[i] + hin[i]; }
`
pdiag
is the marker at the end of the timestep, of which the distribution weights are calculated. Meanwhilep
is the marker at the "beginning" of the time step and is used for defining the marker data.To get them to match the first line can be changed to
pdiag.weight[i] /=hin[i];
. However, that should skew the distribution quite a bit.Has somebody noticed anything weird with bbnbi5 distributions before?