Example #1
0
t0 = l0 / v0

# Setting the length of the box:
L_x = L_y = l0

# Setting delta_v of the Phase Space Grid:
v_max_e = 0.22 * v0
v_max_i = 0.07 * v0

# 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
Example #2
0
eps = 1.  # |eps0| units(eps0)
mu = 1.  # |mu0| units(mu0)
c = 1.  # |c| units(c)

# Dimensionality considered in velocity space:
p_dim = 2

# Number of devices(GPUs/Accelerators) on each node:
num_devices = 4

mass = [1 * m0]
boltzmann_constant = k0
charge = [0 * e0]

# Velocity, length and time scales:
v0 = velocity_scales.sound_speed(T0, k0, 5 / 3)
l0 = 0.3  # Box Length
t0 = l0 / v0

# Time parameters:
N_cfl = 0.95
t_final = 10 * t0

# Switch for solver components:
fields_enabled = False
source_enabled = False
instantaneous_collisions = True

# File-writing Parameters:
# Set to zero for no file-writing
dt_dump_f = 1 * t0
Example #3
0
# Setting lengths of the domain:
L_x = 5 * l0
L_y = 100 * l0

# Setting Maximum Velocities of Phase Space Grid:
v_max_e = 0.0025  # Setting this value depending upon temperature. Can be later determined in terms of v0
v_max_i = 0.00027  # Setting this value depending upon temperature. Can be later determined in terms of v0

# Setting permeability:
c = v_max_e  # |c| units(c)
eps = 1 / (c**2 * mu)

# Velocity Scales:
thermal_speed = velocity_scales.thermal_speed(T_background, m0, k0)
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),