WARPXM v1.10.0
Loading...
Searching...
No Matches
examples.dg.floquet-bloch_bc.bloch_periodic_1D Namespace Reference

Functions

def probe_name (loc)
 

Variables

 try :
 
math pi = math.pi
 
int Nk = 5
 
np kx = np.linspace(0, pi, Nk)
 
np ky = np.zeros(Nk)
 
np kz = np.zeros(Nk)
 
list bloch_a = [1., 0., 0.]
 
str torder = 'SSPRK3'
 
str sorder = 'thirdOrder'
 
float e = 1.6022e-19
 
float c_0 = 2.9979e8
 
float epsilon_0 = 8.8542e-12
 
int mu_0 = 4 * pi * 1.0e-7
 
float mass_p = 1.6726e-27
 
int gas_gamma = 5. / 3.
 
float dt = 1.9e-3
 
int frames = 2**14
 
int t_end = 400.
 
float L = 0.5e-3
 
float elem_size = 0.01
 
str mesh_file = 'meshes/mesh_1D_2subdomain-n101'
 
float A_e = 1.0
 
float A_i = 1.0
 
float Z_e = -1.0
 
float Z_i = 1.0
 
float temp = 1.0
 
float charge_e = -e
 
float charge_i = e
 
int f_pe = 600.e9
 
int omega_p_e = 2. * pi * f_pe
 
int omega_p_i
 
int n = omega_p_i * omega_p_i * epsilon_0 * A_i * mass_p / (e * e)
 
int nu_p = 0
 
math coulomb_log = math.log(10.)
 
int epsilon_r = 1.
 
float v_0 = c_0
 
float tau = L / v_0
 
int n_0 = n
 
float T_0 = mass_p * v_0**2
 
math B_0 = math.sqrt(mu_0 * mass_p * n_0 * v_0**2)
 
float E_0 = v_0 * B_0
 
int nu_p_tau = nu_p * tau
 
float mass_e_norm = A_e
 
float mass_i_norm = A_i
 
float charge_e_norm = Z_e
 
float charge_i_norm = Z_i
 
int n_e_norm = n / n_0
 
int n_i_norm = n / n_0
 
float T_e_norm = temp / T_0
 
float T_i_norm = temp / T_0
 
int omega_p_tau = omega_p_i * tau
 
float skin_depth_norm = c_0 / v_0 / omega_p_tau
 
str ic_type = "Sine"
 
float pert_amp = 0.75
 
int wavelength = 1.
 
str num_terms = ''
 
float E_max = 1.0e0
 
float E_norm = E_max / E_0
 
float B_norm = E_norm / (omega_p_tau * skin_depth_norm)
 
float B_max = B_norm * B_0
 
str run_family
 
str run_name
 
list left_subdomains = ['leftDomain']
 
list right_subdomains = ['rightDomain']
 
list left_periodic_boundaries = ['leftWall']
 
list right_periodic_boundaries = ['rightWall']
 
list interface_boundaries = ['interface']
 
warpy mesh
 
warpy field
 
warpy electron_fluid
 
list va_ics = []
 
 background_value
 
 pert_amplitude
 
 components
 
 no_terms
 
 value
 
warpy ha_ic
 
list apps_left = []
 
list apps_right = []
 
warpy apps_fluids
 
warpy apps_fields
 
warpy apps_field_source
 
list va_bc_bloch = []
 
 k_vector
 
 k
 
 a_vector
 
warpy spatial_solver_left
 
warpy spatial_solver_right
 
warpy temporal_solver
 
warpy variables_left = field.get_vars(region='region1')
 
warpy variables_right = field.get_vars(region='region2')
 
 region
 
warpy writer
 
list probe_loc_left
 
list probe_loc_right
 
list probes_left
 
list probes_right
 
warpy dt_fixed = warpy.dt_calc.fixed_dt(dt)
 
warpy dt_conv = warpy.dt_calc.convergence_dt(max_dt=10. * dt, init_dt=dt)
 
warpy sim
 
str format = '0.5e'
 
dict sim_param_kwargs
 
float sim_params = temp.substitute(sim_param_kwargs)
 
 gen_xdmf
 
 detect_nonscalar
 
 sim_param
 
 wxm_args
 

Function Documentation

◆ probe_name()

def examples.dg.floquet-bloch_bc.bloch_periodic_1D.probe_name (   loc)

Variable Documentation

◆ A_e

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.A_e = 1.0

◆ A_i

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.A_i = 1.0

◆ a_vector

examples.dg.floquet-bloch_bc.bloch_periodic_1D.a_vector

◆ apps_field_source

warpy examples.dg.floquet-bloch_bc.bloch_periodic_1D.apps_field_source
Initial value:
1= field.apps_maxwell_fluid_source(
2 fluid=electron_fluid,
3 momentum_components=['px', 'py', 'pz'],
4 mass=mass_e_norm,
5 charge=charge_e_norm,
6 omega_p_norm=omega_p_tau,
7 skin_depth_norm=skin_depth_norm,
8 rel_permittivity=epsilon_r)

◆ apps_fields

warpy examples.dg.floquet-bloch_bc.bloch_periodic_1D.apps_fields
Initial value:
1= field.apps_maxwell_flux(
2 skin_depth_norm=skin_depth_norm,
3 omega_p_norm=omega_p_tau,
4 rel_permittivity=epsilon_r)

◆ apps_fluids

warpy examples.dg.floquet-bloch_bc.bloch_periodic_1D.apps_fluids
Initial value:
1= electron_fluid.apps_euler_field_source(
2 field=field,
3 mass=A_e,
4 charge=charge_e_norm,
5 skin_depth_norm=skin_depth_norm)

◆ apps_left

list examples.dg.floquet-bloch_bc.bloch_periodic_1D.apps_left = []

◆ apps_right

list examples.dg.floquet-bloch_bc.bloch_periodic_1D.apps_right = []

◆ B_0

math examples.dg.floquet-bloch_bc.bloch_periodic_1D.B_0 = math.sqrt(mu_0 * mass_p * n_0 * v_0**2)

◆ B_max

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.B_max = B_norm * B_0

◆ B_norm

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.B_norm = E_norm / (omega_p_tau * skin_depth_norm)

◆ background_value

examples.dg.floquet-bloch_bc.bloch_periodic_1D.background_value

◆ bloch_a

list examples.dg.floquet-bloch_bc.bloch_periodic_1D.bloch_a = [1., 0., 0.]

◆ c_0

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.c_0 = 2.9979e8

◆ charge_e

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.charge_e = -e

◆ charge_e_norm

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.charge_e_norm = Z_e

◆ charge_i

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.charge_i = e

◆ charge_i_norm

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.charge_i_norm = Z_i

◆ components

examples.dg.floquet-bloch_bc.bloch_periodic_1D.components

◆ coulomb_log

math examples.dg.floquet-bloch_bc.bloch_periodic_1D.coulomb_log = math.log(10.)

◆ detect_nonscalar

examples.dg.floquet-bloch_bc.bloch_periodic_1D.detect_nonscalar

◆ dt

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.dt = 1.9e-3

◆ dt_conv

warpy examples.dg.floquet-bloch_bc.bloch_periodic_1D.dt_conv = warpy.dt_calc.convergence_dt(max_dt=10. * dt, init_dt=dt)

◆ dt_fixed

warpy examples.dg.floquet-bloch_bc.bloch_periodic_1D.dt_fixed = warpy.dt_calc.fixed_dt(dt)

◆ e

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.e = 1.6022e-19

◆ E_0

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.E_0 = v_0 * B_0

◆ E_max

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.E_max = 1.0e0

◆ E_norm

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.E_norm = E_max / E_0

◆ electron_fluid

warpy examples.dg.floquet-bloch_bc.bloch_periodic_1D.electron_fluid
Initial value:
2 variable_name='electron_fluid',
3 components=['rho', 'px', 'py', 'pz', 'e'],
4 sorder=sorder,
5 region1=left_subdomains,
6 region2=right_subdomains,
7 region1_periodic=left_periodic_boundaries,
8 region2_periodic=right_periodic_boundaries,
9 region12_interface=interface_boundaries)
A supervariable that contains real and imaginary variables for each region specified.
Definition: bloch.py:6

◆ elem_size

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.elem_size = 0.01

◆ epsilon_0

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.epsilon_0 = 8.8542e-12

◆ epsilon_r

int examples.dg.floquet-bloch_bc.bloch_periodic_1D.epsilon_r = 1.

◆ f_pe

int examples.dg.floquet-bloch_bc.bloch_periodic_1D.f_pe = 600.e9

◆ field

warpy examples.dg.floquet-bloch_bc.bloch_periodic_1D.field
Initial value:
2 variable_name='field',
3 components=['Ex', 'Ey', 'Ez', 'Bx', 'By', 'Bz'],
4 sorder=sorder,
5 region1=left_subdomains,
6 region2=right_subdomains,
7 region1_periodic=left_periodic_boundaries,
8 region2_periodic=right_periodic_boundaries,
9 region12_interface=interface_boundaries)

◆ format

str examples.dg.floquet-bloch_bc.bloch_periodic_1D.format = '0.5e'

◆ frames

int examples.dg.floquet-bloch_bc.bloch_periodic_1D.frames = 2**14

◆ gas_gamma

int examples.dg.floquet-bloch_bc.bloch_periodic_1D.gas_gamma = 5. / 3.

◆ gen_xdmf

examples.dg.floquet-bloch_bc.bloch_periodic_1D.gen_xdmf

◆ ha_ic

warpy examples.dg.floquet-bloch_bc.bloch_periodic_1D.ha_ic
Initial value:
2 name='ha_ic', variable_adjusters=va_ics)
Runs a list of host actions.
Definition: va_runner.py:5

◆ ic_type

str examples.dg.floquet-bloch_bc.bloch_periodic_1D.ic_type = "Sine"

◆ interface_boundaries

list examples.dg.floquet-bloch_bc.bloch_periodic_1D.interface_boundaries = ['interface']

◆ k

examples.dg.floquet-bloch_bc.bloch_periodic_1D.k

◆ k_vector

examples.dg.floquet-bloch_bc.bloch_periodic_1D.k_vector

◆ kx

np examples.dg.floquet-bloch_bc.bloch_periodic_1D.kx = np.linspace(0, pi, Nk)

◆ ky

np examples.dg.floquet-bloch_bc.bloch_periodic_1D.ky = np.zeros(Nk)

◆ kz

np examples.dg.floquet-bloch_bc.bloch_periodic_1D.kz = np.zeros(Nk)

◆ L

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.L = 0.5e-3

◆ left_periodic_boundaries

list examples.dg.floquet-bloch_bc.bloch_periodic_1D.left_periodic_boundaries = ['leftWall']

◆ left_subdomains

list examples.dg.floquet-bloch_bc.bloch_periodic_1D.left_subdomains = ['leftDomain']

◆ mass_e_norm

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.mass_e_norm = A_e

◆ mass_i_norm

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.mass_i_norm = A_i

◆ mass_p

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.mass_p = 1.6726e-27

◆ mesh

warpy examples.dg.floquet-bloch_bc.bloch_periodic_1D.mesh
Initial value:
2 MeshFile=str(mesh_file + '.inp'),
3 NumLayers=1,
4 PeriodicBoundaries=left_periodic_boundaries +
5 right_periodic_boundaries,
6 basis_array_set=sorder)
general unstructured mesh
Definition: mesh.py:56

◆ mesh_file

str examples.dg.floquet-bloch_bc.bloch_periodic_1D.mesh_file = 'meshes/mesh_1D_2subdomain-n101'

◆ mu_0

int examples.dg.floquet-bloch_bc.bloch_periodic_1D.mu_0 = 4 * pi * 1.0e-7

◆ n

int examples.dg.floquet-bloch_bc.bloch_periodic_1D.n = omega_p_i * omega_p_i * epsilon_0 * A_i * mass_p / (e * e)

◆ n_0

int examples.dg.floquet-bloch_bc.bloch_periodic_1D.n_0 = n

◆ n_e_norm

int examples.dg.floquet-bloch_bc.bloch_periodic_1D.n_e_norm = n / n_0

◆ n_i_norm

int examples.dg.floquet-bloch_bc.bloch_periodic_1D.n_i_norm = n / n_0

◆ Nk

int examples.dg.floquet-bloch_bc.bloch_periodic_1D.Nk = 5

◆ no_terms

examples.dg.floquet-bloch_bc.bloch_periodic_1D.no_terms

◆ nu_p

int examples.dg.floquet-bloch_bc.bloch_periodic_1D.nu_p = 0

◆ nu_p_tau

int examples.dg.floquet-bloch_bc.bloch_periodic_1D.nu_p_tau = nu_p * tau

◆ num_terms

str examples.dg.floquet-bloch_bc.bloch_periodic_1D.num_terms = ''

◆ omega_p_e

int examples.dg.floquet-bloch_bc.bloch_periodic_1D.omega_p_e = 2. * pi * f_pe

◆ omega_p_i

int examples.dg.floquet-bloch_bc.bloch_periodic_1D.omega_p_i
Initial value:
1= omega_p_e * math.sqrt(
2 A_e / A_i)

◆ omega_p_tau

int examples.dg.floquet-bloch_bc.bloch_periodic_1D.omega_p_tau = omega_p_i * tau

◆ pert_amp

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.pert_amp = 0.75

◆ pert_amplitude

examples.dg.floquet-bloch_bc.bloch_periodic_1D.pert_amplitude

◆ pi

math examples.dg.floquet-bloch_bc.bloch_periodic_1D.pi = math.pi

◆ probe_loc_left

list examples.dg.floquet-bloch_bc.bloch_periodic_1D.probe_loc_left
Initial value:
1= [
2 [-0.44, 0., 0.],
3 [-0.25, 0., 0.],
4 ]

◆ probe_loc_right

list examples.dg.floquet-bloch_bc.bloch_periodic_1D.probe_loc_right
Initial value:
1= [
2 [0.0, 0., 0.],
3 [0.25, 0., 0.],
4 ]

◆ probes_left

list examples.dg.floquet-bloch_bc.bloch_periodic_1D.probes_left
Initial value:
1= [
3 name=probe_name(loc),
4 ReadVars=variables_left,
5 Location=loc,
6 OutputFilename='data/%s' % probe_name(loc),
7 BasisArraySet=sorder) for loc in probe_loc_left
8 ]
Writes out variables for single node at each time point into single file.
Definition: probe.py:4

◆ probes_right

list examples.dg.floquet-bloch_bc.bloch_periodic_1D.probes_right
Initial value:
1= [
3 name=probe_name(loc),
4 ReadVars=variables_right,
5 Location=loc,
6 OutputFilename='data/%s' % probe_name(loc),
7 BasisArraySet=sorder) for loc in probe_loc_right
8 ]

◆ region

examples.dg.floquet-bloch_bc.bloch_periodic_1D.region

◆ right_periodic_boundaries

list examples.dg.floquet-bloch_bc.bloch_periodic_1D.right_periodic_boundaries = ['rightWall']

◆ right_subdomains

list examples.dg.floquet-bloch_bc.bloch_periodic_1D.right_subdomains = ['rightDomain']

◆ run_family

str examples.dg.floquet-bloch_bc.bloch_periodic_1D.run_family
Initial value:
1= 'Example/BlochPeriodic1D/Drude{}Ghz{}{}-{:03}'.format(
2 int(f_pe / 1e9), ic_type, num_terms, int(100 * pert_amp))

◆ run_name

str examples.dg.floquet-bloch_bc.bloch_periodic_1D.run_name
Initial value:
1= 'kx{:05.2f}ky{:05.2f}_1D2sdm101_3rdOrd_t400p16384'.format(
2 k[0], k[1])

◆ sim

warpy examples.dg.floquet-bloch_bc.bloch_periodic_1D.sim
Initial value:
2 name=run_name,
3 meshes=[mesh],
4 initial_conditions=[ha_ic],
5 temporal_solvers=[temporal_solver],
6 writers=[writer] + probes_left + probes_right,
7 time=[0, t_end],
8 dt_controller=dt_conv,
9 flexible_writeout=True,
10 write_steps=frames,
11 verbosity='debug',
12 enable_fpe=False)
Discontinuous finite element RK simulation.
Definition: dg_sim.py:11

◆ sim_param

examples.dg.floquet-bloch_bc.bloch_periodic_1D.sim_param

◆ sim_param_kwargs

dict examples.dg.floquet-bloch_bc.bloch_periodic_1D.sim_param_kwargs

◆ sim_params

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.sim_params = temp.substitute(sim_param_kwargs)

◆ skin_depth_norm

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.skin_depth_norm = c_0 / v_0 / omega_p_tau

◆ sorder

str examples.dg.floquet-bloch_bc.bloch_periodic_1D.sorder = 'thirdOrder'

◆ spatial_solver_left

warpy examples.dg.floquet-bloch_bc.bloch_periodic_1D.spatial_solver_left
Initial value:
1= warpy.spatial_solvers.dg(
2 name="dg_left",
3 spatial_order=sorder,
4 applications=apps_left,
5 on_subdomains=left_subdomains)

◆ spatial_solver_right

warpy examples.dg.floquet-bloch_bc.bloch_periodic_1D.spatial_solver_right
Initial value:
1= warpy.spatial_solvers.dg(
2 name="dg_right",
3 spatial_order=sorder,
4 applications=apps_right,
5 on_subdomains=right_subdomains)

◆ T_0

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.T_0 = mass_p * v_0**2

◆ T_e_norm

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.T_e_norm = temp / T_0

◆ t_end

int examples.dg.floquet-bloch_bc.bloch_periodic_1D.t_end = 400.

◆ T_i_norm

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.T_i_norm = temp / T_0

◆ tau

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.tau = L / v_0

◆ temp

Template examples.dg.floquet-bloch_bc.bloch_periodic_1D.temp = 1.0

◆ temporal_solver

warpy examples.dg.floquet-bloch_bc.bloch_periodic_1D.temporal_solver
Initial value:
2 name="rk",
3 scheme=torder,
4 spatial_solvers=[spatial_solver_left, spatial_solver_right],
5 variable_adjusters=va_bc_bloch)
Explicit Runge-Kutta temporal solver Note: Dormand45 currently will not work correctly with limiters ...
Definition: erk.py:5

◆ torder

str examples.dg.floquet-bloch_bc.bloch_periodic_1D.torder = 'SSPRK3'

◆ try

examples.dg.floquet-bloch_bc.bloch_periodic_1D.try :

◆ v_0

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.v_0 = c_0

◆ va_bc_bloch

list examples.dg.floquet-bloch_bc.bloch_periodic_1D.va_bc_bloch = []

◆ va_ics

list examples.dg.floquet-bloch_bc.bloch_periodic_1D.va_ics = []

◆ value

examples.dg.floquet-bloch_bc.bloch_periodic_1D.value

◆ variables_left

warpy examples.dg.floquet-bloch_bc.bloch_periodic_1D.variables_left = field.get_vars(region='region1')

◆ variables_right

warpy examples.dg.floquet-bloch_bc.bloch_periodic_1D.variables_right = field.get_vars(region='region2')

◆ wavelength

examples.dg.floquet-bloch_bc.bloch_periodic_1D.wavelength = 1.

◆ writer

warpy examples.dg.floquet-bloch_bc.bloch_periodic_1D.writer
Initial value:
2 name='writer',
3 WriteInterval=1000,
4 ReadVars=variables_left + variables_right)
Writes out a list of variables.
Definition: writer.py:4

◆ wxm_args

examples.dg.floquet-bloch_bc.bloch_periodic_1D.wxm_args

◆ Z_e

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.Z_e = -1.0

◆ Z_i

float examples.dg.floquet-bloch_bc.bloch_periodic_1D.Z_i = 1.0