Skip to main content

Mixture properties calculator

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mixprops-0.4.0.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mixprops-0.4.0-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file mixprops-0.4.0.tar.gz.

File metadata

  • Download URL: mixprops-0.4.0.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.6 Linux/5.15.0-1041-azure

File hashes

Hashes for mixprops-0.4.0.tar.gz
Algorithm Hash digest
SHA256 035f3441da3e5936ea97756ff97027a8f781cb6cf3fc8808924448afb818f047
MD5 4c92ea93f2db8444604b31c826f336d4
BLAKE2b-256 a5ad830db03f7844d2ca0db6b3964e8f93396a41cb14506c73f75109dc8dd018

See more details on using hashes here.

File details

Details for the file mixprops-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: mixprops-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.6 Linux/5.15.0-1041-azure

File hashes

Hashes for mixprops-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 afbb35ab5b81ffd177ed5b4783c4dea908e41f6305d67a072897abf5de8c8e38
MD5 01f9fd7ca5265a81ac33ee535a7741b7
BLAKE2b-256 b51c9cbba0d45a83c7f93451a5b78d184eb2d686e83cd7689cbdd56515096b7f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page