![]() |
Semi-Lagrangian Library
Modular library for kinetic and gyrokinetic simulations of plasmas in fusion energy devices.
|
Implements the Maxwell solver in 2D with FDTD method.
Equation
\( \displaystyle \frac{\partial E_x}{\partial t} = {c^2} \frac{\partial B_z}{\partial y} \),
\(\displaystyle \frac{\partial E_y}{\partial t} = -{c^2} \frac{\partial B_z}{\partial x} \)
\(\displaystyle \frac{\partial B_z}{\partial t} = \frac{\partial E_x}{\partial y} - \frac{\partial E_y}{\partial x} \).
FDTD scheme
\(\displaystyle B_{z}^{n+1/2} = B_z^{n-1/2} - \Delta t \big( \frac{\partial E_y^n}{\partial x} - \frac{\partial E_x^n}{\partial y} \big)\)
\(\displaystyle E_x^{n+1} = E_x^{n} + c^2\Delta t \frac{\partial B_z^{n+1/2}}{\partial y} \)
\(\displaystyle E_y^{n+1} = E_y^{n} - c^2\Delta t \frac{\partial B_z^{n+1/2}}{\partial x} \)
Derived types and interfaces | |
| interface | sll_o_create |
| Initialize maxwell solver 2d with FDTD scheme. More... | |
| interface | sll_o_solve |
| Solve maxwell solver 2d with FDTD scheme. More... | |
| interface | sll_solve_ampere |
| Solve Ampere-Maxwell equation. More... | |
| interface | sll_solve_faraday |
| Solve Faraday equation. More... | |
| type | sll_t_maxwell_2d_fdtd |
| Object with data to solve Maxwell equation Maxwell in TE mode: (Ex,Ey,Bz) More... | |
Functions/Subroutines | |
| subroutine | initialize_maxwell_2d_fdtd_alt (self, x1, x2, nc_x, y1, y2, nc_y, polarization) |
| Initilialize the maxwell solver. More... | |
| subroutine | initialize_maxwell_2d_fdtd (self, i1, j1, i2, j2, dx, dy, polarization) |
| Initilialize the maxwell solver. More... | |
| subroutine | solve_maxwell_2d_fdtd (self, fx, fy, fz, dt) |
| self routine exists only for testing purpose. Use ampere and faraday in your appication. More... | |
| subroutine | faraday_2d_fdtd (self, fx, fy, fz, dt) |
| Solve Faraday equation. More... | |
| subroutine | ampere_2d_fdtd (self, fx, fy, fz, dt, jx, jy) |
| Solve ampere-maxwell equation with FDTD scheme. More... | |
| subroutine | bc_periodic_2d_fdtd (self, fx, fy, fz, dt) |
| Set boundary conditions. More... | |
|
private |
Solve ampere-maxwell equation with FDTD scheme.
| self | Maxwell object | |
| [in,out] | fx | Ex or Bx |
| [in,out] | fy | Ey or By |
| [in,out] | fz | Bz or Ez |
| [in] | jx | Jx current |
| [in] | jy | Jy current |
| [in] | dt | time step |
Definition at line 241 of file sll_m_maxwell_2d_fdtd.F90.
|
private |
Set boundary conditions.
| self | maxwell solver object | |
| [in,out] | fx | Ex or Bx |
| [in,out] | fy | Ey or By |
| [in,out] | fz | Bz or Ez |
| [in] | dt | time step |
Definition at line 328 of file sll_m_maxwell_2d_fdtd.F90.
|
private |
Solve Faraday equation.
| self | Maxwell object | |
| fx | Ex or Bx | |
| fy | Ey or By | |
| fz | Bz or Ez | |
| [in] | dt | time step |
Definition at line 174 of file sll_m_maxwell_2d_fdtd.F90.
|
private |
Initilialize the maxwell solver.
| self | maxwell solver object |
| i1 | first incidice along x |
| j1 | last indice along x |
| i2 | first indice along y |
| j2 | last indice along y |
| dx | size step along x |
| dy | size step along y |
| polarization | TE or TM |
Definition at line 127 of file sll_m_maxwell_2d_fdtd.F90.
|
private |
Initilialize the maxwell solver.
| self | maxwell solver object |
| x1 | first incidice along x |
| y1 | last indice along x |
| x2 | first indice along y |
| y2 | last indice along y |
| nc_x | size step along y |
| nc_y | size step along y |
| polarization | TE or TM |
Definition at line 100 of file sll_m_maxwell_2d_fdtd.F90.
|
private |
self routine exists only for testing purpose. Use ampere and faraday in your appication.
| self | maxwell object | |
| fx | Ex or Bx | |
| fy | Ey or By | |
| fz | Bz or Ez | |
| [in] | dt | time step |
Definition at line 154 of file sll_m_maxwell_2d_fdtd.F90.
1.9.1