Implementing classes¶
This part of the documentation describes implementations of the core thermodynamic base classes, such as simu.ThermoContribution and simu.StateDefinition.
ThermoFrame Factory¶
- class simu.app.RegThermoFactory¶
Bases:
ThermoFactoryThis factory class already registers the current content of
simu.all_contributionsandsimu.all_states, making any further registration redundant as long as the definition of the contribution and states is loaded, and the entities are decorated with the appropriateregisterdecorator (simu.registered_contributionandsimu.registered_state).All states and contributions of the
simu.appsubmodule are automatically imported here.
- @simu.registered_contribution¶
A class decorator to be applied to
simu.ThermoContribution. All classes registered this way can be received as the listsimu.all_contributions.
- @simu.registered_state¶
A class decorator to be applied to
simu.StateDefinition. All classes registered this way can be received as the listsimu.all_states.
ThermoStructure¶
- class simu.app.ThermoStructure¶
This class represents the structure of a thermodynamic model, representing the list of contributions and holding the state definition.
In terms of data, it is holding no more than a string representing the name of the
StateDefinitionclass and a list representing the contributions as required for constructingThermoFrameobjects.As the main additional feature, predefined configurations can be loaded via
from_predefined(). Further, add-on contributions, such as augmenters, can easily be added via the+-operator.To be accepted as a valid configuration struct in the
create_frame()method, objects of this class behave like a mapping with two keys:stateandcontributions.
Pre-defined data¶
all_states (simu.core)
This is a list of all currently imported StateDefinition class definitions that are decorated with registered_state(). It normally contains at least the GibbsState and the HelmholtzState class.
all_contributions (simu.core)
This is a list of all currently imported ThermoContribution class definitions that are decorated with registered_contribution().
predefined_parameters (simu.app)
This is a ThermoParameterStore instance with some pre-defined thermodynamic parameters.