gcmotion.plot.bifurcation_plot#

gcmotion.plot.bifurcation_plot(profile: Profile, COM_values: list, **kwargs)#

Draws the bifurcation diagrams for the \(theta\)’s fixed, the \(\psi\)’s fixed and the number of fixed points found for each \(\mu\) or \(P_{\zeta}\).

Parameters:
profileProfile

Profile object containing Tokamak information.

COM_valueslist

List of COM values \(P_{\zeta}\)’s or \(\mu\)’s in [NU].

Other Parameters
—————-
thetalimlist, optional

Limits of the of the \(\theta\), \(\psi\) search area with respect to the \(\theta\) variable. Defaults to [-\(\pi\), \(\pi\)].

psilimlist, optional

Limits of the of the \(\theta\), \(\psi\) search area with respect to the \(\psi\) variable. Defaults to [0.01 , 1.8]. CAUTION-> The limits are given normalized to \(\psi_{wall}\).

methodstr, optional

String that indicates which method will be used to find the system’s fixed points in single_fixed_point(). Can either be “fsolve” (deterministic) or “differential evolution” (stochastic). Defaults to “fsolve”.

dist_tolfloat, optional

Tolerance below which two fixed points are not considered distinct. The differences between both \(\theta\) and \(\psi\) of the fixed points must be below this tolerance for the fixed points to be considered the same. Defaults to 1e-3.

fp_ic_scan_tolfloat, optional

Tolerance below which the sum of the squares of the time derivatives of the \(\theta\) and \(\psi\) variables is considered zero. It is passed into fp_ic_scan(). Defaults to 5 * 1e-8.

ic_theta_grid_densityint, optional

Density of the \(\theta\), \(\psi\) 2D grid to be scanned for initial conditiond (fixed points candidates) with respect to the \(\theta\) variable. It is passed into fp_ic_scan(). Defaults to 400.

ic_psi_grid_densityint, optional

Density of the \(\theta\), \(\psi\) 2D grid to be scanned for initial conditiond (fixed points candidates) with respect to the \(\psi\) variable. It is passed into fp_ic_scan() Defaults to 400.

random_fp_init_condbool, optional

Boolean determining weather random initial conditions are to be used instead of those provided by fp_ic_scan(). Defaults to False.

fp_infobool, optional

Boolean determining weather fixed points’ information is to be is to be printed in the log. Defaults to False.

bif_info: bool, optional

Boolean that determines weather information regarding the bifurcation process is to be is to be printed in the log. Defaults to False.

fp_ic_infobool, optional

Boolean determing weather information on the initial condition is to be is to be printed in the log. Defaults to False.

plot_energy_bifbool, optional

Boolean determining weather the energy of each fixed point of each profile (each \(P_{\zeta}\)) is to be plotted. Defaults to False.

which_COMstr, optional

Determines with regard to which COM (\(\mu\) or \(P_{\zeta}\)) will the bifurcation analysis take place. Essentially determinies the independent variable on the axis’ of the bifurcation diagram. Defaults to ‘Pzeta’.

energy_unitsstr, optional

String specifying the unit of the calculated fixed points’ energies. Defaults to "NUJoule".

energies_infobool, optional

Boolean determining weather information on the fixed points’ energies is to be is to be printed in the log. Defaults to True.

fp_only_confinedbool, optional

Boolean determining if the search for \(\psi_{fixed}\) will be conducted only for \(\psi\) < \(\psi_{wall}\) (confined particles). Defaults to False.