Exemple #1
0
l0 = np.pi # Box Length
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:
Exemple #2
0
l0 = (2 * np.pi / 0.5)  # Box Length
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)
Exemple #3
0
# Mass            ~ m_p; m_p = |m_p| units(m_p)
# 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
Exemple #4
0
l0 = v0 * t0  # ion skin depth

# 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)