Metadata-Version: 2.4
Name: mechlab
Version: 0.0.1
Summary: Computational Mechanical Engineering Toolkit
License: MIT
License-File: LICENSE
Keywords: mechanical-engineering,thermodynamics,fluid-mechanics,control-systems,engineering,scientific-computing
Author: Sewak Sunar
Author-email: sewaksunar@hotmail.com
Requires-Python: >=3.14
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Education
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Dist: colorama (==0.4.6)
Requires-Dist: contourpy (==1.3.3)
Requires-Dist: control (==0.10.2)
Requires-Dist: coolprop (==7.2.0)
Requires-Dist: cycler (==0.12.1)
Requires-Dist: flexcache (==0.3)
Requires-Dist: flexparser (==0.4)
Requires-Dist: fluids (==1.3.0)
Requires-Dist: fonttools (==4.61.1)
Requires-Dist: furo (>=2025.12.19,<2026.0.0)
Requires-Dist: iniconfig (==2.3.0)
Requires-Dist: kiwisolver (==1.4.9)
Requires-Dist: matplotlib (==3.10.8)
Requires-Dist: mpmath (==1.3.0)
Requires-Dist: myst-parser (>=5.0.0,<6.0.0)
Requires-Dist: numpy (==2.4.1)
Requires-Dist: packaging (==26.0)
Requires-Dist: pillow (==12.1.0)
Requires-Dist: pint (==0.25.2)
Requires-Dist: platformdirs (==4.5.1)
Requires-Dist: pluggy (==1.6.0)
Requires-Dist: pygments (==2.19.2)
Requires-Dist: pyparsing (==3.3.2)
Requires-Dist: pytest (==9.0.2)
Requires-Dist: python-dateutil (==2.9.0.post0)
Requires-Dist: scipy (==1.17.0)
Requires-Dist: six (==1.17.0)
Requires-Dist: sphinx-autobuild (>=2025.8.25,<2026.0.0)
Requires-Dist: sphinx-copybutton (>=0.5.2,<0.6.0)
Requires-Dist: sphinx-design (>=0.7.0,<0.8.0)
Requires-Dist: sympy (==1.14.0)
Requires-Dist: typing-extensions (==4.15.0)
Description-Content-Type: text/markdown

![PyPI](https://img.shields.io/pypi/v/mechlab)
![License](https://img.shields.io/pypi/l/mechlab)
![Python](https://img.shields.io/pypi/pyversions/mechlab)
# MechLab 🔧📘

**MechLab** is an open‑source Python library for **mechanical engineering computations**, designed to provide a unified, modular, and extensible toolkit for students, researchers, and practicing engineers.

It brings together commonly used scientific libraries under a clean, engineering‑focused API for **thermodynamics, fluid mechanics, control systems, and numerical analysis**.

---

## ✨ Features

* 🔥 Thermodynamics utilities (properties, processes, cycles)
* 🌊 Fluid mechanics calculations (dimensionless numbers, flow relations)
* 🎛️ Control systems support
* 🧮 Symbolic & numerical computation
* 📐 Unit‑safe calculations (planned)
* 🧱 Modular structure (easy to extend)

---

## 📦 Installation

Install directly from **PyPI**:

```bash
pip install mechlab
```

Or using **Poetry**:

```bash
poetry add mechlab
```

---

## 🚀 Quick Start

```python
from mechlab.thermodynamics import enthalpy_TP

h = enthalpy_TP(
    fluid="Water",
    T=500,        # Temperature in K
    P=3e6         # Pressure in Pa
)

print(f"Enthalpy: {h:.2f} J/kg")
```

---

## 📂 Package Structure

```text
mechlab/
│
├── thermodynamics/
│   ├── __init__.py
│   ├── properties.py
│   └── cycles.py
│
├── fluid_mechanics/
│   ├── __init__.py
│   └── dimensionless.py
│
├── control_systems/
│   ├── __init__.py
│   └── linear.py
│
├── utils/
│   ├── __init__.py
│   └── constants.py
│
└── __init__.py
```

---

## 🔬 Dependencies

MechLab is built on top of proven scientific libraries:

* `numpy`
* `scipy`
* `sympy`
* `control`
* `fluids`
* `CoolProp`
* `pint`
* `matplotlib`

These are installed automatically with MechLab.

---

## 🧠 Design Philosophy

* **Engineering‑first API** (clear variable names, physical meaning)
* **Readable code** over premature optimization
* **Modular** – each subject area is independent
* **Extensible** – easy to add new models & correlations

---

## 📈 Roadmap

* [ ] Rankine, Otto, Diesel cycles
* [ ] Pipe flow & heat exchanger modules
* [ ] Full unit‑aware API using Pint
* [ ] Validation against textbook examples
* [ ] Interactive Jupyter examples
* [ ] Documentation website

---

## 🧪 Development Setup

Clone the repository:

```bash
git clone https://github.com/sewaksunar/mechlab.git
cd mechlab
```

Install dependencies with Poetry:

```bash
poetry install
poetry shell
```

Run tests:

```bash
pytest
```

---

## 🤝 Contributing

Contributions are welcome!

1. Fork the repository
2. Create a feature branch
3. Commit your changes
4. Open a Pull Request

Please follow:

* PEP‑8 style
* Clear docstrings
* Basic tests for new features

---

## 📜 License

This project is licensed under the **MIT License**.

---

## 👤 Author

**Sewak Sunar**
Mechanical Engineering Enthusiast & Python Developer

* GitHub: [https://github.com/sewaksunar](https://github.com/sewaksunar)

---

## ⭐ Acknowledgements

Inspired by mechanical engineering textbooks and the open‑source scientific Python ecosystem.

If you find MechLab useful, please ⭐ the repository on GitHub!

