Skip to main content

Module units

Module units 

Source
Expand description

Everything from pantometry-units, so that use pantometry_core::units::* is enough to write dimensioned physics.

Modules§

vector
Vector quantities: three components sharing one dimension.

Structs§

QVec3
Three components of one dimension, stored in SI base units.
Qty
A quantity, with the seven SI base dimensions in its type.

Constants§

BOLTZMANN
Boltzmann constant, J·K⁻¹ (exact by definition).
C
Speed of light in vacuum, m·s⁻¹ (exact by definition).
G0
Standard gravity, m·s⁻².
PLANCK
Planck constant, J·s (exact by definition).
STEFAN_BOLTZMANN
Stefan-Boltzmann constant, W·m⁻²·K⁻⁴ — radiative exchange lives on this.

Functions§

photon_energy
Energy of one photon at a vacuum wavelength: E = hc/λ.

Type Aliases§

Acceleration
Metres per second squared.
AccelerationVec
An acceleration, m·s⁻².
Amount
Moles.
AngularMomentum
kg·m²·s⁻¹ — the rotational counterpart of momentum, and conserved for the same reason.
Area
Square metres.
Charge
Coulombs.
Concentration
kg·m⁻³ as a concentration of one species dissolved in another.
Conductance
W·K⁻¹ — how fast heat crosses a joint, UA.
Conductivity
S/m — the reciprocal of Resistivity, and what a finite-volume solve actually wants, because conductances in parallel add where resistances do not.
Current
Amperes.
CurrentDensity
A/m² — current per unit area. What actually flows, and the thing I is an integral of.
Damping
N·s·m⁻¹ — a dashpot’s c. Force proportional to velocity, and the only place a mechanical simulation loses energy on purpose.
Density
kg·m⁻³. Note that a glass catalogue quotes g/cm³, a factor of a thousand away — see Density::g_per_cm3.
Diffusivity
m²·s⁻¹ — thermal diffusivity α = k/(ρ c_p), and also mass diffusivity.
Dimensionless
A pure ratio: reflectance, duty cycle, refractive index, Strehl.
DynamicViscosity
Pa·s — dynamic viscosity, the μ of Darcy’s law and of Stokes drag.
ElectricField
V/m — the gradient of a potential.
Energy
Joules.
Force
Newtons.
ForceVec
A force, newtons.
Frequency
Cycles per second. Dimensionally identical to an angular velocity, since a radian is m/m — the type system cannot and should not pretend otherwise.
HeatCapacity
J·K⁻¹ — mass times specific heat. How much heat a thing can hide before it shows up as a temperature.
Irradiance
Power per unit area, W·m⁻². What a detector face actually receives.
LatentHeat
J·kg⁻¹ — the heat a phase change costs at no change in temperature.
Length
Metres.
LengthVec
A position or a displacement, m. The same dimension, and deliberately the same type: the difference between them is a choice of origin, not of physics.
LuminousIntensity
Candelas.
Mass
Kilograms.
MassFlow
kg·s⁻¹ — a mass flow rate. What a brew scale reads the derivative of.
MomentOfInertia
kg·m² — how hard a body is to spin up about an axis.
Momentum
kg·m·s⁻¹ — mass times velocity, and the thing a closed system conserves exactly rather than nearly.
MomentumVec
A momentum, kg·m·s⁻¹. The vector a closed system conserves component by component — and see the note in the workspace README on why the smallest component is what binds a conservation audit.
Power
Watts.
Pressure
Pascals. Also the unit of an energy density and of a stress, which are the same dimension and not a coincidence.
Resistance
Ohms — volts per ampere.
Resistivity
Ω·m — resistance times length. The property of a material, where Resistance is the property of a particular piece of one.
SpecificHeat
J·kg⁻¹·K⁻¹ — the c_p that says how much heat a gram of glass can hide.
Stiffness
N·m⁻¹ — a spring’s k, and the penalty stiffness a contact is modelled with.
Temperature
Absolute temperature. Kelvin only — see Temperature::celsius.
ThermalConductivity
W·m⁻¹·K⁻¹ — the k of Fourier’s law.
ThermalExpansion
K⁻¹ — the coefficient that turns absorbed light into a focus shift.
Time
Seconds.
Velocity
Metres per second.
VelocityVec
A velocity, m·s⁻¹.
Voltage
Volts.
Volume
Cubic metres.