A Power value represents power in watts or horsepower. It is stored as a
number of watts.
Note that since Watts is defined as Rate Joules Seconds (energy per unit
time), you can construct a Power value using Quantity.per:
power =
energy |> Quantity.per durationYou can also do rate-related calculations with Power values to compute
Energy or Duration:
energy =
power |> Quantity.times duration
alsoEnergy =
duration |> Quantity.at power
duration =
energy |> Quantity.at_ powerConstruct a Power value from a number of watts.
Convert a Power value to a number of watts.
Construct a Power value from a number of kilowatts.
Convert a Power value to a number of kilowatts.
Construct a Power value from a number of megawatts.
Convert a Power value to a number of megawatts.
Who knew that there were not one, not two, but three possible interpretations of "one horsepower"? (Actually there are more than that, but these three seemed the most reasonable.)
Construct a Power value from an number of metric horsepower.
Power.metricHorsepower 1
--> Power.watts 735.49875Convert a Power value to a number of metric horsepower.
Construct a Power value from an number of mechanical horsepower.
Power.mechanicalHorsepower 1
--> Power.watts 745.6998715822702Convert a Power value to a number of mechanical horsepower.
Construct a Power value from an number of electrical horsepower.
Power.electricalHorsepower 1
--> Power.watts 746Convert a Power value to a number of electrical horsepower.