thermalExpansion static method

Length thermalExpansion(
  1. Length originalLength,
  2. double expansionCoefficient,
  3. TemperatureDelta temperatureChange
)

Calculates the thermal expansion of a material.

Returns the change in length as a Length quantity.

The temperatureChange parameter requires a TemperatureDelta, not an absolute Temperature. Using an absolute temperature here would introduce the Kelvin offset (e.g. 20 °C → 293.15 K), producing a result ~14× too large. A TemperatureDelta of 20.celsiusDelta correctly represents a 20 K change.

Usage:

final deltaL = EngineeringConstants.thermalExpansion(
  length, coeff, 20.celsiusDelta,
);

Implementation

static Length thermalExpansion(
  Length originalLength,
  double expansionCoefficient,
  TemperatureDelta temperatureChange,
) {
  final l0 = originalLength.inM;
  final deltaT = temperatureChange.getValue(TemperatureDeltaUnit.kelvinDelta);
  final deltaL = l0 * expansionCoefficient * deltaT; // ΔL = L₀αΔT
  return Length(deltaL, LengthUnit.meter);
}