thermalExpansion static method
Length
thermalExpansion(
- Length originalLength,
- double expansionCoefficient,
- Temperature temperatureChange
Calculates the thermal expansion of a material.
Returns the change in length as a Length quantity.
Usage: final deltaL = EngineeringConstants.thermalExpansion(originalLength, expansionCoeff, tempChange);
Implementation
static Length thermalExpansion(
Length originalLength,
double expansionCoefficient,
Temperature temperatureChange,
) {
final l0 = originalLength.inM;
// Temperature difference is valid regardless of the unit scale, but value must be absolute diff
final deltaT = temperatureChange.getValue(TemperatureUnit.kelvin);
final deltaL = l0 * expansionCoefficient * deltaT; // ΔL = L₀αΔT
return Length(deltaL, LengthUnit.meter);
}