desc.magnetic_fields.DommaschkPotentialField

class desc.magnetic_fields.DommaschkPotentialField(ms=Array([0], dtype=int64), ls=Array([0], dtype=int64), a_arr=Array([0.], dtype=float64), b_arr=Array([0.], dtype=float64), c_arr=Array([0.], dtype=float64), d_arr=Array([0.], dtype=float64), B0=1.0)Source

Magnetic field due to a Dommaschk scalar magnetic potential in rpz coordinates.

From Dommaschk 1986 paper https://doi.org/10.1016/0010-4655(86)90109-8

this is the field due to the dommaschk potential (eq. 1) for a given set of m,l indices and their corresponding coefficients a_ml, b_ml, c_ml d_ml.

Parameters:
  • ms (1D array-like of int) – first indices of V_m_l terms (eq. 12 of reference), corresponds to the toroidal periodicity of the mode.

  • ls (1D array-like of int) – second indices of V_m_l terms (eq. 12 of reference), corresponds to the poloidal periodicity of the mode.

  • a_arr (1D array-like of float) – a_m_l coefficients of V_m_l terms, which multiply the cos(m*phi)*D_m_l terms

  • b_arr (1D array-like of float) – b_m_l coefficients of V_m_l terms, which multiply the sin(m*phi)*D_m_l terms

  • c_arr (1D array-like of float) – c_m_l coefficients of V_m_l terms, which multiply the cos(m*phi)*N_m_l-1 term

  • d_arr (1D array-like of float) – d_m_l coefficients of V_m_l terms, which multiply the sin(m*phi)*N_m_l-1 terms

  • B0 (float) – scale strength of the magnetic field’s 1/R portion

Methods

compute_Bnormal(surface[, eval_grid, ...])

Compute Bnormal from self on the given surface.

compute_magnetic_field(coords[, params, ...])

Compute magnetic field at a set of points.

copy([deepcopy])

Return a (deep)copy of this object.

equiv(other)

Compare equivalence between DESC objects.

fit_magnetic_field(field, coords, max_m, max_l)

Fit a vacuum magnetic field with a Dommaschk Potential field.

load(load_from[, file_format])

Initialize from file.

save(file_name[, file_format, file_mode])

Save the object.

save_BNORM_file(surface, fname[, basis_M, ...])

Create BNORM-style .txt file containing Bnormal Fourier coefficients.

save_mgrid(path, Rmin, Rmax, Zmin, Zmax[, ...])

Save the magnetic field to an mgrid NetCDF file in "raw" format.