WARPXM v1.10.0
Loading...
Searching...
No Matches
examples.dg.advection.advection_squares Namespace Reference

Variables

str torder = 'RK1'
 
str sorder = 'firstOrder'
 
list velocity = [1.0,0.0,0.0]
 
bool periodic_boundary_conditions = True
 
bool use_limiters = False
 
int number_velocity_components = 10
 
int skin_depth = 1
 
int charge_to_mass = 1
 
str numerical_flux_type = "upwind"
 
float cfl = 0.8
 
str perturbation = "sinusoidal"
 
warpy mesh
 Generate a mesh.
 
np component_names = np.zeros(number_velocity_components)
 Create a variable for the fluid and one for the array Make components array.
 
warpy fluid
 
warpy field
 
warpy fluid_ic
 Initial conditions function TODO: Make an initial condition function that creates phase space distributions Probable parameters: Number of components, thermal velocity, density, type of perturbation fluid_ic = warpy.functions.fourier(name='fluid_ic', sine_amplitudes=[1],sine_frequencies=[2*np.pi])
 
list applicators
 Initial condition applicator.
 
list apps
 Applications (consists of equation sets and boundary conditions)
 
list bc_apps = []
 
warpy writer
 Variable writer.
 
warpy spatial_solver
 Spatial solver.
 
list variable_adjusters = []
 Variable adjusters.
 
warpy temporal_solver
 Temporal solver.
 
int dt = 1e-3
 Simulation (dg)
 
float dt_final = 2.0
 
warpy dt_controller = warpy.dt_calc.fixed_dt(dt)
 
int write_steps = 100
 
warpy sim
 
 gen_xdmf
 Run Simulation ...
 
 detect_nonscalar
 

Variable Documentation

◆ applicators

list examples.dg.advection.advection_squares.applicators
Initial value:
1= [warpy.applicator(spatial_order = sorder,
2 fun = fluid_ic,
3 var = fluid,
4 spatial_scheme = 'Nodal')]

Initial condition applicator.

◆ apps

list examples.dg.advection.advection_squares.apps
Initial value:
1= [warpy.apps.vlasovmaxwell(name = 'advection',
2 pdf_variable = fluid,
3 field_variable = field,
4 skin_depth = skin_depth,
5 charge_to_mass = charge_to_mass,
6 number_velocity_components = number_velocity_components,
7 numerical_flux_type = numerical_flux_type)]
Definition: __init__.py:1

Applications (consists of equation sets and boundary conditions)

◆ bc_apps

list examples.dg.advection.advection_squares.bc_apps = []

◆ cfl

float examples.dg.advection.advection_squares.cfl = 0.8

◆ charge_to_mass

int examples.dg.advection.advection_squares.charge_to_mass = 1

◆ component_names

np examples.dg.advection.advection_squares.component_names = np.zeros(number_velocity_components)

Create a variable for the fluid and one for the array Make components array.

◆ detect_nonscalar

examples.dg.advection.advection_squares.detect_nonscalar

◆ dt

int examples.dg.advection.advection_squares.dt = 1e-3

Simulation (dg)

◆ dt_controller

warpy examples.dg.advection.advection_squares.dt_controller = warpy.dt_calc.fixed_dt(dt)

◆ dt_final

float examples.dg.advection.advection_squares.dt_final = 2.0

◆ field

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

◆ fluid

warpy examples.dg.advection.advection_squares.fluid
Initial value:
1= warpy.variable(name = 'fluid',
2 components = component_names,
3 basis_array_set = sorder)

◆ fluid_ic

warpy examples.dg.advection.advection_squares.fluid_ic
Initial value:
1= warpy.functions.distribution(name = 'fluid_ic',
2 number_velocity_components = number_velocity_components,
3 thermal_velocity = thermal_velocity,
4 density = density,
5 perturbation = perturbation)

Initial conditions function TODO: Make an initial condition function that creates phase space distributions Probable parameters: Number of components, thermal velocity, density, type of perturbation fluid_ic = warpy.functions.fourier(name='fluid_ic', sine_amplitudes=[1],sine_frequencies=[2*np.pi])

◆ gen_xdmf

examples.dg.advection.advection_squares.gen_xdmf

Run Simulation ...

◆ mesh

warpy examples.dg.advection.advection_squares.mesh
Initial value:
1= warpy.mesh.block(Bounds = [-0.5, 0.5],
2 NumCells = [128],
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.

◆ number_velocity_components

int examples.dg.advection.advection_squares.number_velocity_components = 10

◆ numerical_flux_type

str examples.dg.advection.advection_squares.numerical_flux_type = "upwind"

◆ periodic_boundary_conditions

bool examples.dg.advection.advection_squares.periodic_boundary_conditions = True

◆ perturbation

str examples.dg.advection.advection_squares.perturbation = "sinusoidal"

◆ sim

warpy examples.dg.advection.advection_squares.sim
Initial value:
1= warpy.dg_sim(name = 'advection',
2 meshes = [mesh],
3 initial_conditions = applicators,
4 temporal_solvers = [temporal_solver],
5 writers = [writer],
6 time = [0,dt_final],
7 dt_controller = dt_controller,
8 flexible_writeout = False,
9 write_steps = write_steps,
10 verbosity = 'info')
Discontinuous finite element RK simulation.
Definition: dg_sim.py:11

◆ skin_depth

int examples.dg.advection.advection_squares.skin_depth = 1

◆ sorder

str examples.dg.advection.advection_squares.sorder = 'firstOrder'

◆ spatial_solver

warpy examples.dg.advection.advection_squares.spatial_solver
Initial value:
1= warpy.spatial_solvers.dg(name="dg",
2 spatial_order = sorder,
3 applications = apps,
4 on_subdomains = ['all'],
5 phase_space_basis_primitive_id = "WMPRIMITIVE_KINETIC_SQUARE",
6 cfl = cfl)

Spatial solver.

◆ temporal_solver

warpy examples.dg.advection.advection_squares.temporal_solver
Initial value:
1= warpy.host_actions.erk(name = 'rk',
2 scheme = torder,
3 spatial_solvers = [spatial_solver],
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.

◆ torder

str examples.dg.advection.advection_squares.torder = 'RK1'

◆ use_limiters

bool examples.dg.advection.advection_squares.use_limiters = False

◆ variable_adjusters

list examples.dg.advection.advection_squares.variable_adjusters = []

Variable adjusters.

◆ velocity

list examples.dg.advection.advection_squares.velocity = [1.0,0.0,0.0]

◆ write_steps

int examples.dg.advection.advection_squares.write_steps = 100

◆ writer

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

Variable writer.