{ "cells": [ { "cell_type": "markdown", "id": "d7bd5fa0-e6ec-4a9a-8b4c-3e725faf6a38", "metadata": {}, "source": [ "# Local Axes and Loads Demonstration" ] }, { "cell_type": "code", "execution_count": 1, "id": "30aabb86-6d34-4b99-9ccb-4007af71acc6", "metadata": { "execution": { "iopub.execute_input": "2023-05-06T12:19:53.618295Z", "iopub.status.busy": "2023-05-06T12:19:53.618295Z", "iopub.status.idle": "2023-05-06T12:19:54.723033Z", "shell.execute_reply": "2023-05-06T12:19:54.723033Z", "shell.execute_reply.started": "2023-05-06T12:19:53.618295Z" }, "tags": [] }, "outputs": [], "source": [ "import opstool as opst" ] }, { "cell_type": "code", "execution_count": 2, "id": "db7a06c4-7afb-416b-a12d-876116093aa4", "metadata": { "execution": { "iopub.execute_input": "2023-05-06T12:19:54.725027Z", "iopub.status.busy": "2023-05-06T12:19:54.724027Z", "iopub.status.idle": "2023-05-06T12:19:54.739734Z", "shell.execute_reply": "2023-05-06T12:19:54.738531Z", "shell.execute_reply.started": "2023-05-06T12:19:54.725027Z" }, "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The original Tcl file comes from http://www.dinochen.com/, and the Python version is converted by opstool.tcl2py().\n" ] } ], "source": [ "opst.load_ops_examples(\"Frame3D2\")" ] }, { "cell_type": "markdown", "id": "5cef69ae-e83f-4ca6-a37b-3d495b5b5cd7", "metadata": {}, "source": [ "## Local axes" ] }, { "cell_type": "code", "execution_count": 3, "id": "d0d3338f-a59e-44ce-9bed-8ed75faa0c48", "metadata": { "execution": { "iopub.execute_input": "2023-05-06T12:19:54.739734Z", "iopub.status.busy": "2023-05-06T12:19:54.739734Z", "iopub.status.idle": "2023-05-06T12:19:55.261326Z", "shell.execute_reply": "2023-05-06T12:19:55.261326Z", "shell.execute_reply.started": "2023-05-06T12:19:54.739734Z" }, "tags": [] }, "outputs": [ { "data": { "text/html": [ "
Model data saved in opstool_output/ModelData.hdf5!\n",
       "
\n" ], "text/plain": [ "Model data saved in \u001b[1;38;2;0;174;255mopstool_output/ModelData.hdf5\u001b[0m!\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "opst.plot_model(backend=\"plotly\", show_local_crd=True, local_crd_alpha=1.2,\n", " show_outline=False)" ] }, { "cell_type": "raw", "id": "d147cc0e-4aac-4fd9-9c05-cd600e3d07a5", "metadata": { "raw_mimetype": "text/restructuredtext", "tags": [] }, "source": [ ".. image:: images/Frame3D2model.png\n", " :align: center" ] }, { "cell_type": "markdown", "id": "3df1d6c7-318e-4280-a99e-47d3cf4d1e79", "metadata": {}, "source": [ "## Loads" ] }, { "cell_type": "markdown", "id": "0dbf2f46-f086-4abd-a6bd-9063fda7312c", "metadata": {}, "source": [ "First generate gravity loads (nodal loads)" ] }, { "cell_type": "code", "execution_count": 4, "id": "fda047ab-d942-44ca-bb3e-8677819a394a", "metadata": { "execution": { "iopub.execute_input": "2023-05-06T12:19:55.263326Z", "iopub.status.busy": "2023-05-06T12:19:55.263326Z", "iopub.status.idle": "2023-05-06T12:19:55.276884Z", "shell.execute_reply": "2023-05-06T12:19:55.276884Z", "shell.execute_reply.started": "2023-05-06T12:19:55.263326Z" }, "tags": [] }, "outputs": [], "source": [ "opst.gen_grav_load(ts_tag=1, pattern_tag=1, direction=\"Z\", factor=-9810)" ] }, { "cell_type": "code", "execution_count": 5, "id": "d759e5ac-853b-4c33-84c6-c804112873b5", "metadata": { "execution": { "iopub.execute_input": "2023-05-06T12:19:55.277883Z", "iopub.status.busy": "2023-05-06T12:19:55.277883Z", "iopub.status.idle": "2023-05-06T12:19:55.403906Z", "shell.execute_reply": "2023-05-06T12:19:55.402908Z", "shell.execute_reply.started": "2023-05-06T12:19:55.277883Z" }, "tags": [] }, "outputs": [ { "data": { "text/html": [ "
Model data saved in opstool_output/ModelData.hdf5!\n",
       "
\n" ], "text/plain": [ "Model data saved in \u001b[1;38;2;0;174;255mopstool_output/ModelData.hdf5\u001b[0m!\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "opst.plot_model(backend=\"plotly\", show_load=True, load_alpha=1.2,\n", " show_outline=False)" ] }, { "cell_type": "raw", "id": "e648cafd-6bbc-4462-a2ee-0f8147752509", "metadata": { "raw_mimetype": "text/restructuredtext", "tags": [] }, "source": [ ".. image:: images/Frame3D2load.png\n", " :align: center" ] } ], "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.16" } }, "nbformat": 4, "nbformat_minor": 5 }