jf1uids.initial_condition_generation.turb

jf1uids.initial_condition_generation.turb#

Module Contents#

Functions#

create_turb_field

Creates a turbulent field with given slope, amplitude

and cutoffs in Fourier space for a uniform grid in 3D.

create_incompressible_turb_field

Creates an incompressible turbulent vector field with a given power spectrum.

API#

jf1uids.initial_condition_generation.turb.create_turb_field(Ndim, A0, slope, kmin, kmax, seed=None)[source]#
Creates a turbulent field with given slope, amplitude

and cutoffs in Fourier space for a uniform grid in 3D.

Ndim: int

the number of grid points in each dimension

A0: float

the amplitude of the field

slope: float

the slope of the power spectrum

kmin: float

the minimum wavenumber

kmax: float

the maximum wavenumber

rfield: np.ndarray

the real field

jf1uids.initial_condition_generation.turb.create_incompressible_turb_field(Ndim, A0, slope, kmin, kmax, seed=None)[source]#

Creates an incompressible turbulent vector field with a given power spectrum.

Parameters:

Ndim (int): Dimension of the cubic grid (Ndim x Ndim x Ndim). A0 (float): Amplitude scaling factor for the power spectrum. slope (float): Slope of the power spectrum (typically -5/3 for Kolmogorov). kmin (float): Minimum wavenumber. kmax (float): Maximum wavenumber. seed (int, optional): Random seed for reproducibility.

Returns:

tuple: (vx, vy, vz), each of shape (Ndim, Ndim, Ndim).