{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "0658a664",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-03T17:10:03.599860Z",
     "iopub.status.busy": "2022-04-03T17:10:03.599860Z",
     "iopub.status.idle": "2022-04-03T17:10:05.876875Z",
     "shell.execute_reply": "2022-04-03T17:10:05.876875Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'A': 0.08000000000000002,\n",
      " 'I_y': 0.001066666666666667,\n",
      " 'I_z': 0.00026666666666666673,\n",
      " 'y_s': 0.1,\n",
      " 'z_s': 0.2}\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17052 characters]\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "filenames": {
       "image/png": "C:\\Users\\David\\OneDrive\\Desktop\\imwspy\\stanpy\\stanpy\\docs\\_build\\jupyter_execute\\user_guide\\cross_section_0_1.png"
      },
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import stanpy as stp\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "b = 0.2  # m\n",
    "h = 0.4 # m\n",
    "\n",
    "cs_props = stp.cs(b=b,h=h)\n",
    "\n",
    "print(cs_props)\n",
    "\n",
    "offset = 0.2\n",
    "fig, ax = plt.subplots()\n",
    "stp.plot_cs(ax, b, h)\n",
    "ax.set_xlim(-offset, np.max(b) + offset)\n",
    "ax.set_ylim(-offset, np.max(h) + offset)\n",
    "ax.grid(linestyle=\":\")\n",
    "ax.axis('equal')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "e957343c",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-03T17:10:05.881874Z",
     "iopub.status.busy": "2022-04-03T17:10:05.880873Z",
     "iopub.status.idle": "2022-04-03T17:10:06.086872Z",
     "shell.execute_reply": "2022-04-03T17:10:06.086872Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'A': 0.01632,\n",
      " 'I_y': 0.0004802560000000001,\n",
      " 'I_z': 9.005184000000001e-05,\n",
      " 'y_s': 0.15,\n",
      " 'z_s': 0.20000000000000004}\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 14336 characters]\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "filenames": {
       "image/png": "C:\\Users\\David\\OneDrive\\Desktop\\imwspy\\stanpy\\stanpy\\docs\\_build\\jupyter_execute\\user_guide\\cross_section_1_1.png"
      },
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import stanpy as stp\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "s, t = 0.012, 0.02  # m\n",
    "b, h = 0.3, 0.4 # m\n",
    "b_v = np.array([b, s, b])\n",
    "h_v = np.array([t, h - 2 * t, t])\n",
    "zsi_v = np.array([t / 2, t + (h - 2 * t) / 2, t + (h - 2 * t) + t / 2])  # von OK\n",
    "ysi_v = np.array([b/2, b/2, b/2])  # von Links\n",
    "\n",
    "cs_props = stp.cs(b=b_v, h=h_v, y_si=ysi_v, z_si=zsi_v)\n",
    "print(cs_props)\n",
    "offset = 0.2\n",
    "fig, ax = plt.subplots()\n",
    "stp.plot_cs(ax, b_v, h_v, ysi_v, zsi_v)\n",
    "ax.set_xlim(-offset, np.max(b) + offset)\n",
    "ax.set_ylim(-offset, np.max(h) + offset)\n",
    "ax.grid(linestyle=\":\")\n",
    "ax.axis('equal')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "9869eb74",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-03T17:10:06.090877Z",
     "iopub.status.busy": "2022-04-03T17:10:06.089875Z",
     "iopub.status.idle": "2022-04-03T17:10:06.237494Z",
     "shell.execute_reply": "2022-04-03T17:10:06.237494Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'A': 0.01632,\n",
      " 'I_y': 0.0004802560000000001,\n",
      " 'I_z': 9.005184000000001e-05,\n",
      " 'y_s': 0.15,\n",
      " 'z_s': 0.20000000000000004}\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 14336 characters]\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "filenames": {
       "image/png": "C:\\Users\\David\\OneDrive\\Desktop\\imwspy\\stanpy\\stanpy\\docs\\_build\\jupyter_execute\\user_guide\\cross_section_2_1.png"
      },
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import stanpy as stp\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "s, t = 0.012, 0.02  # m\n",
    "b, h = 0.3, 0.4 # m\n",
    "b_v = np.array([b, s, b])\n",
    "h_v = np.array([t, h - 2 * t, t])\n",
    "ysi_v = stp.AI_y.dot(b_v) # von OK\n",
    "zsi_v = stp.AI_z.dot(h_v) # von Links\n",
    "\n",
    "cs_props = stp.cs(b=b_v, h=h_v, y_si=ysi_v, z_si=zsi_v)\n",
    "\n",
    "print(cs_props)\n",
    "\n",
    "offset = 0.2\n",
    "fig, ax = plt.subplots()\n",
    "stp.plot_cs(ax, b_v, h_v, ysi_v, zsi_v)\n",
    "ax.set_xlim(-offset, np.max(b) + offset)\n",
    "ax.set_ylim(-offset, np.max(h) + offset)\n",
    "ax.grid(linestyle=\":\")\n",
    "ax.axis('equal')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "2d845a5a",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-03T17:10:06.241497Z",
     "iopub.status.busy": "2022-04-03T17:10:06.240498Z",
     "iopub.status.idle": "2022-04-03T17:10:06.372132Z",
     "shell.execute_reply": "2022-04-03T17:10:06.372132Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'A': 0.019200000000000002,\n",
      " 'I_y': 9.024000000000011e-05,\n",
      " 'I_z': 0.0005113600000000001,\n",
      " 'y_s': 0.20000000000000004,\n",
      " 'z_s': 0.14999999999999997}\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 13064 characters]\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "filenames": {
       "image/png": "C:\\Users\\David\\OneDrive\\Desktop\\imwspy\\stanpy\\stanpy\\docs\\_build\\jupyter_execute\\user_guide\\cross_section_3_1.png"
      },
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import stanpy as stp\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "s, t = 0.02, 0.02  # m\n",
    "b, h = 0.3, 0.4 # m\n",
    "\n",
    "b_v = np.array([t, h - 2 * t, t])\n",
    "h_v = np.array([b, s, b])\n",
    "ysi_v = stp.AH_y.dot(b_v) # von OK\n",
    "zsi_v = stp.AH_z.dot(h_v) # von Links\n",
    "\n",
    "cs_props = stp.cs(b=b_v, h=h_v, y_si=ysi_v, z_si=zsi_v)\n",
    "\n",
    "print(cs_props)\n",
    "\n",
    "offset = 0.2\n",
    "fig, ax = plt.subplots()\n",
    "stp.plot_cs(ax, b_v, h_v, ysi_v, zsi_v)\n",
    "ax.set_xlim(-offset, np.max(b) + offset)\n",
    "ax.set_ylim(-offset, np.max(h) + offset)\n",
    "ax.grid(linestyle=\":\")\n",
    "ax.axis('equal')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "aedbbc2d",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-03T17:10:06.376135Z",
     "iopub.status.busy": "2022-04-03T17:10:06.376135Z",
     "iopub.status.idle": "2022-04-03T17:10:06.522451Z",
     "shell.execute_reply": "2022-04-03T17:10:06.522451Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'A': 0.020640000000000002,\n",
      " 'I_y': 0.000526912,\n",
      " 'I_z': 0.0002692627199999998,\n",
      " 'y_s': 0.15000000000000002,\n",
      " 'z_s': 0.2}\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 15436 characters]\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "filenames": {
       "image/png": "C:\\Users\\David\\OneDrive\\Desktop\\imwspy\\stanpy\\stanpy\\docs\\_build\\jupyter_execute\\user_guide\\cross_section_4_1.png"
      },
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import stanpy as stp\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "s, t = 0.012, 0.02  # m\n",
    "b, h = 0.3, 0.4 # m\n",
    "\n",
    "b_v = np.array([b, s, s, b])\n",
    "h_v = np.array([t, h - 2 * t, h - 2 * t, t])\n",
    "ysi_v = stp.AK_y.dot(b_v) # von OK\n",
    "zsi_v = stp.AK_z.dot(h_v) # von Links\n",
    "\n",
    "cs_props = stp.cs(b=b_v, h=h_v, z_si=zsi_v, y_si=ysi_v)\n",
    "\n",
    "print(cs_props)\n",
    "\n",
    "offset = 0.2\n",
    "fig, ax = plt.subplots()\n",
    "stp.plot_cs(ax, b_v, h_v, ysi_v, zsi_v)\n",
    "ax.set_xlim(-offset, np.max(b) + offset)\n",
    "ax.set_ylim(-offset, np.max(h) + offset)\n",
    "ax.grid(linestyle=\":\")\n",
    "ax.axis('equal')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "5da8dc1b",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-03T17:10:06.526455Z",
     "iopub.status.busy": "2022-04-03T17:10:06.526455Z",
     "iopub.status.idle": "2022-04-03T17:10:06.687519Z",
     "shell.execute_reply": "2022-04-03T17:10:06.687519Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'A': 0.01872,\n",
      " 'I_y': 0.0005384160000000002,\n",
      " 'I_z': 0.00013984703999999986,\n",
      " 'y_s': 0.15000000000000002,\n",
      " 'z_s': 0.20000000000000004}\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 14912 characters]\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "filenames": {
       "image/png": "C:\\Users\\David\\OneDrive\\Desktop\\imwspy\\stanpy\\stanpy\\docs\\_build\\jupyter_execute\\user_guide\\cross_section_5_1.png"
      },
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import stanpy as stp\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "s, t = 0.012, 0.02  # m\n",
    "b, h = 0.3, 0.4 # m\n",
    "h_i = 0.05  # m\n",
    "\n",
    "b_v = np.array([b, s, b, s, s, s, s])\n",
    "h_v = np.array([t, h - 2 * t, t, h_i, h_i, h_i, h_i])\n",
    "ysi_v = stp.AI_yp.dot(b_v) # von OK\n",
    "zsi_v = stp.AI_zp.dot(h_v) # von Links\n",
    "\n",
    "cs_props = stp.cs(b=b_v, h=h_v, z_si=zsi_v, y_si=ysi_v)\n",
    "\n",
    "print(cs_props)\n",
    "\n",
    "offset = 0.2\n",
    "fig, ax = plt.subplots()\n",
    "stp.plot_cs(ax, b_v, h_v, ysi_v, zsi_v)\n",
    "ax.set_xlim(-offset, np.max(b) + offset)\n",
    "ax.set_ylim(-offset, np.max(h) + offset)\n",
    "ax.grid(linestyle=\":\")\n",
    "ax.axis('equal')\n",
    "plt.show()"
   ]
  }
 ],
 "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.9.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}