MechForge: Next-Generation Mechanical Engineering Python Platform
Project description
MechForge ๐งโ๏ธ
Next-Generation Mechanical Engineering Python Platform
Structural Analysis โข Thermodynamics โข Fluid Mechanics โข Machine Design โข Dynamics โข Controls โข Materials โข Manufacturing โข AI/ML โข Industry 4.0
Vision
To become the NumPy/SciPy of mechanical engineering โ the foundational, trusted computational layer that every mechanical engineer, researcher, and industrial developer reaches for by default.
Features
Phase 1 โ Foundation (Current)
- โ Unit System โ Pint-based, every value carries units (SI, Imperial, mixed)
- โ Materials Database โ 500+ engineering materials with full property sets
- โ Structural Analysis โ Beam analysis, stress transformation, fatigue, fracture mechanics
- โ Machine Design โ Shafts, gears, bearings, bolted joints, springs
- โ Fluids โ Pipe flow, pump systems, compressible flow
- โ Thermal โ Thermodynamic cycles, heat transfer, heat exchangers
- โ Reports โ Auto-generated PDF/Word engineering reports
Upcoming
- ๐ Dynamics & Vibration
- ๐ Controls (PID, state-space)
- ๐ AI/ML (Predictive maintenance, optimization, anomaly detection)
- ๐ Industry 4.0 (IoT, OPC-UA, MQTT, Digital Twins)
- ๐ FEM Solver & Simplified CFD
- ๐ Manufacturing (GD&T, DFM)
Quick Start
pip install mechforge
import mechforge as mf
# Every value carries units โ no ambiguity
shaft = mf.machine.Shaft(
length=mf.Q(500, 'mm'),
torque=mf.Q(200, 'N*m'),
material=mf.materials.get('AISI 4140'),
)
result = shaft.analyze()
print(result.max_shear_stress.to('MPa'))
print(result.safety_factor)
Fatigue Analysis
from mechforge.structural import FatigueAnalysis
from mechforge.materials import get_material
analysis = FatigueAnalysis(
material=get_material('AISI 4340'),
surface_finish='ground',
loading_type='bending',
reliability=0.99,
)
life = analysis.predict_life(sigma_max=450, sigma_min=-200)
print(f'Fatigue life: {life.cycles:.2e} cycles')
analysis.plot_goodman_diagram(save='goodman.pdf')
Heat Exchanger
from mechforge.thermal import HeatExchanger
hx = HeatExchanger(
method='LMTD',
hot_inlet=mf.Q(150, 'degC'), hot_outlet=mf.Q(90, 'degC'),
cold_inlet=mf.Q(25, 'degC'), cold_outlet=mf.Q(70, 'degC'),
U=mf.Q(500, 'W/(m**2*K)'),
flow_type='counterflow',
)
result = hx.analyze()
print(f'Required area: {result.area.to("m**2"):.2f}')
Standards Compliance
MechForge implements and references major engineering standards:
| Domain | Standards |
|---|---|
| Shafts | ASME B106, DIN 743 |
| Gears | AGMA 2101-D04, ISO 6336 |
| Fasteners | VDI 2230, ASME B1.1 |
| Fatigue | ASME FFS-1, BS 7910 |
| Pressure Vessels | ASME BPVC VIII |
| Piping | ASME B31.1, B31.3 |
Architecture
mechforge/
โโโ core/ # Units, constants, materials DB, exceptions
โโโ structural/ # FEA, beam analysis, stress/strain, fatigue
โโโ thermal/ # Heat transfer, thermodynamic cycles
โโโ fluids/ # Pipe networks, pump systems, compressible flow
โโโ machine/ # Gears, shafts, bearings, springs, bolts
โโโ dynamics/ # Vibration, modal analysis, rotor dynamics
โโโ manufacturing/ # GD&T, tolerance stack-up, DFM
โโโ materials/ # Material DB, selection, composites
โโโ controls/ # PID, state-space, transfer functions
โโโ pressure/ # ASME VIII vessels, B31.3 piping
โโโ energy/ # Turbomachinery, renewables
โโโ ai/ # Predictive, optimization, anomaly, NLP, vision
โโโ industry40/ # IoT, OPC-UA, MQTT, digital twins
โโโ simulation/ # FEM, CFD, MBD, Monte Carlo
โโโ solvers/ # Shared numerical solvers
โโโ viz/ # 2D/3D visualization
โโโ standards/ # Code lookups & compliance
โโโ reports/ # PDF, Word, HTML, Excel reports
โโโ database/ # SQLite, PostgreSQL, InfluxDB
โโโ api/ # FastAPI REST layer
โโโ cli/ # Command-line interface
Development
git clone https://github.com/mechforge/mechforge.git
cd mechforge
pip install -e ".[dev]"
pytest
Contributing
See CONTRIBUTING.md for guidelines.
License
MIT License โ Free for everyone.
MechForge โ Built by Engineers, for Engineers ๐๏ธ
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mechforge-0.1.0.tar.gz.
File metadata
- Download URL: mechforge-0.1.0.tar.gz
- Upload date:
- Size: 85.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8539e0502c5b0b05e6552dfde930863854a65b642f7929794a1fd85316338e11
|
|
| MD5 |
d862377ce387fc879aac4fdc1acb60c8
|
|
| BLAKE2b-256 |
df959bd8e67dc8c4a88622e89310666964464649889f246dc1c5a67bca7328ae
|
File details
Details for the file mechforge-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mechforge-0.1.0-py3-none-any.whl
- Upload date:
- Size: 96.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11671226ab08afa3dc4de25f6580afe5585a96cd7810e461815f18a36cc8753c
|
|
| MD5 |
9de9f8076a60e82e35b603553b581a1e
|
|
| BLAKE2b-256 |
435faeda64f0ffa4f12ff7a092bdcba8f8671ed7eb201f7c1e7010d4c03c986b
|