1 package org.djunits.value.vfloat.scalar.base; 2 3 import org.djunits.unit.DimensionlessUnit; 4 import org.djunits.unit.ElectricalChargeUnit; 5 import org.djunits.value.vdouble.scalar.ElectricalCharge; 6 import org.djunits.value.vfloat.scalar.FloatDimensionless; 7 import org.djunits.value.vfloat.scalar.FloatElectricalCharge; 8 import org.djunits.value.vfloat.scalar.FloatFrequency; 9 import org.djunits.value.vfloat.scalar.FloatMass; 10 import org.djunits.value.vfloat.scalar.FloatSIScalar; 11 import org.djunits.value.vfloat.scalar.FloatSpeed; 12 13 /** 14 * Various physical constants. For many, see 15 * <a href="https://en.wikipedia.org/wiki/2019_redefinition_of_the_SI_base_units">Wikipedia 2019 redefinition of the SI base 16 * units</a> 17 * @author <a href="https://www.tudelft.nl/staff/p.knoppers">Peter Knoppers</a> 18 */ 19 public final class FloatConstants 20 { 21 /** Utility class. */ 22 private FloatConstants() 23 { 24 // utility class 25 } 26 27 /** 28 * Number of constituent particles in a Mole; a.k.a. Avogadro's number. This value is exact since the 2019 redefinition of 29 * the SI base units. 30 */ 31 public static final FloatSIScalar AVOGADRO = FloatSIScalar.of(6.02214076e23f, "1/mol"); 32 33 /** 34 * Boltzmann constant in Joule per Kelvin (this value is exact since the 2019 redefinition of SI base units). See 35 * <a href="https://en.wikipedia.org/wiki/Boltzmann_constant">Wikipedia: Boltzmann constant</a> 36 */ 37 public static final FloatSIScalar BOLTZMANN = FloatSIScalar.of(1.380649e-23f, "kgm2/s2K"); 38 39 /** 40 * The Cesium 133 ground state hyperfine structure transition frequency. This value is exact since the 2006 redefinition of 41 * the SI base units. 42 */ 43 public static final FloatFrequency CESIUM133_FREQUENCY = FloatFrequency.of(9192631770f, "1/s"); 44 45 /** Electrical charge of one electron. This value is exact since the 2019 redefinition of the SI base units. */ 46 public static final FloatElectricalCharge ELECTRONCHARGE = new FloatElectricalCharge(-1.0f, ElectricalChargeUnit.ATOMIC_UNIT); 47 48 /** 49 * Mass of an electron. See <a href="https://en.wikipedia.org/wiki/Physical_constant">Wikipedia Physical constant</a>. This 50 * value of this physical constant has an uncertainty of 2.8e-40 kg. 51 */ 52 public static final FloatMass ELECTRONMASS = FloatMass.of(9.1093837015e-31f, "kg"); 53 54 /** ElectricalCharge of one proton. */ 55 public static final ElectricalCharge PROTONCHARGE = new ElectricalCharge(1, ElectricalChargeUnit.ATOMIC_UNIT); 56 57 /** 58 * Mass of a neutron. See <a href="https://en.wikipedia.org/wiki/List_of_physical_constants">Wikipedia List of physical 59 * constants</a>. This value of this physical constant has an uncertainty of 9.5e-37 kg. 60 */ 61 public static final FloatMass NEUTRONMASS = FloatMass.of(1.6749274714e-27f, "kg"); 62 63 /** 64 * Mass of a proton. See <a href="https://en.wikipedia.org/wiki/Physical_constant">Wikipedia Physical constant</a>. This 65 * value of this physical constant has an uncertainty of 5.1e-37. 66 */ 67 public static final FloatMass PROTONMASS = FloatMass.of(1.67262192369e-27f, "kg"); 68 69 /** 70 * Gravitational constant, a.k.a. Newtonian constant of gravitation. This is the 2018 best known approximation, which has an 71 * uncertainty 1.5e-15 m^3/kgs^2 72 */ 73 public static final FloatSIScalar G = FloatSIScalar.of(6.67430e-11f, "m3/kgs2"); 74 75 /** Speed of light in vacuum. This value is exact (since the 2006 redefinition of the SI base units). */ 76 public static final FloatSpeed LIGHTSPEED = FloatSpeed.of(299792458f, "m/s"); 77 78 /** 79 * Permeability of vacuum. See <a href="https://en.wikipedia.org/wiki/Vacuum_permeability">Wikipedia, Vacuum 80 * permeability</a>. The uncertainty of this value is 1.9e-16N/A^2. 81 */ 82 public static final FloatSIScalar VACUUMPERMEABILITY = FloatSIScalar.of(1.25663706212e-6f, "kgm/s2A2"); 83 84 /** 85 * Permittivity of vacuum. See <a href="https://en.wikipedia.org/wiki/Vacuum_permittivity">Wikipedia Vacuum 86 * permittivity</a>. The uncertainty of this value is 1.3e-21 F/m. 87 */ 88 public static final FloatSIScalar VACUUMPERMITTIVITY = FloatSIScalar.of(8.8541878128e-12f, "s4A2/kgm3"); 89 90 /** Impedance of vacuum. */ 91 public static final FloatSIScalar VACUUMIMPEDANCE = VACUUMPERMEABILITY.times(LIGHTSPEED); 92 93 /** 94 * Planck constant; ratio of a photon's energy and its frequency. This value is exact since the 2019 redefinition of the SI 95 * base units. 96 */ 97 public static final FloatSIScalar PLANCK = FloatSIScalar.of(6.62607015e-34f, "kgm2/s"); 98 99 /** 100 * The luminous efficacy Kcd of monochromatic radiation of frequency 540×10^12 Hz (540 THz). This is the frequency of a 101 * green-colored light at approximately the peak sensitivity of the human eye. This value is exact since the 2006 102 * redefinition of the SI base units. 103 */ 104 public static final FloatSIScalar LUMINOUS_EFFICACY_540THZ = FloatSIScalar.of(683f, "cdsrs3/kg"); 105 106 /** Ratio of a half circumference of a circle and its radius. */ 107 public static final FloatDimensionless PI = new FloatDimensionless(Math.PI, DimensionlessUnit.SI); 108 109 /** Ratio of circumference of circle and its radius. */ 110 public static final FloatDimensionless TAU = new FloatDimensionless(Math.PI * 2, DimensionlessUnit.SI); 111 112 /** Euler's constant. */ 113 public static final FloatDimensionless E = new FloatDimensionless(Math.E, DimensionlessUnit.SI); 114 115 /** Golden ratio. */ 116 public static final FloatDimensionless PHI = new FloatDimensionless(0.5 + 0.5 * Math.sqrt(5.0), DimensionlessUnit.SI); 117 118 119 /** Reduced Planck constant, a.k.a. angular Planck constant; Planck constant divided by 2 pi. */ 120 public static final FloatSIScalar PLANCKREDUCED = PLANCK.divide(TAU); 121 122 }