# 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("==================================================") PETSc.Sys.Print("Debye Length :", debye_length) PETSc.Sys.Print("Skin Depth :", skin_depth) PETSc.Sys.Print("Gyroradius :", gyroradius)
sound_speed = velocity_scales.sound_speed(T_background, k0, gamma) alfven_velocity = velocity_scales.alfven_velocity(B0, n_background, m0, mu) # Length scales: debye_length = length_scales.debye_length(n_background, T_background, e0, k0, eps) skin_depth = length_scales.skin_depth(n_background, e0, c, m0, eps) gyroradius = length_scales.gyroradius( velocity_scales.thermal_speed(T_background, m0, k0), B0, e0, m0) # Time scales: plasma_frequency = time_scales.plasma_frequency(n_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, n_background, m0, mu) sound_crossing_time = time_scales.sound_crossing_time(min(L_x, L_y), T_background, k0, gamma) # Time parameters: N_cfl = 0.125 t_final = 400 * t0 PETSc.Sys.Print("==================================================") PETSc.Sys.Print(" Length Scales of the System ") PETSc.Sys.Print("==================================================") PETSc.Sys.Print("Debye Length :", debye_length) PETSc.Sys.Print("Skin Depth :", skin_depth) PETSc.Sys.Print("Gyroradius :", gyroradius) PETSc.Sys.Print("Chosen Length Scale:", l0) PETSc.Sys.Print("Length_x :", L_x / l0, "|l0| units(l0)") PETSc.Sys.Print("Length_y :", L_y / l0, "|l0| units(l0)") PETSc.Sys.Print("==================================================\n")