Coverage for /usr/lib/python3/dist-packages/sympy/physics/units/systems/natural.py: 100%
8 statements
« prev ^ index » next coverage.py v7.9.1, created at 2025-06-14 15:55 +0200
« prev ^ index » next coverage.py v7.9.1, created at 2025-06-14 15:55 +0200
1"""
2Naturalunit system.
4The natural system comes from "setting c = 1, hbar = 1". From the computer
5point of view it means that we use velocity and action instead of length and
6time. Moreover instead of mass we use energy.
7"""
9from sympy.physics.units import DimensionSystem
10from sympy.physics.units.definitions import c, eV, hbar
11from sympy.physics.units.definitions.dimension_definitions import (
12 action, energy, force, frequency, length, mass, momentum,
13 power, time, velocity)
14from sympy.physics.units.prefixes import PREFIXES, prefix_unit
15from sympy.physics.units.unitsystem import UnitSystem
18# dimension system
19_natural_dim = DimensionSystem(
20 base_dims=(action, energy, velocity),
21 derived_dims=(length, mass, time, momentum, force, power, frequency)
22)
24units = prefix_unit(eV, PREFIXES)
26# unit system
27natural = UnitSystem(base_units=(hbar, eV, c), units=units, name="Natural system")