Skip to content

Latest commit

 

History

49 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Language Count GitHub Top Language GitHub Stars GitHub Last Commit Repository Size

▶️ Getting Started

Starting with git clone:

git clone https://github.com/aimanamri/mechanicalEngineering.git -b main
cd mechanicalEngineering

Pre-Requisites

  • Python 3.12 or later - requirements.txt is pinned to NumPy 2.x/SciPy 1.18, which require Python ≥3.12 (tested on 3.13).
  • A virtual environment is recommended so these pins don't collide with other projects:
python3 -m venv venv
source venv/bin/activate        # Windows: venv\Scripts\activate
  • Install all packages in requirements.txt (everything the notebooks import) plus jupyter itself (which pulls in ipykernel automatically):
pip install -r requirements.txt jupyter

Libraries used

Library Used for
numpy, scipy numerical arrays, interpolation, integration, linear algebra, ODE solving
matplotlib all plots (SFD/BMD, Mohr's circle, stress-strain curves, T-s/p-h diagrams, ...)
japanize_matplotlib renders the Japanese (日本語) labels/titles used throughout
pandas, openpyxl reading and processing practice.xlsx in the tensile-test notebook
pyromat steam and R-134a refrigerant properties (Rankine, reheat, refrigeration cycle notebooks) - configured to output SI-derived units (MPa, K, kJ/kg) rather than its bar default
rich nicely formatted result tables printed inside the thermodynamics notebooks
setuptools provides the distutils shim japanize_matplotlib needs on Python 3.12+ (distutils was removed from the standard library)

Running the notebooks

  • Jupyter Notebook / JupyterLab: jupyter notebook or jupyter lab, then open any .ipynb file and Run All.
  • VS Code: open the folder and use the built-in Jupyter extension (select the venv kernel created above).
  • Headless / regenerate all outputs from the command line:
jupyter nbconvert --to notebook --execute --inplace *.ipynb
  • Standalone scripts (mohr_circle.py, projection_motion.py) run directly with python3 <script>.py.

💻 Mechanical Engineering Calculations

drawing

drawing

  • Shear Force Diagram,SFD and Bending Moment Diagram,BMD (せん断力図・曲げモーメント図)
    SFD-BMD.ipynb

drawing

drawing

  • Tensile Test (引張試験)

drawing

  • Heat effieciency, η of ideal Rankine cycle (理想ランキンサイクルの熱効率)
    rankine_cycle.ipynb

  • Heat effieciency, η of Rankine reheat cycle (理想ランキンサイクルの熱効率)
    rankine_reheat_cycle.ipynb

  • Coefficient of performance(COF) of ideal refrigeration cycle (冷凍サイクルの成績係数/動作係数)
    refrigeration_cycle.ipynb

  • Under damping system/vibration (不足減衰)

  • Over damping system/vibration (過減衰)
    damped_vibration.ipynb

  • Numerical computation of Force, Velocity & Acceleration - Euler's method, Trapezoidal rule, Simpson's rule (数値解析による力・速度・加速度の計算)
    numerical_kinematics.ipynb


💻 Engineering Math using Python

📔 math.ipynb - All calculation was made in this single notebook.

  • Interpolation (線形補間)

  • Numerical intergration using trapezoidal rule and Simpson (数値積分:台形公式とシンプソン則)

  • Addition, subtraction and multiplication of matrice (行列の足し算・引き算・掛け算)

  • Eigenvector and eigenvalue (固有ベクトル・固有値)

Project Status

  • █████████████ Complete

About

Mechanical engineering calculation examples in Python -- projectile motion, stress analysis (Mohr's circle, von Mises, tensile test), beam SFD/BMD, thermodynamic cycles (Rankine, reheat, refrigeration), damped vibration, and numerical methods. Runs in Jupyter Notebook/JupyterLab.

Topics

Resources

Stars

10 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages