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

from meenpy.numerics import ScalarEquation, MatrixEquation, TabularEquation, System
import pandas as pd
import sympy as sym

## 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/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: 115, x: 1})

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.2.tar.gz (6.2 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.2-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for meenpy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ead0fc86fb9c442f7e099978223068c546cf161c98239b0890c8745a23cb8d4a
MD5 203abb636572420a00a3ee04bf06c054
BLAKE2b-256 e9f2a370f9321352d027d2b55ae952dcde5c3260cc456f958a3dcdf876cb8191

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for meenpy-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 905bef3aa27217ab58e1679114f0fcdf9f38dc29624fc791b46fee6af58e500e
MD5 892aea061c8455fbded3265a780b5078
BLAKE2b-256 9596d95ffd7fb2d77eeedf2cf2d3e1d28bbc12f18d7aa7a00414cda883f0aae4

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