src.pydasa.dimensional.buckingham#
Module for representing Dimensionless Coefficients in Dimensional Analysis for PyDASA.
This module provides the Coefficient class which models dimensionless numbers used in Vaschy-Buckingham’s Pi-theorem for dimensional analysis.
Classes:
Coefficient: Represents a dimensionless coefficient with properties, validation, and symbolic expression.
IMPORTANT: Based on the theory from:
# H.Gorter, Dimensionalanalyse: Eine Theoririe der physikalischen Dimensionen mit Anwendungen
Classes#
Coefficient class for Dimensional Analysis in PyDASA. |
Module Contents#
- class src.pydasa.dimensional.buckingham.Coefficient#
Bases:
pydasa.core.basic.Foundation,pydasa.elements.specs.numerical.BoundsSpecsCoefficient class for Dimensional Analysis in PyDASA.
A comprehensive implementation that represents dimensionless coefficients (Pi numbers) used in the Vaschy-Buckingham Pi-theorem method.
- Inherits From:
Foundation: Base class providing symbol validation and framework context. BoundsSpecs: Provides numerical bounds and ranges (setpoint, min, max, mean, dev).
- # From Foundation
name (str): User-friendly name of the dimensionless coefficient. description (str): Brief summary of the dimensionless coefficient. _idx (int): Index/precedence in the dimensional matrix. _sym (str): Symbol representation (LaTeX or alphanumeric). _alias (str): Python-compatible alias for use in code. _fwk (str): Frameworks context (PHYSICAL, COMPUTATION, SOFTWARE, CUSTOM).
- Type:
inherited
- # From BoundsSpecs
_setpoint (Optional[float]): Specific value/point of interest (always in standardized units). _min (Optional[float]): Minimum value (always in standardized units). _max (Optional[float]): Maximum value (always in standardized units). _mean (Optional[float]): Average value (always in standardized units). _dev (Optional[float]): Standard deviation (always in standardized units).
- Type:
inherited
- # Coefficient-Specific Attributes
_cat (str): Category (COMPUTED, DERIVED). relevance (bool): Flag indicating if coefficient is relevant for analysis. _variables (Dict[str, Variable]): Variable symbols used in coefficient construction. _dim_col (List[int]): Dimensional column for matrix operations. _pivot_lt (List[int]): Pivot indices in dimensional matrix. _pi_expr (str): Symbolic expression of the coefficient. var_dims (Dict[str, int]): Dimensional variable exponents. _step (Optional[float]): Step size for simulations (always in standardized units). _data (np.ndarray): Array of coefficient values for analysis.
- _variables: Dict[str, pydasa.elements.parameter.Variable]#
Variables symbols used in the coefficient.
- _data: numpy.typing.NDArray[numpy.float64]#
Data array for the dimensionless coefficient for analysis.
- _build_expression(var_lt, dim_col)#
_build_expression() Builds LaTeX expression for coefficient.
- property cat: str#
cat Get the coefficient category.
- Returns:
Category (COMPUTED, DERIVED).
- Return type:
- property variables: Dict[str, pydasa.elements.parameter.Variable]#
variables Get the variable symbols dictionary.
- property dim_col: List[int]#
dim_col Get the dimensional column.
- Returns:
Dimensional column.
- Return type:
List[int]
- property pivot_lt: List[int] | None#
pivot_lt Get the pivot indices list.
- Returns:
Pivot indices list.
- Return type:
Optional[List[int]]
- property pi_expr: str | None#
pi_expr Get the coefficient expression.
- Returns:
Coefficient expression.
- Return type:
Optional[str]
- property step: float | None#
step Get standardized step size.
- Returns:
Step size (always standardized).
- Return type:
Optional[float]
- property data: numpy.typing.NDArray[numpy.float64]#
data Get standardized data array.
- Returns:
Data array for range (always standardized).
- Return type:
NDArray[np.float64]
- calculate_setpoint(vars=None)#
calculate_setpoint() Calculate coefficient setpoint value based on provided variable setpoints. If no variables are provided uses the ones stored in the variables standardized attribute.
- Parameters:
vars (Optional[Dict[str, float]]) – Variable setpoints dictionary.
- Raises:
ValueError – If variable setpoints are missing or invalid.
ValueError – If number of variable setpoints does not match coefficient variables.
- Return type:
- generate_data()#
generate_data() Generate a linear standardized data array from min, max, using step value.
- Raises:
ValueError – If needed values are missing.
- Return type:
None
- get_data()#
get_data() Get data array from the dimensionless coefficient and its variables.
- Returns:
Data dictionary with ‘symbol’: data_list entries.
- Return type:
Dict[str, List]
- clear()#
clear() Reset all attributes to default values.
Resets all coefficient properties to their initial state.
- Return type:
None