Physical Structure |
Namespace: Imsl.Math
The Physical type exposes the following members.
Name | Description | |
---|---|---|
Physical(Double, String) |
Constructs a new Physical object and initializes this object
to a double value.
| |
Physical(Double, Int32, Int32, Int32, Int32, Int32) |
Constructs a new Physical object and initializes this object
to a double value along with int values for length,
mass, time, current, and temperature.
|
Name | Description | |
---|---|---|
Add |
Adds two compatible Physical objects.
| |
CheckCompatibility |
Checks the compatibility of two Physical objects.
| |
Constant(String) |
Returns the value of a constant, given its name.
| |
Constant(String, String) |
Returns the value of a constant, given its name, in the specified
units.
| |
Convert |
Converts a value to a different set of units.
| |
DefineConstant |
Defines a new constant.
| |
DefinePrefix |
Defines a new prefix.
| |
DefineUnit |
Defines a new unit.
| |
Divide(Double, Physical) |
Divides a double by a Physical object.
| |
Divide(Physical, Physical) |
Divides two Physical objects.
| |
Divide(Physical, Double) |
Divides a Physical object by a double.
| |
DoubleValue |
Returns the value of this dimensionless object.
| |
Equals(Object) |
Returns true if x equals this value.
(Overrides ValueTypeEquals(Object).) | |
Equals(Physical, Physical) |
Returns true if x and y are equal.
| |
GetHashCode |
Serves as a hash function for a particular type, suitable for use in
hashing algorithms and data structures like a hash table.
(Overrides ValueTypeGetHashCode.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Multiply(Double, Physical) |
Multiply a double and a Physical object.
| |
Multiply(Physical, Physical) |
Multiply two Physical objects.
| |
Multiply(Physical, Double) |
Multiply a Physical object and a double.
| |
Negate |
Negate a Physical object.
| |
Subtract |
Subtract two compatible Physical objects.
| |
ToString |
Returns a String containing the value and units, if any.
(Overrides ValueTypeToString.) | |
UnitsString |
Returns a String containing the units only.
|
Name | Description | |
---|---|---|
Addition |
Add two compatible Physical objects.
| |
Division(Double, Physical) |
Divide a double by a Physical object.
| |
Division(Physical, Physical) |
Divide two Physical objects.
| |
Division(Physical, Double) |
Divide a Physical object by a double.
| |
Equality |
Returns true if x and y are equal.
| |
(Physical to Double) |
Returns the value of this dimensionless object.
| |
Inequality |
Returns true if x and y are not equal.
| |
Multiply(Double, Physical) |
Multiply a double and a Physical object
| |
Multiply(Physical, Physical) |
Multiply two Physical objects.
| |
Multiply(Physical, Double) |
Multiply a Physical object and a double.
| |
Subtraction |
Subtract two compatible Physical objects.
| |
UnaryNegation |
Negate a Physical object.
|
The case of the String specifying the name of the physical constant does not matter. The names 'PI', 'Pi', 'pI' and 'pi' are equivalent.
The units of the physical constants are in SI units, (meter-kilogram-second).
The names allowed are as follows:
Name | Description | Value | Reference |
---|---|---|---|
AMU | Atomic mass unit | 1.6605402E-27 kg | [1] |
ATM | Standard atm pressure | 1.01325E+5 | E[2] |
AU | Astronomical unit | 1.496E+11 m | [ ] |
Avogadro | Avogadro's number | 6.0221367E+23 1/mole | [1] |
Boltzman | Boltzman's constant | 1.380658E-23 J/K | [1] |
C | Speed of light | 2.997924580E+8 m/s | E[1] |
Catalan | Catalan's constant | 0.915965... | E[3] |
E | Base of natural logs | 2.718... | E[3] |
ElectronCharge | Electron change | 1.60217733E-19 C | [1] |
ElectronMass | Electron mass | 9.1093897E-31 kg | [1] |
ElectronVolt | Electron volt | 1.60217733E-19 J | [1] |
Euler | Euler's constant gamma | 0.577... | E[3] |
Faraday | Faraday constant | 9.6485309E+4 C/mole | [1] |
FineStructure | Fine structure | 7.29735308E-3 | [1] |
Gamma | Euler's constant | 0.577... | E[3] |
Gas | Gas constant | 8.314510 J/mole/K | [1] |
Gravity | Gravitational constant | 6.67259E-11 | [1] |
Hbar | Planck constant / 2 pi | 1.05457266E-34 J*s | [1] |
PerfectGasVolume | Std vol ideal gas | 2.241383E-2 | [*] |
Pi | Pi | 3.141... | E[3] |
Planck | Planck's constant h | 6.6260755E-34 J*s | [1] |
ProtonMass | Proton mass | 1.6726231E-27 kg | [1] |
Rydberg | Rydberg's constant | 1.0973731534E+7 /m | [1] |
SpeedLight | Speed of light | 2.997924580E+8 m/s | E[1] |
StandardGravity | Standard g | 9.80665 | E[2] |
StandardPressure | Standard atm pressure | 1.01325E+5 | E[2] |
StefanBoltzmann | Stefan-Boltzman | 5.67051E-8 | [1] |
WaterTriple | Triple point of water | 2.7316E+2 K | E[2] |
The reference for constants are indicated by the code in the [] comment above.
[1] | Cohen and Taylor (1986) |
[2] | Liepman (1964) |
[3] | Precomputed mathematical constants |
The constants marked with an E before the [] are exact (to machine precision).
Units strings have the form U1*U2*...*Um/V1/.../Vn, where Ui and Vi are the names of basic units or are the names of basic units raised to a power. Examples are, 'METER*KILOGRAM/SECOND', 'M*KG/S', 'METER', or ''. These strings are case insensitive.
The basic unit names allowed are as follows.
Units of time
day, hour = hr, min = minute, s = sec = second, year
Units of frequency
Hertz = Hz
Units of mass
AMU, g = gram, lb = pound, ounce = oz, slug
Units of distance
Angstrom, AU, ft = feet = foot, in = inch, m = meter = metre, micron, mile, mill, parsec, yard
Units of area
acre
Units of volume
l = liter = litre
Units of force
dyne, N = Newton, poundal
Units of energy
BTU(thermochemical), Erg, J = Joule
Units of work
W = watt
Units of pressure
ATM = atomosphere, bar, Pascal
Units of temperature
degC = Celsius, degF = Fahrenheit, degK = Kelvin
Units of viscosity
poise, stoke
Units of charge
Abcoulomb, C = Coulomb, statcoulomb
Units of current
A = ampere, abampere, statampere
Units of voltage
Abvolt, V = volt
Units of magnetic induction
T = Tesla, Wb = Weber
Other units
1, farad, mole, Gauss, Henry, Maxwell, Ohm
The following metric prefixes may be used with the above units. Note that the one or two letter prefixes may only be used with one letter unit abbreviations.
A = atto = 1.E-18
F = femto = 1.E-15
P = pico = 1.E-12
N = nano = 1.E-9
U = micro = 1.E-6
M = milli = 1.E-3
C = centi = 1.E-2
D = deci = 1.E-1
DK = deca = 1.E+1
K = kilo = 1.E+3
myria = 1.E+4 (no single letter prefix; M means milli)
mega = 1.E+6 (no single letter prefix; M means milli)
G = giga = 1.E+9
T = tera = 1.E+12