desc.coils.FourierRZCoil.save_BNORM_file
- FourierRZCoil.save_BNORM_file(surface, fname, basis_M=24, basis_N=24, eval_grid=None, source_grid=None, params=None, sym='sin', scale_by_curpol=True)Source
Create BNORM-style .txt file containing Bnormal Fourier coefficients.
- Parameters:
surface (Surface or Equilibrium) – Surface to calculate the magnetic field’s Bnormal on. If an Equilibrium is supplied, will use its boundary surface.
fname (str) – name of file to save the BNORM Bnormal Fourier coefficients to.
basis_M (int, optional) – Poloidal resolution of the DoubleFourierSeries used to fit the Bnormal on the plasma surface, by default 24
basis_N (int, optional) – Toroidal resolution of the DoubleFourierSeries used to fit the Bnormal on the plasma surface, by default 24
eval_grid (Grid, optional) – Grid of points on the surface to calculate the Bnormal at, if None defaults to a LinearGrid with twice the surface poloidal and toroidal resolutions points are in surface angular coordinates i.e theta and zeta
source_grid (Grid, int or None) – Grid used to discretize MagneticField object if calculating B from Biot-Savart. Should NOT include endpoint at 2pi.
params (list or tuple of dict, optional) – parameters to pass to underlying field’s compute_magnetic_field function. If None, uses the default parameters for each field. If a list or tuple, should have one entry for each component field.
sym (str, optional) – if Bnormal is symmetric, by default “sin” NOTE: BNORM code only ever deals with sin-symmetric modes, so results may not be as expected if attempt to create a BNORM file with a non-symmetric Bnormal distribution, as only the sin-symmetric modes will be saved.
scale_by_curpol (bool, optional) – Whether or not to scale the Bnormal coefficients by curpol which is expected by most other codes that accept BNORM files, by default True
- Returns:
None