marker='o') fig.suptitle('Relative Error') axes[0].set_xlabel('k') axes[1].set_xlabel('k') axes[0].set_ylabel('$\Delta \omega_r$ / $\omega_r$') axes[0].set_ylabel('$\Delta \omega_i$ / $\omega_i$') plt.show() return if __name__ == '__main__': ''' Test quantities/direct interface ''' L_shell = 4 # L-shell at which magnetic field and density are calculated n0 = sheely_plasmasphere(L_shell) # Plasma density, /m3 _B0 = geomagnetic_magnitude(L_shell) # Background magnetic field, T mp = 1.673e-27 # Proton mass (kg) qi = 1.602e-19 # Elementary charge (C) if True: ''' Standard Wang (2016) test values DON'T CHANGE ''' # This all must add up to 1 RC_ab = 0.1 H_ab = 0.6 He_ab = 0.2 O_ab = 0.1 if round(RC_ab + H_ab + He_ab + O_ab, 5) != 1.0:
counted as separate species ''' log_dir = 'C://Users//iarey//Documents//GitHub//hybrid//linear_theory//Logs//' log_output = False mp = 1.673E-27 # kg me = 9.109E-31 # kg q = 1.602e-19 # C qe = -q c = 3E8 # m/s e0 = 8.854e-12 # F/m mu0 = (4e-7) * np.pi # units N = 3 # Number of species L_shell = 4 # L-shell at which magnetic field and density are calculated n0 = sheely_plasmasphere(L_shell) # /m3 field = 300e-9 #geomagnetic_magnitude(L_shell) # T ndensc = np.zeros(N) ndensc[0] = 196e6 ndensc[1] = 22e6 ndensc[2] = 2e6 # Density of warm species (same order as cold) (number/cc) ndensw = np.zeros(N) ndensw[0] = 5.1e6 ndensw[1] = 0.05e6 ndensw[2] = 0.13e6 # Input the perpendicular temperature (ev) t_perp = np.zeros(N)
ax.text(left + 0.05, h_top, r' $n_i (cm^{-3})$ $T_{\perp} (keV)$ $A_i$ ', transform=ax.transAxes, fontsize=fsize, fontname=font) ax.text(left, h_top - 1*v_space, ' H+: {:>5.2f} {:>5} {:>5}'.format(round(_ndensw2[0], 2), TPER_kev2[0], _A2[0]) , transform=ax.transAxes, fontsize=fsize, fontname=font) ax.text(left, h_top - 2*v_space, 'He+: {:>5.2f} {:>5} {:>5}'.format(round(_ndensw2[1], 2), TPER_kev2[1], _A2[1]) , transform=ax.transAxes, fontsize=fsize, fontname=font) ax.text(left, h_top - 3*v_space, ' O+: {:>5.2f} {:>5} {:>5}'.format(round(_ndensw2[2], 2), TPER_kev2[2], _A2[2]) , transform=ax.transAxes, fontsize=fsize, fontname=font) return if __name__ == '__main__': save_path = 'G://TEMP//' output = 'show' np.seterr(all='raise') figtext = True Nn = 3 # Number of species L_shell = 4 # L-shell at which magnetic field and density are calculated n0 = sheely_plasmasphere(L_shell)*1e-6 # /cc _field = geomagnetic_magnitude(L_shell)*1e9 # nT variable = np.array([1.0]) alphas = np.linspace(0.2, 1.0, variable.shape[0]) for ii, _var in zip(range(variable.shape[0]), variable): ####################### ### CALCULATING BIT ### ####################### print('var {}'.format(_var)) _ndensc = np.zeros(Nn) _ndensc[0] = 0.6*n0 # Cold Hydrogen density (/cc) _ndensc[1] = 0.2*n0 # Cold Helium