src.pydasa.core.basic#

This module provides base classes with common validation logic used across different classes to minimize code duplication in PyDASA.

IMPORTANT
  • Based on the theory from H. Görtler, Dimensionalanalyse: Eine Theoririe der physikalischen Dimensionen mit Anwendungen

Classes#

SymBasis

Abstract Class to manage the entity's symbolic, sorting, and dimensional domain/framework functionalities in PyDASA.

IdxBasis

Basic class to manage index/precedence functionalities in PyDASA entities.

Foundation

Basic class to manage common attributes and validation logic for dimensional analysis entities in PyDASA.

Module Contents#

class src.pydasa.core.basic.SymBasis#

Bases: abc.ABC

Abstract Class to manage the entity’s symbolic, sorting, and dimensional domain/framework functionalities in PyDASA.

Inherits from:
  • ABC: Python Abstract Base Class to indicate that this class is not meant to be instantiated directly.

_sym: str = ''#

Symbol representation (LaTeX or alphanumeric).

_fwk: str = 'PHYSICAL'#

Frameworks context (PHYSICAL, COMPUTATION, SOFTWARE, CUSTOM).

_alias: str = ''#

rho_{1} -> rho_1.

Type:

Python-compatible alias for symbol, used in executable code. e.g.

property sym: str#

Get the entity’s symbol.

Returns:

Symbol value.

Return type:

str

property fwk: str#

Get the entity’s framework.

Returns:

Frameworks value.

Return type:

str

property alias: str | None#

Get the Python variable synonym.

Returns:

Python variable name. e.g.: rho_{1} -> rho_1.

Return type:

Optional[str]

clear()#

Reset symbol, alias, and framework attributes to default values.

Return type:

None

class src.pydasa.core.basic.IdxBasis#

Bases: SymBasis

Basic class to manage index/precedence functionalities in PyDASA entities.

Inherits from:
  • SymBasis: Inherits symbol and framework validation.

_idx: int = -1#

Unique identifier/index for ordering in dimensional matrix.

property idx: int#

Get the index/precedence value.

Returns:

Index value.

Return type:

int

clear()#

Reset index and inherited symbol attributes to default values.

Return type:

None

class src.pydasa.core.basic.Foundation#

Bases: IdxBasis

Basic class to manage common attributes and validation logic for dimensional analysis entities in PyDASA.

Provides common validation logic and attributes shared by dimensional framework/domain, Variable, and Coeffcient classes.

Inherits from:
  • IdxBasis: Inherits index, symbol, and framework validation.

_name: str = ''#

User-friendly name of the entity.

description: str = ''#

Brief summary or description of the entity.

property name: str#

Get the entity’s name.

Returns:

Name value.

Return type:

str

clear()#

Reset name, description, and inherited attributes to default values.

Return type:

None