Module traceon_pro.field

Radial series expansion in 3D

In a general three dimensional geometry the potential will be dependent not only on the distance from the optical axis but also on the angle \theta around the optical axis at which the potential is sampled. It turns out (equation (35, 24) in [1]) the potential can be written as follows:

\phi = \sum_{\nu=0}^\infty \sum_{m=0}^\infty r^{2\nu + m} \left( A^\nu_m \cos(m\theta) + B^\nu_m \sin(m\theta) \right)

The A^\nu_m and B^\nu_m coefficients can be expressed in directional derivatives perpendicular to the optical axis, analogous to the radial symmetric case. The mathematics of calculating these coefficients quickly and accurately gets quite involved, but all details have been abstracted away from the user.

[1] W. Glaser. Grundlagen der Elektronenoptik. 1952.

Classes

class Field3DAxial (field, zmin, zmax, N=None)

Use a radial series expansion around the optical axis to allow for very fast field evaluations. Constructing the radial series expansion in 3D is much more complicated than the radial symmetric case, but all details have been abstracted away from the user.

Parameters

field : Field3D_BEM
The field which to approximate along the z-axis
zmin : float
Location on the optical axis where to start sampling the radial expansion coefficients.
zmax : float
Location on the optical axis where to stop sampling the radial expansion coefficients. Any field evaluation outside [zmin, zmax] will return a zero field strength.
N : int, optional
Number of samples to take on the optical axis, if N=None the amount of samples is determined by taking into account the number of elements in the mesh.

Returns

Field3DAxial object allowing fast field evaluations.

Ancestors

Methods

def electrostatic_field_at_point(self, point)

Compute the electric field, \vec{E} = -\nabla \phi

Parameters

point : (3,) array of float64
Position at which to compute the field.

Returns

Numpy array containing the field strengths (in units of V/mm) in the x, y and z directions.

def electrostatic_potential_at_point(self, point)

Compute the electrostatic potential.

Parameters

point : (3,) array of float64
Position at which to compute the potential.

Returns

Potential as a float value (in units of V).

def get_tracer(self, bounds)

Get a Tracer class capable of tracing particle through this field.

Returns

Tracer

def magnetostatic_field_at_point(self, point)

Compute the magnetic field \vec{H}

Parameters

point : (3,) array of float64
Position at which to compute the field.

Returns

(3,) np.ndarray of float64 containing the field strength (in units of A/m) in the x, y and z directions.

def magnetostatic_potential_at_point(self, point)

Compute the magnetostatic scalar potential (satisfying \vec{H} = -\nabla \phi ) close to the axis.

Parameters

point : (3,) array of float64
Position at which to compute the field.

Returns

Potential as a float value (in units of A).

Inherited members

class Field3D_BEM (electrostatic_point_charges=None,
magnetostatic_point_charges=None,
current_point_charges=None)

An electrostatic field resulting from a general 3D geometry. The field is a result of the surface charges as computed by the solve_direct() function. See also the comments in FieldBEM.

Ancestors

Methods

def area_of_element(self, i)

Compute the area of a specific triangle which makes up the field.

Parameters

i : int
Index of the triangle for which to compute the area

Returns

float
Area of the triangle (in meter^2).
def current_field_at_point(self, point_)

Compute the magnetic field \vec{H} resulting from the current excitation by using the Biot-Savart law. Note that the magnetic field does not include the field induced by the magnetizable material (for this, see the traceon.field.Field3D_BEM.magnetostatic_field_at_point method).

Parameters

point : (3,) array of float64
Position at which to compute the field.

Returns

(3,) array of float64 representing the magnetic field

def electrostatic_field_at_point(self, point_)

Compute the electric field, \vec{E} = -\nabla \phi

Parameters

point : (3,) array of float64
Position at which to compute the field.

Returns

(3,) array of float64 representing the electric field

def electrostatic_potential_at_point(self, point_)

Compute the electrostatic potential.

Parameters

point : (3,) array of float64
Position at which to compute the field.

Returns

Potential as a float value (in units of V).

def get_tracer(self, bounds)

Get a Tracer class capable of tracing particle through this field.

Returns

Tracer

def magnetostatic_field_at_point(self, point_)

Compute the magnetic field \vec{H}

Parameters

point : (3,) array of float64
Position at which to compute the field.

Returns

(3,) np.ndarray of float64 containing the field strength (in units of A/m) in the x, y and z directions.

def magnetostatic_potential_at_point(self, point_)

Compute the magnetostatic scalar potential (satisfying \vec{H} = -\nabla \phi )

Parameters

point : (3,) array of float64
Position at which to compute the field.

Returns

Potential as a float value (in units of A).

Inherited members