neso_fame.mesh.normalise_field_line(trace: FieldTrace, start: SliceCoord, x3_min: float, x3_max: float, resolution: int = 10) NormalisedCurve

Trace a magnetic field-line from a starting point.

Takes a function defining a magnetic field and returns a new function tracing a field line within it.

Parameters:
trace: FieldTrace

A callable which takes a SliceCoord defining a position on the x3=0 plane and an array-like object with x3 coordinates. It should return a 2-tuple. The first element is the locations found by tracing the magnetic field line beginning at the position of the first argument until reaching the x3 locations described in the second argument. The second element is the distance traversed along the field line.

start: SliceCoord

The location on the x3=0 plane which the traced field line will pass through.

x3_min: float

The minimum x3 value to trace the field line from.

x3_max: float

The maximum x3 value to trace the field line to.

resolution: int = 10

The number of locations used along the field line used to interpolate distances.

Returns:

A function taking an argument s between 0 and 1 and returning a coordinate along the field line. The distance of the point from the start of the field line is directly proportional to s. This function is vectorised, so can be called with an array-like argument.

Return type:

NormalisedCurve


Last update: Nov 07, 2024