Grids
Warning
This section is currently in development.
3D Cartesian geometry
- class picmistandard.PICMI_Cartesian3DGrid(number_of_cells=None, lower_bound=None, upper_bound=None, lower_boundary_conditions=None, upper_boundary_conditions=None, nx=None, ny=None, nz=None, xmin=None, xmax=None, ymin=None, ymax=None, zmin=None, zmax=None, bc_xmin=None, bc_xmax=None, bc_ymin=None, bc_ymax=None, bc_zmin=None, bc_zmax=None, moving_window_velocity=None, refined_regions=[], lower_bound_particles=None, upper_bound_particles=None, xmin_particles=None, xmax_particles=None, ymin_particles=None, ymax_particles=None, zmin_particles=None, zmax_particles=None, lower_boundary_conditions_particles=None, upper_boundary_conditions_particles=None, bc_xmin_particles=None, bc_xmax_particles=None, bc_ymin_particles=None, bc_ymax_particles=None, bc_zmin_particles=None, bc_zmax_particles=None, guard_cells=None, pml_cells=None, **kw)[source]
Three dimensional Cartesian grid Parameters can be specified either as vectors or separately. (If both are specified, the vector is used.)
- Parameters:
number_of_cells (vector of integers) – Number of cells along each axis (number of nodes is number_of_cells+1)
lower_bound (vector of floats) – Position of the node at the lower bound [m]
upper_bound (vector of floats) – Position of the node at the upper bound [m]
lower_boundary_conditions (vector of strings) – Conditions at lower boundaries, periodic, open, dirichlet, absorbing_silver_mueller, or neumann
upper_boundary_conditions (vector of strings) – Conditions at upper boundaries, periodic, open, dirichlet, absorbing_silver_mueller, or neumann
nx (integer) – Number of cells along X (number of nodes=nx+1)
ny (integer) – Number of cells along Y (number of nodes=ny+1)
nz (integer) – Number of cells along Z (number of nodes=nz+1)
xmin (float) – Position of first node along X [m]
xmax (float) – Position of last node along X [m]
ymin (float) – Position of first node along Y [m]
ymax (float) – Position of last node along Y [m]
zmin (float) – Position of first node along Z [m]
zmax (float) – Position of last node along Z [m]
bc_xmin (string) – Boundary condition at min X: One of periodic, open, dirichlet, absorbing_silver_mueller, or neumann
bc_xmax (string) – Boundary condition at max X: One of periodic, open, dirichlet, absorbing_silver_mueller, or neumann
bc_ymin (string) – Boundary condition at min Y: One of periodic, open, dirichlet, absorbing_silver_mueller, or neumann
bc_ymax (string) – Boundary condition at max Y: One of periodic, open, dirichlet, absorbing_silver_mueller, or neumann
bc_zmin (string) – Boundary condition at min Z: One of periodic, open, dirichlet, absorbing_silver_mueller, or neumann
bc_zmax (string) – Boundary condition at max Z: One of periodic, open, dirichlet, absorbing_silver_mueller, or neumann
moving_window_velocity (vector of floats, optional) – Moving frame velocity [m/s]
refined_regions (list of lists, optional) – List of refined regions, each element being a list of the format [level, lo, hi, refinement_factor], with level being the refinement level, with 1 being the first level of refinement, 2 being the second etc, lo and hi being vectors of length 3 specifying the extent of the region, and refinement_factor defaulting to [2,2,2] (relative to next lower level)
lower_bound_particles (vector of floats, optional) – Position of particle lower bound [m]
upper_bound_particles (vector of floats, optional) – Position of particle upper bound [m]
xmin_particles (float, optional) – Position of min particle boundary along X [m]
xmax_particles (float, optional) – Position of max particle boundary along X [m]
ymin_particles (float, optional) – Position of min particle boundary along Y [m]
ymax_particles (float, optional) – Position of max particle boundary along Y [m]
float (zmin_particles) – Position of min particle boundary along Z [m]
optional – Position of min particle boundary along Z [m]
zmax_particles (float, optional) – Position of max particle boundary along Z [m]
lower_boundary_conditions_particles (vector of strings, optional) – Conditions at lower boundaries for particles, periodic, absorbing, reflect or thermal
upper_boundary_conditions_particles (vector of strings, optional) – Conditions at upper boundaries for particles, periodic, absorbing, reflect or thermal
bc_xmin_particles (string, optional) – Boundary condition at min X for particles: One of periodic, absorbing, reflect, thermal
bc_xmax_particles (string, optional) – Boundary condition at max X for particles: One of periodic, absorbing, reflect, thermal
bc_ymin_particles (string, optional) – Boundary condition at min Y for particles: One of periodic, absorbing, reflect, thermal
bc_ymax_particles (string, optional) – Boundary condition at max Y for particles: One of periodic, absorbing, reflect, thermal
bc_zmin_particles (string, optional) – Boundary condition at min Z for particles: One of periodic, absorbing, reflect, thermal
bc_zmax_particles (string, optional) – Boundary condition at max Z for particles: One of periodic, absorbing, reflect, thermal
guard_cells (vector of integers, optional) – Number of guard cells used along each direction
pml_cells (vector of integers, optional) – Number of Perfectly Matched Layer (PML) cells along each direction
References
absorbing_silver_mueller: A local absorbing boundary condition that works best under normal incidence angle. Based on the Silver-Mueller Radiation Condition, e.g., in
A. K. Belhora and L. Pichon, “Maybe Efficient Absorbing Boundary Conditions for the Finite Element Solution of 3D Scattering Problems,” 1995, https://doi.org/10.1109/20.376322
B Engquist and A. Majdat, “Absorbing boundary conditions for numerical simulation of waves,” 1977, https://doi.org/10.1073/pnas.74.5.1765
R. Lehe, “Electromagnetic wave propagation in Particle-In-Cell codes,” 2016, US Particle Accelerator School (USPAS) Summer Session, Self-Consistent Simulations of Beam and Plasma Systems https://people.nscl.msu.edu/~lund/uspas/scs_2016/lec_adv/A1b_EM_Waves.pdf
2D Cartesian geometry
- class picmistandard.PICMI_Cartesian2DGrid(number_of_cells=None, lower_bound=None, upper_bound=None, lower_boundary_conditions=None, upper_boundary_conditions=None, nx=None, ny=None, xmin=None, xmax=None, ymin=None, ymax=None, bc_xmin=None, bc_xmax=None, bc_ymin=None, bc_ymax=None, moving_window_velocity=None, refined_regions=[], lower_bound_particles=None, upper_bound_particles=None, xmin_particles=None, xmax_particles=None, ymin_particles=None, ymax_particles=None, lower_boundary_conditions_particles=None, upper_boundary_conditions_particles=None, bc_xmin_particles=None, bc_xmax_particles=None, bc_ymin_particles=None, bc_ymax_particles=None, guard_cells=None, pml_cells=None, **kw)[source]
Two dimensional Cartesian grid Parameters can be specified either as vectors or separately. (If both are specified, the vector is used.)
- Parameters:
number_of_cells (vector of integers) – Number of cells along each axis (number of nodes is number_of_cells+1)
lower_bound (vector of floats) – Position of the node at the lower bound [m]
upper_bound (vector of floats) – Position of the node at the upper bound [m]
lower_boundary_conditions (vector of strings) – Conditions at lower boundaries, periodic, open, dirichlet, absorbing_silver_mueller, or neumann
upper_boundary_conditions (vector of strings) – Conditions at upper boundaries, periodic, open, dirichlet, absorbing_silver_mueller, or neumann
nx (integer) – Number of cells along X (number of nodes=nx+1)
ny (integer) – Number of cells along Y (number of nodes=ny+1)
xmin (float) – Position of first node along X [m]
xmax (float) – Position of last node along X [m]
ymin (float) – Position of first node along Y [m]
ymax (float) – Position of last node along Y [m]
bc_xmin (vector of strings) – Boundary condition at min X: One of periodic, open, dirichlet, absorbing_silver_mueller, or neumann
bc_xmax (vector of strings) – Boundary condition at max X: One of periodic, open, dirichlet, absorbing_silver_mueller, or neumann
bc_ymin (vector of strings) – Boundary condition at min Y: One of periodic, open, dirichlet, absorbing_silver_mueller, or neumann
bc_ymax (vector of strings) – Boundary condition at max Y: One of periodic, open, dirichlet, absorbing_silver_mueller, or neumann
moving_window_velocity (vector of floats, optional) – Moving frame velocity [m/s]
refined_regions (list of lists, optional) – List of refined regions, each element being a list of the format [level, lo, hi, refinement_factor], with level being the refinement level, with 1 being the first level of refinement, 2 being the second etc, lo and hi being vectors of length 2 specifying the extent of the region, and refinement_factor defaulting to [2,2] (relative to next lower level)
lower_bound_particles (vector of floats, optional) – Position of particle lower bound [m]
upper_bound_particles (vector of floats, optional) – Position of particle upper bound [m]
xmin_particles (float, optional) – Position of min particle boundary along X [m]
xmax_particles (float, optional) – Position of max particle boundary along X [m]
ymin_particles (float, optional) – Position of min particle boundary along Y [m]
ymax_particles (float, optional) – Position of max particle boundary along Y [m]
lower_boundary_conditions_particles (vector of strings, optional) – Conditions at lower boundaries for particles, periodic, absorbing, reflect or thermal
upper_boundary_conditions_particles (vector of strings, optional) – Conditions at upper boundaries for particles, periodic, absorbing, reflect or thermal
bc_xmin_particles (string, optional) – Boundary condition at min X for particles: One of periodic, absorbing, reflect, thermal
bc_xmax_particles (string, optional) – Boundary condition at max X for particles: One of periodic, absorbing, reflect, thermal
bc_ymin_particles (string, optional) – Boundary condition at min Y for particles: One of periodic, absorbing, reflect, thermal
bc_ymax_particles (string, optional) – Boundary condition at max Y for particles: One of periodic, absorbing, reflect, thermal
guard_cells (vector of integers, optional) – Number of guard cells used along each direction
pml_cells (vector of integers, optional) – Number of Perfectly Matched Layer (PML) cells along each direction
References
absorbing_silver_mueller: A local absorbing boundary condition that works best under normal incidence angle. Based on the Silver-Mueller Radiation Condition, e.g., in
A. K. Belhora and L. Pichon, “Maybe Efficient Absorbing Boundary Conditions for the Finite Element Solution of 3D Scattering Problems,” 1995, https://doi.org/10.1109/20.376322
B Engquist and A. Majdat, “Absorbing boundary conditions for numerical simulation of waves,” 1977, https://doi.org/10.1073/pnas.74.5.1765
R. Lehe, “Electromagnetic wave propagation in Particle-In-Cell codes,” 2016, US Particle Accelerator School (USPAS) Summer Session, Self-Consistent Simulations of Beam and Plasma Systems https://people.nscl.msu.edu/~lund/uspas/scs_2016/lec_adv/A1b_EM_Waves.pdf
1D Cartesian geometry
- class picmistandard.PICMI_Cartesian1DGrid(number_of_cells=None, lower_bound=None, upper_bound=None, lower_boundary_conditions=None, upper_boundary_conditions=None, nx=None, xmin=None, xmax=None, bc_xmin=None, bc_xmax=None, moving_window_velocity=None, refined_regions=[], lower_bound_particles=None, upper_bound_particles=None, xmin_particles=None, xmax_particles=None, lower_boundary_conditions_particles=None, upper_boundary_conditions_particles=None, bc_xmin_particles=None, bc_xmax_particles=None, guard_cells=None, pml_cells=None, **kw)[source]
One-dimensional Cartesian grid Parameters can be specified either as vectors or separately. (If both are specified, the vector is used.)
- Parameters:
number_of_cells (vector of integers) – Number of cells along each axis (number of nodes is number_of_cells+1)
lower_bound (vector of floats) – Position of the node at the lower bound [m]
upper_bound (vector of floats) – Position of the node at the upper bound [m]
lower_boundary_conditions (vector of strings) – Conditions at lower boundaries, periodic, open, dirichlet, absorbing_silver_mueller, or neumann
upper_boundary_conditions (vector of strings) – Conditions at upper boundaries, periodic, open, dirichlet, absorbing_silver_mueller, or neumann
nx (integer) – Number of cells along X (number of nodes=nx+1)
xmin (float) – Position of first node along X [m]
xmax (float) – Position of last node along X [m]
bc_xmin (vector of strings) – Boundary condition at min X: One of periodic, open, dirichlet, absorbing_silver_mueller, or neumann
bc_xmax (vector of strings) – Boundary condition at max X: One of periodic, open, dirichlet, absorbing_silver_mueller, or neumann
moving_window_velocity (vector of floats, optional) – Moving frame velocity [m/s]
refined_regions (list of lists, optional) – List of refined regions, each element being a list of the format [level, lo, hi, refinement_factor], with level being the refinement level, with 1 being the first level of refinement, 2 being the second etc, lo and hi being vectors of length 2 specifying the extent of the region, and refinement_factor defaulting to [2,2] (relative to next lower level)
lower_bound_particles (vector of floats, optional) – Position of particle lower bound [m]
upper_bound_particles (vector of floats, optional) – Position of particle upper bound [m]
xmin_particles (float, optional) – Position of min particle boundary along X [m]
xmax_particles (float, optional) – Position of max particle boundary along X [m]
lower_boundary_conditions_particles (vector of strings, optional) – Conditions at lower boundaries for particles, periodic, absorbing, reflect or thermal
upper_boundary_conditions_particles (vector of strings, optional) – Conditions at upper boundaries for particles, periodic, absorbing, reflect or thermal
bc_xmin_particles (string, optional) – Boundary condition at min X for particles: One of periodic, absorbing, reflect, thermal
bc_xmax_particles (string, optional) – Boundary condition at max X for particles: One of periodic, absorbing, reflect, thermal
guard_cells (vector of integers, optional) – Number of guard cells used along each direction
pml_cells (vector of integers, optional) – Number of Perfectly Matched Layer (PML) cells along each direction
References
absorbing_silver_mueller: A local absorbing boundary condition that works best under normal incidence angle. Based on the Silver-Mueller Radiation Condition, e.g., in
A. K. Belhora and L. Pichon, “Maybe Efficient Absorbing Boundary Conditions for the Finite Element Solution of 3D Scattering Problems,” 1995, https://doi.org/10.1109/20.376322
B Engquist and A. Majdat, “Absorbing boundary conditions for numerical simulation of waves,” 1977, https://doi.org/10.1073/pnas.74.5.1765
R. Lehe, “Electromagnetic wave propagation in Particle-In-Cell codes,” 2016, US Particle Accelerator School (USPAS) Summer Session, Self-Consistent Simulations of Beam and Plasma Systems https://people.nscl.msu.edu/~lund/uspas/scs_2016/lec_adv/A1b_EM_Waves.pdf
Cylindrical geometry
- class picmistandard.PICMI_CylindricalGrid(number_of_cells=None, lower_bound=None, upper_bound=None, lower_boundary_conditions=None, upper_boundary_conditions=None, nr=None, nz=None, n_azimuthal_modes=None, rmin=None, rmax=None, zmin=None, zmax=None, bc_rmin=None, bc_rmax=None, bc_zmin=None, bc_zmax=None, moving_window_velocity=None, refined_regions=[], lower_bound_particles=None, upper_bound_particles=None, rmin_particles=None, rmax_particles=None, zmin_particles=None, zmax_particles=None, lower_boundary_conditions_particles=None, upper_boundary_conditions_particles=None, bc_rmin_particles=None, bc_rmax_particles=None, bc_zmin_particles=None, bc_zmax_particles=None, guard_cells=None, pml_cells=None, **kw)[source]
Axisymmetric, cylindrical grid Parameters can be specified either as vectors or separately. (If both are specified, the vector is used.)
- Parameters:
number_of_cells (vector of integers) – Number of cells along each axis (number of nodes is number_of_cells+1)
lower_bound (vector of floats) – Position of the node at the lower bound [m]
upper_bound (vector of floats) – Position of the node at the upper bound [m]
lower_boundary_conditions (vector of strings) – Conditions at lower boundaries, periodic, open, dirichlet, absorbing_silver_mueller, or neumann
upper_boundary_conditions (vector of strings) – Conditions at upper boundaries, periodic, open, dirichlet, absorbing_silver_mueller, or neumann
nr (integer) – Number of cells along R (number of nodes=nr+1)
nz (integer) – Number of cells along Z (number of nodes=nz+1)
n_azimuthal_modes (integer) – Number of azimuthal modes
rmin (float) – Position of first node along R [m]
rmax (float) – Position of last node along R [m]
zmin (float) – Position of first node along Z [m]
zmax (float) – Position of last node along Z [m]
bc_rmin (vector of strings) – Boundary condition at min R: One of open, dirichlet, absorbing_silver_mueller, or neumann
bc_rmax (vector of strings) – Boundary condition at max R: One of open, dirichlet, absorbing_silver_mueller, or neumann
bc_zmin (vector of strings) – Boundary condition at min Z: One of periodic, open, dirichlet, absorbing_silver_mueller, or neumann
bc_zmax (vector of strings) – Boundary condition at max Z: One of periodic, open, dirichlet, absorbing_silver_mueller, or neumann
moving_window_velocity (vector of floats, optional) – Moving frame velocity [m/s]
refined_regions (list of lists, optional) – List of refined regions, each element being a list of the format [level, lo, hi, refinement_factor], with level being the refinement level, with 1 being the first level of refinement, 2 being the second etc, lo and hi being vectors of length 2 specifying the extent of the region, and refinement_factor defaulting to [2,2] (relative to next lower level)
lower_bound_particles (vector of floats, optional) – Position of particle lower bound [m]
upper_bound_particles (vector of floats, optional) – Position of particle upper bound [m]
rmin_particles (float, optional) – Position of min particle boundary along R [m]
rmax_particles (float, optional) – Position of max particle boundary along R [m]
zmin_particles (float, optional) – Position of min particle boundary along Z [m]
zmax_particles (float, optional) – Position of max particle boundary along Z [m]
lower_boundary_conditions_particles (vector of strings, optional) – Conditions at lower boundaries for particles, periodic, absorbing, reflect or thermal
upper_boundary_conditions_particles (vector of strings, optional) – Conditions at upper boundaries for particles, periodic, absorbing, reflect or thermal
bc_rmin_particles (string, optional) – Boundary condition at min R for particles: One of periodic, absorbing, reflect, thermal
bc_rmax_particles (string, optional) – Boundary condition at max R for particles: One of periodic, absorbing, reflect, thermal
bc_zmin_particles (string, optional) – Boundary condition at min Z for particles: One of periodic, absorbing, reflect, thermal
bc_zmax_particles (string, optional) – Boundary condition at max Z for particles: One of periodic, absorbing, reflect, thermal
guard_cells (vector of integers, optional) – Number of guard cells used along each direction
pml_cells (vector of integers, optional) – Number of Perfectly Matched Layer (PML) cells along each direction
References
absorbing_silver_mueller: A local absorbing boundary condition that works best under normal incidence angle. Based on the Silver-Mueller Radiation Condition, e.g., in
A. K. Belhora and L. Pichon, “Maybe Efficient Absorbing Boundary Conditions for the Finite Element Solution of 3D Scattering Problems,” 1995, https://doi.org/10.1109/20.376322
B Engquist and A. Majdat, “Absorbing boundary conditions for numerical simulation of waves,” 1977, https://doi.org/10.1073/pnas.74.5.1765
R. Lehe, “Electromagnetic wave propagation in Particle-In-Cell codes,” 2016, US Particle Accelerator School (USPAS) Summer Session, Self-Consistent Simulations of Beam and Plasma Systems https://people.nscl.msu.edu/~lund/uspas/scs_2016/lec_adv/A1b_EM_Waves.pdf