Formula reference: turbulence

Generated from the docstrings of vaft.formula.turbulence: 16 public functions. Each entry is what vaft.formula.describe("turbulence.<name>") prints. All formula categories

Overview

Two groups (issues #1112 and #1820). The first are definitions and reduced estimates of fluctuation-driven transport – the diamagnetic velocity and frequency, the E-cross-B velocity of a potential fluctuation, turbulent particle and heat fluxes as correlations, the cross-phase flux of one mode, the mixing-length diffusivity, the E-cross-B shearing rate, the Reynolds stress and the zonal-flow drive. None is a turbulence closure, a stability classifier or a transport prediction; geometry is slab unless stated.

The second is the two-variable turbulence–zonal-flow predator–prey model (Lotka–Volterra form).

The transparent reduced description of turbulence self-regulation by zonal flows (issue #1820): fluctuation intensity $N$ (the prey) grows at an effective linear rate and is sheared apart by the zonal flow; zonal-flow intensity $E$ (the predator) is driven by the turbulence through the Reynolds stress and decays at an effective damping rate. The functions here are the model’s analytic properties only – right-hand side, fixed point, conserved quantity, small-amplitude period and response lag. Integrating orbits, extracting $N$ and $E$ from gyrokinetic fields and fitting the coefficients belong to vaft.process.

The model is a reference against which a gyrokinetic time series can be tested, not a claim that every nonlinear state obeys it: a bursty trace may equally come from tertiary instability, profile relaxation or noise.

SymbolMeaningUnit
Nturbulence (non-zonal fluctuation) intensityarbitrary, > 0
Ezonal-flow intensityarbitrary, > 0
gamma_effeffective turbulence growth rate1/time
gamma_Zeffective zonal-flow damping rate1/time
c1suppression of turbulence by the zonal flow1/(time * E)
c2drive of the zonal flow by the turbulence1/(time * N)
\[\dot N = \gamma_\mathrm{eff} N - c_1 N E, \qquad \dot E = c_2 N E - \gamma_Z E\]

Any consistent time unit is accepted (s, $a/c_s$, …): the rates set it, and every returned time is in the same unit. $N$ and $E$ carry no fixed normalisation. Rescaling $N \to \lambda N$ maps $c_2 \to c_2/\lambda$, and $E \to \mu E$ maps $c_1 \to c_1/\mu$; the rates and the dynamics are unchanged. A fitted $c_1, c_2$ therefore means nothing without the definition of the intensities it was fitted to.

Functions

coherent_particle_flux_from_amplitudes_phaseE-cross-B particle flux of one Fourier mode from its amplitudes and cross-phase. Convention
diamagnetic_frequency_from_k_v_starDiamagnetic frequency of one Fourier mode: the Doppler shift of the diamagnetic flow. Convention
diamagnetic_velocity_from_grad_p_q_n_BDiamagnetic drift velocity of a species, from its pressure gradient. Convention
exb_shearing_rate_from_velocity_gradientLocal E-cross-B shearing rate: the magnitude of the radial derivative of the flow. Convention
exb_velocity_from_potential_gradientElectrostatic E-cross-B velocity from a potential gradient. Convention
mixing_length_diffusivity_from_gamma_k_perpMixing-length diffusivity estimate: growth rate over the squared perpendicular wavenumber. Convention
predator_prey_fixed_pointPositive (coexistence) fixed point of the predator–prey model. Convention
predator_prey_invariantConserved quantity of the classical predator–prey model. Convention
predator_prey_periodSmall-amplitude oscillation period about the positive fixed point. Convention
predator_prey_response_lagSmall-amplitude delay of the zonal-flow peak after the turbulence peak. Convention
predator_prey_rhsTime derivatives of the turbulence–zonal-flow predator–prey model. Convention
reynolds_stress_from_velocity_fluctuationsTurbulent Reynolds stress: the correlation of radial and poloidal velocity fluctuations. Convention
shear_to_growth_rate_ratioRatio of the E-cross-B shearing rate to a linear growth rate. Convention
turbulent_heat_flux_from_fluctuationsTurbulent radial heat flux carried by pressure fluctuations: $\tfrac32\langle\tilde p\,\tilde v_r\rangle$. Convention
turbulent_particle_flux_from_fluctuationsTurbulent radial particle flux: the correlation of density and radial-velocity fluctuations. Convention
zonal_flow_drive_from_reynolds_stress_gradientRate of change of a zonal flow driven by the Reynolds-stress divergence. Convention

coherent_particle_flux_from_amplitudes_phase

Convention-sensitive source
coherent_particle_flux_from_amplitudes_phase(n_amplitude, phi_amplitude, k_y, B, phase)
Show source vaft/formula/turbulence.py, lines 701–760
def coherent_particle_flux_from_amplitudes_phase(n_amplitude, phi_amplitude, k_y, B, phase):
    r"""E-cross-B particle flux of one Fourier mode from its amplitudes and cross-phase.

    $$\Gamma_k = \frac{k_y\,|\tilde n_k|\,|\tilde\phi_k|}{2B}\,\sin\theta_{n\phi}$$

    Parameters
    ----------
    n_amplitude : float or array-like
        Peak density amplitude $|\tilde n_k|$, non-negative [m^-3].
    phi_amplitude : float or array-like
        Peak potential amplitude $|\tilde\phi_k|$, non-negative [V].
    k_y : float or array-like
        Wavenumber along the binormal direction $\hat y$ [1/m].
    B : float or array-like
        Field strength, positive [T].
    phase : float or array-like
        Cross-phase $\theta_{n\phi} = \alpha_\phi - \alpha_n$: the phase by which
        the potential leads the density [rad].

    Returns
    -------
    float or np.ndarray
        $\Gamma_k$ along $+\hat x$ (outward), averaged over a period [m^-2 s^-1].

    Raises
    ------
    ValueError
        Non-finite input, a negative amplitude, or a non-positive field.

    Convention
    ----------
    Slab geometry: $\hat x$ radial (outward), $\hat y$ binormal and
    $\mathbf B = B\hat z$, right-handed. Real fields
    $\tilde n = |\tilde n_k|\cos(k_yy - \omega t + \alpha_n)$ and
    $\tilde\phi = |\tilde\phi_k|\cos(k_yy - \omega t + \alpha_\phi)$, so
    $\tilde v_x = -\partial_y\tilde\phi/B$ from
    :func:`exb_velocity_from_potential_gradient`; the factor $1/2$ is the
    period average of $\cos\cdot\sin$. Another Fourier sign convention
    ($e^{-i\omega t}$ against $e^{i\omega t}$), a left-handed frame or a
    reversed field flips the sign.

    Physical interpretation
    -----------------------
    In phase ($\theta_{n\phi} = 0$, the adiabatic electron response) a drift
    wave carries no flux; the flux grows with the phase shift that a
    non-adiabatic response opens and reverses with its sign.

    References
    ----------
    .. [1] W. Horton, Rev. Mod. Phys. 71 (1999) 735.
    .. [2] E. J. Powers, Nucl. Fusion 14 (1974) 749.
    """
    na = _finite(n_amplitude, "n_amplitude")
    pa = _finite(phi_amplitude, "phi_amplitude")
    if np.any(na < 0.0) or np.any(pa < 0.0):
        raise ValueError("amplitudes must be non-negative")
    ky = _finite(k_y, "k_y")
    b = _positive(B, "B")
    theta = _finite(phase, "phase")
    return _out(ky * na * pa / (2.0 * b) * np.sin(theta))

E-cross-B particle flux of one Fourier mode from its amplitudes and cross-phase.

\[\Gamma_k = \frac{k_y\,|\tilde n_k|\,|\tilde\phi_k|}{2B}\,\sin\theta_{n\phi}\]
NameTypeUnitDescription
n_amplitudefloat or array-likem^-3
Peak density amplitude $ \tilde n_k $, non-negative.
phi_amplitudefloat or array-likeV
Peak potential amplitude $ \tilde\phi_k $, non-negative.
k_yfloat or array-like1/m

Wavenumber along the binormal direction $\hat y$.

Bfloat or array-likeT

Field strength, positive.

phasefloat or array-likerad

Cross-phase $\theta_{n\phi} = \alpha_\phi - \alpha_n$: the phase by which the potential leads the density.

Returns
—float or np.ndarraym^-2 s^-1

$\Gamma_k$ along $+\hat x$ (outward), averaged over a period.

Convention

Slab geometry: $\hat x$ radial (outward), $\hat y$ binormal and $\mathbf B = B\hat z$, right-handed. Real fields $\tilde n = |\tilde n_k|\cos(k_yy - \omega t + \alpha_n)$ and $\tilde\phi = |\tilde\phi_k|\cos(k_yy - \omega t + \alpha_\phi)$, so $\tilde v_x = -\partial_y\tilde\phi/B$ from exb_velocity_from_potential_gradient; the factor $1/2$ is the period average of $\cos\cdot\sin$. Another Fourier sign convention ($e^{-i\omega t}$ against $e^{i\omega t}$), a left-handed frame or a reversed field flips the sign.

Raises

  • ValueError Non-finite input, a negative amplitude, or a non-positive field.
Physical interpretation · References

Physical interpretation

In phase ($\theta_{n\phi} = 0$, the adiabatic electron response) a drift wave carries no flux; the flux grows with the phase shift that a non-adiabatic response opens and reverses with its sign.

References

  1. W. Horton, Rev. Mod. Phys. 71 (1999) 735.
  2. E. J. Powers, Nucl. Fusion 14 (1974) 749.

diamagnetic_frequency_from_k_v_star

Convention-sensitive source
diamagnetic_frequency_from_k_v_star(k, v_star)
Show source vaft/formula/turbulence.py, lines 529–566
def diamagnetic_frequency_from_k_v_star(k, v_star):
    r"""Diamagnetic frequency of one Fourier mode: the Doppler shift of the diamagnetic flow.

    $$\omega_{*s} = \mathbf k\cdot\mathbf v_{*s}$$

    Parameters
    ----------
    k : array-like
        Wave vector, last axis the three Cartesian components [1/m].
    v_star : array-like
        Diamagnetic velocity of the species, last axis the three Cartesian
        components, as from :func:`diamagnetic_velocity_from_grad_p_q_n_B` [m/s].

    Returns
    -------
    float or np.ndarray
        $\omega_{*s}$ [rad/s].

    Raises
    ------
    ValueError
        A vector without three components, or non-finite input.

    Convention
    ----------
    The sign follows the species charge through $\mathbf v_{*s}$ and the
    direction of $\mathbf k$; only the perpendicular part of $\mathbf k$
    contributes, since $\mathbf v_{*s}\perp\mathbf B$. A reduced form in
    $k_y\rho_s$ is not given here: it needs the binormal direction and the
    reference gyroradius stated, which belong to the code normalisation.

    References
    ----------
    .. [1] W. Horton, Rev. Mod. Phys. 71 (1999) 735.
    """
    kk = _vector3(k, "k")
    v = _vector3(v_star, "v_star")
    return _out(np.sum(kk * v, axis=-1))

Diamagnetic frequency of one Fourier mode: the Doppler shift of the diamagnetic flow.

\[\omega_{*s} = \mathbf k\cdot\mathbf v_{*s}\]
NameTypeUnitDescription
karray-like1/m

Wave vector, last axis the three Cartesian components.

v_stararray-likem/s

Diamagnetic velocity of the species, last axis the three Cartesian components, as from diamagnetic_velocity_from_grad_p_q_n_B.

Returns
—float or np.ndarrayrad/s

$\omega_{*s}$.

Convention

The sign follows the species charge through $\mathbf v_{s}$ and the direction of $\mathbf k$; only the perpendicular part of $\mathbf k$ contributes, since $\mathbf v_{s}\perp\mathbf B$. A reduced form in $k_y\rho_s$ is not given here: it needs the binormal direction and the reference gyroradius stated, which belong to the code normalisation.

Raises

  • ValueError A vector without three components, or non-finite input.
References

References

  1. W. Horton, Rev. Mod. Phys. 71 (1999) 735.

diamagnetic_velocity_from_grad_p_q_n_B

Convention-sensitive source
diamagnetic_velocity_from_grad_p_q_n_B(grad_p, q, n, B)
Show source vaft/formula/turbulence.py, lines 466–526
def diamagnetic_velocity_from_grad_p_q_n_B(grad_p, q, n, B):
    r"""Diamagnetic drift velocity of a species, from its pressure gradient.

    $$\mathbf v_{*s} = \frac{\mathbf B\times\nabla p_s}{q_s n_s B^2}$$

    Parameters
    ----------
    grad_p : array-like
        Pressure gradient of the species, last axis the three Cartesian
        components [Pa/m].
    q : float or array-like
        Species charge, signed (negative for electrons), non-zero [C].
    n : float or array-like
        Species density, positive [m^-3].
    B : array-like
        Magnetic field, last axis the three Cartesian components, non-zero [T].

    Returns
    -------
    np.ndarray
        $\mathbf v_{*s}$, last axis the three Cartesian components [m/s].

    Raises
    ------
    ValueError
        A vector without three components, non-finite input, a zero charge or
        field, or a non-positive density.

    Convention
    ----------
    Right-handed Cartesian components. Ions and electrons drift in opposite
    directions through the sign of $q_s$; $\mathbf v_{*s}$ is a fluid
    velocity, not a guiding-centre drift.

    Physical interpretation
    -----------------------
    More gyrating particles on the high-pressure side than on the low one
    leave a net fluid flow perpendicular to $\mathbf B$ and $\nabla p$, with no
    guiding centre moving.

    References
    ----------
    .. [1] F. F. Chen, *Introduction to Plasma Physics and Controlled
           Fusion*, 3rd ed., Springer (2016), Sec. 3.5.
    .. [2] W. Horton, Rev. Mod. Phys. 71 (1999) 735.
    """
    gp = _vector3(grad_p, "grad_p")
    b = _vector3(B, "B")
    b2 = np.sum(b * b, axis=-1)
    if np.any(b2 == 0.0):
        raise ValueError("B must be non-zero")
    charge = _finite(q, "q")
    if np.any(charge == 0.0):
        raise ValueError("q must be non-zero")
    density = _positive(n, "n")
    lead = np.broadcast_shapes(gp.shape[:-1], b.shape[:-1])
    try:
        scale = np.broadcast_to(charge * density, lead)
    except ValueError as error:
        raise ValueError(f"q and n must broadcast to the vectors' leading shape {lead}") from error
    return np.cross(b, gp) / (scale * np.broadcast_to(b2, lead))[..., None]

Diamagnetic drift velocity of a species, from its pressure gradient.

\[\mathbf v_{*s} = \frac{\mathbf B\times\nabla p_s}{q_s n_s B^2}\]
NameTypeUnitDescription
grad_parray-likePa/m

Pressure gradient of the species, last axis the three Cartesian components.

qfloat or array-likeC

Species charge, signed (negative for electrons), non-zero.

nfloat or array-likem^-3

Species density, positive.

Barray-likeT

Magnetic field, last axis the three Cartesian components, non-zero.

Returns
—np.ndarraym/s

$\mathbf v_{*s}$, last axis the three Cartesian components.

Convention

Right-handed Cartesian components. Ions and electrons drift in opposite directions through the sign of $q_s$; $\mathbf v_{*s}$ is a fluid velocity, not a guiding-centre drift.

Raises

  • ValueError A vector without three components, non-finite input, a zero charge or field, or a non-positive density.
Physical interpretation · References

Physical interpretation

More gyrating particles on the high-pressure side than on the low one leave a net fluid flow perpendicular to $\mathbf B$ and $\nabla p$, with no guiding centre moving.

References

  1. F. F. Chen, Introduction to Plasma Physics and Controlled Fusion, 3rd ed., Springer (2016), Sec. 3.5.
  2. W. Horton, Rev. Mod. Phys. 71 (1999) 735.

exb_shearing_rate_from_velocity_gradient

Convention-sensitive source
exb_shearing_rate_from_velocity_gradient(dv_E_dr)
Show source vaft/formula/turbulence.py, lines 817–857
def exb_shearing_rate_from_velocity_gradient(dv_E_dr):
    r"""Local E-cross-B shearing rate: the magnitude of the radial derivative of the flow.

    $$\gamma_E = \left|\frac{\partial v_E}{\partial r}\right|$$

    Parameters
    ----------
    dv_E_dr : float or array-like
        Radial derivative of the perpendicular (binormal) $E\times B$ velocity,
        taken along the radial coordinate $r$ in metres [1/s].

    Returns
    -------
    float or np.ndarray
        $\gamma_E$ [1/s].

    Raises
    ------
    ValueError
        Non-finite input.

    Convention
    ----------
    The simplest slab definition. The derivative is with respect to the
    coordinate the caller states, in metres; differentiating a profile and
    converting from a flux label ($\rho$, $\psi$) is a procedure. The
    Hahm--Burrell rate $(RB_\theta)^2/B\,\partial_\psi(E_r/RB_\theta)$ and
    code-specific normalised rates are different quantities and need their
    own identities.

    Limitations
    -----------
    No geometry factor and no sign; it does not decide whether turbulence is
    suppressed (see :func:`shear_to_growth_rate_ratio`).

    References
    ----------
    .. [1] H. Biglari, P. H. Diamond and P. W. Terry, Phys. Fluids B 2 (1990) 1.
    .. [2] T. S. Hahm and K. H. Burrell, Phys. Plasmas 2 (1995) 1648.
    """
    return _out(np.abs(_finite(dv_E_dr, "dv_E_dr")))

Local E-cross-B shearing rate: the magnitude of the radial derivative of the flow.

\[\gamma_E = \left|\frac{\partial v_E}{\partial r}\right|\]
NameTypeUnitDescription
dv_E_drfloat or array-like1/s

Radial derivative of the perpendicular (binormal) $E\times B$ velocity, taken along the radial coordinate $r$ in metres.

Returns
—float or np.ndarray1/s

$\gamma_E$.

Convention

The simplest slab definition. The derivative is with respect to the coordinate the caller states, in metres; differentiating a profile and converting from a flux label ($\rho$, $\psi$) is a procedure. The Hahm–Burrell rate $(RB_\theta)^2/B\,\partial_\psi(E_r/RB_\theta)$ and code-specific normalised rates are different quantities and need their own identities.

Raises

  • ValueError Non-finite input.
Limitations · References

Limitations

No geometry factor and no sign; it does not decide whether turbulence is suppressed (see shear_to_growth_rate_ratio).

References

  1. H. Biglari, P. H. Diamond and P. W. Terry, Phys. Fluids B 2 (1990) 1.
  2. T. S. Hahm and K. H. Burrell, Phys. Plasmas 2 (1995) 1648.

exb_velocity_from_potential_gradient

Convention-sensitive source
exb_velocity_from_potential_gradient(grad_phi, B)
Show source vaft/formula/turbulence.py, lines 569–610
def exb_velocity_from_potential_gradient(grad_phi, B):
    r"""Electrostatic E-cross-B velocity from a potential gradient.

    $$\mathbf v_E = \frac{\mathbf B\times\nabla\phi}{B^2}$$

    Parameters
    ----------
    grad_phi : array-like
        Gradient of the electrostatic potential (mean or fluctuating), last
        axis the three Cartesian components [V/m].
    B : array-like
        Magnetic field, last axis the three Cartesian components [T].

    Returns
    -------
    np.ndarray
        $\mathbf v_E$, last axis the three Cartesian components [m/s].

    Raises
    ------
    ValueError
        A vector without three components, or ``B`` vanishes.

    Convention
    ----------
    $\mathbf E = -\nabla\phi$, so this is
    :func:`vaft.formula.particle.exb_drift_velocity` evaluated at
    $-\nabla\phi$; that function remains the owner of
    $\mathbf E\times\mathbf B/B^2$ and is called here.

    Physical interpretation
    -----------------------
    The fluid velocity of a potential fluctuation: equipotentials are
    streamlines, so a potential eddy is a convective cell.

    References
    ----------
    .. [1] W. Horton, Rev. Mod. Phys. 71 (1999) 735.
    """
    from .particle import exb_drift_velocity

    return exb_drift_velocity(-_vector3(grad_phi, "grad_phi"), _vector3(B, "B"))

Electrostatic E-cross-B velocity from a potential gradient.

\[\mathbf v_E = \frac{\mathbf B\times\nabla\phi}{B^2}\]
NameTypeUnitDescription
grad_phiarray-likeV/m

Gradient of the electrostatic potential (mean or fluctuating), last axis the three Cartesian components.

Barray-likeT

Magnetic field, last axis the three Cartesian components.

Returns
—np.ndarraym/s

$\mathbf v_E$, last axis the three Cartesian components.

Convention

$\mathbf E = -\nabla\phi$, so this is vaft.formula.particle.exb_drift_velocity evaluated at $-\nabla\phi$; that function remains the owner of $\mathbf E\times\mathbf B/B^2$ and is called here.

Raises

  • ValueError A vector without three components, or B vanishes.
Physical interpretation · References

Physical interpretation

The fluid velocity of a potential fluctuation: equipotentials are streamlines, so a potential eddy is a convective cell.

References

  1. W. Horton, Rev. Mod. Phys. 71 (1999) 735.

mixing_length_diffusivity_from_gamma_k_perp

Convention-sensitive source
mixing_length_diffusivity_from_gamma_k_perp(gamma, k_perp)
Show source vaft/formula/turbulence.py, lines 763–814
def mixing_length_diffusivity_from_gamma_k_perp(gamma, k_perp):
    r"""Mixing-length diffusivity estimate: growth rate over the squared perpendicular wavenumber.

    $$D_\mathrm{ML} \sim \frac{\gamma}{k_\perp^2}$$

    Parameters
    ----------
    gamma : float or array-like
        Linear growth rate of the mode, non-negative [1/s].
    k_perp : float or array-like
        Perpendicular wavenumber of the mode, non-zero [1/m].

    Returns
    -------
    float or np.ndarray
        $\gamma/k_\perp^2$ [m^2/s].

    Raises
    ------
    ValueError
        Non-finite input, a negative growth rate or a zero wavenumber.

    Convention
    ----------
    No order-unity prefactor. In gyro-Bohm units the same expression is
    $(\gamma\,a/c_s)/(k_\perp\rho_s)^2$ and returns $D/\chi_\mathrm{gB}$; which
    $k_\perp$ (often $k_y$ alone, at $k_x = 0$) is the caller's statement.

    Physical interpretation
    -----------------------
    Saturation when the eddy grows to the size of its own wavelength:
    $\tilde n/n \sim 1/(k_\perp L_n)$ and a step $1/k_\perp$ per growth time
    $1/\gamma$ give the random-walk diffusivity $\gamma/k_\perp^2$.

    Limitations
    -----------
    A reduced saturation estimate, not a transport closure: it ignores
    zonal flows, nonlinear spectral transfer and the mode spectrum, and is no
    prediction of ITG, TEM or ETG transport.

    References
    ----------
    .. [1] B. B. Kadomtsev, *Plasma Turbulence*, Academic Press (1965).
    .. [2] W. Horton, Rev. Mod. Phys. 71 (1999) 735.
    """
    g = _finite(gamma, "gamma")
    if np.any(g < 0.0):
        raise ValueError("gamma must be non-negative")
    k = _finite(k_perp, "k_perp")
    if np.any(k == 0.0):
        raise ValueError("k_perp must be non-zero")
    return _out(g / k ** 2)

Mixing-length diffusivity estimate: growth rate over the squared perpendicular wavenumber.

\[D_\mathrm{ML} \sim \frac{\gamma}{k_\perp^2}\]
NameTypeUnitDescription
gammafloat or array-like1/s

Linear growth rate of the mode, non-negative.

k_perpfloat or array-like1/m

Perpendicular wavenumber of the mode, non-zero.

Returns
—float or np.ndarraym^2/s

$\gamma/k_\perp^2$.

Convention

No order-unity prefactor. In gyro-Bohm units the same expression is $(\gamma\,a/c_s)/(k_\perp\rho_s)^2$ and returns $D/\chi_\mathrm{gB}$; which $k_\perp$ (often $k_y$ alone, at $k_x = 0$) is the caller’s statement.

Raises

  • ValueError Non-finite input, a negative growth rate or a zero wavenumber.
Physical interpretation · Limitations · References

Physical interpretation

Saturation when the eddy grows to the size of its own wavelength: $\tilde n/n \sim 1/(k_\perp L_n)$ and a step $1/k_\perp$ per growth time $1/\gamma$ give the random-walk diffusivity $\gamma/k_\perp^2$.

Limitations

A reduced saturation estimate, not a transport closure: it ignores zonal flows, nonlinear spectral transfer and the mode spectrum, and is no prediction of ITG, TEM or ETG transport.

References

  1. B. B. Kadomtsev, Plasma Turbulence, Academic Press (1965).
  2. W. Horton, Rev. Mod. Phys. 71 (1999) 735.

predator_prey_fixed_point

Convention-sensitive source
predator_prey_fixed_point(gamma_eff, coupling_suppression, coupling_drive, gamma_zonal)
Show source vaft/formula/turbulence.py, lines 188–249
def predator_prey_fixed_point(gamma_eff, coupling_suppression, coupling_drive, gamma_zonal):
    r"""Positive (coexistence) fixed point of the predator--prey model.

    $$N_* = \frac{\gamma_Z}{c_2}, \qquad E_* = \frac{\gamma_\mathrm{eff}}{c_1}$$

    Parameters
    ----------
    gamma_eff : float or array-like
        Effective turbulence growth rate, positive [1/time].
    coupling_suppression : float or array-like
        Suppression coefficient $c_1$, positive [1/(time E)].
    coupling_drive : float or array-like
        Drive coefficient $c_2$, positive [1/(time N)].
    gamma_zonal : float or array-like
        Effective zonal-flow damping rate, positive [1/time].

    Returns
    -------
    turbulence_star : float or np.ndarray
        $N_*$ [N].
    zonal_star : float or np.ndarray
        $E_*$ [E].

    Raises
    ------
    ValueError
        Non-finite input or a non-positive rate or coupling (the positive
        fixed point does not exist then).

    Convention
    ----------
    The model has two equilibria: the trivial $(0, 0)$ and this positive one.
    Only the positive one is returned.

    Physical interpretation
    -----------------------
    The turbulence level at which zonal-flow drive balances its damping, and
    the zonal-flow level at which shear suppression balances the linear drive.
    It is the time average of $N$ and $E$ over any closed orbit.

    Assumptions
    -----------
    The classical model of :func:`predator_prey_rhs`.

    Validity
    --------
    The positive fixed point of the classical model is a centre: neutrally
    stable, surrounded by closed orbits, and *not* asymptotically stable.  A
    trajectory does not relax to it; damping or saturation terms (not in this
    model) are needed for that.

    References
    ----------
    .. [1] P. H. Diamond, S.-I. Itoh, K. Itoh and T. S. Hahm,
           Plasma Phys. Control. Fusion 47 (2005) R35.
    """
    g = _rate(gamma_eff, "gamma_eff", strict=True)
    c1 = _rate(coupling_suppression, "coupling_suppression", strict=True)
    c2 = _rate(coupling_drive, "coupling_drive", strict=True)
    gz = _rate(gamma_zonal, "gamma_zonal", strict=True)
    g, c1, c2, gz = np.broadcast_arrays(g, c1, c2, gz)
    return _out(gz / c2), _out(g / c1)

Positive (coexistence) fixed point of the predator–prey model.

\[N_* = \frac{\gamma_Z}{c_2}, \qquad E_* = \frac{\gamma_\mathrm{eff}}{c_1}\]
NameTypeUnitDescription
gamma_efffloat or array-like1/time

Effective turbulence growth rate, positive.

coupling_suppressionfloat or array-like1/(time E)

Suppression coefficient $c_1$, positive.

coupling_drivefloat or array-like1/(time N)

Drive coefficient $c_2$, positive.

gamma_zonalfloat or array-like1/time

Effective zonal-flow damping rate, positive.

Returns
turbulence_starfloat or np.ndarrayN

$N_*$.

zonal_starfloat or np.ndarrayE

$E_*$.

Convention

The model has two equilibria: the trivial $(0, 0)$ and this positive one. Only the positive one is returned.

Raises

  • ValueError Non-finite input or a non-positive rate or coupling (the positive fixed point does not exist then).
Physical interpretation · Assumptions · Validity · References

Physical interpretation

The turbulence level at which zonal-flow drive balances its damping, and the zonal-flow level at which shear suppression balances the linear drive. It is the time average of $N$ and $E$ over any closed orbit.

Assumptions

The classical model of predator_prey_rhs.

Validity

The positive fixed point of the classical model is a centre: neutrally stable, surrounded by closed orbits, and not asymptotically stable. A trajectory does not relax to it; damping or saturation terms (not in this model) are needed for that.

References

  1. P. H. Diamond, S.-I. Itoh, K. Itoh and T. S. Hahm, Plasma Phys. Control. Fusion 47 (2005) R35.

predator_prey_invariant

Convention-sensitive source
predator_prey_invariant(turbulence, zonal, gamma_eff, coupling_suppression, coupling_drive, gamma_zonal)
Show source vaft/formula/turbulence.py, lines 252–316
def predator_prey_invariant(turbulence, zonal, gamma_eff, coupling_suppression, coupling_drive, gamma_zonal):
    r"""Conserved quantity of the classical predator--prey model.

    $$H(N, E) = c_2 N - \gamma_Z \ln N + c_1 E - \gamma_\mathrm{eff} \ln E$$

    Parameters
    ----------
    turbulence : float or array-like
        Turbulence intensity $N$, strictly positive [arbitrary].
    zonal : float or array-like
        Zonal-flow intensity $E$, strictly positive [arbitrary].
    gamma_eff : float or array-like
        Effective turbulence growth rate, positive [1/time].
    coupling_suppression : float or array-like
        Suppression coefficient $c_1$, positive [1/(time E)].
    coupling_drive : float or array-like
        Drive coefficient $c_2$, positive [1/(time N)].
    gamma_zonal : float or array-like
        Effective zonal-flow damping rate, positive [1/time].

    Returns
    -------
    float or np.ndarray
        $H$ [1/time].

    Raises
    ------
    ValueError
        Non-finite input, non-positive intensity, or a non-positive rate or
        coupling.

    Convention
    ----------
    The logarithms take $N$ and $E$ in whatever unit they are given, so $H$ is
    defined up to an additive constant; only differences of $H$ along or
    between orbits are meaningful.

    Physical interpretation
    -----------------------
    Each closed orbit is a level set of $H$; its minimum
    $H(N_*, E_*)$ marks the fixed point.  The amount by which a measured
    trajectory changes $H$ measures how far it departs from classical
    predator--prey dynamics.

    Assumptions
    -----------
    The classical model of :func:`predator_prey_rhs`; $dH/dt = 0$ along its
    exact trajectories.

    Validity
    --------
    Conserved only for the undamped two-variable model; any saturation,
    noise or third variable makes $H$ drift.

    References
    ----------
    .. [1] M. Leconte, A. Masson and L. Qi, Phys. Plasmas 29 (2022) 022302.
    """
    n = _intensity(turbulence, "turbulence", strict=True)
    e = _intensity(zonal, "zonal", strict=True)
    g = _rate(gamma_eff, "gamma_eff", strict=True)
    c1 = _rate(coupling_suppression, "coupling_suppression", strict=True)
    c2 = _rate(coupling_drive, "coupling_drive", strict=True)
    gz = _rate(gamma_zonal, "gamma_zonal", strict=True)
    return _out(c2 * n - gz * np.log(n) + c1 * e - g * np.log(e))

Conserved quantity of the classical predator–prey model.

\[H(N, E) = c_2 N - \gamma_Z \ln N + c_1 E - \gamma_\mathrm{eff} \ln E\]
NameTypeUnitDescription
turbulencefloat or array-likearbitrary

Turbulence intensity $N$, strictly positive.

zonalfloat or array-likearbitrary

Zonal-flow intensity $E$, strictly positive.

gamma_efffloat or array-like1/time

Effective turbulence growth rate, positive.

coupling_suppressionfloat or array-like1/(time E)

Suppression coefficient $c_1$, positive.

coupling_drivefloat or array-like1/(time N)

Drive coefficient $c_2$, positive.

gamma_zonalfloat or array-like1/time

Effective zonal-flow damping rate, positive.

Returns
—float or np.ndarray1/time

$H$.

Convention

The logarithms take $N$ and $E$ in whatever unit they are given, so $H$ is defined up to an additive constant; only differences of $H$ along or between orbits are meaningful.

Raises

  • ValueError Non-finite input, non-positive intensity, or a non-positive rate or coupling.
Physical interpretation · Assumptions · Validity · References

Physical interpretation

Each closed orbit is a level set of $H$; its minimum $H(N_, E_)$ marks the fixed point. The amount by which a measured trajectory changes $H$ measures how far it departs from classical predator–prey dynamics.

Assumptions

The classical model of predator_prey_rhs; $dH/dt = 0$ along its exact trajectories.

Validity

Conserved only for the undamped two-variable model; any saturation, noise or third variable makes $H$ drift.

References

  1. M. Leconte, A. Masson and L. Qi, Phys. Plasmas 29 (2022) 022302.

predator_prey_period

Convention-sensitive source
predator_prey_period(gamma_eff, gamma_zonal, *, approximation='linearized')
Show source vaft/formula/turbulence.py, lines 319–372
def predator_prey_period(gamma_eff, gamma_zonal, *, approximation="linearized"):
    r"""Small-amplitude oscillation period about the positive fixed point.

    $$\omega_\mathrm{PP} = \sqrt{\gamma_\mathrm{eff}\gamma_Z}, \qquad
      T_\mathrm{lin} = \frac{2\pi}{\sqrt{\gamma_\mathrm{eff}\gamma_Z}}$$

    Parameters
    ----------
    gamma_eff : float or array-like
        Effective turbulence growth rate, positive [1/time].
    gamma_zonal : float or array-like
        Effective zonal-flow damping rate, positive [1/time].
    approximation : {"linearized"}, optional
        Only the linearized period is implemented [-].

    Returns
    -------
    float or np.ndarray
        $T_\mathrm{lin}$ [time].

    Raises
    ------
    ValueError
        Non-finite input, a non-positive rate, or an unknown approximation.

    Convention
    ----------
    The same time unit as the rates.  The couplings $c_1, c_2$ drop out of the
    linearized period.

    Physical interpretation
    -----------------------
    The time for one turbulence burst -- zonal-flow growth -- turbulence
    quench -- zonal-flow decay cycle for a small excursion about the fixed
    point.

    Assumptions
    -----------
    Linearization of :func:`predator_prey_rhs` about $(N_*, E_*)$.

    Validity
    --------
    Exact only in the small-amplitude limit.  Finite-amplitude
    Lotka--Volterra orbits have amplitude-dependent periods that grow with
    the orbit size; this is not the period of a general orbit.

    References
    ----------
    .. [1] M. Leconte, A. Masson and L. Qi, Phys. Plasmas 29 (2022) 022302.
    """
    _approximation(approximation)
    g = _rate(gamma_eff, "gamma_eff", strict=True)
    gz = _rate(gamma_zonal, "gamma_zonal", strict=True)
    return _out(2.0 * np.pi / np.sqrt(g * gz))

Small-amplitude oscillation period about the positive fixed point.

\[\omega_\mathrm{PP} = \sqrt{\gamma_\mathrm{eff}\gamma_Z}, \qquad T_\mathrm{lin} = \frac{2\pi}{\sqrt{\gamma_\mathrm{eff}\gamma_Z}}\]
NameTypeUnitDescription
gamma_efffloat or array-like1/time

Effective turbulence growth rate, positive.

gamma_zonalfloat or array-like1/time

Effective zonal-flow damping rate, positive.

approximation{"linearized"}, optional-

Only the linearized period is implemented.

Returns
—float or np.ndarraytime

$T_\mathrm{lin}$.

Convention

The same time unit as the rates. The couplings $c_1, c_2$ drop out of the linearized period.

Raises

  • ValueError Non-finite input, a non-positive rate, or an unknown approximation.
Physical interpretation · Assumptions · Validity · References

Physical interpretation

The time for one turbulence burst – zonal-flow growth – turbulence quench – zonal-flow decay cycle for a small excursion about the fixed point.

Assumptions

Linearization of predator_prey_rhs about $(N_, E_)$.

Validity

Exact only in the small-amplitude limit. Finite-amplitude Lotka–Volterra orbits have amplitude-dependent periods that grow with the orbit size; this is not the period of a general orbit.

References

  1. M. Leconte, A. Masson and L. Qi, Phys. Plasmas 29 (2022) 022302.

predator_prey_response_lag

Convention-sensitive source
predator_prey_response_lag(gamma_eff, gamma_zonal, *, approximation='linearized')
Show source vaft/formula/turbulence.py, lines 375–427
def predator_prey_response_lag(gamma_eff, gamma_zonal, *, approximation="linearized"):
    r"""Small-amplitude delay of the zonal-flow peak after the turbulence peak.

    $$\tau_\mathrm{lag} = \frac{\pi}{2\sqrt{\gamma_\mathrm{eff}\gamma_Z}} = \frac{T_\mathrm{lin}}{4}$$

    Parameters
    ----------
    gamma_eff : float or array-like
        Effective turbulence growth rate, positive [1/time].
    gamma_zonal : float or array-like
        Effective zonal-flow damping rate, positive [1/time].
    approximation : {"linearized"}, optional
        Only the linearized lag is implemented [-].

    Returns
    -------
    float or np.ndarray
        $\tau_\mathrm{lag}$ [time].

    Raises
    ------
    ValueError
        Non-finite input, a non-positive rate, or an unknown approximation.

    Convention
    ----------
    Positive when the zonal flow (predator) peaks after the turbulence (prey);
    the same time unit as the rates.

    Physical interpretation
    -----------------------
    Linearizing about the fixed point gives $\delta\dot N = -c_1N_*\delta E$
    and $\delta\dot E = c_2E_*\delta N$, so $\delta E$ is $\delta N$ shifted by
    a quarter period: the zonal flow builds up while the turbulence is high
    and peaks when the turbulence, already falling, crosses its mean level
    and is collapsing fastest.

    Assumptions
    -----------
    Linearization of :func:`predator_prey_rhs` about $(N_*, E_*)$.

    Validity
    --------
    $T/4$ holds in the small-amplitude limit only; finite-amplitude orbits
    have a different, amplitude-dependent delay.  A delay measured from data
    belongs in :mod:`vaft.process`.

    References
    ----------
    .. [1] M. Leconte, A. Masson and L. Qi, Phys. Plasmas 29 (2022) 022302.
    """
    _approximation(approximation)
    return _out(0.25 * np.asarray(predator_prey_period(gamma_eff, gamma_zonal), dtype=float))

Small-amplitude delay of the zonal-flow peak after the turbulence peak.

\[\tau_\mathrm{lag} = \frac{\pi}{2\sqrt{\gamma_\mathrm{eff}\gamma_Z}} = \frac{T_\mathrm{lin}}{4}\]
NameTypeUnitDescription
gamma_efffloat or array-like1/time

Effective turbulence growth rate, positive.

gamma_zonalfloat or array-like1/time

Effective zonal-flow damping rate, positive.

approximation{"linearized"}, optional-

Only the linearized lag is implemented.

Returns
—float or np.ndarraytime

$\tau_\mathrm{lag}$.

Convention

Positive when the zonal flow (predator) peaks after the turbulence (prey); the same time unit as the rates.

Raises

  • ValueError Non-finite input, a non-positive rate, or an unknown approximation.
Physical interpretation · Assumptions · Validity · References

Physical interpretation

Linearizing about the fixed point gives $\delta\dot N = -c_1N_\delta E$ and $\delta\dot E = c_2E_\delta N$, so $\delta E$ is $\delta N$ shifted by a quarter period: the zonal flow builds up while the turbulence is high and peaks when the turbulence, already falling, crosses its mean level and is collapsing fastest.

Assumptions

Linearization of predator_prey_rhs about $(N_, E_)$.

Validity

$T/4$ holds in the small-amplitude limit only; finite-amplitude orbits have a different, amplitude-dependent delay. A delay measured from data belongs in vaft.process.

References

  1. M. Leconte, A. Masson and L. Qi, Phys. Plasmas 29 (2022) 022302.

predator_prey_rhs

Convention-sensitive source
predator_prey_rhs(turbulence, zonal, gamma_eff, coupling_suppression, coupling_drive, gamma_zonal)
Show source vaft/formula/turbulence.py, lines 116–185
def predator_prey_rhs(turbulence, zonal, gamma_eff, coupling_suppression, coupling_drive, gamma_zonal):
    r"""Time derivatives of the turbulence--zonal-flow predator--prey model.

    $$\dot N = \gamma_\mathrm{eff}N - c_1 N E, \qquad \dot E = c_2 N E - \gamma_Z E$$

    Parameters
    ----------
    turbulence : float or array-like
        Turbulence intensity $N$, non-negative [arbitrary].
    zonal : float or array-like
        Zonal-flow intensity $E$, non-negative [arbitrary].
    gamma_eff : float or array-like
        Effective turbulence growth rate $\gamma_\mathrm{eff}$, non-negative [1/time].
    coupling_suppression : float or array-like
        Suppression coefficient $c_1$, non-negative [1/(time E)].
    coupling_drive : float or array-like
        Drive coefficient $c_2$, non-negative [1/(time N)].
    gamma_zonal : float or array-like
        Effective zonal-flow damping rate $\gamma_Z$, non-negative [1/time].

    Returns
    -------
    d_turbulence_dt : float or np.ndarray
        $\dot N$ [N/time].
    d_zonal_dt : float or np.ndarray
        $\dot E$ [E/time].

    Raises
    ------
    ValueError
        Non-finite input, negative intensity, or a negative rate or coupling.

    Convention
    ----------
    Arguments broadcast with NumPy rules; the time unit is the one the rates
    are given in.

    Physical interpretation
    -----------------------
    $\gamma_\mathrm{eff}N$ is linear drive; $-c_1NE$ is shear decorrelation of
    the turbulence by the zonal flow; $c_2NE$ is Reynolds-stress drive of the
    zonal flow; $-\gamma_ZE$ is its collisional (or other) damping.

    Assumptions
    -----------
    Two scalar intensities stand for the whole spectrum; the couplings are
    constants; no saturation of $N$ in the absence of zonal flow and no
    zonal-flow self-interaction.

    Validity
    --------
    A reduced model for weakly to moderately driven turbulence near marginal
    stability, where zonal flows dominate saturation.  Away from that regime
    (strong drive, tertiary instability, profile relaxation) it is a
    reference, not a prediction.

    References
    ----------
    .. [1] P. H. Diamond, Y.-M. Liang, B. A. Carreras and P. W. Terry,
           Phys. Rev. Lett. 72 (1994) 2565.
    .. [2] S. Kobayashi, O. D. Gurcan and P. H. Diamond, Phys. Plasmas 22 (2015) 090702.
    """
    n = _intensity(turbulence, "turbulence", strict=False)
    e = _intensity(zonal, "zonal", strict=False)
    g = _rate(gamma_eff, "gamma_eff", strict=False)
    c1 = _rate(coupling_suppression, "coupling_suppression", strict=False)
    c2 = _rate(coupling_drive, "coupling_drive", strict=False)
    gz = _rate(gamma_zonal, "gamma_zonal", strict=False)
    n, e, g, c1, c2, gz = np.broadcast_arrays(n, e, g, c1, c2, gz)
    return _out(g * n - c1 * n * e), _out(c2 * n * e - gz * e)

Time derivatives of the turbulence–zonal-flow predator–prey model.

\[\dot N = \gamma_\mathrm{eff}N - c_1 N E, \qquad \dot E = c_2 N E - \gamma_Z E\]
NameTypeUnitDescription
turbulencefloat or array-likearbitrary

Turbulence intensity $N$, non-negative.

zonalfloat or array-likearbitrary

Zonal-flow intensity $E$, non-negative.

gamma_efffloat or array-like1/time

Effective turbulence growth rate $\gamma_\mathrm{eff}$, non-negative.

coupling_suppressionfloat or array-like1/(time E)

Suppression coefficient $c_1$, non-negative.

coupling_drivefloat or array-like1/(time N)

Drive coefficient $c_2$, non-negative.

gamma_zonalfloat or array-like1/time

Effective zonal-flow damping rate $\gamma_Z$, non-negative.

Returns
d_turbulence_dtfloat or np.ndarrayN/time

$\dot N$.

d_zonal_dtfloat or np.ndarrayE/time

$\dot E$.

Convention

Arguments broadcast with NumPy rules; the time unit is the one the rates are given in.

Raises

  • ValueError Non-finite input, negative intensity, or a negative rate or coupling.
Physical interpretation · Assumptions · Validity · References

Physical interpretation

$\gamma_\mathrm{eff}N$ is linear drive; $-c_1NE$ is shear decorrelation of the turbulence by the zonal flow; $c_2NE$ is Reynolds-stress drive of the zonal flow; $-\gamma_ZE$ is its collisional (or other) damping.

Assumptions

Two scalar intensities stand for the whole spectrum; the couplings are constants; no saturation of $N$ in the absence of zonal flow and no zonal-flow self-interaction.

Validity

A reduced model for weakly to moderately driven turbulence near marginal stability, where zonal flows dominate saturation. Away from that regime (strong drive, tertiary instability, profile relaxation) it is a reference, not a prediction.

References

  1. P. H. Diamond, Y.-M. Liang, B. A. Carreras and P. W. Terry, Phys. Rev. Lett. 72 (1994) 2565.
  2. S. Kobayashi, O. D. Gurcan and P. H. Diamond, Phys. Plasmas 22 (2015) 090702.

reynolds_stress_from_velocity_fluctuations

Convention-sensitive source
reynolds_stress_from_velocity_fluctuations(v_r_fluct, v_theta_fluct, axis=-1)
Show source vaft/formula/turbulence.py, lines 904–947
def reynolds_stress_from_velocity_fluctuations(v_r_fluct, v_theta_fluct, axis=-1):
    r"""Turbulent Reynolds stress: the correlation of radial and poloidal velocity fluctuations.

    $$R_{r\theta} = \langle\tilde v_r\,\tilde v_\theta\rangle$$

    Parameters
    ----------
    v_r_fluct : array-like
        Radial velocity fluctuation, positive outward [m/s].
    v_theta_fluct : array-like
        Poloidal (binormal) velocity fluctuation at the same samples [m/s].
    axis : int
        Axis that ``<.>`` averages over [-].

    Returns
    -------
    float or np.ndarray
        $R_{r\theta}$, the radial flux of poloidal momentum per unit mass density [m^2/s^2].

    Raises
    ------
    ValueError
        Non-finite input, inputs of different shapes, or a missing or empty averaging axis.

    Convention
    ----------
    Kinematic stress (per unit mass density). Positive $R_{r\theta}$ carries
    positive $\theta$-momentum outward; the direction of $\hat\theta$ is the
    caller's, and reversing it reverses the sign. As for the particle flux,
    the inputs are fluctuating parts.

    Physical interpretation
    -----------------------
    Tilted eddies have correlated $\tilde v_r$ and $\tilde v_\theta$; their
    stress, and its radial gradient, is how turbulence drives a sheared
    zonal flow.

    References
    ----------
    .. [1] P. H. Diamond and Y.-B. Kim, Phys. Fluids B 3 (1991) 1626.
    .. [2] P. H. Diamond, S.-I. Itoh, K. Itoh and T. S. Hahm,
           Plasma Phys. Control. Fusion 47 (2005) R35.
    """
    return _ensemble_mean(v_r_fluct, v_theta_fluct, axis, ("v_r_fluct", "v_theta_fluct"))

Turbulent Reynolds stress: the correlation of radial and poloidal velocity fluctuations.

\[R_{r\theta} = \langle\tilde v_r\,\tilde v_\theta\rangle\]
NameTypeUnitDescription
v_r_fluctarray-likem/s

Radial velocity fluctuation, positive outward.

v_theta_fluctarray-likem/s

Poloidal (binormal) velocity fluctuation at the same samples.

axisint-

Axis that <.> averages over.

Returns
—float or np.ndarraym^2/s^2

$R_{r\theta}$, the radial flux of poloidal momentum per unit mass density.

Convention

Kinematic stress (per unit mass density). Positive $R_{r\theta}$ carries positive $\theta$-momentum outward; the direction of $\hat\theta$ is the caller’s, and reversing it reverses the sign. As for the particle flux, the inputs are fluctuating parts.

Raises

  • ValueError Non-finite input, inputs of different shapes, or a missing or empty averaging axis.
Physical interpretation · References

Physical interpretation

Tilted eddies have correlated $\tilde v_r$ and $\tilde v_\theta$; their stress, and its radial gradient, is how turbulence drives a sheared zonal flow.

References

  1. P. H. Diamond and Y.-B. Kim, Phys. Fluids B 3 (1991) 1626.
  2. P. H. Diamond, S.-I. Itoh, K. Itoh and T. S. Hahm, Plasma Phys. Control. Fusion 47 (2005) R35.

shear_to_growth_rate_ratio

Convention-sensitive source
shear_to_growth_rate_ratio(gamma_E, gamma_lin)
Show source vaft/formula/turbulence.py, lines 860–901
def shear_to_growth_rate_ratio(gamma_E, gamma_lin):
    r"""Ratio of the E-cross-B shearing rate to a linear growth rate.

    $$\frac{\gamma_E}{\gamma_\mathrm{lin}}$$

    Parameters
    ----------
    gamma_E : float or array-like
        Shearing rate, non-negative [1/s].
    gamma_lin : float or array-like
        Linear growth rate, positive [1/s].

    Returns
    -------
    float or np.ndarray
        $\gamma_E/\gamma_\mathrm{lin}$ [-].

    Raises
    ------
    ValueError
        Non-finite input, a negative shearing rate or a non-positive growth rate.

    Convention
    ----------
    Both rates in the same unit and taken at the same location; the rate
    definitions (which $\gamma_E$, the maximum or a mode's $\gamma$) are the
    caller's.

    Limitations
    -----------
    A ratio, not a classifier. The rule of thumb that turbulence is suppressed
    near $\gamma_E/\gamma_\mathrm{lin} \gtrsim 1$ depends on the definitions
    and the geometry, and is not encoded here.

    References
    ----------
    .. [1] R. E. Waltz, G. D. Kerbel and J. Milovich, Phys. Plasmas 1 (1994) 2229.
    """
    ge = _finite(gamma_E, "gamma_E")
    if np.any(ge < 0.0):
        raise ValueError("gamma_E must be non-negative")
    return _out(ge / _positive(gamma_lin, "gamma_lin"))

Ratio of the E-cross-B shearing rate to a linear growth rate.

\[\frac{\gamma_E}{\gamma_\mathrm{lin}}\]
NameTypeUnitDescription
gamma_Efloat or array-like1/s

Shearing rate, non-negative.

gamma_linfloat or array-like1/s

Linear growth rate, positive.

Returns
—float or np.ndarray-

$\gamma_E/\gamma_\mathrm{lin}$.

Convention

Both rates in the same unit and taken at the same location; the rate definitions (which $\gamma_E$, the maximum or a mode’s $\gamma$) are the caller’s.

Raises

  • ValueError Non-finite input, a negative shearing rate or a non-positive growth rate.
Limitations · References

Limitations

A ratio, not a classifier. The rule of thumb that turbulence is suppressed near $\gamma_E/\gamma_\mathrm{lin} \gtrsim 1$ depends on the definitions and the geometry, and is not encoded here.

References

  1. R. E. Waltz, G. D. Kerbel and J. Milovich, Phys. Plasmas 1 (1994) 2229.

turbulent_heat_flux_from_fluctuations

Convention-sensitive source
turbulent_heat_flux_from_fluctuations(p_fluct, v_r_fluct, axis=-1)
Show source vaft/formula/turbulence.py, lines 659–698
def turbulent_heat_flux_from_fluctuations(p_fluct, v_r_fluct, axis=-1):
    r"""Turbulent radial heat flux carried by pressure fluctuations: $\tfrac32\langle\tilde p\,\tilde v_r\rangle$.

    $$Q_s = \frac{3}{2}\langle\tilde p_s\,\tilde v_r\rangle$$

    Parameters
    ----------
    p_fluct : array-like
        Pressure fluctuation $\tilde p_s = \widetilde{n_sT_s}$ samples [Pa].
    v_r_fluct : array-like
        Radial velocity fluctuation $\tilde v_r$ at the same samples, positive
        outward [m/s].
    axis : int
        Axis that ``<.>`` averages over [-].

    Returns
    -------
    float or np.ndarray
        $Q_s$, positive outward [W/m^2].

    Raises
    ------
    ValueError
        Non-finite input, inputs of different shapes, or a missing or empty averaging axis.

    Convention
    ----------
    The flux of the fluctuating thermal energy $\tfrac32\tilde p_s$ by the
    radial velocity -- the energy-flux definition of the electrostatic
    gyrokinetic codes. It is the total (convective plus conductive) energy
    flux; the conductive part alone is
    $Q_s - \tfrac32T_s\Gamma_s$, and some texts use $\tfrac52$ in the
    convective term. ``p_fluct`` must be the fluctuation of $n_sT_s$, not
    $T_s\tilde n_s$ or $n_s\tilde T_s$ alone.

    References
    ----------
    .. [1] W. Horton, Rev. Mod. Phys. 71 (1999) 735.
    """
    return _out(1.5 * np.asarray(_ensemble_mean(p_fluct, v_r_fluct, axis, ("p_fluct", "v_r_fluct"))))

Turbulent radial heat flux carried by pressure fluctuations: $\tfrac32\langle\tilde p\,\tilde v_r\rangle$.

\[Q_s = \frac{3}{2}\langle\tilde p_s\,\tilde v_r\rangle\]
NameTypeUnitDescription
p_fluctarray-likePa

Pressure fluctuation $\tilde p_s = \widetilde{n_sT_s}$ samples.

v_r_fluctarray-likem/s

Radial velocity fluctuation $\tilde v_r$ at the same samples, positive outward.

axisint-

Axis that <.> averages over.

Returns
—float or np.ndarrayW/m^2

$Q_s$, positive outward.

Convention

The flux of the fluctuating thermal energy $\tfrac32\tilde p_s$ by the radial velocity – the energy-flux definition of the electrostatic gyrokinetic codes. It is the total (convective plus conductive) energy flux; the conductive part alone is $Q_s - \tfrac32T_s\Gamma_s$, and some texts use $\tfrac52$ in the convective term. p_fluct must be the fluctuation of $n_sT_s$, not $T_s\tilde n_s$ or $n_s\tilde T_s$ alone.

Raises

  • ValueError Non-finite input, inputs of different shapes, or a missing or empty averaging axis.
References

References

  1. W. Horton, Rev. Mod. Phys. 71 (1999) 735.

turbulent_particle_flux_from_fluctuations

Convention-sensitive source
turbulent_particle_flux_from_fluctuations(n_fluct, v_r_fluct, axis=-1)
Show source vaft/formula/turbulence.py, lines 613–656
def turbulent_particle_flux_from_fluctuations(n_fluct, v_r_fluct, axis=-1):
    r"""Turbulent radial particle flux: the correlation of density and radial-velocity fluctuations.

    $$\Gamma_s = \langle\tilde n_s\,\tilde v_r\rangle$$

    Parameters
    ----------
    n_fluct : array-like
        Density fluctuation $\tilde n_s$ samples [m^-3].
    v_r_fluct : array-like
        Radial velocity fluctuation $\tilde v_r$ at the same samples, positive
        outward [m/s].
    axis : int
        Axis that ``<.>`` averages over (time, ensemble or flux surface) [-].

    Returns
    -------
    float or np.ndarray
        $\Gamma_s$, positive outward [m^-2 s^-1].

    Raises
    ------
    ValueError
        Non-finite input, inputs of different shapes, or a missing or empty averaging axis.

    Convention
    ----------
    The inputs are the fluctuating parts: removing the mean (or the
    equilibrium) is a procedure the caller does before this, and a
    non-zero mean in both inputs adds $\bar n\bar v_r$ to the result. The
    average is the arithmetic mean along ``axis``.

    Physical interpretation
    -----------------------
    A flux needs density and radial velocity to be correlated: two fluctuations
    of any amplitude carry nothing if they are out of phase by $\pi/2$
    (see :func:`coherent_particle_flux_from_amplitudes_phase`).

    References
    ----------
    .. [1] W. Horton, Rev. Mod. Phys. 71 (1999) 735.
    .. [2] A. J. Wootton et al., Phys. Fluids B 2 (1990) 2879.
    """
    return _ensemble_mean(n_fluct, v_r_fluct, axis, ("n_fluct", "v_r_fluct"))

Turbulent radial particle flux: the correlation of density and radial-velocity fluctuations.

\[\Gamma_s = \langle\tilde n_s\,\tilde v_r\rangle\]
NameTypeUnitDescription
n_fluctarray-likem^-3

Density fluctuation $\tilde n_s$ samples.

v_r_fluctarray-likem/s

Radial velocity fluctuation $\tilde v_r$ at the same samples, positive outward.

axisint-

Axis that <.> averages over (time, ensemble or flux surface).

Returns
—float or np.ndarraym^-2 s^-1

$\Gamma_s$, positive outward.

Convention

The inputs are the fluctuating parts: removing the mean (or the equilibrium) is a procedure the caller does before this, and a non-zero mean in both inputs adds $\bar n\bar v_r$ to the result. The average is the arithmetic mean along axis.

Raises

  • ValueError Non-finite input, inputs of different shapes, or a missing or empty averaging axis.
Physical interpretation · References

Physical interpretation

A flux needs density and radial velocity to be correlated: two fluctuations of any amplitude carry nothing if they are out of phase by $\pi/2$ (see coherent_particle_flux_from_amplitudes_phase).

References

  1. W. Horton, Rev. Mod. Phys. 71 (1999) 735.
  2. A. J. Wootton et al., Phys. Fluids B 2 (1990) 2879.

zonal_flow_drive_from_reynolds_stress_gradient

Convention-sensitive source
zonal_flow_drive_from_reynolds_stress_gradient(dR_dr, zonal_velocity=0.0, damping_rate=0.0)
Show source vaft/formula/turbulence.py, lines 950–992
def zonal_flow_drive_from_reynolds_stress_gradient(dR_dr, zonal_velocity=0.0, damping_rate=0.0):
    r"""Rate of change of a zonal flow driven by the Reynolds-stress divergence.

    $$\frac{\partial V_\mathrm{ZF}}{\partial t} = -\frac{\partial R_{r\theta}}{\partial r} - \mu\,V_\mathrm{ZF}$$

    Parameters
    ----------
    dR_dr : float or array-like
        Radial derivative of the Reynolds stress $R_{r\theta}$, along $r$ in
        metres [m/s^2].
    zonal_velocity : float or array-like
        Zonal-flow velocity $V_\mathrm{ZF}$; enters only through the damping [m/s].
    damping_rate : float or array-like
        Damping rate $\mu$, non-negative; 0 (the default) leaves the drive
        undamped [1/s].

    Returns
    -------
    float or np.ndarray
        $\partial V_\mathrm{ZF}/\partial t$ [m/s^2].

    Raises
    ------
    ValueError
        Non-finite input or a negative damping rate.

    Convention
    ----------
    Slab form of the flux-surface-averaged poloidal momentum balance; the
    damping is a model choice the caller makes explicit (collisional or
    neoclassical damping, or none). This is not the predator--prey model
    above, which describes intensities, not the flow itself.

    References
    ----------
    .. [1] P. H. Diamond and Y.-B. Kim, Phys. Fluids B 3 (1991) 1626.
    .. [2] P. H. Diamond, S.-I. Itoh, K. Itoh and T. S. Hahm,
           Plasma Phys. Control. Fusion 47 (2005) R35.
    """
    mu = _finite(damping_rate, "damping_rate")
    if np.any(mu < 0.0):
        raise ValueError("damping_rate must be non-negative")
    return _out(-_finite(dR_dr, "dR_dr") - mu * _finite(zonal_velocity, "zonal_velocity"))

Rate of change of a zonal flow driven by the Reynolds-stress divergence.

\[\frac{\partial V_\mathrm{ZF}}{\partial t} = -\frac{\partial R_{r\theta}}{\partial r} - \mu\,V_\mathrm{ZF}\]
NameTypeUnitDescription
dR_drfloat or array-likem/s^2

Radial derivative of the Reynolds stress $R_{r\theta}$, along $r$ in metres.

zonal_velocityfloat or array-likem/s

Zonal-flow velocity $V_\mathrm{ZF}$; enters only through the damping.

damping_ratefloat or array-like1/s

Damping rate $\mu$, non-negative; 0 (the default) leaves the drive undamped.

Returns
—float or np.ndarraym/s^2

$\partial V_\mathrm{ZF}/\partial t$.

Convention

Slab form of the flux-surface-averaged poloidal momentum balance; the damping is a model choice the caller makes explicit (collisional or neoclassical damping, or none). This is not the predator–prey model above, which describes intensities, not the flow itself.

Raises

  • ValueError Non-finite input or a negative damping rate.
References

References

  1. P. H. Diamond and Y.-B. Kim, Phys. Fluids B 3 (1991) 1626.
  2. P. H. Diamond, S.-I. Itoh, K. Itoh and T. S. Hahm, Plasma Phys. Control. Fusion 47 (2005) R35.

results matching ""

    No results matching ""