ApasScript.

Electrostatics

These are Apas Cloud services: they run on our servers for a signed-in member. The examples below are shown already made; sign in to edit and run your own.

position Apas Cloud

A point in space for the electrostatics functions. Coordinates are metres, or quantities of length. With one argument, position(t) is the turtle's position instead.

pointCharge Apas Cloud

A point charge at a position. Read it with c.x, c.y, c.z and c.q.

chargeCollection Apas Cloud

Several point charges as one model, for the field, potential and energy functions.

electricPotentialAt Apas Cloud

The potential at a point due to a collection of point charges, V = sum of k q / r, zero at infinity. The result is a quantity in volts.

electricFieldAt Apas Cloud

The electric field at a point due to a collection of point charges, by superposition. The result has .x, .y, .z (N/C) and .units.

electricForceOn Apas Cloud

The force on a charge in a field, F = q E. The result has .x, .y, .z in newtons.

potentialExpression Apas Cloud

The potential of a collection of point charges as a formula in x, y and z.

fieldExpression Apas Cloud

The electric field of a collection of point charges as formulas in x, y and z: E = -grad V, worked symbolically. Read the components with E.x, E.y, E.z.

configurationEnergy Apas Cloud

The electrostatic energy of a collection of point charges: the sum of k q1 q2 / r over every pair. The result is a quantity in joules.

workByField Apas Cloud

The work done by the field of a collection of charges on a test charge moved from one point to another, W = q (V_from - V_to). The result is a quantity in joules.

dipoleMoment Apas Cloud

The dipole moment of a collection of charges about a point, p = sum of q r. The result has .x, .y, .z in C m.

dipoleTorque Apas Cloud

The torque on a dipole in a uniform field, the cross product p x E. The result has .x, .y, .z in N m.

dipolePotentialEnergy Apas Cloud

The energy of a dipole in a uniform field, U = -p . E. The result is a quantity in joules.

gaussFlux Apas Cloud

The electric flux through a closed surface around a charge, by Gauss's law: Q / eps0. The result is a quantity in N m^2/C.

sphericalField Apas Cloud

The field at a distance from a spherically symmetric charge, by Gauss's law: Q / (4 pi eps0 r^2). The result is a quantity in N/C.

infiniteLineField Apas Cloud

The field at a distance from a long straight line of charge: lambda / (2 pi eps0 r). The result is a quantity in N/C.

infiniteSheetField Apas Cloud

The field of a large flat sheet of charge: sigma / (2 eps0), the same at every distance. The result is a quantity in N/C.

sphericalShellPotential Apas Cloud

The potential of a thin charged spherical shell: k Q / R everywhere inside, k Q / r outside. The result is a quantity in volts.

sphericalShellField Apas Cloud

The radial field of a thin charged spherical shell: zero inside, k Q / r^2 outside. The result is a quantity in N/C.

solidSpherePotential Apas Cloud

The potential of a uniformly charged solid sphere: k Q (3 R^2 - r^2) / (2 R^3) inside, k Q / r outside. The result is a quantity in volts.

solidSphereField Apas Cloud

The radial field of a uniformly charged solid sphere: k Q r / R^3 inside, k Q / r^2 outside. The result is a quantity in N/C.

ringAxialPotential Apas Cloud

The potential on the axis of a uniformly charged ring: k Q / sqrt(R^2 + z^2). The result is a quantity in volts.

ringAxialField Apas Cloud

The field along the axis of a uniformly charged ring: k Q z / (R^2 + z^2)^(3/2). The result is a quantity in N/C.

finiteRodAxisPotential Apas Cloud

The potential on the line of a uniformly charged rod, beyond its end. It contains a logarithm, so the value is approximate. The result is a quantity in volts.

finiteRodAxisField Apas Cloud

The field on the line of a uniformly charged rod, beyond its end: k (Q/L) (1/|x - L/2| - 1/|x + L/2|). The result is a quantity in N/C.

finiteRodPerpendicularPotential Apas Cloud

The potential on the perpendicular bisector of a uniformly charged rod. It contains an inverse hyperbolic sine, so the value is approximate. The result is a quantity in volts.

finiteRodPerpendicularField Apas Cloud

The field on the perpendicular bisector of a uniformly charged rod: k Q / (y sqrt(y^2 + (L/2)^2)). The result is a quantity in N/C.

diskAxialPotential Apas Cloud

The potential on the axis of a uniformly charged disk: sigma (sqrt(R^2 + z^2) - |z|) / (2 eps0). The result is a quantity in volts.

diskAxialField Apas Cloud

The field along the axis of a uniformly charged disk: sigma (1 - |z| / sqrt(R^2 + z^2)) / (2 eps0), pointing away from a positive disk. The result is a quantity in N/C.

infiniteLinePotentialDifference Apas Cloud

The potential at distance r from a long line of charge, measured from a reference distance r0: V(r) - V(r0) = -lambda ln(r / r0) / (2 pi eps0). Approximate (a logarithm). The result is a quantity in volts.

infiniteSheetPotentialDifference Apas Cloud

The potential at distance z from a large flat sheet of charge, measured from a reference distance z0: V(z) - V(z0) = -sigma (|z| - |z0|) / (2 eps0). The result is a quantity in volts.

infiniteSolidCylinderField Apas Cloud

The radial field of a long uniformly charged solid cylinder: lambda r / (2 pi eps0 R^2) inside, lambda / (2 pi eps0 r) outside. The result is a quantity in N/C.

infiniteSolidCylinderPotentialFromSurface Apas Cloud

The potential of a long uniformly charged solid cylinder, measured from its surface (V = 0 at r = R). The result is a quantity in volts.

infiniteCylindricalShellField Apas Cloud

The radial field of a long thin charged cylindrical shell: zero inside, lambda / (2 pi eps0 r) outside. The result is a quantity in N/C.

infiniteCylindricalShellPotentialFromSurface Apas Cloud

The potential of a long thin charged cylindrical shell, measured from its surface: zero inside, -lambda ln(r / R) / (2 pi eps0) outside. The result is a quantity in volts.

parallelPlateCapacitance Apas Cloud

The capacitance of two parallel plates, eps A / d, ignoring the fringe field. The result is a quantity in farads.

dielectricCapacitance Apas Cloud

The capacitance with a dielectric filling the gap: kappa times the vacuum capacitance. The result is a quantity in farads.

capacitorCharge Apas Cloud

The charge on a capacitor, Q = C V. The result is a quantity in coulombs.

capacitorVoltage Apas Cloud

The voltage across a capacitor, V = Q / C. The result is a quantity in volts.

capacitorEnergy Apas Cloud

The energy stored in a capacitor, U = Q^2 / (2 C). The result is a quantity in joules.

seriesCapacitance Apas Cloud

Capacitors in series: 1 / C = 1 / C1 + 1 / C2 + ... The result is a quantity in farads.

parallelCapacitance Apas Cloud

Capacitors in parallel: C = C1 + C2 + ... The result is a quantity in farads.

dielectricConnected Apas Cloud

A capacitor that stays connected to its battery while a dielectric is put in: the voltage is fixed, the charge and energy rise. The result has .capacitance, .charge, .voltage and .energy, each a quantity.

dielectricDisconnected Apas Cloud

A charged capacitor that is disconnected before a dielectric is put in: the charge is fixed, the voltage and energy fall. The result has .capacitance, .charge, .voltage and .energy, each a quantity.

electricEnergyDensity Apas Cloud

The energy per unit volume of an electric field, u = eps E^2 / 2. The result is a quantity in J/m^3.

isolatedSphereCapacitance Apas Cloud

The capacitance of a conducting sphere on its own, R / k = 4 pi eps0 R. The result is a quantity in farads.

sphericalCapacitorCapacitance Apas Cloud

The capacitance of two concentric conducting spheres, a b / (k (b - a)). The result is a quantity in farads.

connectedSphereCharges Apas Cloud

The charges on two distant conducting spheres after they are joined by a thin wire: the total charge is shared in proportion to the radii. The result has .first and .second, each a quantity in coulombs.

idealDipolePotential Apas Cloud

The potential of a point dipole, V = k (p . r) / r^3. The result is a quantity in volts.

idealDipoleField Apas Cloud

The field of a point dipole, E = k (3 (p . r) r / r^5 - p / r^3). The result has .x, .y, .z in N/C.

partiallyFilledAreaCapacitance Apas Cloud

A parallel-plate capacitor with a dielectric covering a fraction of the plate area (the two parts act in parallel): C0 (1 - f + kappa f). The result is a quantity in farads.

dielectricSlabCapacitance Apas Cloud

A parallel-plate capacitor with a dielectric slab thinner than the gap (the slab and the remaining gap act in series): eps A / (d - t + t / kappa). The result is a quantity in farads.

cylindricalCapacitorCapacitance Apas Cloud

The capacitance of a long coaxial pair of cylinders, 2 pi eps L / ln(b / a), ignoring the ends. Approximate (a logarithm). The result is a quantity in farads.