|
Phyth v0.1.0
A dimensional safe C++ header-only mechanics and electromagnetics simulation library.
|
Ideal electric dipole with zero net charge. More...
#include <DipoleCharge.hpp>


Private Attributes | |
| Vector3< Quantity< Meter > > | position_ |
| Vector3< Quantity< CoulombMeter > > | p_ |
Ideal electric dipole with zero net charge.
DipoleCharge represents an ideal point electric dipole. It has zero net charge (total charge = 0) but produces a non-zero electric field and potential due to the separation of positive and negative charges.
The dipole is defined by its position and dipole moment vector p, which points from the negative to the positive charge.
Example: auto pos = Vector3<Quantity<Meter>>(0_m, 0_m, 0_m); auto p = Vector3<Quantity<CoulombMeter>>(1.0_C*m, 0_C*m, 0_C*m); DipoleCharge dipole(pos, p);
auto point = Vector3<Quantity<Meter>>(1.0_m, 0_m, 0_m); auto E = dipole.GetElectricFieldAt(point); auto V = dipole.GetElectricPotentialAt(point);
Definition at line 30 of file DipoleCharge.hpp.
|
inline |
Construct an electric dipole.
| position | Location of the dipole (meters) |
| dipole_moment | Dipole moment vector p (C*m) |
Definition at line 38 of file DipoleCharge.hpp.
|
inline |
Definition at line 110 of file DipoleCharge.hpp.
|
inlineoverridevirtual |
Compute the electric field of the dipole.
The field at point r (relative to the dipole) is: E = k_E * (3 * (p dot hat_r) * hat_r - p) / r^3
| point | Position to evaluate the field (meters) |
| std::runtime_error | If point is at the dipole location |
Implements Phyth::Electromagnetics::ChargeSource.
Definition at line 55 of file DipoleCharge.hpp.
|
inlineoverridevirtual |
Compute the electric potential of the dipole.
The potential at point r (relative to the dipole) is: V = k_E * (p dot hat_r) / r^2
| point | Position to evaluate the potential (meters) |
| std::runtime_error | If point is at the dipole location |
Implements Phyth::Electromagnetics::ChargeSource.
Definition at line 78 of file DipoleCharge.hpp.
|
inlineoverridevirtual |
Get the minimum distance from a point to the dipole location.
| point | Position to compute distance from |
Implements Phyth::Electromagnetics::ChargeSource.
Definition at line 105 of file DipoleCharge.hpp.
|
inlineoverridevirtual |
Get the total charge of the dipole.
Implements Phyth::Electromagnetics::ChargeSource.
Definition at line 94 of file DipoleCharge.hpp.
|
private |
Definition at line 116 of file DipoleCharge.hpp.
Definition at line 115 of file DipoleCharge.hpp.