sft2d.calculate_diffusion
- sft2d.calculate_diffusion(field, diffusivity, grid)[source]
Computes the diffusion of the magnetic field using a second-order central difference scheme.
- Parameters:
field (np.ndarray) – The magnetic field on the grid (2D array).
diffusivity (float) – The diffusivity value (e.g., 250 km^2/s).
grid (dict) – Dictionary containing grid information (‘theta’, ‘phi’, and their spacings).
- Returns:
Updated magnetic field after applying diffusion.
- Return type:
np.ndarray