Expand description
§use-physics
Feature-gated facade for the focused RustUse physics crates.
§Install
[dependencies]
use-physics = { version = "0.0.1", default-features = false, features = ["gravity", "orbit", "momentum", "collision", "oscillation", "elasticity", "relativity", "quantum", "plasma", "electricity", "magnetism", "electromagnetism", "particle", "nuclear", "radiation", "work"] }§Foundation
use-physics re-exports focused f64-first physics helpers behind opt-in features. The facade stays thin, mirrors the boundaries of the concrete crates, and exposes each enabled crate under a matching module such as use_physics::gravity, use_physics::orbit, use_physics::momentum, use_physics::collision, use_physics::oscillation, use_physics::elasticity, use_physics::rigidbody, use_physics::statics, use_physics::relativity, use_physics::quantum, use_physics::plasma, use_physics::electricity, use_physics::magnetism, use_physics::electromagnetism, use_physics::particle, use_physics::nuclear, use_physics::radiation, or use_physics::work.
When focused crates would otherwise collide at the root, the facade keeps explicit aliases or module boundaries. For example, enabling both force and momentum preserves use-force’s impulse export and re-exports the force-time helper from use-momentum as momentum_impulse. Enabling both collision and energy keeps the existing root kinetic_energy export from use-energy and re-exports the collision crate’s version as collision_kinetic_energy. Enabling both pressure and fluid keeps use-pressure’s hydrostatic_pressure export at the root and re-exports the fluid-specific helper as fluid_hydrostatic_pressure. Enabling both torque and statics keeps the established root is_rotational_equilibrium export from use-torque and re-exports the statics version as statics_is_rotational_equilibrium. Enabling orbit alongside gravity or force keeps the existing root GRAVITATIONAL_CONSTANT, STANDARD_GRAVITY, and circular_orbital_period behavior, while the overlapping orbit variants remain available under use_physics::orbit. Enabling oscillation keeps use-motion’s root displacement export and use-work’s root spring_potential_energy export unchanged while exposing the oscillation variants as oscillation_displacement and oscillation_spring_potential_energy. Enabling rigidbody alongside rotation or torque keeps the established root angular-momentum, rotational-energy, and moment-of-inertia exports in place while re-exporting the rigid-body variants as rigidbody_... aliases when those names would collide. Enabling electromagnetism alongside magnetism or nuclear keeps the existing VACUUM_PERMEABILITY and SPEED_OF_LIGHT exports at the root and re-exports the electromagnetism versions as ELECTROMAGNETISM_VACUUM_PERMEABILITY and ELECTROMAGNETISM_SPEED_OF_LIGHT. Enabling relativity alongside electromagnetism or nuclear keeps the existing root SPEED_OF_LIGHT export and re-exports the relativity version as RELATIVITY_SPEED_OF_LIGHT. Enabling quantum alongside a crate that already owns the root SPEED_OF_LIGHT export keeps that existing root behavior and re-exports the quantum version as QUANTUM_SPEED_OF_LIGHT. Enabling plasma alongside quantum, electromagnetism, or magnetism keeps the established root ELEMENTARY_CHARGE, ELECTRON_MASS, VACUUM_PERMITTIVITY, VACUUM_PERMEABILITY, and magnetic_pressure exports and re-exports the plasma variants as PLASMA_ELEMENTARY_CHARGE, PLASMA_ELECTRON_MASS, PLASMA_VACUUM_PERMITTIVITY, PLASMA_VACUUM_PERMEABILITY, and plasma_magnetic_pressure. Enabling radiation keeps the focused crate available under use_physics::radiation, exposes the overlapping convenience constants as RADIATION_SPEED_OF_LIGHT and RADIATION_JOULES_PER_MEV, and leaves the overlapping photon-constant and photon-energy helpers on the namespaced use_physics::radiation module. Likewise, the full use-work surface stays available under use_physics::work while the existing root work export continues to come from use-energy.
§Example
use use_physics::{MagneticField, magnetic_flux};
assert_eq!(magnetic_flux(2.0, 3.0, 0.0), Some(6.0));
assert_eq!(
MagneticField::new(3.0)
.and_then(|field| field.energy_density())
.map(|value| value > 0.0),
Some(true)
);
§When to use directly
Choose use-physics when you want one dependency and one import surface. Prefer the focused crates directly when you only need one physics domain.
§Scope
- The facade stays close to the focused crate APIs.
- Feature flags map directly to the focused crates in this workspace.
- Units systems and symbolic algebra are out of scope.
§Status
use-physics is a pre-1.0 crate with a deliberately small facade over focused helpers.
Facade for RustUse physics helpers.
Re-exports§
pub use use_density as density;pub use use_elasticity as elasticity;pub use use_energy as energy;pub use use_collision as collision;pub use use_fluid as fluid;pub use use_electricity as electricity;pub use use_magnetism as magnetism;pub use use_electromagnetism as electromagnetism;pub use use_quantum as quantum;pub use use_plasma as plasma;pub use use_force as force;pub use use_torque as torque;pub use use_statics as statics;pub use use_gravity as gravity;pub use use_orbit as orbit;pub use use_momentum as momentum;pub use use_relativity as relativity;pub use use_motion as motion;pub use use_oscillation as oscillation;pub use use_rotation as rotation;pub use use_rigidbody as rigidbody;pub use use_particle as particle;pub use use_nuclear as nuclear;pub use use_radiation as radiation;pub use use_power as power;pub use use_pressure as pressure;pub use use_thermodynamics as thermodynamics;
Modules§
Structs§
- Angular
State - A scalar angular position and angular velocity pair.
- Cantilever
Reaction - Fixed-end reaction data for a cantilever with a free-end point load.
- Central
Body - Mass and optional radius for a central body used in orbital calculations.
- Collision1D
- A one-dimensional collision configuration with two bodies and a restitution coefficient.
- Collision
Body1D - A one-dimensional body with scalar mass and velocity.
- Constant
Force Work - Constant-force work inputs for repeated calculations.
- Decay
Law - Simple exponential-decay law parameterized by a decay constant.
- Dose
- A simple absorbed dose wrapper in gray.
- Elastic
Bar - Simple uniform elastic bar properties for axial loading summaries.
- Elastic
Material - Simple elastic material parameters for linear isotropic summaries.
- Electrical
Load - A simple electrical load described by voltage and resistance.
- Electromagnetic
Field - A scalar electric and magnetic field pair.
- Electron
Plasma - A simple electron-plasma state.
- Elementary
Charge - An exact electric charge expressed in thirds of the elementary charge.
- Elliptical
Orbit - Elliptical orbit state described by a gravitational parameter and apsides.
- Fluid
- A simple fluid model with density and optional dynamic viscosity.
- Force2D
- A validated planar force value.
- Gravity
Body - Mass and radius for a body used in gravity calculations.
- Lever
Force - A force applied at a lever arm.
- Magnetic
Field - A simple magnetic field described by flux density.
- Mass
Properties - Mass and rotational inertia for a scalar rigid body.
- Matter
Wave - A lightweight matter-wave wrapper stored by momentum magnitude.
- Moving
Mass - A moving mass with scalar velocity.
- Nuclide
Numbers - Mass and atomic numbers for a nuclide.
- Particle
- A lightweight particle wrapper that delegates to the free helper functions.
- Photon
- A lightweight photon wrapper stored by energy in joules.
- Pipe
Flow - A simple cross-sectional pipe flow with area and scalar velocity.
- Plasma
Species - A simple scalar plasma species description.
- Point
Force2D - A planar force applied at a position relative to a chosen moment point.
- Quantum
Numbers - Quantum numbers for a single-electron atomic-state style validation helper.
- Radiation
Beam - A simple beam characterized by total power and illuminated area.
- Relativistic
Body - A body with scalar rest mass and signed velocity.
- Rigid
Body1D - A one-dimensional rigid body with scalar translational and rotational state.
- Rotating
Body - A rotating body with scalar moment of inertia and angular velocity.
- Shield
- A simple slab shield with a linear attenuation coefficient and thickness.
- Simple
Harmonic Oscillator - A simple scalar harmonic oscillator state.
- Spin
- A spin value expressed as doubled units of
hbar. - Spring
Oscillator - A spring-mass oscillator state.
- Static
System2D - A simple planar static system made of force vectors and scalar moments.
- Torque
System - A collection of torque values that can be analyzed as a system.
Enums§
- Density
Error - Motion
Error - Particle
Family - Broad family groupings for the supported particles.
- Particle
Kind - Identifies a supported particle kind.
- Particle
Statistics - Spin-statistics classification for the supported particles.
- Power
Error - Pressure
Error - Radiation
Kind - Simple radiation categories for scalar helper selection.
- Thermodynamics
Error
Constants§
- ATOMIC_
MASS_ UNIT_ MEV_ C2 - Atomic mass unit energy equivalent in mega-electron-volts per
c^2. - BOHR_
RADIUS - Bohr radius
a0, in meters. - BOLTZMANN_
CONSTANT - Boltzmann constant in joules per kelvin.
- COULOMB_
CONSTANT - Coulomb’s constant for electrostatic force calculations.
- ELECTROMAGNETISM_
SPEED_ OF_ LIGHT - Speed of light in vacuum, in meters per second.
- ELECTROMAGNETISM_
VACUUM_ PERMEABILITY - Vacuum permeability in henries per meter.
- ELECTRON_
MASS - Electron rest mass, in kilograms.
- ELEMENTARY_
CHARGE - Elementary charge, in coulombs.
- GRAVITATIONAL_
CONSTANT - Newtonian constant of gravitation, in cubic meters per kilogram second squared.
- IDEAL_
GAS_ CONSTANT - JOULES_
PER_ MEV - Joules in one mega-electron-volt.
- LN_2
- Natural logarithm of
2for half-life conversions and decay-law helpers. - PLANCK_
CONSTANT - Planck constant
h, in joule seconds. - PLASMA_
ELECTRON_ MASS - Electron mass in kilograms.
- PLASMA_
ELEMENTARY_ CHARGE - Elementary charge in coulombs.
- PLASMA_
VACUUM_ PERMEABILITY - Vacuum permeability in henries per meter.
- PLASMA_
VACUUM_ PERMITTIVITY - Vacuum permittivity in farads per meter.
- PROTON_
MASS - Proton mass in kilograms.
- QUANTUM_
SPEED_ OF_ LIGHT - Speed of light in vacuum, in meters per second.
- RADIATION_
JOULES_ PER_ MEV - Joules in one mega-electron-volt.
- RADIATION_
SPEED_ OF_ LIGHT - Speed of light in vacuum, in meters per second.
- REDUCED_
PLANCK_ CONSTANT - Reduced Planck constant
hbar, in joule seconds. - RELATIVITY_
SPEED_ OF_ LIGHT - Speed of light in vacuum, in meters per second.
- RYDBERG_
ENERGY_ EV - Hydrogen Rydberg energy magnitude, in electron volts.
- SPEED_
OF_ LIGHT - Speed of light in vacuum in meters per second.
- STANDARD_
GRAVITY - VACUUM_
PERMEABILITY - Vacuum permeability in newtons per ampere squared.
- VACUUM_
PERMITTIVITY - Vacuum permittivity in farads per meter.
Functions§
- absolute_
pressure - Computes absolute pressure from surface pressure and the hydrostatic contribution.
- absorbed_
dose - Computes absorbed dose with
D = E / m. - absorbed_
energy_ from_ dose - Computes absorbed energy from dose with
E = D * m. - acceleration
- Computes acceleration for simple harmonic motion using
a(t) = -Aω² * cos(ωt + φ). - acceleration_
from_ displacement - Computes simple-harmonic acceleration from displacement using
a = -ω²x. - accumulated_
dose - Computes accumulated dose with
D = dose_rate * t. - activity
- Computes activity from a decay constant and number of nuclei.
- alfven_
speed - Computes the Alfven speed.
- altitude_
from_ orbital_ radius - Computes altitude from body radius and orbital radius.
- angular_
acceleration - Computes angular acceleration using
α = (ω_final - ω_initial) / t. - angular_
acceleration_ from_ torque - Computes angular acceleration from torque and moment of inertia.
- angular_
displacement - Computes angular displacement using
θ = ω_initial * t + 0.5 * α * t². - angular_
frequency_ from_ energy - Computes angular frequency from energy using
omega = E / hbar. - angular_
frequency_ from_ frequency - Computes angular frequency from frequency using
ω = 2πf. - angular_
frequency_ from_ period - Computes angular frequency from period using
ω = 2π / T. - angular_
impulse_ from_ angular_ velocity_ change - Computes angular impulse from an angular velocity change using
J = I(ω_final - ω_initial). - angular_
momentum - Computes angular momentum using
L = Iω. - angular_
velocity - Computes angular velocity using
ω = Δθ / t. - angular_
velocity_ after_ angular_ impulse - Computes final angular velocity after an angular impulse using
ω_final = ω_initial + J / I. - angular_
velocity_ from_ angular_ momentum - Computes angular velocity from angular momentum using
ω = L / I. - angular_
velocity_ from_ rotational_ kinetic_ energy - Computes angular velocity from rotational kinetic energy using
ω = sqrt(2KE / I). - angular_
velocity_ from_ tangential_ speed - Computes angular velocity from tangential speed using
ω = v / r. - antiparticle
- Returns the modeled antiparticle for
kind. - apoapsis_
from_ semi_ major_ axis_ eccentricity - Computes apoapsis radius from semi-major axis and eccentricity.
- apoapsis_
speed - Computes speed at apoapsis using the vis-viva equation.
- attenuated_
intensity - Computes attenuated intensity with
I = I0 * e^(-mu * x). - average_
force_ from_ impulse - Computes average force from impulse and elapsed time using
F = J / Δt. - average_
power - Computes average power from total work and elapsed duration.
- average_
speed - Computes average speed from traveled distance and elapsed duration.
- axial_
deformation - Computes axial deformation of a prismatic bar under linear elastic loading.
- axial_
stiffness - Computes axial stiffness of a uniform elastic bar.
- balancing_
force - Computes the balancing force needed at a lever arm to cancel a known torque.
- balancing_
lever_ arm - Computes the balancing lever arm needed for a force to cancel a known torque.
- bernoulli_
pressure - Computes downstream pressure from the Bernoulli relation between two points.
- beta
- Computes the dimensionless speed ratio
β = v / c. - beta_
from_ rapidity - Computes
β = tanh(φ)from rapidity. - binding_
energy_ mev_ from_ mass_ defect_ u - Computes binding energy in mega-electron-volts from a mass defect in atomic mass units.
- binding_
energy_ per_ nucleon - Computes binding energy per nucleon.
- bohr_
orbit_ radius - Computes the hydrogen-like Bohr orbit radius for
Z = 1usingr_n = a0 * n^2. - bulk_
modulus - Computes bulk modulus from pressure change and volumetric strain.
- bulk_
modulus_ from_ youngs_ and_ poisson - Computes bulk modulus from Young’s modulus and Poisson’s ratio.
- buoyant_
force - Computes buoyant force from fluid density, displaced volume, and gravitational acceleration.
- can_
static_ friction_ hold - Checks whether static friction can hold a body at rest.
- cantilever_
end_ point_ load_ reaction - Computes the fixed-end reaction for a cantilever with a downward load at the free end.
- celsius_
to_ kelvin - center_
moment_ from_ parallel_ axis - Computes the center moment from a shifted moment using
I_cm = I - md². - center_
of_ mass_ 1d - Computes the one-dimensional center of mass using
x_cm = Σ(m_i * x_i) / Σm_i. - centripetal_
acceleration_ from_ angular_ velocity - Computes centripetal acceleration using
a_c = ω²r. - centripetal_
acceleration_ from_ tangential_ speed - Computes centripetal acceleration using
a_c = v² / r. - change_
in_ length - Computes change in length from strain and original length.
- change_
in_ volume - Computes change in volume from volumetric strain and original volume.
- charge
- Returns the exact charge for
kind. - charge_
density - Computes charge density.
- charge_
from_ current_ time - Computes electric charge from current and elapsed time.
- charge_
in_ elementary_ units - Returns the charge in elementary-charge units.
- charge_
thirds - Returns the exact charge in thirds of the elementary charge.
- circular_
orbital_ period - Computes the orbital period for a circular orbit.
- circular_
orbital_ speed - Computes the speed for a circular orbit at a radius around a body with gravitational parameter.
- circular_
orbital_ velocity - Computes the circular orbital velocity around a source mass.
- coefficient_
of_ restitution - Computes the coefficient of restitution from approach and separation speeds.
- collision_
energy_ loss_ 1d - Computes the total kinetic energy lost in a one-dimensional collision.
- collision_
energy_ loss_ fraction_ 1d - Computes the fraction of kinetic energy lost in a one-dimensional collision.
- collision_
final_ velocities_ 1d - Computes the final velocities of a one-dimensional collision from masses, initial velocities, and a coefficient of restitution.
- collision_
impulse_ on_ a - Computes the collision impulse applied to body A.
- collision_
impulse_ on_ b - Computes the collision impulse applied to body B.
- collision_
impulses_ 1d - Computes the impulses on both bodies for a one-dimensional collision.
- collision_
kinetic_ energy - Computes kinetic energy from mass and one-dimensional velocity.
- combined_
mass - Computes the sum of non-negative masses.
- conductance
- Computes conductance from resistance.
- continuity_
area - Computes downstream area from continuity for incompressible flow.
- continuity_
velocity - Computes downstream velocity from continuity for incompressible flow.
- contracted_
length - Computes contracted length
L = L0 / γfrom proper lengthL0. - coulomb_
force - Computes electrostatic force using Coulomb’s law.
- critical_
damping_ coefficient - Computes the critical damping coefficient using
c_critical = 2 * sqrt(mk). - current
- Computes current from voltage and resistance using Ohm’s law.
- current_
from_ charge_ time - Computes current from electric charge and elapsed time.
- cyclotron_
angular_ frequency - Computes cyclotron angular frequency using
ω = |q|B / m. - cyclotron_
frequency - Computes cyclotron frequency in cycles per second using
f = |q|B / (2πm). - cyclotron_
radius - Computes cyclotron radius using
r = mv / (|q|B). - damped_
angular_ frequency - Computes the damped angular frequency for an underdamped oscillator.
- damping_
ratio - Computes damping ratio using
ζ = c / (2 * sqrt(mk)). - damping_
ratio_ from_ quality_ factor - Computes damping ratio from quality factor using
ζ = 1 / (2Q). - de_
broglie_ wavelength - Computes de Broglie wavelength from momentum magnitude using
lambda = h / p. - de_
broglie_ wavelength_ from_ mass_ velocity - Computes de Broglie wavelength from mass and velocity using
lambda = h / (m * |v|). - debye_
length - Computes the Debye length.
- debye_
number - Computes the Debye number.
- debye_
sphere_ volume - Computes the Debye sphere volume.
- decay_
constant_ from_ half_ life - Computes a decay constant from a half-life.
- decayed_
fraction_ from_ decay_ constant - Computes the decayed fraction from a decay constant and elapsed time.
- decayed_
quantity_ from_ decay_ constant - Computes the decayed quantity from an initial quantity, decay constant, and elapsed time.
- default_
radiation_ weighting_ factor - Returns a simple conventional radiation weighting factor for the given kind.
- degrees_
from_ radians - Converts radians to degrees.
- density_
of - Computes density from mass and occupied volume.
- dilated_
time - Computes dilated coordinate time
t = γτfrom proper timeτ. - displaced_
volume_ from_ buoyant_ force - Computes displaced volume from buoyant force, fluid density, and gravitational acceleration.
- displacement
- displacement_
from_ work - Computes the displacement implied by a work value and a constant force.
- distance
- doppler_
factor_ longitudinal_ from_ beta - Computes the longitudinal relativistic Doppler factor
D = sqrt((1 + β) / (1 - β)). - dose_
rate - Computes dose rate with
dose_rate = D / t. - downslope_
force_ incline - Computes the downslope component of weight on an incline.
- drag_
force - Computes drag force from density, velocity, drag coefficient, and area.
- dynamic_
pressure - Computes dynamic pressure from density and flow velocity.
- dynamic_
viscosity - Computes dynamic viscosity from kinematic viscosity and density.
- earth_
weight - eccentricity_
from_ apsides - Computes eccentricity from periapsis and apoapsis radii.
- effective_
dose - Computes effective dose with
E = H * w_T. - elapsed_
time_ from_ remaining_ fraction - Computes elapsed time from a remaining fraction and decay constant.
- elastic_
collision_ final_ velocities_ 1d - Computes the final velocities of a perfectly elastic one-dimensional collision.
- elastic_
energy_ density - Computes elastic strain-energy density.
- elastic_
energy_ from_ force_ deformation - Computes elastic energy from force and deformation for a linear loading path.
- elastic_
energy_ from_ spring_ constant - Computes elastic energy stored in a linear spring from stiffness and deformation.
- electric_
field_ energy_ density - Computes electric field energy density using
u_E = 0.5 * ε0 * E². - electric_
field_ for_ velocity_ selector - Computes electric field magnitude for a selector using
E = vB. - electric_
field_ from_ magnetic_ flux_ density_ in_ vacuum - Computes electric field magnitude in vacuum using
E = cB. - electric_
force_ on_ charge - Computes electric force using
F = qE. - electrical_
power - electromagnetic_
energy_ density - Computes combined electromagnetic energy density.
- electron_
gyrofrequency - Computes the electron gyrofrequency using electron mass and charge magnitude.
- electron_
gyroradius - Computes the electron gyroradius using electron mass and charge magnitude.
- electron_
plasma_ angular_ frequency - Computes the electron plasma angular frequency.
- electron_
plasma_ frequency - Computes the electron plasma frequency in hertz.
- electron_
thermal_ speed - Computes the electron thermal speed.
- electron_
volts_ to_ joules - Converts electron volts to joules using
J = eV * e. - elliptical_
orbital_ period - Computes the orbital period for an elliptical orbit.
- energy_
fluence - Computes energy fluence with
Psi = E / A. - energy_
from_ angular_ frequency - Computes energy from angular frequency using
E = hbar * omega. - energy_
from_ mass_ defect_ kg - Computes energy in joules from a mass defect in kilograms.
- energy_
from_ power_ time - Computes electrical energy from power and elapsed time.
- energy_
from_ voltage_ charge - Computes electrical energy from voltage and charge.
- energy_
momentum_ relation - Computes total energy from rest mass and momentum using
E = sqrt((pc)² + (mc²)²). - equivalent_
dose - Computes equivalent dose with
H = D * w_R. - escape_
speed - Computes escape speed from a distance around a body with gravitational parameter.
- escape_
velocity - Computes the escape velocity from a source mass at a distance.
- family
- Returns the broad particle family for
kind. - final_
angular_ velocity - Computes final angular velocity using
ω_final = ω_initial + αt. - final_
angular_ velocity_ from_ displacement - Computes final angular velocity using
ω_final = sqrt(ω_initial² + 2αθ). - final_
angular_ velocity_ squared - Computes squared final angular velocity using
ω_final² = ω_initial² + 2αθ. - final_
kinetic_ energy_ from_ work - Computes final kinetic energy from an initial kinetic energy and applied work.
- final_
length - Computes final length after elastic axial strain.
- final_
velocity - fluence
- Computes fluence with
F = N / A. - fluence_
rate - Computes fluence rate with
fluence_rate = F / t. - fluid_
hydrostatic_ pressure - Computes hydrostatic pressure from fluid density, gravitational acceleration, and depth.
- force
- force_
angle_ radians - Computes the planar angle of a force vector in radians.
- force_
from_ axial_ deformation - Computes force from axial deformation of a uniform elastic bar.
- force_
from_ stress - Computes force from stress and cross-sectional area.
- force_
from_ torque - Computes the force required to produce a known torque at a lever arm.
- force_
from_ work - Computes the force required to perform a given amount of work over a displacement.
- force_
magnitude - Computes the magnitude of a planar force vector.
- frequency_
from_ angular_ frequency - Computes frequency from angular frequency using
f = ω / 2π. - frequency_
from_ period - Computes frequency from period using
f = 1 / T. - frequency_
from_ photon_ energy - Computes frequency from photon energy using
f = E / h. - gauge_
pressure - gravitational_
acceleration - Computes the gravitational acceleration caused by a source mass at a distance.
- gravitational_
force - Computes the gravitational attraction between two point masses.
- gravitational_
parameter - Computes the standard gravitational parameter from a source mass.
- gravitational_
potential_ energy - Computes gravitational potential energy between two masses.
- gravity_
weight - Computes weight from mass and gravitational acceleration.
- gyro_
angular_ frequency - Computes the gyro angular frequency.
- gyrofrequency
- Computes the gyrofrequency in hertz.
- gyroradius
- Computes the gyroradius.
- half_
life_ from_ decay_ constant - Computes a half-life from a decay constant.
- half_
value_ layer - Computes half-value layer with
HVL = ln(2) / mu. - has_
rest_ mass - Returns whether
kindhas nonzero rest mass when that metadata is modeled here. - heat_
energy - hohmann_
delta_ v_ 1 - Computes the first burn for a Hohmann transfer.
- hohmann_
delta_ v_ 2 - Computes the second burn for a Hohmann transfer.
- hohmann_
total_ delta_ v - Computes the total scalar delta-v magnitude for a Hohmann transfer.
- hohmann_
transfer_ semi_ major_ axis - Computes the semi-major axis of a Hohmann transfer ellipse.
- hohmann_
transfer_ time - Computes the transfer time for a Hohmann transfer.
- hollow_
sphere_ moment_ of_ inertia - Computes hollow-sphere moment of inertia using
I = (2 / 3)mr². - hydrogen_
energy_ level_ ev - Computes the hydrogen energy level in electron volts using
E_n = -Ry / n^2. - hydrogen_
transition_ energy_ ev - Computes the absolute transition energy between two hydrogen energy levels in electron volts.
- hydrogen_
transition_ wavelength - Computes the photon wavelength for a hydrogen transition in meters.
- hydrostatic_
pressure - ideal_
gas_ pressure - Computes ideal gas pressure from amount of substance, temperature, and volume.
- impulse
- impulse_
from_ momentum_ change - Computes impulse from a change in momentum using
J = p_final - p_initial. - impulse_
from_ velocity_ change - Computes impulse from a velocity change using
J = m(v_final - v_initial). - initial_
kinetic_ energy_ from_ work - Computes initial kinetic energy from a final kinetic energy and applied work.
- intensity
- Computes intensity from power and area with
I = P / A. - inverse_
square_ intensity - Computes inverse-square intensity from a reference value.
- ion_
plasma_ angular_ frequency - Computes the ion plasma angular frequency.
- is_
antiparticle - Returns
truewhenkindis represented as an antiparticle variant. - is_
baryon - Returns
truewhenkindis a baryon. - is_
boson - Returns
truewhenkindis a boson. - is_
common_ poisson_ ratio - Returns
truewhen Poisson’s ratio is finite and between0.0and0.5, inclusive. - is_
critically_ damped - Returns
truewhen the damping ratio is withintoleranceof critical damping. - is_
fermion - Returns
truewhenkindis a fermion. - is_
ionizing - Returns whether the listed radiation kind is ionizing in this simple crate.
- is_
lepton - Returns
truewhenkindis a lepton. - is_
meson - Returns
truewhenkindis a meson. - is_
overdamped - Returns
truewhen the damping ratio represents an overdamped system. - is_
particle_ radiation - Returns whether the listed radiation kind is particle radiation.
- is_
perfectly_ elastic - Returns whether a valid restitution coefficient is effectively perfectly elastic.
- is_
perfectly_ inelastic - Returns whether a valid restitution coefficient is effectively perfectly inelastic.
- is_
photon_ radiation - Returns whether the listed radiation kind is photon radiation.
- is_
quark - Returns
truewhenkindis a quark. - is_
quasi_ neutral - Checks whether a plasma is quasi-neutral within a relative tolerance.
- is_
rotational_ equilibrium - Checks whether a torque system is in rotational equilibrium.
- is_
self_ antiparticle - Returns
truewhenkindis its own antiparticle. - is_
static_ equilibrium_ 2d - Checks whether a planar static system satisfies both translational and rotational equilibrium.
- is_
subluminal_ speed - Returns
truewhenspeedis finite, non-negative, and strictly less than the speed of light. - is_
translational_ equilibrium_ 1d - Checks whether a 1D force system is in translational equilibrium.
- is_
translational_ equilibrium_ 2d - Checks whether a 2D force system is in translational equilibrium.
- is_
underdamped - Returns
truewhen the damping ratio represents an underdamped system. - is_
valid_ azimuthal_ quantum_ number - Returns
truewhenn >= 1andl < n. - is_
valid_ coulomb_ logarithm - Returns whether a Coulomb logarithm value is finite and positive.
- is_
valid_ magnetic_ quantum_ number - Returns
truewhen-l <= m_l <= l. - is_
valid_ nuclide_ numbers - Validates mass and atomic numbers for a simple nuclide representation.
- is_
valid_ principal_ quantum_ number - Returns
truewhenn >= 1. - is_
valid_ quantum_ numbers - Returns
truewhen the supplied quantum-number combination is valid. - is_
valid_ restitution - Returns
truewhen a restitution coefficient is finite and within[0.0, 1.0]. - is_
valid_ spin_ twice - Returns
truewhen the spin projection is one of-1or1. - isotropic_
intensity - Computes isotropic intensity from power and distance with
I = P / (4 * pi * r^2). - joules_
to_ electron_ volts - Converts joules to electron volts using
eV = J / e. - joules_
to_ mev - Converts energy in joules to mega-electron-volts.
- kinematic_
viscosity - Computes kinematic viscosity from dynamic viscosity and density.
- kinetic_
energy - kinetic_
energy_ from_ total_ and_ potential - Computes kinetic energy from total energy and potential energy using
KE = E_total - U. - kinetic_
energy_ loss - Computes the kinetic energy lost between an initial and final state.
- kinetic_
energy_ loss_ fraction - Computes the fraction of kinetic energy lost between two states.
- lever_
arm_ from_ torque - Computes the lever arm required to produce a known torque from a force.
- linear_
attenuation_ from_ mass_ attenuation - Computes linear attenuation coefficient from mass attenuation and density.
- linear_
kinetic_ energy - Computes translational kinetic energy using
KE = 0.5mv². - linear_
momentum - Computes linear momentum using
p = mv. - lorentz_
factor - Computes the Lorentz factor
γfrom a speed magnitude in meters per second. - lorentz_
factor_ from_ beta - Computes the Lorentz factor
γ = 1 / sqrt(1 - β²)from a non-negativebetamagnitude. - lorentz_
force_ magnitude_ perpendicular - Computes
|F| = |q| * |E + vB|for perpendicular fields along the same scalar direction. - lorentz_
force_ scalar - Computes the scalar Lorentz-force convenience relation
F = q(E + vB sin(theta)). - lorentz_
force_ scalar_ degrees - Computes the scalar Lorentz-force convenience relation with the angle in degrees.
- magnetic_
energy_ density - Computes magnetic energy density.
- magnetic_
field_ around_ long_ straight_ wire - Computes magnetic flux density around a long straight wire.
- magnetic_
field_ at_ center_ of_ loop - Computes magnetic flux density at the center of a circular current loop.
- magnetic_
field_ energy_ density - Computes magnetic field energy density using
u_B = B² / (2μ0). - magnetic_
field_ inside_ solenoid - Computes magnetic flux density inside an ideal long solenoid.
- magnetic_
flux - Computes magnetic flux through an area.
- magnetic_
flux_ degrees - Computes magnetic flux through an area using an angle in degrees.
- magnetic_
flux_ density_ for_ velocity_ selector - Computes magnetic flux density magnitude for a selector using
B = E / v. - magnetic_
flux_ density_ from_ electric_ field_ in_ vacuum - Computes magnetic flux density magnitude in vacuum using
B = E / c. - magnetic_
flux_ density_ from_ flux - Computes magnetic flux density from magnetic flux, area, and orientation.
- magnetic_
force_ magnitude_ on_ charge - Computes the magnitude of magnetic force on a moving charge.
- magnetic_
force_ on_ charge - Computes magnetic force on a moving charge.
- magnetic_
force_ on_ charge_ degrees - Computes magnetic force on a moving charge using an angle in degrees.
- magnetic_
force_ on_ moving_ charge - Computes magnetic force using
F = qvB sin(theta). - magnetic_
force_ on_ moving_ charge_ degrees - Computes magnetic force using
F = qvB sin(theta)with the angle in degrees. - magnetic_
force_ on_ wire - Computes magnetic force on a current-carrying wire.
- magnetic_
force_ on_ wire_ degrees - Computes magnetic force on a current-carrying wire using an angle in degrees.
- magnetic_
pressure - Computes magnetic pressure.
- mass_
attenuation_ from_ linear_ attenuation - Computes mass attenuation coefficient from linear attenuation and density.
- mass_
defect_ kg_ from_ energy - Computes mass defect in kilograms from energy in joules.
- mass_
flow_ rate - Computes mass flow rate from density and volumetric flow rate.
- mass_
from_ density - mass_
from_ momentum - Computes mass from momentum and velocity using
m = p / v. - mass_
from_ rest_ energy - Computes rest mass
m = E0 / c²from rest energy in joules. - mass_
from_ spring_ period - Computes mass from spring constant and period using
m = kT² / 4π². - max_
acceleration - Computes the maximum acceleration using
a_max = Aω². - max_
speed - Computes the maximum speed using
v_max = Aω. - maximum_
static_ friction - Computes the maximum available static friction.
- mean_
lifetime - Computes the mean lifetime from a decay constant.
- mechanical_
power - mev_
to_ joules - Converts energy in mega-electron-volts to joules.
- minimum_
energy_ uncertainty - Computes the minimum energy uncertainty estimate from
delta E >= hbar / (2 * delta t). - minimum_
momentum_ uncertainty - Computes the minimum momentum uncertainty estimate from
delta p >= hbar / (2 * delta x). - minimum_
position_ uncertainty - Computes the minimum position uncertainty estimate from
delta x >= hbar / (2 * delta p). - minimum_
static_ friction_ coefficient_ for_ incline - Computes the minimum static friction coefficient needed to prevent sliding on an incline.
- minimum_
time_ uncertainty - Computes the minimum time uncertainty estimate from
delta t >= hbar / (2 * delta E). - moment_
2d - Computes the scalar
z-moment of a planar force about a chosen point. - moment_
arm - Computes the perpendicular moment arm from a lever arm and angle in radians.
- moment_
arm_ degrees - Computes the perpendicular moment arm from an angle given in degrees.
- moment_
from_ force_ and_ arm - Computes a moment from a signed force and a signed moment arm.
- momentum
- Computes linear momentum using
p = m * v. - momentum_
from_ de_ broglie_ wavelength - Computes momentum magnitude from a de Broglie wavelength using
p = h / lambda. - momentum_
impulse - Computes impulse from force and elapsed time using
J = F * Δt. - near_
surface_ potential_ energy - Computes near-surface potential energy from mass, height, and gravitational acceleration.
- net_
force_ 1d - Computes the net force from a list of scalar forces.
- net_
force_ 2d - Computes the net force from a list of planar force components.
- net_
moment - Computes the net moment from a slice of scalar moment values.
- net_
moment_ 2d - Computes the net moment from planar point forces.
- net_
torque - Computes the sum of a slice of torque values.
- net_
torque_ from_ force_ lever_ pairs - Computes the net torque for force and lever-arm pairs.
- net_
work - Computes the net work from a slice of work contributions.
- neutron_
count - Computes neutron count from mass number and atomic number.
- normal_
force_ horizontal_ surface - Computes the normal force on a horizontal surface.
- normal_
force_ incline - Computes the normal force on an incline.
- normal_
strain - Computes normal strain from change in length and original length.
- normal_
stress - Computes normal stress from applied force and cross-sectional area.
- nuclei_
from_ activity - Computes the number of nuclei from activity and decay constant.
- nucleon_
count - Computes nucleon count from proton and neutron counts.
- observed_
frequency_ longitudinal - Computes observed longitudinal Doppler-shifted frequency
f_observed = f_emitted * D. - orbital_
radius_ from_ altitude - Computes orbital radius from body radius and altitude.
- orbital_
radius_ from_ circular_ speed - Computes the circular orbital radius from circular speed.
- orbital_
radius_ from_ period - Computes the circular orbital radius from an orbital period.
- oscillation_
displacement - Computes displacement for simple harmonic motion using
x(t) = A * cos(ωt + φ). - oscillation_
spring_ potential_ energy - Computes spring potential energy using
U = 0.5 * k * x². - oscillator_
total_ energy - Computes oscillator total energy using
E = 0.5 * k * A². - parallel_
axis_ moment_ of_ inertia - Applies the parallel-axis theorem using
I = I_cm + md². - parallel_
resistance - Computes the total resistance for resistors in parallel.
- particle_
thermal_ speed - Computes a particle thermal speed.
- pendulum_
length_ from_ period - Computes pendulum length from period using
L = g * (T / 2π)². - perfectly_
inelastic_ collision_ final_ velocities_ 1d - Computes the final velocities of a perfectly inelastic one-dimensional collision.
- perfectly_
inelastic_ collision_ velocity_ 1d - Computes the shared final velocity of a perfectly inelastic one-dimensional collision.
- periapsis_
from_ semi_ major_ axis_ eccentricity - Computes periapsis radius from semi-major axis and eccentricity.
- periapsis_
speed - Computes speed at periapsis using the vis-viva equation.
- period_
from_ angular_ frequency - Computes period from angular frequency using
T = 2π / ω. - period_
from_ frequency - Computes period from frequency using
T = 1 / f. - perpendicular_
force_ component - Computes the component of a force that acts perpendicular to a lever arm.
- perpendicular_
force_ component_ degrees - Computes the perpendicular force component from an angle given in degrees.
- photon_
energy_ from_ frequency - Computes photon energy from frequency using
E = h * f. - photon_
energy_ from_ wavelength - Computes photon energy from wavelength using
E = h * c / lambda. - photon_
flux_ density - Computes photon flux density with
phi = Phi / A. - photon_
flux_ from_ power - Computes photon flux from power with
Phi = P / E_photon. - photon_
momentum_ from_ energy - Computes photon momentum from energy using
p = E / c. - photon_
momentum_ from_ wavelength - Computes photon momentum from wavelength using
p = h / lambda. - plasma_
beta - Computes plasma beta.
- plasma_
magnetic_ pressure - Computes magnetic pressure.
- plasma_
pressure - Computes scalar plasma pressure.
- point_
mass_ moment_ of_ inertia - Computes the moment of inertia for a point mass.
- poisson_
ratio - Computes Poisson’s ratio from transverse and axial strain.
- potential_
energy - power_
from_ current_ resistance - Computes electrical power from current and resistance.
- power_
from_ voltage_ current - Computes electrical power from voltage and current.
- power_
from_ voltage_ resistance - Computes electrical power from voltage and resistance.
- poynting_
magnitude - Computes Poynting magnitude in vacuum using
S = EB / μ0. - pressure
- Computes pressure from applied force and cross-sectional area.
- pressure_
change_ from_ bulk_ modulus - Computes pressure change from bulk modulus and volumetric strain.
- proper_
length - Computes proper length
L0 = Lγfrom a contracted lengthL. - proper_
time - Computes proper time
τ = t / γfrom dilated coordinate timet. - quality_
factor_ from_ damping_ ratio - Computes quality factor from damping ratio using
Q = 1 / (2ζ). - radians_
from_ degrees - Converts degrees to radians.
- radians_
from_ revolutions - Converts revolutions to radians.
- rapidity_
from_ beta - Computes rapidity
φ = atanh(β)from a signedbeta. - recoil_
velocity - Computes recoil velocity assuming the initial total momentum is zero.
- reduced_
mass - Computes reduced mass using
μ = (m1 * m2) / (m1 + m2). - relative_
speed - Computes the relative speed between two one-dimensional bodies.
- relative_
velocity - Computes the signed relative velocity between two one-dimensional bodies.
- relativistic_
kinetic_ energy - Computes relativistic kinetic energy
KE = (γ - 1)mc²in joules. - relativistic_
momentum - Computes relativistic momentum
p = γmv. - remaining_
fraction_ from_ decay_ constant - Computes the remaining fraction from a decay constant and elapsed time.
- remaining_
fraction_ from_ half_ life - Computes the remaining fraction from a half-life and elapsed time.
- remaining_
quantity_ from_ decay_ constant - Computes the remaining quantity from an initial quantity, decay constant, and elapsed time.
- remaining_
quantity_ from_ half_ life - Computes the remaining quantity from an initial quantity, half-life, and elapsed time.
- required_
shield_ thickness - Computes required shield thickness with
x = ln(I0 / I) / mu. - required_
static_ friction - Computes the static friction magnitude required to hold horizontal equilibrium.
- resistance
- Computes resistance from voltage and current using Ohm’s law.
- resistance_
from_ conductance - Computes resistance from conductance.
- resonance_
angular_ frequency_ natural - Computes the natural resonance angular frequency of a spring-mass oscillator.
- rest_
energy - Computes rest energy
E0 = mc²in joules. - rest_
mass_ from_ momentum_ speed - Computes rest mass from relativistic momentum and velocity using
m = p / (γv). - rest_
mass_ mev_ c2 - Returns an approximate rest mass in
MeV/c^2forkind. - revolutions_
from_ radians - Converts radians to revolutions.
- reynolds_
number - Computes Reynolds number from density, velocity, characteristic length, and dynamic viscosity.
- rigidbody_
angular_ momentum - Computes angular momentum using
L = Iω. - rigidbody_
hollow_ sphere_ moment_ of_ inertia - Computes hollow-sphere moment of inertia using
I = (2 / 3)mr². - rigidbody_
point_ mass_ moment_ of_ inertia - Computes point-mass moment of inertia using
I = mr². - rigidbody_
rod_ moment_ of_ inertia_ about_ center - Computes rod moment of inertia about its center using
I = (1 / 12)mL². - rigidbody_
rod_ moment_ of_ inertia_ about_ end - Computes rod moment of inertia about one end using
I = (1 / 3)mL². - rigidbody_
rotational_ kinetic_ energy - Computes rotational kinetic energy using
KE_rot = 0.5Iω². - rigidbody_
solid_ disk_ moment_ of_ inertia - Computes solid-disk moment of inertia using
I = 0.5mr². - rigidbody_
solid_ sphere_ moment_ of_ inertia - Computes solid-sphere moment of inertia using
I = (2 / 5)mr². - rigidbody_
thin_ ring_ moment_ of_ inertia - Computes thin-ring moment of inertia using
I = mr². - rod_
moment_ of_ inertia_ about_ center - Computes the moment of inertia of a uniform rod about its center.
- rod_
moment_ of_ inertia_ about_ end - Computes the moment of inertia of a uniform rod about one end.
- rotation_
angular_ acceleration_ from_ torque - Computes angular acceleration from torque using
α = τ / I. - rotation_
point_ mass_ moment_ of_ inertia - Computes point-mass moment of inertia using
I = mr². - rotation_
rod_ moment_ of_ inertia_ about_ center - Computes rod moment of inertia about its center using
I = (1 / 12)mL². - rotation_
rod_ moment_ of_ inertia_ about_ end - Computes rod moment of inertia about one end using
I = (1 / 3)mL². - rotational_
kinetic_ energy - Computes rotational kinetic energy using
KE_rot = 0.5 * I * ω². - semi_
major_ axis_ from_ apsides - Computes the semi-major axis from periapsis and apoapsis radii.
- semi_
major_ axis_ from_ specific_ energy - Computes the semi-major axis for a bound orbit from specific orbital energy.
- separation_
speed_ from_ restitution - Computes separation speed from an approach speed and restitution coefficient.
- series_
resistance - Computes the total resistance for resistors in series.
- shear_
modulus - Computes shear modulus from shear stress and shear strain.
- shear_
modulus_ from_ youngs_ and_ poisson - Computes shear modulus from Young’s modulus and Poisson’s ratio.
- shear_
strain - Computes engineering shear strain from lateral displacement and height.
- shear_
strain_ from_ modulus - Computes shear strain from shear stress and shear modulus.
- shear_
stress - Computes shear stress from applied force and loaded area.
- shear_
stress_ from_ modulus - Computes shear stress from shear modulus and shear strain.
- simple_
pendulum_ angular_ frequency - Computes small-angle simple pendulum angular frequency using
ω = sqrt(g / L). - simple_
pendulum_ frequency - Computes small-angle simple pendulum frequency in cycles per second.
- simple_
pendulum_ period - Computes the small-angle simple pendulum period using
T = 2π * sqrt(L / g). - simply_
supported_ point_ load_ reactions - Computes support reactions for a simply supported beam with one point load.
- simply_
supported_ uniform_ load_ reactions - Computes support reactions for a simply supported beam with a uniform load.
- solid_
disk_ moment_ of_ inertia - Computes solid-disk moment of inertia using
I = 0.5mr². - solid_
sphere_ moment_ of_ inertia - Computes solid-sphere moment of inertia using
I = (2 / 5)mr². - source_
mass_ from_ gravitational_ parameter - Computes the source mass from a standard gravitational parameter.
- specific_
activity - Computes specific activity from activity and mass.
- specific_
orbital_ energy - Computes specific orbital energy.
- speed_
from_ beta - Computes the speed magnitude
v = βcin meters per second. - speed_
from_ permittivity_ permeability - Computes propagation speed from permittivity and permeability using
v = 1 / sqrt(εμ). - speed_
from_ rapidity - Computes signed velocity
v = c * tanh(φ)from rapidity. - spin
- Returns the spin for
kind. - spring_
angular_ frequency - Computes spring angular frequency using
ω = sqrt(k / m). - spring_
constant_ from_ period - Computes spring constant from mass and period using
k = 4π²m / T². - spring_
frequency - Computes spring frequency in cycles per second.
- spring_
period - Computes spring period using
T = 2π * sqrt(m / k). - spring_
potential_ energy - Computes the spring potential energy stored at a displacement.
- spring_
work - Computes work done by an ideal spring force over a displacement interval.
- standard_
weight - Computes weight under conventional standard gravity.
- statics_
is_ rotational_ equilibrium - Checks whether a moment system is in rotational equilibrium.
- statistics
- Returns the particle statistics implied by the modeled spin.
- strain_
from_ youngs_ modulus - Computes strain from stress and Young’s modulus.
- stress_
from_ youngs_ modulus - Computes stress from Young’s modulus and axial strain.
- tangential_
acceleration - Computes tangential acceleration using
a_t = αr. - tangential_
speed - Computes tangential speed using
v = ωr. - tenth_
value_ layer - Computes tenth-value layer with
TVL = ln(10) / mu. - thin_
ring_ moment_ of_ inertia - Computes thin-ring moment of inertia using
I = mr². - torque
- Computes torque from a force and lever arm.
- torque_
at_ angle - Computes torque when the applied force meets the lever arm at an angle in radians.
- torque_
at_ angle_ degrees - Computes torque when the applied force meets the lever arm at an angle in degrees.
- torques_
from_ force_ lever_ pairs - Converts force and lever-arm pairs into torque values.
- total_
effective_ dose - Sums pre-weighted equivalent doses into a total effective dose.
- total_
energy - Computes total relativistic energy
E = γmc²in joules. - total_
kinetic_ energy - Computes total kinetic energy using
KE_total = 0.5mv² + 0.5Iω². - total_
kinetic_ energy_ 1d - Computes the total kinetic energy of two one-dimensional bodies.
- total_
momentum - Computes the total momentum of a slice of momentum values.
- total_
plasma_ pressure - Computes total scalar plasma pressure.
- transmitted_
fraction - Computes transmitted fraction with
T = e^(-mu * x). - transverse_
strain_ from_ poisson_ ratio - Computes transverse strain from Poisson’s ratio and axial strain.
- two_
body_ total_ momentum - Computes the total momentum of two moving bodies using
p_total = m1v1 + m2v2. - velocity
- Computes velocity for simple harmonic motion using
v(t) = -Aω * sin(ωt + φ). - velocity_
addition - Computes relativistic velocity addition
u = (v + w) / (1 + vw / c²). - velocity_
after_ impulse - Computes final velocity after an impulse using
v_final = v_initial + J / m. - velocity_
from_ flow_ rate - Computes velocity from volumetric flow rate and area.
- velocity_
from_ momentum - Computes velocity from momentum and mass using
v = p / m. - velocity_
selector_ speed - Computes selector speed using
v = E / B. - vis_
viva_ speed - Computes orbital speed from the vis-viva equation.
- voltage
- Computes voltage from current and resistance using Ohm’s law.
- volume
- Computes occupied volume from mass and density.
- volume_
strain - Computes volumetric strain from change in volume and original volume.
- volumetric_
flow_ rate - Computes volumetric flow rate from area and flow velocity.
- wavelength_
from_ photon_ energy - Computes wavelength from photon energy using
lambda = h * c / E. - weight
- work
- work_
against_ gravity - Computes work done against gravity near a surface.
- work_
at_ angle - Computes mechanical work when the force is applied at an angle to the displacement.
- work_
at_ angle_ degrees - Computes mechanical work when the applied-force angle is given in degrees.
- work_
by_ friction - Computes work done by kinetic friction.
- work_
by_ gravity - Computes work done by gravity near a surface.
- work_
from_ force_ samples - Approximates work from aligned force and displacement samples.
- work_
from_ kinetic_ energy_ change - Computes net work from the change in kinetic energy.
- youngs_
modulus - Computes Young’s modulus from stress and strain.
- youngs_
modulus_ from_ shear_ and_ poisson - Computes Young’s modulus from shear modulus and Poisson’s ratio.