|
str | torder = 'SSPRK3' |
|
str | sorder = 'thirdOrder' |
|
float | cfl = 0.209 |
|
str | mesh_res = '32x192x32' |
|
f | meshfile = f'sheath_mesh_{mesh_res}.inp' |
|
warpy | mesh |
|
float | density_min = 0.01 |
|
float | pressure_min = 0.01 |
|
float | gamma = 3.0 |
|
bool | use_limiter_mr = False |
|
int | limiter_alpha_coefficient = 2. |
|
bool | use_phmaxwell = False |
|
float | phchi = 1.5 |
|
float | phgamma = phchi |
|
argparse | parser = argparse.ArgumentParser(description='1d Sheath problem') |
|
| type |
|
| str |
|
| nargs |
|
| help |
|
| default |
|
argparse | args = parser.parse_args() |
|
argparse | model = args.model |
|
list | tf_sds = ['middle'] |
|
list | tf_vds = ['left','right'] |
|
list | kinetic_sds = ['left','right'] |
|
list | kinetic_vds = ['middle'] |
|
| else : |
|
float | qe = 1.602177e-19 |
|
float | mp = 1.672622e-27 |
|
float | mu0 = 1.256637e-6 |
|
float | eps0 = 8.854187e-12 |
|
int | c_light = 1/(mu0*eps0)**.5 |
|
tuple | L_debye = (eps0*qe*1/(1e19*qe**2))**0.5 |
|
tuple | L = L_debye |
|
float | ompt = 1.0 |
|
float | omct = 3.265e-5 |
|
float | c_tilde = ompt/omct |
|
int | skin_depth_norm = 1/omct |
|
float | omega_p_norm = ompt |
|
float | n0 = mp*omct**2/(mu0*L**2*qe**2) |
|
float | tau = ompt*L/(omct*c_light) |
|
float | b0 = mp*c_light*omct**2/(qe*L*ompt) |
|
float | e0 = b0**2/mu0 |
|
float | T0 = e0/(n0*qe) |
|
float | Z_i = +1.0 |
|
float | Z_e = -1.0 |
|
float | mass_ratio = 1836.0 |
|
float | A_i = 1.0 |
|
float | A_e = A_i / mass_ratio |
|
float | n_i = 1.0 |
|
float | n_e = 1.0 |
|
float | rho_i = A_i * n_i |
|
float | rho_e = A_e * n_e |
|
float | charge_to_mass_ion = Z_i/A_i |
|
float | charge_to_mass_electron = Z_e/A_e |
|
int | T_i = 10 |
|
int | T_e = 10 |
|
float | P_i = n_i * T_i |
|
float | P_e = n_e * T_e |
|
math | v_th_i = math.sqrt(P_i/A_i/n_i) |
|
math | v_th_e = math.sqrt(P_e/A_e/n_e) |
|
float | nu_p_tau_bgk = 1.0 |
|
float | vth_factor = +6.0 |
|
list | v_space_num_elements = [48] |
|
list | min_v_ion = [-vth_factor*v_th_i] |
|
list | dv_ion = [0.25* v_th_i] |
|
list | min_v_electron = [-vth_factor*v_th_e] |
|
list | dv_electron = [0.25* v_th_e] |
|
list | fluid_comps = ['rho', 'px', 'py', 'pz', 'e'] |
|
list | field_comps = ['Ex', 'Ey', 'Ez', 'Bx', 'By', 'Bz'] |
|
warpy | ions |
|
warpy | electrons |
|
warpy | field |
|
warpy | electron_distribution |
|
warpy | ion_distribution |
|
warpy | kinetic_electron_fluid |
|
warpy | kinetic_ion_fluid |
|
warpy | ion_maxwellian_distribution |
|
warpy | electron_maxwellian_distribution |
|
warpy | chi_metric_i |
|
warpy | chi_metric_e |
|
tuple | ic_fun_i |
|
tuple | ic_fun_e |
|
tuple | ic_fun_EM |
|
warpy | electron_ic |
|
warpy | ion_ic |
|
warpy | ic_fun_i_va |
|
warpy | ic_fun_e_va |
|
warpy | ic_fun_EM_va |
|
warpy | electron_ic_va |
|
warpy | ion_ic_va |
|
warpy | tf_ic_ha |
|
warpy | field_ic_ha |
|
warpy | distribution_ic_ha |
|
list | ic_ha = [] |
|
list | bc_apps = [] |
|
list | values_in = [A_e*1e-4,0,0,0,1e-4/(gamma-1)] |
|
list | electron_distribution_wall_bcs = [] |
|
list | ion_distribution_wall_bcs = [] |
|
list | maxwell_bcs = [] |
|
list | virtual_bc_apps_tf = [] |
|
list | virtual_bc_apps_kinetic_ions = [] |
|
list | virtual_bc_apps_kinetic_electrons = [] |
|
list | applications_moments_ions = [] |
|
list | applications_moments_electrons = [] |
|
list | applications_2nd_moments_ions = [] |
|
list | applications_2nd_moments_electrons = [] |
|
list | applications_maxwellian_metric_ions = [] |
|
list | applications_maxwellian_metric_electrons = [] |
|
list | limiter_apps_electron = [] |
|
list | limiter_apps_ion = [] |
|
list | variable_adjusters_tf = [] |
|
list | variable_adjusters_kinetic = [] |
|
list | kinetic_to_tf_va = [] |
|
list | tf_to_kinetic_va_ions = [] |
|
list | tf_to_kinetic_va_electrons = [] |
|
warpy | ion_timestep_start_moment_taker |
| add these same moment takers that can be done at the beginning of each timestep before writeout
|
|
warpy | electron_timestep_start_moment_taker |
|
warpy | ion_timestep_start_second_moment_taker |
|
warpy | electron_timestep_start_second_moment_taker |
|
warpy | ion_timestep_start_chi_metric_moment_taker |
|
warpy | electron_timestep_start_chi_metric_moment_taker |
|
list | extra_timestep_start_writer = [] |
|
warpy | moment_takers_timestep_start_ha |
|
warpy | fluid_ions_to_maxwellian_function |
|
warpy | fluid_electrons_to_maxwellian_function |
|
list | maxwellian_evalution_timestep_start_va = [] |
| add these maxwellian conversions that can be done at the beginning of each timestep before writeout
|
|
warpy | maxwellian_evaluation_timestep_start_ha |
|
list | solver_apps_tf = [] |
|
list | solver_apps_maxwell_flux = [] |
|
list | solver_apps_maxwell_tf_fluid_source = [] |
|
list | solver_apps_maxwell_kinetic_fluid_source = [] |
|
list | apps_kinetic_ions = [] |
|
list | apps_kinetic_electrons = [] |
|
warpy | spatial_solver_tf |
| Spatial solver.
|
|
warpy | spatial_solver_kinetic_ions |
|
warpy | spatial_solver_kinetic_electrons |
|
warpy | spatial_solver_kinetic_field |
|
list | ss_s = [spatial_solver_tf] |
|
list | va_s = variable_adjusters_tf |
|
warpy | time_integrator = warpy.host_actions.erk(name="ti", scheme=torder, spatial_solvers=ss_s, variable_adjusters=va_s) |
|
list | write_vars = [ions, electrons, field] |
|
warpy | writer |
|
int | dt = 1e-4 |
| Simulation (dg) dt = 1e-6.
|
|
tuple | ompe = (1e19*qe**2/(eps0*A_e*mp))**0.5 |
|
float | t_final = 20.0/ompe/tau |
|
warpy | dt_controller = warpy.dt_calc.stability_dt(dt) |
|
int | write_steps = 100 |
|
datetime | now = datetime.datetime.now().strftime("%Y_%m_%d") |
|
f | sim_name = f'sheath_vm_{v_space_num_elements[0]}_{mesh_res}_{model}' |
|
warpy | config_args = warpy.load_configs() |
|
warpy | case_loc = config_args['test_rundir'](f'hybrid/sheath/{now}', '') |
|
f | sim_param |
|
warpy | sim |
|
| gen_xdmf |
| Run Simulation ...
|
|
| detect_nonscalar |
|