## FCSys.Units.Examples

Examples

### Information

Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).

### Package Content

Name | Description
--- | ---
Evaluate | Evaluate the values assigned to constants and units

## FCSys.Units.Examples.Evaluate

Evaluate the values assigned to constants and units

### Information

This model may be used to calculate the values of the constants and units.

For more information, please see the documentation for the Units package.

Extends from Modelica.Icons.Example (Icon for runnable examples).

### Modelica definition

    model Evaluate "Evaluate the values assigned to constants and units"
      extends Modelica.Icons.Example;

      // ------------------------------------------------------------------------
      // Mathematical constants

      final constant Q.Number pi=U.pi "pi";

      // ------------------------------------------------------------------------
      // Base physical constants and units

      final constant Q.Angle rad=U.rad "radian";
      final constant Q.Wavenumber R_inf=U.R_inf "Rydberg constant";
      final constant Q.Velocity c=U.c "speed of light in vacuum";
      final constant Q.MagneticFluxReciprocal k_J=U.k_J "Josephson constant";
      final constant Q.ResistanceElectrical R_K=U.R_K "von Klitzing constant";
      final constant Q.PowerRadiant 'cd'=U.'cd' "candela";
      final constant Q.Number k_F=U.k_F "Faraday constant";
      final constant Q.Number R=U.R "gas constant";

      // ------------------------------------------------------------------------
      // Empirical units

      final constant Q.Length m=U.m "meter";
      final constant Q.Time s=U.s "second";
      final constant Q.MagneticFlux Wb=U.Wb "weber";
      final constant Q.ConductanceElectrical S=U.S "siemen";
      final constant Q.Amount mol=U.mol "mole";
      final constant Q.Potential K=U.K "kelvin";

      // ------------------------------------------------------------------------
      // SI prefixes [BIPM2006, Table 5]

      final constant Q.Number yotta=U.yotta "yotta (Y)";
      final constant Q.Number zetta=U.zetta "zetta (Z)";
      final constant Q.Number exa=U.exa "exa (E)";
      final constant Q.Number peta=U.peta "peta (P)";
      final constant Q.Number tera=U.tera "tera (T)";
      final constant Q.Number giga=U.giga "giga (G)";
      final constant Q.Number mega=U.mega "mega (M)";
      final constant Q.Number kilo=U.kilo "kilo (k)";
      final constant Q.Number hecto=U.hecto "hecto (h)";
      final constant Q.Number deca=U.deca "deca (da)";
      final constant Q.Number deci=U.deci "deci (d)";
      final constant Q.Number centi=U.centi "centi (c)";
      final constant Q.Number milli=U.milli "milli (m)";
      final constant Q.Number micro=U.micro "micro (u)";
      final constant Q.Number nano=U.nano "nano (n)";
      final constant Q.Number pico=U.pico "pico (p)";
      final constant Q.Number femto=U.femto "femto (f)";
      final constant Q.Number atto=U.atto "atto (a)";
      final constant Q.Number zepto=U.zepto "zepto (z)";
      final constant Q.Number yocto=U.yocto "yocto (y)";

      // ------------------------------------------------------------------------
      // SI base units [BIPM2006, Table 1] and intermediate units

      final constant Q.Potential V=U.V "volt";
      final constant Q.Current A=U.A "ampere";
      final constant Q.Amount C=U.C "coulomb";
      final constant Q.Energy J=U.J "joule";
      final constant Q.Velocity2 Sv=U.Sv "sievert";
      final constant Q.Mass kg=U.kg "kilogram ";

      // ------------------------------------------------------------------------
      // Coherent derived units in SI with special names and symbols [BIPM2006,
      // Table 3]

      final constant Q.Angle cyc=U.cyc "cycle";
      final constant Q.Frequency Hz=U.Hz "hertz";
      final constant Q.Angle2 sr=U.sr "steradian";
      final constant Q.Force N=U.N "newton";
      final constant Q.Pressure Pa=U.Pa "pascal";
      final constant Q.Power W=U.W "watt";
      final constant Q.Capacitance F=U.F "farad";
      final constant Q.ResistanceElectrical ohm=U.ohm "ohm (Omega)";
      final constant Q.Inductance H=U.H "henry";
      final constant Q.MagneticFluxAreic T=U.T "tesla";
      final constant Q.Power lm=U.lm "lumen";
      final constant Q.PowerAreic lx=U.lx "lux";
      final constant Q.Frequency Bq=U.Bq "becquerel";
      final constant Q.Velocity2 Gy=U.Gy "gray";
      final constant Q.Current kat=U.kat "katal";
      final constant Q.Mass g=U.g "gram";

      // ------------------------------------------------------------------------
      // Non-SI units accepted for use with SI units [BIPM2006, Table 6].

      final constant Q.Time min=U.min "minute";
      final constant Q.Time hr=U.hr "hour";
      final constant Q.Time day=U.day "day";
      final constant Q.Angle degree=U.degree "degree";
      final constant Q.Volume L=U.L "liter (L or l)";

      // ------------------------------------------------------------------------
      // Physical constants

      // Electromagnetism
      final constant Q.ConductanceElectrical G_0=U.G_0 "conductance quantum";
      final constant Q.MagneticFlux Phi_0=U.Phi_0 "magnetic flux quantum";
      final constant Q.Amount q=U.q "elementary charge";
      final constant Q.MomentumRotational h=U.h "Planck constant";
      final constant Q.Number alpha=U.alpha "fine-structure constant";
      final constant Q.ResistanceElectrical Z_0=U.Z_0
        "characteristic impedance of vacuum";
      final constant Q.Permeability mu_0=U.mu_0 "magnetic constant";
      final constant Q.Permittivity epsilon_0=U.epsilon_0 "electric constant";
      final constant Q.Permeability k_A=U.k_A "magnetic force constant";
      final constant Q.PermittivityReciprocal k_e=U.k_e "Coulomb constant";
      final constant Q.Energy E_h=U.E_h "Hartree energy";
      final constant Q.Energy eV=U.eV "electron volt";

      // Electrochemistry
      final constant Q.AmountReciprocal N_A=U.N_A "Avogadro constant";

      // Thermal physics
      final constant Q.Amount k_B=U.k_B "Boltzmann constant";
      final constant Q.PowerArea c_1=U.c_1 "first radiation constant";
      final constant Q.PotentialPerWavenumber c_2=U.c_2 "second radiation constant";
      final constant Q.PotentialPerWavenumber c_3_f=U.c_3_f
        "Wien frequency displacement law constant";
      final constant Q.MagneticFluxReciprocal c_3_lambda=U.c_3_lambda
        "Wien wavelength displacement law constant";
      final constant Q.PowerAreicPerPotential4 sigma=U.sigma
        "Stefan-Boltzmann constant";

      // ------------------------------------------------------------------------
      // Selected other non-SI units from [BIPM2006, Table 8]

      final constant Q.Pressure bar=U.bar "bar";
      final constant Q.Length angstrom=U.angstrom "angstrom";

      // ------------------------------------------------------------------------
      // Additional units that are useful for fuel cells

      final constant Q.Pressure atm=U.atm "atmosphere";
      final constant Q.Pressure kPa=U.kPa "kilopascal";
      final constant Q.Energy kJ=U.kJ "kilojoule";
      final constant Q.Length cm=U.cm "centimeter";
      final constant Q.Length mm=U.mm "millimeter";
      final constant Q.Number '%'=U.'%' "percent";
      final constant Q.Density M=U.M "molar";
      final constant Q.Volume cc=U.cc "cubic centimeter";

    end Evaluate;