= Q(1.3, Unit.PRESSURE) pressure
Core
Fill in a module description here
Unit
Unit
Unit ()
Default Units
= Q(21.2, Unit.MASS) mass
mass._dimensionality
mass.__dict__
{'_magnitude': 21.2,
'_units': <UnitsContainer({'kilogram': 1})>,
'_Quantity__used': False,
'_Quantity__handling': None}
= Q(0.214, Unit.MOLE) moles
= Q(0.235, Unit.SPECIFIC_HEAT) specific_heat
specific_heat
0.235 joule/(kelvin kilogram)
specific_heat.units
joule/(kelvin kilogram)
593, 'torr').to(Unit.PRESSURE) Q(
79060.16447368421 pascal
Dimensional Analysis
Check whether a quantity belong to particular dimension
DimensionalAnalysis
DimensionalAnalysis ()
Initialize self. See help(type(self)) for accurate signature.
Symbols
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
= Symbol('m', 'truck') m
m.__dict__
{'name': m_truck, 'value': None}
m.name
m_truck
m.value
m.is_empty
True
2.2, 'kilogram')) m.setValue(Q(
<__main__.Symbol>
m.value
2.2 kilogram