Skip to content

neoclassics_variables

Module containing neoclassical computations

Formulas used are described in: Beidler (2013), https://doi.org/10.1088/0029-5515/51/7/076001

NO_ROOTS = 30 module-attribute

Number of Gauss laguerre roots

CREATE_DICTS_FROM_DATACLASS = NeoclassicsData module-attribute

NeoclassicsData dataclass

Source code in process/data_structure/neoclassics_variables.py
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
@dataclass(slots=True)
class NeoclassicsData:
    densities: list[float] = field(default_factory=lambda: np.zeros(4))
    """Densities of the species that are considered [/m3]"""

    temperatures: list[float] = field(default_factory=lambda: np.zeros(4))
    """Temperature of the species that are considered [J]"""

    dr_densities: list[float] = field(default_factory=lambda: np.zeros(4))
    """Radial derivative of the density of the species [/m3]"""

    dr_temperatures: list[float] = field(default_factory=lambda: np.zeros(4))
    """Radial derivative of the temperature of the species [J]"""

    roots: list[float] = field(default_factory=lambda: np.zeros(NO_ROOTS))
    """Gauss Laguerre Roots"""

    weights: list[float] = field(default_factory=lambda: np.zeros(NO_ROOTS))
    """Gauss Laguerre Weights"""

    nu: list[float] = field(default_factory=lambda: np.zeros((4, NO_ROOTS)))
    """90-degree deflection frequency on GL roots"""

    nu_star: list[float] = field(default_factory=lambda: np.zeros((4, NO_ROOTS)))
    """Dimensionless deflection frequency"""

    nu_star_averaged: list[float] = field(default_factory=lambda: np.zeros(4))
    """Maxwellian averaged dimensionless 90-degree deflection frequency for electrons (index 1) and ions (index 2)"""

    vd: list[float] = field(default_factory=lambda: np.zeros((4, NO_ROOTS)))
    """Drift velocity on GL roots"""

    kt: list[float] = field(default_factory=lambda: np.zeros((4, NO_ROOTS)))
    """Thermal energy on GL roots"""

    er: float = 0.0
    """Radial electrical field [V/m]"""

    iota: float = 1.0
    """Iota (1/safety factor)"""

    d11_mono: list[float] = field(default_factory=lambda: np.zeros((4, NO_ROOTS)))
    """Radial monoenergetic transport coefficient on GL roots (species dependent)"""

    d11_plateau: list[float] = field(default_factory=lambda: np.zeros((4, NO_ROOTS)))
    """Toroidal monoenergetic transport coefficient as given by the stellarator
    input json file as function of nu_star, normalised by the banana value.
    """

    d111: list[float] = field(default_factory=lambda: np.zeros(4))
    """Radial integrated transport coefficient (n=1) (species dependent)"""

    d112: list[float] = field(default_factory=lambda: np.zeros(4))
    """Radial integrated transport coefficient (n=2) (species dependent)"""

    d113: list[float] = field(default_factory=lambda: np.zeros(4))
    """Radial integrated transport coefficient (n=3) (species dependent)"""

    q_flux: list[float] = field(default_factory=lambda: np.zeros(4))
    """energy transport flux (J/m2)"""

    gamma_flux: list[float] = field(default_factory=lambda: np.zeros(4))
    """energy flux from particle transport"""

    d31_mono: list[float] = field(default_factory=lambda: np.zeros(NO_ROOTS))
    """Toroidal monoenergetic transport coefficient"""

    eps_eff: float = 1e-5
    """Epsilon effective (used in neoclassics_calc_D11_mono)"""

    r_eff: float = 0.0

densities = field(default_factory=(lambda: np.zeros(4))) class-attribute instance-attribute

Densities of the species that are considered [/m3]

temperatures = field(default_factory=(lambda: np.zeros(4))) class-attribute instance-attribute

Temperature of the species that are considered [J]

dr_densities = field(default_factory=(lambda: np.zeros(4))) class-attribute instance-attribute

Radial derivative of the density of the species [/m3]

dr_temperatures = field(default_factory=(lambda: np.zeros(4))) class-attribute instance-attribute

Radial derivative of the temperature of the species [J]

roots = field(default_factory=(lambda: np.zeros(NO_ROOTS))) class-attribute instance-attribute

Gauss Laguerre Roots

weights = field(default_factory=(lambda: np.zeros(NO_ROOTS))) class-attribute instance-attribute

Gauss Laguerre Weights

nu = field(default_factory=(lambda: np.zeros((4, NO_ROOTS)))) class-attribute instance-attribute

90-degree deflection frequency on GL roots

nu_star = field(default_factory=(lambda: np.zeros((4, NO_ROOTS)))) class-attribute instance-attribute

Dimensionless deflection frequency

nu_star_averaged = field(default_factory=(lambda: np.zeros(4))) class-attribute instance-attribute

Maxwellian averaged dimensionless 90-degree deflection frequency for electrons (index 1) and ions (index 2)

vd = field(default_factory=(lambda: np.zeros((4, NO_ROOTS)))) class-attribute instance-attribute

Drift velocity on GL roots

kt = field(default_factory=(lambda: np.zeros((4, NO_ROOTS)))) class-attribute instance-attribute

Thermal energy on GL roots

er = 0.0 class-attribute instance-attribute

Radial electrical field [V/m]

iota = 1.0 class-attribute instance-attribute

Iota (1/safety factor)

d11_mono = field(default_factory=(lambda: np.zeros((4, NO_ROOTS)))) class-attribute instance-attribute

Radial monoenergetic transport coefficient on GL roots (species dependent)

d11_plateau = field(default_factory=(lambda: np.zeros((4, NO_ROOTS)))) class-attribute instance-attribute

Toroidal monoenergetic transport coefficient as given by the stellarator input json file as function of nu_star, normalised by the banana value.

d111 = field(default_factory=(lambda: np.zeros(4))) class-attribute instance-attribute

Radial integrated transport coefficient (n=1) (species dependent)

d112 = field(default_factory=(lambda: np.zeros(4))) class-attribute instance-attribute

Radial integrated transport coefficient (n=2) (species dependent)

d113 = field(default_factory=(lambda: np.zeros(4))) class-attribute instance-attribute

Radial integrated transport coefficient (n=3) (species dependent)

q_flux = field(default_factory=(lambda: np.zeros(4))) class-attribute instance-attribute

energy transport flux (J/m2)

gamma_flux = field(default_factory=(lambda: np.zeros(4))) class-attribute instance-attribute

energy flux from particle transport

d31_mono = field(default_factory=(lambda: np.zeros(NO_ROOTS))) class-attribute instance-attribute

Toroidal monoenergetic transport coefficient

eps_eff = 1e-05 class-attribute instance-attribute

Epsilon effective (used in neoclassics_calc_D11_mono)

r_eff = 0.0 class-attribute instance-attribute