Copyright | Copyright (C) 2006-2018 Bjorn Buckwalter |
---|---|
License | BSD3 |
Maintainer | bjorn@buckwalter.se |
Stability | Stable |
Portability | GHC only |
Safe Haskell | None |
Language | Haskell2010 |
Extensions | DataKinds |
Summary
This module defines type synonyms for common dimensionalities and the associated quantity types. Additional dimensionalities and quantity types will be added on an as-needed basis.
The definitions in this module are grouped so that a type synonym for the dimensionality is defined first in terms of base dimension exponents. Then a type synonym for the corresponding quantity type is defined. If there are several quantity types with the same dimensionality type synonyms are provided for each quantity type.
References
Synopsis
- type Area = Quantity DArea
- type Volume = Quantity DVolume
- type Velocity = Quantity DVelocity
- type Acceleration = Quantity DAcceleration
- type WaveNumber = Quantity DWaveNumber
- type MassDensity = Quantity DMassDensity
- type Density = MassDensity
- type SpecificVolume = Quantity DSpecificVolume
- type CurrentDensity = Quantity DCurrentDensity
- type MagneticFieldStrength = Quantity DMagneticFieldStrength
- type AmountOfSubstanceConcentration = Quantity DAmountOfSubstanceConcentration
- type Concentration = AmountOfSubstanceConcentration
- type Luminance = Quantity DLuminance
- type PlaneAngle = Dimensionless
- type SolidAngle = Dimensionless
- type Frequency = Quantity DFrequency
- type Force = Quantity DForce
- type Pressure = Quantity DPressure
- type Stress = Quantity DStress
- type Energy = Quantity DEnergy
- type Work = Quantity DWork
- type QuantityOfHeat = Quantity DQuantityOfHeat
- type Power = Quantity DPower
- type RadiantFlux = Quantity DRadiantFlux
- type ElectricCharge = Quantity DElectricCharge
- type QuantityOfElectricity = Quantity DQuantityOfElectricity
- type ElectricPotential = Quantity DElectricPotential
- type PotentialDifference = Quantity DPotentialDifference
- type ElectromotiveForce = Quantity DElectromotiveForce
- type Capacitance = Quantity DCapacitance
- type ElectricResistance = Quantity DElectricResistance
- type ElectricConductance = Quantity DElectricConductance
- type MagneticFlux = Quantity DMagneticFlux
- type MagneticFluxDensity = Quantity DMagneticFluxDensity
- type Inductance = Quantity DInductance
- type LuminousFlux = Quantity DLuminousFlux
- type Illuminance = Quantity DIlluminance
- type CelsiusTemperature = Quantity DCelsiusTemperature
- type Activity = Quantity DActivity
- type AbsorbedDose = Quantity DAbsorbedDose
- type SpecificEnergy = Quantity DSpecificEnergy
- type Kerma = Quantity DKerma
- type DoseEquivalent = Quantity DDoseEquivalent
- type AmbientDoseEquivalent = DoseEquivalent
- type DirectionalDoseEquivalent = DoseEquivalent
- type PersonalDoseEquivalent = DoseEquivalent
- type EquivalentDose = DoseEquivalent
- type CatalyticActivity = Quantity DCatalyticActivity
- type AngularVelocity = Quantity DAngularVelocity
- type AngularAcceleration = Quantity DAngularAcceleration
- type DynamicViscosity = Quantity DDynamicViscosity
- type MomentOfForce = Quantity DMomentOfForce
- type SurfaceTension = Quantity DSurfaceTension
- type HeatFluxDensity = Quantity DHeatFluxDensity
- type Irradiance = Quantity DIrradiance
- type RadiantIntensity = Quantity DRadiantIntensity
- type Radiance = Quantity DRadiance
- type HeatCapacity = Quantity DHeatCapacity
- type Entropy = Quantity DEntropy
- type SpecificHeatCapacity = Quantity DSpecificHeatCapacity
- type SpecificEntropy = Quantity DSpecificEntropy
- type ThermalConductivity = Quantity DThermalConductivity
- type EnergyDensity = Quantity DEnergyDensity
- type ElectricFieldStrength = Quantity DElectricFieldStrength
- type ElectricChargeDensity = Quantity DElectricChargeDensity
- type ElectricFluxDensity = Quantity DElectricFluxDensity
- type Permittivity = Quantity DPermittivity
- type Permeability = Quantity DPermeability
- type MolarEnergy = Quantity DMolarEnergy
- type MolarEntropy = Quantity DMolarEntropy
- type MolarHeatCapacity = Quantity DMolarHeatCapacity
- type Exposure = Quantity DExposure
- type AbsorbedDoseRate = Quantity DAbsorbedDoseRate
- type Impulse = Quantity DImpulse
- type Momentum = Quantity DMomentum
- type MassFlow = Quantity DMassFlow
- type VolumeFlow = Quantity DVolumeFlow
- type GravitationalParameter = Quantity DGravitationalParameter
- type KinematicViscosity = Quantity DKinematicViscosity
- type FirstMassMoment = Quantity DFirstMassMoment
- type MomentOfInertia = Quantity DMomentOfInertia
- type AngularMomentum = Quantity DAngularMomentum
- type ThermalResistivity = Quantity DThermalResistivity
- type ThermalConductance = Quantity DThermalConductance
- type ThermalResistance = Quantity DThermalResistance
- type HeatTransferCoefficient = Quantity DHeatTransferCoefficient
- type ThermalAdmittance = HeatTransferCoefficient
- type ThermalInsulance = Quantity DThermalInsulance
- type Jerk = Quantity DJerk
- type Angle = PlaneAngle
- type Thrust = Force
- type Torque = MomentOfForce
- type EnergyPerUnitMass = SpecificEnergy
- square :: (Fractional a, Typeable m) => Unit m DLength a -> Unit NonMetric DArea a
- cubic :: (Fractional a, Typeable m) => Unit m DLength a -> Unit NonMetric DVolume a
- type DArea = Dim Pos2 Zero Zero Zero Zero Zero Zero
- type DVolume = Dim Pos3 Zero Zero Zero Zero Zero Zero
- type DVelocity = Dim Pos1 Zero Neg1 Zero Zero Zero Zero
- type DAcceleration = Dim Pos1 Zero Neg2 Zero Zero Zero Zero
- type DWaveNumber = Dim Neg1 Zero Zero Zero Zero Zero Zero
- type DMassDensity = Dim Neg3 Pos1 Zero Zero Zero Zero Zero
- type DDensity = DMassDensity
- type DSpecificVolume = Dim Pos3 Neg1 Zero Zero Zero Zero Zero
- type DCurrentDensity = Dim Neg2 Zero Zero Pos1 Zero Zero Zero
- type DMagneticFieldStrength = Dim Neg1 Zero Zero Pos1 Zero Zero Zero
- type DAmountOfSubstanceConcentration = Dim Neg3 Zero Zero Zero Zero Pos1 Zero
- type DConcentration = DAmountOfSubstanceConcentration
- type DLuminance = Dim Neg2 Zero Zero Zero Zero Zero Pos1
- type DPlaneAngle = DOne
- type DSolidAngle = DOne
- type DFrequency = Dim Zero Zero Neg1 Zero Zero Zero Zero
- type DForce = Dim Pos1 Pos1 Neg2 Zero Zero Zero Zero
- type DPressure = Dim Neg1 Pos1 Neg2 Zero Zero Zero Zero
- type DStress = DPressure
- type DEnergy = Dim Pos2 Pos1 Neg2 Zero Zero Zero Zero
- type DWork = DEnergy
- type DQuantityOfHeat = DEnergy
- type DPower = Dim Pos2 Pos1 Neg3 Zero Zero Zero Zero
- type DRadiantFlux = DPower
- type DElectricCharge = Dim Zero Zero Pos1 Pos1 Zero Zero Zero
- type DQuantityOfElectricity = DElectricCharge
- type DElectricPotential = Dim Pos2 Pos1 Neg3 Neg1 Zero Zero Zero
- type DPotentialDifference = DElectricPotential
- type DElectromotiveForce = DElectricPotential
- type DCapacitance = Dim Neg2 Neg1 Pos4 Pos2 Zero Zero Zero
- type DElectricResistance = Dim Pos2 Pos1 Neg3 Neg2 Zero Zero Zero
- type DElectricConductance = Dim Neg2 Neg1 Pos3 Pos2 Zero Zero Zero
- type DMagneticFlux = Dim Pos2 Pos1 Neg2 Neg1 Zero Zero Zero
- type DMagneticFluxDensity = Dim Zero Pos1 Neg2 Neg1 Zero Zero Zero
- type DInductance = Dim Pos2 Pos1 Neg2 Neg2 Zero Zero Zero
- type DLuminousFlux = DLuminousIntensity
- type DIlluminance = Dim Neg2 Zero Zero Zero Zero Zero Pos1
- type DCelsiusTemperature = DThermodynamicTemperature
- type DActivity = DFrequency
- type DAbsorbedDose = Dim Pos2 Zero Neg2 Zero Zero Zero Zero
- type DSpecificEnergy = DAbsorbedDose
- type DKerma = DAbsorbedDose
- type DDoseEquivalent = DAbsorbedDose
- type DAmbientDoseEquivalent = DDoseEquivalent
- type DDirectionalDoseEquivalent = DDoseEquivalent
- type DPersonalDoseEquivalent = DDoseEquivalent
- type DEquivalentDose = DDoseEquivalent
- type DCatalyticActivity = Dim Zero Zero Neg1 Zero Zero Pos1 Zero
- type DAngularVelocity = DFrequency
- type DAngularAcceleration = Dim Zero Zero Neg2 Zero Zero Zero Zero
- type DDynamicViscosity = Dim Neg1 Pos1 Neg1 Zero Zero Zero Zero
- type DMomentOfForce = DEnergy
- type DSurfaceTension = Dim Zero Pos1 Neg2 Zero Zero Zero Zero
- type DHeatFluxDensity = Dim Zero Pos1 Neg3 Zero Zero Zero Zero
- type DIrradiance = DHeatFluxDensity
- type DRadiantIntensity = DPower
- type DRadiance = DIrradiance
- type DHeatCapacity = Dim Pos2 Pos1 Neg2 Zero Neg1 Zero Zero
- type DEntropy = DHeatCapacity
- type DSpecificHeatCapacity = Dim Pos2 Zero Neg2 Zero Neg1 Zero Zero
- type DSpecificEntropy = DSpecificHeatCapacity
- type DThermalConductivity = Dim Pos1 Pos1 Neg3 Zero Neg1 Zero Zero
- type DEnergyDensity = DPressure
- type DElectricFieldStrength = Dim Pos1 Pos1 Neg3 Neg1 Zero Zero Zero
- type DElectricChargeDensity = Dim Neg3 Zero Pos1 Pos1 Zero Zero Zero
- type DElectricFluxDensity = Dim Neg2 Zero Pos1 Pos1 Zero Zero Zero
- type DPermittivity = Dim Neg3 Neg1 Pos4 Pos2 Zero Zero Zero
- type DPermeability = Dim Pos1 Pos1 Neg2 Neg2 Zero Zero Zero
- type DMolarEnergy = Dim Pos2 Pos1 Neg2 Zero Zero Neg1 Zero
- type DMolarEntropy = Dim Pos2 Pos1 Neg2 Zero Neg1 Neg1 Zero
- type DMolarHeatCapacity = DMolarEntropy
- type DExposure = Dim Zero Neg1 Pos1 Pos1 Zero Zero Zero
- type DAbsorbedDoseRate = Dim Pos2 Zero Neg3 Zero Zero Zero Zero
- type DImpulse = Dim Pos1 Pos1 Neg1 Zero Zero Zero Zero
- type DMomentum = DImpulse
- type DMassFlow = Dim Zero Pos1 Neg1 Zero Zero Zero Zero
- type DVolumeFlow = Dim Pos3 Zero Neg1 Zero Zero Zero Zero
- type DGravitationalParameter = Dim Pos3 Zero Neg2 Zero Zero Zero Zero
- type DKinematicViscosity = Dim Pos2 Zero Neg1 Zero Zero Zero Zero
- type DFirstMassMoment = Dim Pos1 Pos1 Zero Zero Zero Zero Zero
- type DMomentOfInertia = Dim Pos2 Pos1 Zero Zero Zero Zero Zero
- type DAngularMomentum = Dim Pos2 Pos1 Neg1 Zero Zero Zero Zero
- type DThermalResistivity = Dim Neg1 Neg1 Pos3 Zero Pos1 Zero Zero
- type DThermalConductance = Dim Pos2 Pos1 Neg3 Zero Neg1 Zero Zero
- type DThermalResistance = Dim Neg2 Neg1 Pos3 Zero Pos1 Zero Zero
- type DHeatTransferCoefficient = Dim Zero Pos1 Neg3 Zero Neg1 Zero Zero
- type DThermalAdmittance = DHeatTransferCoefficient
- type DThermalInsulance = Dim Zero Neg1 Pos3 Zero Pos1 Zero Zero
- type DJerk = Dim Pos1 Zero Neg3 Zero Zero Zero Zero
- type DAngle = DPlaneAngle
- type DThrust = DForce
- type DTorque = DMomentOfForce
- type DEnergyPerUnitMass = DSpecificEnergy
Quantities from the NIST Guide
The following quantities are all from the NIST publication "Guide for the Use of the International System of Units (SI)" [1]. Any chapters, sections or tables referenced are from [1] unless otherwise specified.
For lack of better organization we provide definitions grouped by table in [1].
Table 2
"Examples of SI derived units expressed in terms of SI base units."
type Acceleration = Quantity DAcceleration Source #
type WaveNumber = Quantity DWaveNumber Source #
type MassDensity = Quantity DMassDensity Source #
type Density = MassDensity Source #
type SpecificVolume = Quantity DSpecificVolume Source #
type CurrentDensity = Quantity DCurrentDensity Source #
type Luminance = Quantity DLuminance Source #
Table 3
SI coherent derived units with special names and symbols.
type PlaneAngle = Dimensionless Source #
type SolidAngle = Dimensionless Source #
type Frequency = Quantity DFrequency Source #
type QuantityOfHeat = Quantity DQuantityOfHeat Source #
type RadiantFlux = Quantity DRadiantFlux Source #
type ElectricCharge = Quantity DElectricCharge Source #
type Capacitance = Quantity DCapacitance Source #
type MagneticFlux = Quantity DMagneticFlux Source #
type Inductance = Quantity DInductance Source #
type LuminousFlux = Quantity DLuminousFlux Source #
type Illuminance = Quantity DIlluminance Source #
type AbsorbedDose = Quantity DAbsorbedDose Source #
type SpecificEnergy = Quantity DSpecificEnergy Source #
type DoseEquivalent = Quantity DDoseEquivalent Source #
type EquivalentDose = DoseEquivalent Source #
Table 4
"Examples of SI coherent derived units expressed with the aid of SI derived units having special names and symbols."
We use the same grouping as for table 2.
type MomentOfForce = Quantity DMomentOfForce Source #
type SurfaceTension = Quantity DSurfaceTension Source #
type Irradiance = Quantity DIrradiance Source #
type HeatCapacity = Quantity DHeatCapacity Source #
type EnergyDensity = Quantity DEnergyDensity Source #
type Permittivity = Quantity DPermittivity Source #
type Permeability = Quantity DPermeability Source #
type MolarEnergy = Quantity DMolarEnergy Source #
type MolarEntropy = Quantity DMolarEntropy Source #
Quantities not from the NIST Guide
Here we define additional quantities on an as-needed basis. We also provide some synonyms that we anticipate will be useful.
type VolumeFlow = Quantity DVolumeFlow Source #
type Angle = PlaneAngle Source #
type Torque = MomentOfForce Source #
type EnergyPerUnitMass = SpecificEnergy Source #
Powers of Unit Lengths
It is permissible to express powers of length units by prefixing
square
and cubic
(see section 9.6 "Spelling unit names raised
to powers" of [1]).
These definitions may seem slightly out of place but these is no
obvious place where they should be. Here they are at least close
to the definitions of DArea
and DVolume
.
square :: (Fractional a, Typeable m) => Unit m DLength a -> Unit NonMetric DArea a Source #
Constructs a unit of area from a unit of length, taking the area of a square whose sides are that length.
>>>
64 *~ square meter == (8 *~ meter) ^ pos2
True
cubic :: (Fractional a, Typeable m) => Unit m DLength a -> Unit NonMetric DVolume a Source #
Constructs a unit of volume from a unit of length, taking the volume of a cube whose sides are that length.
>>>
64 *~ cubic meter == (4 *~ meter) ^ pos3
True
Dimension Aliases
For each Quantity
alias supplied above, we also supply a corresponding Dimension
alias.
These dimension aliases may be convenient for supplying type signatures for Unit
s or for other type-level dimensional programming.
type DDensity = DMassDensity Source #
type DPlaneAngle = DOne Source #
type DSolidAngle = DOne Source #
type DQuantityOfHeat = DEnergy Source #
type DRadiantFlux = DPower Source #
type DLuminousFlux = DLuminousIntensity Source #
type DActivity = DFrequency Source #
type DSpecificEnergy = DAbsorbedDose Source #
type DKerma = DAbsorbedDose Source #
type DDoseEquivalent = DAbsorbedDose Source #
type DEquivalentDose = DDoseEquivalent Source #
type DAngularVelocity = DFrequency Source #
type DMomentOfForce = DEnergy Source #
type DIrradiance = DHeatFluxDensity Source #
type DRadiantIntensity = DPower Source #
type DRadiance = DIrradiance Source #
type DEntropy = DHeatCapacity Source #
type DEnergyDensity = DPressure Source #
type DMolarHeatCapacity = DMolarEntropy Source #
type DAngle = DPlaneAngle Source #
type DTorque = DMomentOfForce Source #
type DEnergyPerUnitMass = DSpecificEnergy Source #