gtsimulation.electric_field#
Electric field models.
This subpackage provides an abstract interface for custom electric field implementations as well as several predefined electric field models, including a uniform electric field.
- class gtsimulation.electric_field.GeneralFieldE[source]#
Abstract base class for electric field models.
A subclass implements the field model in calc_field in the native coordinate units of the model. calc_field must return the electric field in V/m. The class attribute to_meters is the native length unit in metres (e.g.
Units.km) and must be set in the subclass; the default value 1 corresponds to metres. Fields can be combined with+, which returns their vector sum.- abstractmethod calc_field(x, y, z)[source]#
Calculate the electric field in the native units of the model.
- Parameters:
- x, y, zfloat
Coordinates in the native units of the model.
- Returns:
- Ex, Ey, Ezfloat
Electric field components in V/m.
- to_meters = 1#