{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Example 4.1: Pull-out multilinear bond-slip law unloading\n", "\n", "This notebook uses the `bmcs` package to show the unphysical \n", "nature of a model without physical representation of irreversible\n", "processes in the material structure. It unloads along the original\n", "pull-out curve.\n", "\n", "Further, the notebook shows how to define non-monotonic loading scenario\n", "using a time-function and how to use the function of the `PullOutModel`\n", "to plot the results into a prepared plotting area." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/rch/miniconda3/lib/python3.9/site-packages/traits/observation/_has_traits_helpers.py:70: RuntimeWarning: Trait '_wrappers' (trait type: List) on class ActionItem is defined with comparison_mode=<ComparisonMode.equality: 2>. Mutations and extended traits cannot be observed if a new container compared equally to the old one is set. Redefine the trait with List(..., comparison_mode=<ComparisonMode.identity: 1>) to avoid this.\n", " warnings.warn(\n", "/home/rch/miniconda3/lib/python3.9/site-packages/traits/observation/_has_traits_helpers.py:70: RuntimeWarning: Trait '_wrappers' (trait type: List) on class ActionItem is defined with comparison_mode=<ComparisonMode.equality: 2>. Mutations and extended traits cannot be observed if a new container compared equally to the old one is set. Redefine the trait with List(..., comparison_mode=<ComparisonMode.identity: 1>) to avoid this.\n", " warnings.warn(\n", "/home/rch/miniconda3/lib/python3.9/site-packages/traits/observation/_has_traits_helpers.py:70: RuntimeWarning: Trait '_wrappers' (trait type: List) on class ActionItem is defined with comparison_mode=<ComparisonMode.equality: 2>. Mutations and extended traits cannot be observed if a new container compared equally to the old one is set. Redefine the trait with List(..., comparison_mode=<ComparisonMode.identity: 1>) to avoid this.\n", " warnings.warn(\n" ] } ], "source": [ "%matplotlib widget\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "from bmcs_cross_section.api import PullOutModel" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Model parameters\n", "Let us consider the case of the CFRP sheet debonding from concrete" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "A_f = 16.67 # [mm^2]\n", "A_m = 1540.0 # [mm^2]\n", "p = 1.0 #\n", "E_f = 170000 # [MPa]\n", "E_m = 28000 # [MPa]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Construct the finite element pullout model\n", "The model uses a multilinear bond-slip law specified by the attributes \n", "s_arr and tau_arr specifying the pairs of slip and bond stress values." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "REGENERATE DOMAIN\n", "REGENERATE DOMAIN\n", "REGENERATE DOMAIN\n" ] } ], "source": [ "pm = PullOutModel()\n", "pm.mat_mod_.s_data = \"0, 0.1, 0.4, 4\"\n", "pm.mat_mod_.tau_data = \"0, 800, 0, 0\"\n", "pm.sim.tline.step = 0.01\n", "pm.cross_section.trait_set(A_f=A_f, P_b=p, A_m=A_m)\n", "pm.geometry.L_x = 100\n", "pm.w_max = 2\n", "pm.n_e_x = 100" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "8ff5aa5a95fc4543b9b09e65793c2014", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(HBox(children=(VBox(children=(Tree(layout=Layout(align_items='stretch', border='solid 1px black…" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "pm.interact()" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "e63e64be77934e39a3bb239662a1d0d8", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/latex": [ "\n", " \\begin{array}{lrrl}\\hline\n", " \\textrm{number_of_cycles} & n_\\mathrm{cycles} = 1 & \\textrm{[-]} & \\textrm{for cyclic loading} \\\\\n", " \\textrm{maximum_loading} & \\phi_{\\max} = 1.0 & \\textrm{[-]} & \\textrm{load factor at maximum load level} \\\\\n", " \\textrm{number_of_increments} & n_{\\mathrm{incr}} = 20 & \\textrm{[-]} & \\textrm{number of values within a monotonic load branch} \\\\\n", " \\textrm{unloading_ratio} & \\phi_{\\mathrm{unload}} = 0.5 & \\textrm{[-]} & \\textrm{fraction of maximum load at lowest load level} \\\\\n", " \\textrm{amplitude_type} & option = increasing & \\textrm{[-]} & \\textrm{possible values: [increasing, constant]} \\\\\n", " \\textrm{loading_range} & option = non-symmetric & \\textrm{[-]} & \\textrm{possible values: [non-symmetric, symmetric]} \\\\\n", " \\hline\n", " \\hline\n", " \\end{array}\n", " " ], "text/plain": [ "<ibvpy.tfunction.loading_scenario.CyclicLoadingScenario at 0x7fdbc3ba7f40>" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "_, ax = plt.subplots(1,1,figsize=(7,4))\n", "pm.loading_scenario_.plot(ax)\n", "pm.loading_scenario_" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "\n", " \\begin{array}{lrrl}\\hline\n", " \\textrm{loading_type} & option = cyclic & \\textrm{[-]} & \\textrm{possible values: [monotonic, cyclic]} \\\\\n", " \\textrm{number_of_cycles} & n_\\mathrm{cycles} = 2 & \\textrm{[-]} & \\textrm{for cyclic loading} \\\\\n", " \\textrm{maximum_loading} & \\phi_{\\max} = 1.0 & \\textrm{[-]} & \\textrm{load factor at maximum load level} \\\\\n", " \\textrm{unloading_ratio} & \\phi_{\\mathrm{unload}} = 0.0 & \\textrm{[-]} & \\textrm{fraction of maximum load at lowest load level} \\\\\n", " \\textrm{number_of_increments} & n_{\\mathrm{incr}} = 20 & \\textrm{[-]} & \\textrm{number of values within a monotonic load branch} \\\\\n", " \\textrm{amplitude_type} & option = constant & \\textrm{[-]} & \\textrm{possible values: [increasing, constant]} \\\\\n", " \\textrm{loading_range} & option = non-symmetric & \\textrm{[-]} & \\textrm{possible values: [non-symmetric, symmetric]} \\\\\n", " \\hline\n", " \\hline\n", " \\end{array}\n", " " ], "text/plain": [ "<ibvpy.tfunction.loading_scenario.LoadingScenario at 0x7f4d73abd0e0>" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "pm.loading_scenario.loading_type='cyclic'\n", "pm.loading_scenario.trait_set(number_of_cycles=2,\n", " unloading_ratio=0.0,\n", " amplitude_type='constant',\n", " loading_range='non-symmetric')\n", "pm.loading_scenario" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "<ipython-input-7-a80ba1790c48>:1: MatplotlibDeprecationWarning: Adding an axes using the same arguments as a previous axes currently reuses the earlier instance. In a future version, a new instance will always be created and returned. Meanwhile, this warning can be suppressed, and the future behavior ensured, by passing a unique label to each axes instance.\n", " pm.loading_scenario.plot(plt.axes())\n" ] } ], "source": [ "pm.loading_scenario.plot(plt.axes())" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "\n", " \\begin{array}{lrrl}\\hline\n", " \\textrm{A_m} & A_\\mathrm{m} = 1540.0 & \\textrm{[$\\mathrm{mm}^2$]} & \\textrm{matrix area} \\\\\n", " \\textrm{A_f} & A_\\mathrm{f} = 16.67 & \\textrm{[$\\mathrm{mm}^2$]} & \\textrm{reinforcement area} \\\\\n", " \\textrm{P_b} & p_\\mathrm{b} = 1.0 & \\textrm{[$\\mathrm{mm}$]} & \\textrm{perimeter of the bond interface} \\\\\n", " \\hline\n", " \\hline\n", " \\end{array}\n", " " ], "text/plain": [ "<bmcs.pullout.pullout_sim.CrossSection at 0x7f8eacdf6530>" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "pm.cross_section.trait_set(A_f=A_f, P_b=p, A_m=A_m)\n", "pm.cross_section # display the cross section parameters" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "\n", " \\begin{array}{lrrl}\\hline\n", " \\textrm{L_x} & L = 45 & \\textrm{[$\\mathrm{mm}$]} & \\textrm{embedded length} \\\\\n", " \\hline\n", " \\hline\n", " \\end{array}\n", " " ], "text/plain": [ "<bmcs.pullout.pullout_sim.Geometry at 0x7f8eacdf6470>" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "pm.geometry # geometry of the boundary value problem" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Plot the current bond-slip law" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "\n", " \\begin{array}{lrrl}\\hline\n", " \\textrm{E_m} & E_\\mathrm{m} = 28000.0 & \\textrm{[MPa]} & \\textrm{E-modulus of the matrix} \\\\\n", " \\textrm{E_f} & E_\\mathrm{f} = 170000.0 & \\textrm{[MPa]} & \\textrm{E-modulus of the reinforcement} \\\\\n", " \\textrm{s_data} & s = 0, 0.1, 0.4, 4 & \\textrm{[mm]} & \\textrm{slip values} \\\\\n", " \\textrm{tau_data} & \\tau = 0, 800, 0, 0 & \\textrm{[MPa]} & \\textrm{shear stress values} \\\\\n", " \\hline\n", " \\hline\n", " \\end{array}\n", " " ], "text/plain": [ "<ibvpy.tmodel.mats1D5.vmats1D5_bondslip1D.MATSBondSlipMultiLinear at 0x7f1f25718810>" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "pm.mat_mod_ # configuration of the material model" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "f184fee970b4427b91685ce451f3669a", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "_, ax = plt.subplots(1,1,figsize=(7,4))\n", "pm.mat_mod_.plot(ax, color='green')" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [], "source": [ "c='red'\n", "pm.geometry.L_x = 200\n", "pm.sim.run()" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "3399b8c10dc540369e2282ed2a5dad7c", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "_, ax = plt.subplots(1,1,figsize=(7,4))\n", "pm.hist.plot_Pw(ax,0.68)" ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "0aaabc9a67844b0b801d026243f8fb32", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "_, ax = plt.subplots(1,1,figsize=(7,4))\n", "for t in np.linspace(0.,0.62,4):\n", " pm.hist.t_slider = t\n", " pm.hist.plot_sf(ax)\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "f8316fff884f47d4b59a27f8879206fc", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "_, ax = plt.subplots(1,1,figsize=(7,4))\n", "for t in np.linspace(0.,0.62,4):\n", " pm.hist.t_slider = t\n", " pm.hist.plot_s(ax)\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": 25, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "cafa3ab8f561421e899e6f2b0ba7eff9", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "_, ax = plt.subplots(1,1,figsize=(7,4))\n", "for t in np.linspace(0.,.99,5):\n", " pm.hist.t_slider = t\n", " pm.hist.plot_eps_p(ax)\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": 26, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "8b62d46e22af412cb0926afbb213a01e", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "_, ax = plt.subplots(1,1,figsize=(7,4))\n", "for t in np.linspace(0.,.99,5):\n", " pm.hist.t_slider = t\n", " pm.hist.plot_sig_p(ax)\n", "plt.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Questions and Tasks" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 1 Define a symmetric loading scenario with increasing amplitude and 3 cycles" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "base", "language": "python", "name": "base" }, "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.1" }, "toc": { "base_numbering": 1, "nav_menu": {}, "number_sections": true, "sideBar": true, "skip_h1_title": true, "title_cell": "Table of Contents", "title_sidebar": "Contents", "toc_cell": false, "toc_position": {}, "toc_section_display": true, "toc_window_display": false } }, "nbformat": 4, "nbformat_minor": 4 }