ascot4fusion / ascot5

ASCOT5 is a high-performance orbit-following code for fusion plasma physics and engineering
https://ascot4fusion.github.io/ascot5/
GNU Lesser General Public License v3.0
20 stars 6 forks source link

Some features to analyse 2D wall loads #110

Open Otsooni opened 5 days ago

Otsooni commented 5 days ago

Currently, Ascot can only analyse wall loads for 3D walls. However, 2D walls are widely used and there exists meaning in analysing the poloidal distribution of the wall loads. These methods also make it easier to compare to LOCUST results (since they at least used to have only 2D wall load analysis support).

If you have any suggestions on the implemented methods, put them here.

Currently done: -Get the areas of each revolving line strip segment -get the length of each line strip

Otsooni commented 4 days ago

Currently implemented so that the runmixin methods of calculating heat loads work for also 2D wall. However, currently the incident angle will not work(will not return anything meaningful), since for 2D wall the incident angle is determined in only R and z (and phi would be determined on the collision point of the marker, but that is not currently used for 3D detection).

Therefore, iangle for 2D walls will not currently result in anything meaningful. Should the code say something of this to the user, or what is your opinion @miekkasarki ?

miekkasarki commented 11 hours ago

What do you mean "for 2D wall the incident angle is determined in only R and z"? Isn't there a sufficient information to calculate the angle in post-processing?

I think the easiest way to have all features of the 3D wall available for 2D wall is to assume that the 2D wall is 3D where each element is a stripe that revolves around the whole torus. That way you get the area and surface normal (which now depends on phi) which are sufficient to calculate any quantity of interest.

Otsooni commented 8 hours ago

What I mean by that is that I did not modify the runmixin method of calculating heat loads. The runmixin only needed to call wall.area(). I implemented that area method for 2D walls. However, the heatload method also wants surface normals of the walls (which are undefined for the 2D walls due to phi), so currently the iangle does not work with the method. Moreover, I am not certain of the usefulness of that metric for 2D walls. (If you are certain it is useful, I can modify the runmixin heatload method to get the correct normals for 2D walls. The reason I originally did not do it is because the method is getting too large/convoluted.)

My question to you was, (assuming no modification to the heatload code) should I give a note that the 2D incident angle is not defined.