pg_utils.pg_model.base_utils.field_to_moment

pg_utils.pg_model.base_utils.field_to_moment(B_field)[source]

Convert magnetic field to integrated quadratic moments.

Parameters:

B_field – tuple, magnetic field components B_field should be given in cylindrical components, and the field components should be functions of cylindrical coordinates, i.e. B_field = (B_s(s, p, z), B_p(s, p, z), B_z(s, p, z))

Returns:

tuple of the sympy expressions of the eight moments, Mss, Mpp, Msp, Msz, Mpz, zMss, zMpp, zMsp