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