Skip to main content

meenpy is a library of utilities for mechanical engineering problem solving.

Project description

meenpy

meenpy is a library of utilities for mechanical engineering problem solving.

meenpy.numerics enables the succinct articulation equations, efficient assembly of systems, and provides a transparent solving interface.

Installation

Check out the package manager uv and add meenpy to your project or workspace.

uv add meenpy

Alternatively, install meenpy directly with pip.

pip install meenpy

Usage

import numpy as np, sympy as sym, pandas as pd
from meenpy.numerics import ScalarEquation, MatrixEquation, TabularEquation, System
from meenpy.numerics.utils import *

## Variable Definitions
T, x, p, v = sym.symbols("T, x, p, v")
T_amb, h, Qd = sym.symbols("T_amb, h, Qd")
column_map = {T: "Temperature", x: "Quality", p: "Pressure", v: "Specific Volume"}

## Equation Definitions
water = TabularEquation(pd.read_csv("test/assets/water.csv"), ["Temperature", "Quality"], residual_type="all_column_differential")
convection = ScalarEquation(Qd, h * (T - T_amb))

## System Composition and Solution
water_system = System([water, convection], column_map)
water_system_solution = water_system.solve({T_amb: 25, h: 1, Qd: 100}, {T: 100})

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

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

meenpy-0.1.5.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

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

meenpy-0.1.5-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file meenpy-0.1.5.tar.gz.

File metadata

  • Download URL: meenpy-0.1.5.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.24

File hashes

Hashes for meenpy-0.1.5.tar.gz
Algorithm Hash digest
SHA256 33aa588c358daa120063e1f3de6851f597a8a7b91c5644a253c1e7d6e06077f1
MD5 9d9565a977763fc6b96595285ea46ddd
BLAKE2b-256 fcd4718182c9e1c7d4f0ca3d44e579c01fcc831468a6cb78adbf094192fa93ba

See more details on using hashes here.

File details

Details for the file meenpy-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: meenpy-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.24

File hashes

Hashes for meenpy-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1b9be83d051d6274669ef010b0fc946f9ff14d867d0ca29a290e5e291d25df61
MD5 7673dfa4d0f4179dbc3515053cba96a7
BLAKE2b-256 27b79d8238e353bca11667571c237dc78bc454270f919cf76fa78686c05d984b

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