Exemplo n.º 1
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
Exemplo n.º 2
0
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("==================================================")
PETSc.Sys.Print("Debye Length       :", debye_length)
Exemplo n.º 3
0
# Charge of electron and positron:
e_e = -1 * e0
e_p = 1 * e0

mass = [m_e, m_p]
boltzmann_constant = k0
charge = [e_e, e_p]

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

B1 = 1

# Velocity, length and time scales:
t0 = 1 / time_scales.cyclotron_frequency(B1, e0, m0)
v0 = velocity_scales.alfven_velocity(B1, density_background, m0, mu)
l0 = v0 * t0  # positron skin depth

L_x = 1 * l0
L_y = 1.5 * l0

# Setting Maximum Velocity of Phase Space Grid:
v_max = 15 * v0

# Calculating Permittivity:
c = v_max
eps = 1 / (c**2 * mu)

# Velocity Scales:
thermal_speed = velocity_scales.thermal_speed(temperature_background, m0, k0)