Current section
Files
Jump to
Current section
Files
lib/units/pressure.ex
defmodule ExUc.Units.Pressure do
@moduledoc """
Defines units and conversions for the Pressure kind.
Pressure is the amount of force acting per unit area.
## Included Units and Aliases
- **Pa**, Pascal
- **hPa**, Hectopascal
- **kPa**, Kilopascal, kilopascal, kilopascals
- **bar**, Bar, bar, bars
- **at**, Technical atmosphere
- **atm**, Standard atmosphere
- **mmHg**, Torr torr Torrs torrs,
- **psi**, Pounds per square inch
"""
use ExUc.Kind
def units do
[
Pa: ~w(Pascal),
hPa: ~w(Hectopascal),
kPa: ~w(Kilopascal kilopascal kilopascals),
bar: ~w(Bar bar bars),
at: "Technical atmosphere",
atm: "Standard atmosphere",
mmHg: ~w(Torr torr Torrs torrs),
psi: "Pounds per square inch"
]
end
def conversions do
[
kPa_to_Pa: 1000,
hPa_to_Pa: 100,
bar_to_kPa: 100,
bar_to_at: 1.0197,
bar_to_atm: 0.9869,
bar_to_mmHg: 750.06,
bar_to_psi: 14.5037
]
end
end