encomp documentation¶
Overview¶
General-purpose library for engineering computations, with focus on clean and consistent interfaces.
Main functionality of the encomp library:
- Handles physical quantities with magnitude(s), dimensionality and units
Modules
encomp.units,encomp.utypesExtends the pint library
Uses Python’s type system to validate dimensionalities
Compatible with
mypyand other type checkersIntegrates with with Numpy arrays, Pandas series and Polars series and expressions
JSON serialization and decoding via Pydantic
- Implements a flexible interface to CoolProp
Module
encomp.fluidsUses quantities for all inputs and outputs (including dimensionless quantities)
Fluids are represented as class instances, the properties are class attributes
- Extends Sympy
Module
encomp.sympyAdds convenience methods for creating symbols with sub- and superscripts
Additional functions to convert (algebraic) expressions and systems to Python code that supports Numpy arrays# add mock imports to avoid running modules:
The other modules implement calculations related to process engineering and thermodynamics.
Tip
This library can be used as a starting point when developing your own engineering calculations.
For instance, using the encomp.units.Quantity class and decorating functions with @typeguard.typechecked will eliminate all unit-related errors in your calculations.
encomp also serves as an overview of commonly used Python libraries for engineering and science.
Contents¶
- Usage
- Examples
- encomp package
- Submodules
- encomp.constants module
- encomp.context module
- encomp.conversion module
- encomp.fluids module
- encomp.gases module
- encomp.misc module
- encomp.settings module
- encomp.structures module
- encomp.sympy module
- encomp.thermo module
- encomp.units module
- encomp.utypes module
AreaCurrencyCurrencyPerEnergyCurrencyPerMassCurrencyPerTimeCurrencyPerVolumeCurrentDensityDimensionalityDimensionlessDynamicViscosityEnergyEnergyPerMassForceFrequencyHeatTransferCoefficientHeatingValueHigherHeatingValueIndistinctDimensionalityKinematicViscosityLengthLowerHeatingValueLuminosityMassMassFlowMassPerEnergyMassPerNormalVolumeMixtureEnthalpyPerDryAirMixtureEnthalpyPerHumidAirMixtureEntropyPerDryAirMixtureEntropyPerHumidAirMixtureVolumePerDryAirMixtureVolumePerHumidAirMolarDensityMolarMassMolarSpecificEnthalpyMolarSpecificEntropyMolarSpecificInternalEnergyNormalNormalTemperatureNormalVolumeNormalVolumeFlowNormalVolumePerMassPowerPowerPerAreaPowerPerLengthPowerPerTemperaturePowerPerVolumePressureSpecificEnthalpySpecificEntropySpecificHeatCapacitySpecificHeatPerDryAirSpecificHeatPerHumidAirSpecificInternalEnergySpecificVolumeSubstanceSubstancePerMassTemperatureTemperatureDifferenceThermalConductivityTimeUnknownDimensionalityVelocityVolumeVolumeFlowget_registered_units()
- Module contents