Skip to main content

mixprops

CI pypi versions license

Mixture properties calculator.

Installation

Python

pip install mixprops --upgrade

Configuration

Using a settings.yaml configuration file, you can specify the units system used for computation.

Available units systems:

  • SI - International System of Units
  • SIC - International System of Units with temperature in degrees Celsius (DEFAULT)
  • IS - Imperial Unit System (currently this only assumes a temperature in degrees Fahrenheit)

You may also overwrite the default Pressure unit of Pascal:

  • Pa - Pascal
  • kPa - Kilopascal
  • Mpa - Megapascal
  • bar - bar

Example

units: "SI" # International System of Units
pressure_unit: "kPa" # Kilopascal

Properties

  • molecular_weight - Molecular weight (g/mol)
  • density - Density (kg/m3)
  • specific_heat_capacity - Specific heat capacity (J/kg-K)
  • viscosity - Viscosity (kg/m-s)
  • conductivity - Thermal conductivity (W/m-K)
  • speed_of_sound - Speed of sound (m/s)
  • adiabatic_index - Adiabatic index

Supported species

For the supported species, see the .csv files in the mixprops/data directory.

Examples

from mixprops.mixture import Mixture
from mixprops.state import State

mixture = Mixture(
    species=[("O2", 0.21), ("N2", 0.79)],
    state=State(pressure=101325, temperature=25))

print(mixture.specific_heat_capacity)
# 1011.3387518918726

CLI

Follow instructions from pipx to install pipx.

pipx install git+https://github.com/oaarnikoivu/mixprops.git
mixprops \
    --units SIC \
    --pressure-unit Pa \
    --state 101325,25 \
    --species O2,N2 \
    --composition 0.21,0.79
  • --units = Units system -> Optional, defaults to SIC
  • --pressure-unit = Pressure unit -> Optional, defaults to Pa
  • --state = Mixture state -> Absolute pressure,temperature
  • --species = Comma separated list of species by name or species -> O2,N2 or Oxygen,Nitrogen
  • --composition = Species molar composition as comma separated mole fractions -> 0.21,0.79

Release files for mixprops 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mixprops 0.4.0
File Size Uploaded
mixprops-0.4.0.tar.gz 15.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mixprops 0.4.0
File Interpreter ABI Platform
mixprops-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 34.1 kB

Release files / mixprops-0.4.0.tar.gz

Download URL mixprops-0.4.0.tar.gz
Size 15.7 kB
Tags Source
SHA-256 checksum
How to use checksums
035f3441da3e5936ea97756ff97027a8f781cb6cf3fc8808924448afb818f047
BLAKE2b-256 checksum
How to use checksums
a5ad830db03f7844d2ca0db6b3964e8f93396a41cb14506c73f75109dc8dd018
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.10.6 Linux/5.15.0-1041-azure

Release files / mixprops-0.4.0-py3-none-any.whl

Download URL mixprops-0.4.0-py3-none-any.whl
Size 18.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
afbb35ab5b81ffd177ed5b4783c4dea908e41f6305d67a072897abf5de8c8e38
BLAKE2b-256 checksum
How to use checksums
b51c9cbba0d45a83c7f93451a5b78d184eb2d686e83cd7689cbdd56515096b7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.10.6 Linux/5.15.0-1041-azure

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page