CFL_limit_electromagnetic_yee
- plasmapy.simulation.resolution_constraints.CFL_limit_electromagnetic_yee( ) Annotated[Quantity, Unit('s')][source]
Calculates the limiting time-step for a finite difference time-domain electromagnetic Yee solver which uses a Cartesian grid.
This limit is defined by the Courant-Friederichs-Lewy (CFL) Condition:
\[\Delta t = \frac{1}{c\sqrt{{\sum_{i=1}^{n} \Delta x_i^{-2}}}}\]where \(\Delta x_i\) corresponds to the grid resolution along the \(i\)-th dimension and \(n\) is the number of dimensions. For example, in 3D this corresponds to:
\[\Delta t = \frac{1}{c\sqrt{\frac{1}{\Delta x^2} +\frac{1}{\Delta y^2} +\frac{1}{\Delta z^2}}}\]- Parameters:
dx (
Quantity) – Array with grid resolution along the different dimensions.- Returns:
dt – Computed CFL limiting time-step.
- Return type:
Notes
For details, see [Courant et al., 1928, Courant et al., 1967]
Examples
>>> import astropy.units as u >>> import numpy as np >>> CFL_limit_electromagnetic_yee(10 * u.nm) <Quantity 3.33564...e-17 s> >>> CFL_limit_electromagnetic_yee(np.array([5, 10, 15]) * u.nm) <Quantity 1.42956...e-17 s>