SciPy Constant
The scipy.constant package is available with a wide range of constants, which is used extensively in the scientific field. There are various physical, mathematical constants and units that we can import the required constants and use them as per needed.
List of Mathematical constant
The scipy.constant provides the following list of mathematical constants.
Sr. No. | Constants | Description |
---|---|---|
1. | pi | pi |
2. | golden | Golden ratio |
Consider the following example of scipy.constant. Here we compare the ‘pi’ value by importing different modules.
Output:
The above code will give the following output. As we can observe that both values are same.
sciPy - pi Value = 3.141592653589793116 math - pi Value = 3.141592653589793116
Physical Constants
The scipy.constant package provides the number of physical constants. The most commonly used physical constants are the following:
Sr. No. | Physical Constants | Description |
---|---|---|
1. | c | Speed of light in vaccum |
2. | speed_of_light | Speed of light in vaccum |
3. | G | Standard acceleration of gravity |
4. | G | Newton Constant of gravitation |
5. | E | Elementry charge |
6. | R | Molar gas constant |
7. | Alpha | Fine-structure constant |
8. | N_A | Avagadro constant |
9. | K | Boltzmann constant |
10 | Sigma | Stefan-Boltzmann constant σ |
11. | m_e | Electron mass |
12. | m_p | Proton mass |
13. | m_n | Neutron Mass |
14. | H | Plank Constant |
15. | Plank constant | Plank constant h |
Other important Constant
It is difficult to remember all units; the few essential constants are listed below:
Sr. No. | Units | Value |
---|---|---|
1. | Mass | |
Gram | One gram in Kilogram. | |
Grain | One grain in Kilogram. | |
Pound | One Pound in Kilogram. | |
Ounce | One Ounce in Kilogram. | |
automic_mass | Atomics mass constant in Kilogram. | |
2. | Time | |
Minute | One minute in seconds. | |
Hour | One hour in seconds. | |
Day | One day in seconds. | |
Year | One year in seconds. | |
3. | Length | |
Inch | One inch in meters. | |
Foot | One foot in meters. | |
Yard | One yard in meters. | |
Pt | One point in meters. | |
Micron | One Micron in meters. | |
4. | Pressure | |
Atm | The standard atmosphere in pascals. | |
Atmosphere | The standard atmosphere in pascals. | |
Bar | One bar in Pascals. | |
Torr | One torr(mmHg) in pascals. | |
5. | Area | |
Hectare | One hectare in square meters. | |
Acre | One acre in square meters. | |
6. | Speed | |
Kmh | Kilometer per hour in meter per second. | |
Mph | Miles per hour in meter per second. | |
Mach | One Match in meter per second. |
The scipy.constant provides the find() function, which returns a list of physical_constant keys containing a given string.
Consider the following example:
Output:
['Boltzmann constant', 'Boltzmann constant in Hz/K', 'Boltzmann constant in eV/K', 'Boltzmann constant in inverse meters per kelvin', 'Stefan-Boltzmann constant']