ianmackenzie/elm-units/2.8.0

NOTE: the latest version is 2.10.0

Force

A Force value represents a force in newtons, pounds force etc. It is stored as a number of newtons.

Note that since Newtons is defined as Product Kilograms MetersPerSecondSquared, you can compute force directly as a product of mass and acceleration:

mass =
    Mass.kilograms 10


acceleration =
    Acceleration.metersPerSecondSquared 2


mass |> Quantity.times acceleration
--> Force.newtons 20
type alias Force =
Quantity Float Newtons
type alias Newtons =
Product Kilograms MetersPerSecondSquared

Metric

newtons : Float -> Force

Construct a force value from a number of newtons.

inNewtons : Force -> Float

Convert a force value to a number of newtons.

kilonewtons : Float -> Force

Construct a force value from a number of kilonewtons.

inKilonewtons : Force -> Float

Convert a force value to a number of kilonewtons.

meganewtons : Float -> Force

Construct a force value from a number of meganewtons.

inMeganewtons : Force -> Float

Convert a force value to a number of meganewtons.

Imperial

pounds : Float -> Force

Construct a force value from a number of pounds force. One pound force is the force required to accelerate one pound mass at a rate of one gee.

inPounds : Force -> Float

Convert a force value to a number of pounds force.

kips : Float -> Force

Construct a force value from a number of kips (kilopounds force).

Force.kips 2
--> Force.pounds 2000
inKips : Force -> Float

Convert a force value to a number of kips.