-
Notifications
You must be signed in to change notification settings - Fork 36
Waratah Custom Units
Matthew Williams edited this page Dec 27, 2021
·
1 revision
All custom units are composed of unit-dimensions (i.e. other custom units and pre-defined-units). Pre-defined-units encompass the base-level primitive dimensions of common measurement systems (SI/Imperial).
Every dimension includes the unit name, a base-10 multiplier and an exponent.
[[unit]]
name = '...'
unitName = ['multiplier', 'exponent']Defines the unit meter, which is 100 centimeter. This is declared by name = meter, multipler = 100, exponent = 1.
[[unit]]
name = 'meter'
centimeter = [100.0, 1.0]Defines the unit newton, expressed in SI units as (kg ⋅ m ⋅ s⁻²).
This is declared by first defining two additional units (for convience and re-usability), kilogram and meter, then newton as combination of kilogram, meter and second
[[unit]]
name = 'kilogram'
gram = [1000.0, 1.0]
[[unit]]
name = 'meter'
centimeter = [100.0, 1.0]
[[unit]]
name = 'newton'
kilogram = [1.0, 1.0]
meter = [1.0, 1.0]
second = [1.0, -2.0]Defines the unit farad, expressed in SI units as (kg⁻¹ ⋅ m⁻² ⋅ s⁴ ⋅ A²)
[[unit]]
name = 'meter'
centimeter = [100.0, 1.0]
[[unit]]
name = 'kilogram'
gram = [1000.0, 1.0]
[[unit]]
name = 'farad'
kilogram = [1.0, -1.0]
meter = [1.0, -2.0]
second = [1.0, 4.0]
ampere = [1.0, 2.0]