Пример #1
0
m_i = 1        * m0

# Charge of electron and ion:
e_e = -1 * e0
e_i =  1 * e0

mass               = [m_e, m_i]
boltzmann_constant = k0
charge             = [e_e, e_i]

# Background Quantities:
density_background     = 1 * n0
temperature_background = 1 * T0

# Velocity, length and time scales:
v0 = velocity_scales.alfven_velocity(B0, density_background, m0, mu)
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:
Пример #2
0
mass               = [m_e]
boltzmann_constant = k0
charge             = [e_e]

# Boundary conditions for the density and temperature of left zone, 
# Setup as initial conditions throughout domain:
n_left = 1 * n0
T_left = 1 * T0

plasma_beta = 100 # β = p / (B^2 / 2μ)
# Setting magnetic field along x using plasma beta:
B1 = np.sqrt(2 * mu * n_left * T_left / plasma_beta)

# Velocity, length and time scales:
t0 = 1 / time_scales.cyclotron_frequency(B1, e_i, m_i)
v0 = velocity_scales.alfven_velocity(B1, n_left, m_i, mu)
l0 = v0 * t0 # ion skin depth

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

# Setting bulk velocity of left boundary:
# Also setup as initial conditions throughout domain:
v1_bulk_left = 1 * v0

# Time parameters:
N_cfl   = 0.1
t_final = 200 * t0

# Switch for solver components: