Core

Fill in a module description here

Unit


source

Unit

 Unit ()

Default Units

pressure = Q(1.3, Unit.PRESSURE)
mass = Q(21.2, Unit.MASS)
mass._dimensionality
mass.__dict__
{'_magnitude': 21.2,
 '_units': <UnitsContainer({'kilogram': 1})>,
 '_Quantity__used': False,
 '_Quantity__handling': None}
moles = Q(0.214, Unit.MOLE)
specific_heat = Q(0.235, Unit.SPECIFIC_HEAT)
specific_heat
0.235 joule/(kelvin kilogram)
specific_heat.units
joule/(kelvin kilogram)
Q(593, 'torr').to(Unit.PRESSURE)
79060.16447368421 pascal

Dimensional Analysis

Check whether a quantity belong to particular dimension


source

DimensionalAnalysis

 DimensionalAnalysis ()

Initialize self. See help(type(self)) for accurate signature.

Symbols


source

Symbol

 Symbol (symbol:str, name:str)

Initialize self. See help(type(self)) for accurate signature.

Type Details
symbol str the symbol
name str the name of the symbol
type(smp.symbols('x'))
sympy.core.symbol.Symbol
m = Symbol('m', 'truck')
m.__dict__
{'name': m_truck, 'value': None}
m.name
m_truck
m.value
m.is_empty
True
m.setValue(Q(2.2, 'kilogram'))
<__main__.Symbol>
m.value
2.2 kilogram