1#ifndef PHYTH_SURFACE_CHARGE_HPP
2#define PHYTH_SURFACE_CHARGE_HPP
143 const int nu,
const int nv)
const {
148 for (
int i = 0;
i <
nu; ++
i) {
149 for (
int j = 0;
j <
nv; ++
j) {
155 const auto dist =
r.Length();
179 const int nu,
const int nv)
const {
184 for (
int i = 0;
i <
nu; ++
i) {
185 for (
int j = 0;
j <
nv; ++
j) {
191 const auto dist =
r.Length();
Abstract base class for all charge distributions.
Uniform surface charge distribution on a rectangular patch.
Quantity< Volt > NumericalIntegratePotential(const Vector3< Quantity< Meter > > &point, const int nu, const int nv) const
Numerical integration of electric potential over the surface.
Quantity< Coulomb > GetTotalChargeValue() const override
Get the total charge of the surface.
Vector3< Quantity< NewtonPerCoulomb > > GetElectricFieldAt(const Vector3< Quantity< Meter > > &point) const override
Compute the electric field at a point using numerical integration.
Vector3< Quantity< NewtonPerCoulomb > > NumericalIntegrateField(const Vector3< Quantity< Meter > > &point, const int nu, const int nv) const
Numerical integration of electric field over the surface.
Quantity< Meter > height_
Vector3< Quantity< Meter > > center_
Vector3< Scalar > v_axis_
Vector3< Scalar > u_axis_
Quantity< CoulombPerSquareMeter > sigma_
Quantity< Volt > GetElectricPotentialAt(const Vector3< Quantity< Meter > > &point) const override
Compute the electric potential at a point using numerical integration.
Quantity< Meter > GetMinimumDistanceTo(const Vector3< Quantity< Meter > > &point) const override
Get the minimum distance from a point to the rectangular surface.
Quantity< CoulombPerSquareMeter > GetSurfaceDensity() const
SurfaceCharge(const Vector3< Quantity< Meter > > ¢er, const Vector3< Scalar > &u_axis, const Vector3< Scalar > &v_axis, const Quantity< Meter > width, const Quantity< Meter > height, const Quantity< CoulombPerSquareMeter > sigma)
Construct a rectangular surface charge.
auto abs(Quantity< UnitT > q)
Absolute value of a quantity.
Physical quantity with a value and a compile-time unit.
3D vector with Quantity components