{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "e70e1154-7d5d-4c92-9f62-2dd2c734f586",
   "metadata": {
    "editable": true,
    "slideshow": {
     "slide_type": ""
    },
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "171.312323780292 kg"
      ],
      "text/latex": [
       "$171.312323780292\\ \\mathrm{kg}$"
      ],
      "text/plain": [
       "<Quantity(171.312324, 'kilogram')>"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pint import UnitRegistry\n",
    "unit = UnitRegistry()\n",
    "unit.formatter.default_format = \"~\"\n",
    "\n",
    "preload_m4 = 3000 * unit.N\n",
    "n_screws = 4 # 2 on each side\n",
    "friction_coeff = 0.21 # Al on Al\n",
    "safety_factor = 1.5\n",
    "\n",
    "max_load = preload_m4 * friction_coeff * n_screws / safety_factor / unit.standard_gravity\n",
    "max_load.to(unit.kg)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d945d6aa-a1d0-4f9b-8f0e-2742e5c75b31",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
