WARPXM v1.10.0
Loading...
Searching...
No Matches
landau_damping Namespace Reference

Variables

str torder = 'RK4'
 
str sorder = 'thirdOrder'
 
bool periodic_boundary_conditions = True
 
float skin_depth_norm = 1.0
 
float omega_p_norm = 1.0
 
int charge = 1
 
int mass = 1
 
int charge_to_mass = charge/mass
 
float cfl = 0.235
 
str pert_strength = "weak"
 
float perturbation = 0.01
 
 else :
 
float thermal_velocity = 1.0
 
float density = 1.0
 
list v_space_num_elements = [40]
 
list min_v = [-5.0]
 
list dv = [0.25]
 
int num_physical_elements = 40
 
int L = 2 * np.pi
 
float k = 0.5
 
warpy mesh
 Generate a mesh -> vlasov.
 
warpy distribution
 
warpy field
 
warpy fluid
 
warpy distribution_ic
 Initial conditions-------------------------------— Step 1: define the function as an application:
 
warpy maxwell_ic
 
warpy distribution_ic_va
 
warpy maxwell_ic_va
 
warpy ic_ha
 
list apps_kinetic
 Initial conditions-------------------------------—.
 
list apps_physical
 
list applications_moments = []
 
list variable_adjusters = []
 Variable adjusters.
 
warpy writer
 Variable writer.
 
warpy spatial_solver_kinetic
 Spatial solver.
 
warpy spatial_solver_physical
 
warpy temporal_solver
 Temporal solver.
 
int dt = 1e-5
 Simulation (dg)
 
int t_final = 80
 
warpy dt_controller = warpy.dt_calc.stability_dt(dt)
 
int write_steps = 1000
 
datetime now = datetime.datetime.now().strftime("%Y_%m_%d")
 
sim_name = f'landau_damping_{num_physical_elements}x{v_space_num_elements[0]}_{pert_strength}'
 
warpy config_args = warpy.load_configs()
 
warpy case_loc = config_args['test_rundir'](f'kinetics/landau_damping/{now}', '')
 
list max_vx = min_v[0] + dv[0] * v_space_num_elements[0]
 
sim_param
 
warpy sim
 
 gen_xdmf
 Run Simulation ... 1 now = datetime.datetime.now()
 
 detect_nonscalar
 

Variable Documentation

◆ applications_moments

list landau_damping.applications_moments = []

◆ apps_kinetic

list landau_damping.apps_kinetic
Initial value:
2 pdf_variable = distribution,
3 field_variable = field,
4 skin_depth_norm = skin_depth_norm,
5 charge_to_mass = charge_to_mass)]
Vlasov-Maxwell.
Definition: vlasovmaxwell.py:4

Initial conditions-------------------------------—.

Applications (consists of equation sets and boundary conditions)

◆ apps_physical

list landau_damping.apps_physical
Initial value:
1= [warpy.apps.maxwell.flux(name='maxwell',
2 field=field,
3 skin_depth_norm=skin_depth_norm,
4 omega_p_norm=omega_p_norm)]
Maxwell flux.
Definition: maxwell.py:4

◆ case_loc

warpy landau_damping.case_loc = config_args['test_rundir'](f'kinetics/landau_damping/{now}', '')

◆ cfl

float landau_damping.cfl = 0.235

◆ charge

int landau_damping.charge = 1

◆ charge_to_mass

int landau_damping.charge_to_mass = charge/mass

◆ config_args

warpy landau_damping.config_args = warpy.load_configs()

◆ density

float landau_damping.density = 1.0

◆ detect_nonscalar

landau_damping.detect_nonscalar

◆ distribution

warpy landau_damping.distribution
Initial value:
1= warpy.variable(name = 'distribution',
2 components = ['f'],
3 basis_array_set = sorder,
4 phase_space_basis_array_set = sorder,
5 v_space_num_elements = v_space_num_elements)
Definition: variable.py:4

◆ distribution_ic

warpy landau_damping.distribution_ic
Initial value:
2 distribution=distribution,
3 thermal_velocity = thermal_velocity,
4 density = density,
5 perturbation = perturbation,
6 wave_number = k)
Velocity distribution initialization routine for the 1d1v Landau Damping.
Definition: kinetics.py:69

Initial conditions-------------------------------— Step 1: define the function as an application:

◆ distribution_ic_va

warpy landau_damping.distribution_ic_va
Initial value:
2 priority=0,
3 spatial_order=sorder,
4 phase_space_spatial_order=sorder,
5 v_space_num_elements=v_space_num_elements,
6 min_v=min_v,
7 dv=dv,
8 on_subdomains=['all'],
9 applications=[distribution_ic])
phase_space function evaluator
Definition: function_evaluation.py:42

◆ dt

int landau_damping.dt = 1e-5

Simulation (dg)

◆ dt_controller

warpy landau_damping.dt_controller = warpy.dt_calc.stability_dt(dt)

◆ dv

list landau_damping.dv = [0.25]

◆ else

landau_damping.else :

◆ field

warpy landau_damping.field
Initial value:
1= warpy.variable(name = 'field',
2 components = ['Ex','Ey','Ez','Bx','By','Bz'],
3 basis_array_set = sorder)

◆ fluid

warpy landau_damping.fluid
Initial value:
1= warpy.variable(name = 'fluid',
2 components = ['n','nvx','nvy','nvz'],
3 basis_array_set = sorder,
4 explodable=False)

◆ gen_xdmf

landau_damping.gen_xdmf

Run Simulation ... 1 now = datetime.datetime.now()

◆ ic_ha

warpy landau_damping.ic_ha
Initial value:
2 variable_adjusters=[distribution_ic_va, maxwell_ic_va])
Runs a list of host actions.
Definition: va_runner.py:5

◆ k

float landau_damping.k = 0.5

◆ L

int landau_damping.L = 2 * np.pi

◆ mass

int landau_damping.mass = 1

◆ max_vx

list landau_damping.max_vx = min_v[0] + dv[0] * v_space_num_elements[0]

◆ maxwell_ic

warpy landau_damping.maxwell_ic
Initial value:
2 fields=field,
3 omega_p_tau=omega_p_norm,
4 skin_depth_norm=skin_depth_norm,
5 density=density,
6 charge=charge,
7 perturbation = perturbation,
8 wave_number = k
9 )
Velocity distribution initialization routine.
Definition: maxwell.py:274

◆ maxwell_ic_va

warpy landau_damping.maxwell_ic_va
Initial value:
2 priority=0,
3 spatial_order=sorder,
4 on_subdomains=['all'],
5 applications=[maxwell_ic])
function evaluator
Definition: function_evaluation.py:4

◆ mesh

warpy landau_damping.mesh
Initial value:
1= warpy.mesh.block(Bounds = [-L, L],
2 NumCells = [num_physical_elements],
3 NodeSets = ['Left', 'Right'],
4 NumLayers = 1,
5 PeriodicBoundaries = ['Left','Right'] if periodic_boundary_conditions else None,
6 basis_array_set = sorder)
block mesh generator
Definition: mesh.py:87

Generate a mesh -> vlasov.

◆ min_v

list landau_damping.min_v = [-5.0]

◆ now

datetime landau_damping.now = datetime.datetime.now().strftime("%Y_%m_%d")

◆ num_physical_elements

int landau_damping.num_physical_elements = 40

◆ omega_p_norm

float landau_damping.omega_p_norm = 1.0

◆ periodic_boundary_conditions

bool landau_damping.periodic_boundary_conditions = True

◆ pert_strength

str landau_damping.pert_strength = "weak"

◆ perturbation

float landau_damping.perturbation = 0.01

◆ sim

warpy landau_damping.sim
Initial value:
1= warpy.dg_sim(name = sim_name,
2 meshes = [mesh],
3 initial_conditions = [ic_ha],
4 temporal_solvers = [temporal_solver],
5 writers = [writer],
6 time = [0,t_final],
7 # time = [0,dt*write_steps],
8 dt_controller = dt_controller,
9 flexible_writeout = False,
10 write_steps = write_steps,
11 verbosity = 'info',
12 # num_partitions=4
13)
Discontinuous finite element RK simulation.
Definition: dg_sim.py:11

◆ sim_name

f landau_damping.sim_name = f'landau_damping_{num_physical_elements}x{v_space_num_elements[0]}_{pert_strength}'

◆ sim_param

landau_damping.sim_param
Initial value:
1= \
2f'''case_loc={case_loc}
3specific_case={sim_name}
4start_frame=0
5end_frame={write_steps}
6domain=domain
7variable={distribution.name()}
8v_space_num_vx={v_space_num_elements[0]}
9basis_name={sorder}
10min_vx={min_v[0]}
11max_vx={max_vx}
12'''

◆ skin_depth_norm

float landau_damping.skin_depth_norm = 1.0

◆ sorder

str landau_damping.sorder = 'thirdOrder'

◆ spatial_solver_kinetic

warpy landau_damping.spatial_solver_kinetic
Initial value:
1= warpy.spatial_solvers.dg_kinetic(name="dg_kinetic",
2 spatial_order = sorder,
3 phase_space_spatial_order = sorder,
4 v_space_num_elements = v_space_num_elements,
5 min_v = min_v,
6 dv = dv,
7 applications = apps_kinetic,
8 on_subdomains = ['all'],
9 cfl = cfl)

Spatial solver.

◆ spatial_solver_physical

warpy landau_damping.spatial_solver_physical
Initial value:
1= warpy.spatial_solvers.dg(name="dg_physical",
2 spatial_order=sorder,
3 applications=apps_physical,
4 cfl = cfl)

◆ t_final

int landau_damping.t_final = 80

◆ temporal_solver

warpy landau_damping.temporal_solver
Initial value:
1= warpy.host_actions.erk(name = 'rk',
2 scheme = torder,
3 spatial_solvers = [spatial_solver_physical,spatial_solver_kinetic],
4 variable_adjusters = variable_adjusters)
Explicit Runge-Kutta temporal solver Note: Dormand45 currently will not work correctly with limiters ...
Definition: erk.py:5

Temporal solver.

◆ thermal_velocity

float landau_damping.thermal_velocity = 1.0

◆ torder

str landau_damping.torder = 'RK4'

◆ v_space_num_elements

list landau_damping.v_space_num_elements = [40]

◆ variable_adjusters

list landau_damping.variable_adjusters = []

Variable adjusters.

◆ write_steps

int landau_damping.write_steps = 1000

◆ writer

warpy landau_damping.writer
Initial value:
1= warpy.host_actions.writer(name = 'writer',
2 ReadVars = [distribution, field, fluid])
Writes out a list of variables.
Definition: writer.py:4

Variable writer.