# Calculating Permittivity: c = 5 * v0 eps = 1 / (c**2 * mu) # Velocity Scales: thermal_speed = velocity_scales.thermal_speed(temperature_background, m0, k0) sound_speed = velocity_scales.sound_speed(temperature_background, k0, gamma) alfven_velocity = velocity_scales.alfven_velocity(B0, density_background, m0, mu) # Length scales: debye_length = length_scales.debye_length(density_background, temperature_background, e0, k0, eps) skin_depth = length_scales.skin_depth(density_background, e0, c, m0, eps) gyroradius = length_scales.gyroradius(velocity_scales.thermal_speed(temperature_background, m0, k0), B0, e0, m0) # Time scales: plasma_frequency = time_scales.plasma_frequency(density_background, e0, m0, eps) cyclotron_frequency = time_scales.cyclotron_frequency(B0, e0, m0) alfven_crossing_time = time_scales.alfven_crossing_time(min(L_x, L_y), B0, density_background, m0, mu) sound_crossing_time = time_scales.sound_crossing_time(min(L_x, L_y), temperature_background, k0, gamma) # Setting amplitude and wave number for perturbation: amplitude = 1e-4 k_q1 = 2 * np.pi / l0 # Time parameters: N_cfl = 0.006 t_final = 2.43 * t0 PETSc.Sys.Print("==================================================") PETSc.Sys.Print(" Length Scales of the System ") PETSc.Sys.Print("==================================================")
# Electric charge ~ e; e = |e| units(e) # Boltzmann const ~ k; k = |k| units(k) # Vacuum perm ~ eps0; eps0 = |eps0| units(eps0) # Now choosing units: n0 = 1 # |n| units(n) T0 = 1 # |T| units(T) m0 = 1 # |m_p| units(m) e0 = 1 # |e| units(e) k0 = 1 # |k| units(k) eps = 1 # |eps0| units(eps0) mu = 1 l0 = length_scales.debye_length(n0, T0, e0, k0, eps) v0 = velocity_scales.thermal_speed(T0, m0, k0) t0 = 1 / time_scales.plasma_frequency(n0, e0, m0, eps) # Dimensionality considered in velocity space: p_dim = 1 # Number of devices(GPUs/Accelerators) on each node: num_devices = 1 # Constants: m1 = 1 * m0 m2 = 1 * m0 mass = [m1, m2] # m_e, m_i boltzmann_constant = k0 charge = [-1 * e0, 1 * e0] # e_e, e_i