packageConstants

Library of mathematical constants and constants of nature (e.g., pi, eps, R, sigma)

Extends from Modelica.Icons.Package (Icon for standard packages).

Information

This package provides often needed constants from mathematics, machine dependent constants and constants from nature. The latter constants (name, value, description) are from the following source (based on the second source):

Michael Stock, Richard Davis, Estefanía de Mirandés and Martin J T Milton:
The revision of the SI-the result of three decades of progress in metrology in Metrologia, Volume 56, Number 2. https://iopscience.iop.org/article/10.1088/1681-7575/ab0013/pdf, 2019.
D B Newell, F Cabiati, J Fischer, K Fujii, S G Karshenboim, H S Margolis , E de Mirandés, P J Mohr, F Nez, K Pachucki, T J Quinn, B N Taylor, M Wang, B M Wood and Z Zhang:
The CODATA 2017 values of h, e, k, and NA for the revision of the SI in Metrologia, Volume 55, Number 1. https://iopscience.iop.org/article/10.1088/1681-7575/aa950a/pdf, 2017.

BIPM is Bureau International des Poids et Mesures (they publish the SI-standard).

CODATA is the Committee on Data for Science and Technology.

Main Author:
Martin Otter
Deutsches Zentrum für Luft- und Raumfahrt (DLR)
Institut für Systemdynamik und Regelungstechnik (SR)
Münchener Straße 20
D-82234 Weßling
Germany
email: Martin.Otter@dlr.de

Copyright © 1998-2025, Modelica Association and contributors

Parameters

TypeNameDefaultDescription
RealeModelica.Math.exp(1.0)
Realpi2*Modelica.Math.asin(1.0)
RealD2Rpi/180Degree to Radian
RealR2D180/piRadian to Degree
Realgamma0.57721566490153286061See http://en.wikipedia.org/wiki/Euler_constant
RealepsModelicaServices.Machine.epsThe difference between 1 and the least value greater than 1 that is representable in the given floating point type
RealsmallModelicaServices.Machine.smallMinimum normalized positive floating-point number
RealinfModelicaServices.Machine.infMaximum representable finite floating-point number
IntegerInteger_infModelicaServices.Machine.Integer_infBiggest Integer number such that Integer_inf and -Integer_inf are representable on the machine
SI.Velocityc299792458Speed of light in vacuum
SI.Accelerationg_n9.80665Standard acceleration of gravity on earth
RealG6.67430e-11Newtonian constant of gravitation
SI.ElectricChargeq1.602176634e-19Elementary charge
SI.FaradayConstantFq*N_AFaraday constant, C/mol
Realh6.62607015e-34Planck constant
Realk1.380649e-23Boltzmann constant
RealRk*N_AMolar gas constant
Realsigma2*pi^5*k^4/(15*h^3*c^2)Stefan-Boltzmann constant
RealN_A6.02214076e23Avogadro constant
SI.Permeabilitymu_01.25663706212e-6Magnetic constant
Realepsilon_01/(mu_0*c*c)Electric constant
NonSI.Temperature_degCT_zero-273.15Absolute zero temperature

Revisions

  • Dec 4, 2019 by Thomas Beutlich:
    Constant G updated according to 2018 CODATA value.
  • Mar 25, 2019 by Hans Olsson:
    Constants updated according to 2017 CODATA values and new SI-standard.
  • Nov 4, 2015 by Thomas Beutlich:
    Constants updated according to 2014 CODATA values.
  • Nov 8, 2004 by Christian Schweiger:
    Constants updated according to 2002 CODATA values.
  • Dec 9, 1999 by Martin Otter:
    Constants updated according to 1998 CODATA values. Using names, values and description text from this source. Included magnetic and electric constant.
  • Sep 18, 1999 by Martin Otter:
    Constants eps, inf, small introduced.
  • Nov 15, 1997 by Martin Otter:
    Realized.