scinumtools.materials package

Submodules

scinumtools.materials.composite module

class scinumtools.materials.composite.Component(proportion: int = 1)

Bases: object

component_mass: Quantity
expr: str
proportion: float | int
class scinumtools.materials.composite.Composite(solver: callable, component_class: callable, expr: str | dict, cols_components: dict, cols_composite: dict, natural: bool, norm_type: Norm)

Bases: object

add(expr: str, proportion: int = 1)
cols_components: dict
cols_composit: dict
component_class: callable
components: Dict[str, Component]
composite_mass: Quantity
natural: bool
norm_type: Norm
print()
print_components()
print_composite(components: list | None = None)
proportion_norm: float | int

scinumtools.materials.element module

class scinumtools.materials.element.Element(expr: str, proportion: int = 1, natural: bool = True, **kwargs)

Bases: Component, Matter

N: float = None
Z: float = None
e: float = None
element: str
get_abundant(element: str, ionisation: int)
get_isotope(element: str, isotope: int, ionisation: int)
get_natural(element: str, ionisation: int)
ionisation: int
isotope: int
natural: bool
print()

scinumtools.materials.material module

class scinumtools.materials.material.Material(expr: str | dict | None = None, natural: bool = True, norm_type: Norm = Norm.NUMBER_FRACTION, **kwargs)

Bases: Composite, Matter

atom(expr: str)
data_components(quantity: bool = True)
data_composite(components: list | None = None, quantity: bool = True)

scinumtools.materials.material_solver module

class scinumtools.materials.material_solver.CustomOperatorAdd(expr: str | None = None)

Bases: OperatorAdd

symbol: str = ' + '
class scinumtools.materials.material_solver.CustomOperatorMul(expr: str | None = None)

Bases: OperatorMul

symbol: str = ' * '
class scinumtools.materials.material_solver.CustomOperatorPar(expr: str)

Bases: OperatorPar

symbol: str = '<'
symbol_close: str = '>'
symbol_open: str = '<'
symbol_separator: str = ','
class scinumtools.materials.material_solver.MaterialSolver(atom: callable)

Bases: object

preprocess(expr)
solve(expr)

scinumtools.materials.matter module

class scinumtools.materials.matter.Matter(number_density: Quantity | None = None, mass_density: Quantity | None = None, volume: Quantity | None = None)

Bases: object

data_matter(components: list | None = None, quantity: bool = True)
mass: Quantity = None
mass_density: Quantity = None
number_density: Quantity = None
print_matter(components: list | None = None)
volume: Quantity = None

scinumtools.materials.periodic_table module

scinumtools.materials.substance module

class scinumtools.materials.substance.Substance(expr: str | dict | None = None, proportion: float = 1.0, natural: bool = True, **kwargs)

Bases: Composite, Component, Matter

atom(expr: str)
data_components(quantity: bool = True)
data_composite(components: list | None = None, quantity: bool = True)

scinumtools.materials.substance_solver module

class scinumtools.materials.substance_solver.CustomOperatorAdd(expr: str | None = None)

Bases: OperatorAdd

symbol: str = ' + '
class scinumtools.materials.substance_solver.CustomOperatorMul(expr: str | None = None)

Bases: OperatorMul

symbol: str = ' * '
class scinumtools.materials.substance_solver.SubstanceSolver(atom: callable)

Bases: object

preprocess(expr)
solve(expr)

Module contents

class scinumtools.materials.Norm(value)

Bases: Enum

An enumeration.

MASS_FRACTION = 2
NUMBER = 0
NUMBER_FRACTION = 1
class scinumtools.materials.Units

Bases: object

ATOMIC_MASS = 'Da'
FRACTION = '%'
MASS_DENSITY = 'g/cm3'
MATERIAL_MASS = 'g'
NUMBER_DENSITY = 'cm-3'