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

Variables

str torder = 'RK4'
 
str sorder = 'thirdOrder'
 
list velocity = [1.0,0.0,0.0]
 
bool periodic_boundary_conditions = True
 
bool use_limiters = False
 
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.8
 
float perturbation = 0.01
 
int thermal_velocity = 1
 
float density = 1.0
 
list v_space_num_elements = [40]
 
list min_v = [-5]
 
list dv = [0.25]
 
int num_physical_elements = 40
 
int L = 2 * np.pi
 
warpy mesh
 Generate a mesh -> vlasov.
 
warpy distribution
 Create a variable for the fluid and one for the array Make components array component_names = np.zeros(number_velocity_components) for i in range(number_velocity_components): component_names[i] = 'fe' + str(i)
 
warpy field
 
warpy fluid
 
warpy distribution_ic
 Initial conditions function.
 
warpy maxwell_ic
 
list applicators
 Initial condition applicator.
 
list apps_kinetic
 Applications (consists of equation sets and boundary 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 = 20
 
warpy dt_controller = warpy.dt_calc.stability_dt(dt)
 
int timesteps = 2000
 
int write_steps = 100
 
warpy sim
 
 gen_xdmf
 Run Simulation ... 1 sim.run('kinetic_advection/apr18_2018',.
 
 detect_nonscalar
 

Variable Documentation

◆ applications_moments

list advection_squares.applications_moments = []

◆ applicators

list advection_squares.applicators
Initial value:
1= [warpy.applicator(spatial_order = sorder,
2 fun = distribution_ic,
3 var = distribution,
4 spatial_scheme = 'Nodal_Kinetic',
5 phase_space_spatial_order=sorder,
6 v_space_num_elements = v_space_num_elements,
7 min_v = min_v,
8 dv = dv)]

Initial condition applicator.

◆ apps_kinetic

list advection_squares.apps_kinetic
Initial value:
1= [warpy.apps.vlasovmaxwell.vlasovmaxwell(name = 'advection_squares',
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

Applications (consists of equation sets and boundary conditions)

◆ apps_physical

list advection_squares.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

◆ cfl

float advection_squares.cfl = 0.8

◆ charge

int advection_squares.charge = 1

◆ charge_to_mass

int advection_squares.charge_to_mass = charge/mass

◆ density

float advection_squares.density = 1.0

◆ detect_nonscalar

advection_squares.detect_nonscalar

◆ distribution

warpy advection_squares.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

Create a variable for the fluid and one for the array Make components array component_names = np.zeros(number_velocity_components) for i in range(number_velocity_components): component_names[i] = 'fe' + str(i)

◆ distribution_ic

warpy advection_squares.distribution_ic
Initial value:
1= warpy.functions.custom_vlasov(name = 'distribution_ic',
2 thermal_velocity = thermal_velocity,
3 density = density,
4 perturbation = perturbation)
Velocity distribution initialization routine.
Definition: custom_vlasovmaxwell.py:4

Initial conditions function.

◆ dt

int advection_squares.dt = 1e-5

Simulation (dg)

◆ dt_controller

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

◆ dv

list advection_squares.dv = [0.25]

◆ field

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

◆ fluid

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

◆ gen_xdmf

advection_squares.gen_xdmf

Run Simulation ... 1 sim.run('kinetic_advection/apr18_2018',.

◆ L

int advection_squares.L = 2 * np.pi

◆ mass

int advection_squares.mass = 1

◆ maxwell_ic

warpy advection_squares.maxwell_ic
Initial value:
2 omega_p_tau=omega_p_norm,
3 skin_depth_norm=skin_depth_norm,
4 density=density,
5 charge=charge,
6 perturbation = perturbation)
Velocity distribution initialization routine.
Definition: custom_vlasovmaxwell.py:27

◆ mesh

warpy advection_squares.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 advection_squares.min_v = [-5]

◆ num_physical_elements

int advection_squares.num_physical_elements = 40

◆ omega_p_norm

float advection_squares.omega_p_norm = 1.0

◆ periodic_boundary_conditions

bool advection_squares.periodic_boundary_conditions = True

◆ perturbation

float advection_squares.perturbation = 0.01

◆ sim

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

◆ skin_depth_norm

float advection_squares.skin_depth_norm = 1.0

◆ sorder

str advection_squares.sorder = 'thirdOrder'

◆ spatial_solver_kinetic

warpy advection_squares.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 # phase_space_basis_primitive_id = "WMPRIMITIVE_KINETIC_SQUARE"
10 cfl = cfl)

Spatial solver.

◆ spatial_solver_physical

warpy advection_squares.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 advection_squares.t_final = 20

◆ temporal_solver

warpy advection_squares.temporal_solver
Initial value:
1= warpy.host_actions.erk(name = 'rk',
2 scheme = torder,
3 # spatial_solvers = [spatial_solver_physical],
4 spatial_solvers = [spatial_solver_physical,spatial_solver_kinetic],
5 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

int advection_squares.thermal_velocity = 1

◆ timesteps

int advection_squares.timesteps = 2000

◆ torder

str advection_squares.torder = 'RK4'

◆ use_limiters

bool advection_squares.use_limiters = False

◆ v_space_num_elements

list advection_squares.v_space_num_elements = [40]

◆ variable_adjusters

list advection_squares.variable_adjusters = []

Variable adjusters.

◆ velocity

list advection_squares.velocity = [1.0,0.0,0.0]

◆ write_steps

int advection_squares.write_steps = 100

◆ writer

warpy advection_squares.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.