pencil.math.Helmholtz ===================== .. py:module:: pencil.math.Helmholtz .. autoapi-nested-parse:: Perform a Helmholtz decomposition on a vector field returning a pair of orthogonal vectors with zero divergence and zero curl respectively. Functions --------- .. autoapisummary:: pencil.math.Helmholtz.helmholtz_fft Module Contents --------------- .. py:function:: helmholtz_fft(tot_field, grid, params, nghost=3, pot=True, rot=True, lno_mean=False, nonperi_bc=None, field_scalar=[], s=None, quiet=True) helmholz_fft(field, grid, params) Creates the decomposition vector pair for the supplied vector field. :param tot_field: Vector field of dimension [3, mz, my, mx], which is decomposed. :type tot_field: ndarray :param grid: Grid object with grid spacing dx, dy, dz. :type grid: obj :param params: Simulation Params object with domain dimensions Lx, Ly and Lz. :type params: obj :param nghost: Number of ghost zones to exclude from the fft. :type nghost: int :param lno_mean: Exclude any mean flow from the decomposition - should drop anyway. :type lno_mean: float :param nonperi_bc: String if not None with boundary condition label. How to apply the bc needs to be implemented as required. :type nonperi_bc: string :param field_scalar: Scalar field (density) as debug tool for energy comparison. :type field_scalar: ndarray :param s: List of three integers if not None for fft dimension. If none the dimension of the field [nz,ny,nx] is used. :type s: list of int :rtype: ndarray with decomposed field.