ParabolicQfactor
q-factor profile described by the following formulas:
\(^*\) Identity: \(\dfrac{1}{\cos^2\theta} = 1 + \tan^2\theta\)
dexter.ParabolicQfactor(qaxis: float, qlast: float, lcfs: LastClosedFluxSurface)
¶
Analytical q-factor of parabolic q(ψ) profile.
Note
A ParabolicQfactor is defined with the help of the
LastClosedFluxSurface helper type, which changes
the position where qlast is met.
Parameters:
-
qaxis(float) –The value of \(q\) on the magnetic axis.
-
qlast(float) –The value of \(q\) at the last closed flux surface.
-
lcfs(LastClosedFluxSurface) –Helper type to define the Last Closed Flux Surface (LCFS) with respect to one of the two fluxes.
Example
Methods:
-
q_of_psi–The \(q(\psi)\) value.
-
q_of_psip–The \(q(\psi_p)\) value.
-
dpsip_dpsi–The derivative \(d\psi_p(\psi)/d\psi\) value in Normalized Units.
-
dpsi_dpsip–The derivative \(d\psi(\psi_p)/d\psi_p\) value in Normalized Units.
-
iota_of_psi–The \(\iota(\psi) = \dfrac{1}{q(\psi)}\) value.
-
iota_of_psip–The \(\iota(\psi_p) = \dfrac{1}{q(\psi_p)}\) value.
-
plot_q_of_psi–Plots \(q(\psi)\).
-
plot_q_of_psip–Plots \(q(\psi_p)\).
-
plot_dpsip_dpsi–Plots \(d\psi_p(\psi)/d\psi\) and \(\iota(\psi)\).
-
plot_dpsi_dpsip–Plots \(d\psi(\psi_p)/d\psi_p\) and \(q(\psi_p)\).
-
plot_iota_of_psi–Plots \(\iota(\psi)\).
-
plot_iota_of_psip–Plots \(\iota(\psi_p)\).
-
psip_of_psi–The \(\psi_p(\psi)\) value in Normalized Units.
-
psi_of_psip–The \(\psi(\psi_p)\) value in Normalized Units.
-
plot_psip_of_psi–Plots \(\psi(\psi_p)\).
-
plot_psi_of_psip–Plots \(\psi(\psi_p)\).
-
psi_of_q–The toroidal flux \(\psi\) in Normalized Units.
-
psip_of_q–The poloidal flux \(\psi_p\) in Normalized Units.
Attributes:
-
psi_state(FluxState) –The state of the toroidal flux coordinate.
-
psip_state(FluxState) –The state of the poloidal flux coordinate.
-
equilibrium_type(EquilibriumType) –The object's equilibrium's type.
-
psi_last(float) –The value of the last closed toroidal flux surface \(\psi_{LCFS}\) in Normalized Units.
-
psip_last(float) –The value of the last closed poloidal flux surface \(\psi_{p,LCFS}\) in Normalized Units.
-
qlast(float) –The value of \(q\) at the last closed flux surface.
-
qaxis(float) –The value of \(q\) on the magnetic axis.
dexter.ParabolicQfactor.psi_state: FluxState
property
¶
The state of the toroidal flux coordinate.
dexter.ParabolicQfactor.psip_state: FluxState
property
¶
The state of the poloidal flux coordinate.
dexter.ParabolicQfactor.equilibrium_type: EquilibriumType
property
¶
The object's equilibrium's type.
dexter.ParabolicQfactor.psi_last: float
property
¶
The value of the last closed toroidal flux surface \(\psi_{LCFS}\) in Normalized Units.
dexter.ParabolicQfactor.psip_last: float
property
¶
The value of the last closed poloidal flux surface \(\psi_{p,LCFS}\) in Normalized Units.
dexter.ParabolicQfactor.qlast: float
property
¶
The value of \(q\) at the last closed flux surface.
dexter.ParabolicQfactor.qaxis: float
property
¶
The value of \(q\) on the magnetic axis.
dexter.ParabolicQfactor.q_of_psi(psi: ArrayLike) -> NDArray
¶
The \(q(\psi)\) value.
Parameters:
-
psi(ArrayLike) –The toroidal flux \(\psi\) in Normalized Units.
dexter.ParabolicQfactor.q_of_psip(psip: ArrayLike) -> NDArray
¶
The \(q(\psi_p)\) value.
Parameters:
-
psip(ArrayLike) –The poloidal flux \(\psi_p\) in Normalized Units.
dexter.ParabolicQfactor.dpsip_dpsi(psi: ArrayLike) -> NDArray
¶
The derivative \(d\psi_p(\psi)/d\psi\) value in Normalized Units.
It's a good check that the values coincide with qfactor.iota_of_psi(psi).
Parameters:
-
psi(ArrayLike) –The toroidal flux \(\psi\) in Normalized Units.
dexter.ParabolicQfactor.dpsi_dpsip(psip: ArrayLike) -> NDArray
¶
The derivative \(d\psi(\psi_p)/d\psi_p\) value in Normalized Units.
It's a good check that the values coincide with qfactor.q_of_psip(psip).
Parameters:
-
psip(ArrayLike) –The poloidal flux \(\psi_p\) in Normalized Units.
dexter.ParabolicQfactor.iota_of_psi(psi: ArrayLike) -> NDArray
¶
The \(\iota(\psi) = \dfrac{1}{q(\psi)}\) value.
Parameters:
-
psi(ArrayLike) –The toroidal flux \(\psi\) in Normalized Units.
dexter.ParabolicQfactor.iota_of_psip(psip: ArrayLike) -> NDArray
¶
The \(\iota(\psi_p) = \dfrac{1}{q(\psi_p)}\) value.
Parameters:
-
psip(ArrayLike) –The poloidal flux \(\psi_p\) in Normalized Units.
dexter.ParabolicQfactor.plot_q_of_psi(points: int = 1000, data: bool = False, show: bool = True) -> Canvas
¶
Plots \(q(\psi)\).
Parameters:
-
points(int, default:1000) –The number of points in which to evaluate \(q(\psi)\). Defaults to 1000.
-
data(bool, default:False) –Whether or not to plot the data array points (numerical equilibria only). Defaults to False.
-
show(bool, default:True) –Whether or not to call
plt.show(). Defaults to True.
Returns:
-
Canvas–The produced
FigureandAx.
dexter.ParabolicQfactor.plot_q_of_psip(points: int = 1000, data: bool = False, show: bool = True) -> Canvas
¶
Plots \(q(\psi_p)\).
Parameters:
-
points(int, default:1000) –The number of points in which to evaluate \(q(\psi_p)\). Defaults to 1000.
-
data(bool, default:False) –Whether or not to plot the data array points (numerical equilibria only). Defaults to False.
-
show(bool, default:True) –Whether or not to call
plt.show(). Defaults to True.
Returns:
-
Canvas–The produced
FigureandAx.
dexter.ParabolicQfactor.plot_dpsip_dpsi(points: int = 1000, show: bool = True) -> Canvas
¶
Plots \(d\psi_p(\psi)/d\psi\) and \(\iota(\psi)\).
This is a check to make sure the two quantities do indeed overlap.
Parameters:
-
points(int, default:1000) –The number of points in which to evaluate the two splines. Defaults to 1000.
-
show(bool, default:True) –Whether or not to call
plt.show(). Defaults to True.
Returns:
-
Canvas–The produced
FigureandAx.
dexter.ParabolicQfactor.plot_dpsi_dpsip(points: int = 1000, show: bool = True) -> Canvas
¶
Plots \(d\psi(\psi_p)/d\psi_p\) and \(q(\psi_p)\).
This is a check to make sure the two quantities do indeed overlap.
Parameters:
-
points(int, default:1000) –The number of points in which to evaluate the two splines. Defaults to 1000.
-
show(bool, default:True) –Whether or not to call
plt.show(). Defaults to True.
Returns:
-
Canvas–The produced
FigureandAx.
dexter.ParabolicQfactor.plot_iota_of_psi(points: int = 1000, show: bool = True) -> Canvas
¶
Plots \(\iota(\psi)\).
Parameters:
-
points(int, default:1000) –The number of points in which to evaluate \(\iota(\psi)\). Defaults to 1000.
-
show(bool, default:True) –Whether or not to call
plt.show(). Defaults to True.
Returns:
-
Canvas–The produced
FigureandAx.
dexter.ParabolicQfactor.plot_iota_of_psip(points: int = 1000, show: bool = True) -> Canvas
¶
Plots \(\iota(\psi_p)\).
Parameters:
-
points(int, default:1000) –The number of points in which to evaluate \(\iota(\psi_p)\). Defaults to 1000.
-
show(bool, default:True) –Whether or not to call
plt.show(). Defaults to True.
Returns:
-
Canvas–The produced
FigureandAx.
dexter.ParabolicQfactor.psip_of_psi(psi: ArrayLike) -> NDArray
¶
The \(\psi_p(\psi)\) value in Normalized Units.
Parameters:
-
psi(ArrayLike) –The toroidal flux \(\psi\) in Normalized Units.
dexter.ParabolicQfactor.psi_of_psip(psip: ArrayLike) -> NDArray
¶
The \(\psi(\psi_p)\) value in Normalized Units.
Parameters:
-
psip(ArrayLike) –The poloidal flux \(\psi_p\) in Normalized Units.
dexter.ParabolicQfactor.plot_psip_of_psi(points: int = 1000, data: bool = False, show: bool = True) -> Canvas
¶
Plots \(\psi(\psi_p)\).
Parameters:
-
points(int, default:1000) –The number of points in which to evaluate \(\psi_p(\psi)\). Defaults to 1000.
-
data(bool, default:False) –Whether or not to plot the data array points (numerical equilibria only). Defaults to False.
-
show(bool, default:True) –Whether or not to call
plt.show(). Defaults to True.
Returns:
-
Canvas–The produced
FigureandAx.
dexter.ParabolicQfactor.plot_psi_of_psip(points: int = 1000, data: bool = False, show: bool = True) -> Canvas
¶
Plots \(\psi(\psi_p)\).
Parameters:
-
points(int, default:1000) –The number of points in which to evaluate \(\psi(\psi_p)\). Defaults to 1000.
-
data(bool, default:False) –Whether or not to plot the data array points (numerical equilibria only). Defaults to False.
-
show(bool, default:True) –Whether or not to call
plt.show(). Defaults to True.
Returns:
-
Canvas–The produced
FigureandAx.
dexter.ParabolicQfactor.psi_of_q(q: ArrayLike) -> NDArray
¶
The toroidal flux \(\psi\) in Normalized Units.
Parameters:
-
q(ArrayLike) –The q-factor value \(q\).
dexter.ParabolicQfactor.psip_of_q(q: ArrayLike) -> NDArray
¶
The poloidal flux \(\psi_p\) in Normalized Units.
Parameters:
-
q(ArrayLike) –The q-factor value \(q\).