| Stability | experimental |
|---|---|
| Maintainer | Scott N. Walck <walck@lvc.edu> |
| Safe Haskell | Trustworthy |
Physics.Learn.Charge
Description
This module contains functions for working with charge, electric field, electric flux, and electric potential.
- type Charge = Double
- data ChargeDistribution
- totalCharge :: ChargeDistribution -> Charge
- eField :: ChargeDistribution -> VectorField
- eFieldFromPointCharge :: Charge -> Position -> VectorField
- eFieldFromLineCharge :: ScalarField -> Curve -> VectorField
- eFieldFromSurfaceCharge :: ScalarField -> Surface -> VectorField
- eFieldFromVolumeCharge :: ScalarField -> Volume -> VectorField
- electricFlux :: Surface -> ChargeDistribution -> Double
- electricPotentialFromField :: Position -> VectorField -> ScalarField
- electricPotentialFromCharge :: ChargeDistribution -> ScalarField
Charge
data ChargeDistribution Source
A charge distribution is a point charge, a line charge, a surface charge,
a volume charge, or a combination of these.
The ScalarField describes a linear charge density, a surface charge density,
or a volume charge density.
Constructors
| PointCharge Charge Position | point charge |
| LineCharge ScalarField Curve |
|
| SurfaceCharge ScalarField Surface |
|
| VolumeCharge ScalarField Volume |
|
| MultipleCharges [ChargeDistribution] | combination of charge distributions |
totalCharge :: ChargeDistribution -> ChargeSource
Total charge (in C) of a charge distribution.
Electric Field
eField :: ChargeDistribution -> VectorFieldSource
The electric field produced by a charge distribution. This is the simplest way to find the electric field, because it works for any charge distribution (point, line, surface, volume, or combination).
Arguments
| :: Charge | charge (in Coulombs) |
| -> Position | of point charge |
| -> VectorField | electric field (in V/m) |
Electric field produced by a point charge.
The function eField calls this function
to evaluate the electric field produced by a point charge.
Arguments
| :: ScalarField | linear charge density lambda |
| -> Curve | geometry of the line charge |
| -> VectorField | electric field (in V/m) |
Electric field produced by a line charge.
The function eField calls this function
to evaluate the electric field produced by a line charge.
Arguments
| :: ScalarField | surface charge density sigma |
| -> Surface | geometry of the surface charge |
| -> VectorField | electric field (in V/m) |
Electric field produced by a surface charge.
The function eField calls this function
to evaluate the electric field produced by a surface charge.
Arguments
| :: ScalarField | volume charge density rho |
| -> Volume | geometry of the volume charge |
| -> VectorField | electric field (in V/m) |
Electric field produced by a volume charge.
The function eField calls this function
to evaluate the electric field produced by a volume charge.
Electric Flux
electricFlux :: Surface -> ChargeDistribution -> DoubleSource
The electric flux through a surface produced by a charge distribution.
Electric Potential
electricPotentialFromFieldSource
Arguments
| :: Position | position where electric potential is zero |
| -> VectorField | electric field |
| -> ScalarField | electric potential |
Electric potential from electric field, given a position to be the zero of electric potential.
electricPotentialFromCharge :: ChargeDistribution -> ScalarFieldSource
Electric potential produced by a charge distribution. The position where the electric potential is zero is taken to be infinity.