Connection length and shortest distance to the target routines
It computes the connection length for the field line defined by x, y, phi (the distance from boundary to boundary). If (x, y, phi) is located inside the wall, the output is negative. If (x, y, phi) is located in the closed flux surface region, the output is the largest allowable number for PARALLAX precision. If the boundary is reached along the field line, but only in one direction, then the routine will return with the arclength to the found boundary point plus the arclength up to dphi_max in the other direction.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equilibrium_t), | intent(inout), | target | :: | equi |
Equilibrium defining the field line |
|
| real(kind=FP), | intent(in) | :: | x |
Spatial coordinate x at which the field line is located |
||
| real(kind=FP), | intent(in) | :: | y |
Spatial coordinate y at which the field line is located |
||
| real(kind=FP), | intent(in) | :: | phi |
Spatial coordinate phi at which the field line is located |
||
| real(kind=FP), | intent(in) | :: | dphi_max |
Maximum toroidal angle to be traced |
||
| real(kind=FP), | intent(in), | optional | :: | maxstep |
Maximum stepsize for the DOP853 integrator |
It computes the shortest distance to the boundary along B. If (x, y, phi) is located inside the wall, the output is negative. If (x, y, phi) is located in the closed flux surface region, the output is the largest allowable number for PARALLAX precision.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equilibrium_t), | intent(inout), | target | :: | equi |
Equilibrium defining the field line |
|
| real(kind=FP), | intent(in) | :: | x |
Spatial coordinate x at which the field line is located |
||
| real(kind=FP), | intent(in) | :: | y |
Spatial coordinate y at which the field line is located |
||
| real(kind=FP), | intent(in) | :: | phi |
Spatial coordinate phi at which the field line is located |
||
| real(kind=FP), | intent(in) | :: | dphi_max |
Maximum toroidal angle to be traced |
||
| real(kind=FP), | intent(out) | :: | shortest_dist |
Shortest distance to boundary along the field line from (x,y,phi) |
||
| real(kind=FP), | intent(in), | optional | :: | maxstep |
Maximum stepsize for the DOP853 integrator |
|
| integer, | intent(out), | optional | :: | dirind |
Refers to the direction to the closest boundary along B: = 1, if the closest transition is in the +phi direction = -1, if the closest transition is in the -phi direction = 0, if the it could not found any boundary along the field line. |