{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "60cf50fa",
   "metadata": {},
   "outputs": [],
   "source": [
    "# ---- Material Sec ----\n",
    "Material(1, \"S235\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "4f7945d7",
   "metadata": {},
   "outputs": [],
   "source": [
    "# ---- Geometry Sec ----\n",
    "Node(1, 0.0, 0.0, 0.0)  # Node at 0 m\n",
    "Node(2, 5.0, 0.0, 0.0)  # Node at 5 m\n",
    "\n",
    "Line(1, '1 2')  # Line between Node 1 and Node 2\n",
    "\n",
    "NodalSupport(1, '1', NodalSupportType.FIXED)  # Fixed support at Node 1\n",
    "NodalSupport(2, '2', NodalSupportType.FIXED)  # Fixed support at Node 2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "99550985",
   "metadata": {},
   "outputs": [],
   "source": [
    "# ---- Cross Sections Sec ----\n",
    "Section(1, 'IPE 200', 1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "5389be0d",
   "metadata": {},
   "outputs": [],
   "source": [
    "# ---- Loads Sec ----\n",
    "\n",
    "LoadCase(1, 'Mid-span Load', [True, 0.0, 0.0, 1.0])  # Load case with self-weight\n",
    "\n",
    "# Since the load is in the middle of the beam, we assume it acts on the member\n",
    "MemberLoad(1, 1, '1', MemberLoadDirection.LOAD_DIRECTION_LOCAL_Z, 3000)  # 3 kN load in the middle"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3a12e61f",
   "metadata": {},
   "outputs": [],
   "source": [
    "# ---- Solver Sec ----\n",
    "Model.clientModel.service.finish_modification()\n",
    "\n",
    "Calculate_all()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "0513ef32",
   "metadata": {},
   "outputs": [],
   "source": [
    "# ---- Material Sec ----\n",
    "Material(1, \"S235\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ff9ffd27",
   "metadata": {},
   "outputs": [],
   "source": [
    "# ---- Geometry Sec ----\n",
    "Node(1, 0.0, 0.0, 0.0)  # First node at the start of the beam\n",
    "Node(2, 5.0, 0.0, 0.0)  # Second node at the end of the beam\n",
    "\n",
    "Line(1, '1 2')  # Line representing the beam between the two nodes\n",
    "\n",
    "NodalSupport(1, '1', NodalSupportType.HINGED)  # Support at the first node\n",
    "NodalSupport(2, '2', NodalSupportType.HINGED)  # Support at the second node"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "05634a42",
   "metadata": {},
   "outputs": [],
   "source": [
    "# ---- Cross Sections Sec ----\n",
    "Section(1, 'IPE 300', 1)  # Define the cross section as IPE 300 with material S235"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f5da7f63",
   "metadata": {},
   "outputs": [],
   "source": [
    "# ---- Loads Sec ----\n",
    "\n",
    "LoadCase(1, 'Self-weight', [True, 0.0, 0.0, 1.0])  # Define the load case with self-weight\n",
    "\n",
    "NodalLoad(1, 1, '1', NodalLoadDirection.LOAD_DIRECTION_GLOBAL_Z_OR_USER_DEFINED_W, -3000)  # Apply a 3 kN load at the midpoint of the beam"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "0c1b00ca",
   "metadata": {},
   "outputs": [],
   "source": [
    "# ---- Solver Sec ----\n",
    "Model.clientModel.service.finish_modification()\n",
    "\n",
    "Calculate_all()"
   ]
  }
 ],
 "metadata": {},
 "nbformat": 4,
 "nbformat_minor": 5
}
