Skip to content
Snippets Groups Projects
x_2_4_PO_comparison.ipynb 2.84 KiB
Newer Older
Rostislav Chudoba's avatar
Rostislav Chudoba committed
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Model comparison \n",
    "Let us now import the three models\n",
    " - PO_LF_LM_RG: pullout of long fiber from long rigid matrix\n",
    " - PO_LF_LM_EL:pullout of long fiber from long elastic matrix\n",
    " - PO_SF_LM_RG: pullout of long fiber from short rigid matrix\n",
    " - PO_Comparison: comparison between the above configurations"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
Rostislav Chudoba's avatar
Rostislav Chudoba committed
   "metadata": {},
   "outputs": [],
   "source": [
    "%%capture\n",
    "%run 2_2_PO_LF_LM_EL.ipynb"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
Rostislav Chudoba's avatar
Rostislav Chudoba committed
   "metadata": {},
   "outputs": [],
   "source": [
    "%%capture\n",
    "%run 2_3_PO_SF_M_RG.ipynb"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
Rostislav Chudoba's avatar
Rostislav Chudoba committed
   "metadata": {},
   "outputs": [],
   "source": [
    "import bmcs_pullout_ui as poui"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
Rostislav Chudoba's avatar
Rostislav Chudoba committed
   "metadata": {},
   "outputs": [],
   "source": [
    "po = poui.ModelInteract(\n",
    "    models=[PO_LF_LM_RG, PO_LF_LM_EL, PO_SF_M_RG],\n",
    "    py_vars=list(py_vars),\n",
    "    map_py2sp=map_py2sp\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
Rostislav Chudoba's avatar
Rostislav Chudoba committed
   "source": [
    "po.interact_geometry()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
Rostislav Chudoba's avatar
Rostislav Chudoba committed
   "metadata": {},
   "outputs": [],
Rostislav Chudoba's avatar
Rostislav Chudoba committed
   "source": [
    "params = {w: w_range, A_f:1, E_f:1, A_m:1, E_m:4, tau:1, p:1, L_b:1}\n",
    "param_vals = tuple(params[map_py2sp[py_var]] for py_var in py_vars)\n",
    "fix, ax = plt.subplots(1,1, figsize=(8,4))\n",
    "poui.plot_filled_var(ax, w_range, PO_LF_LM_RG.get_Pw_pull(*param_vals),color='orange');\n",
    "poui.plot_filled_var(ax, w_range, PO_LF_LM_EL.get_Pw_pull(*param_vals),color='green');\n",
    "poui.plot_filled_var(ax, w_range, PO_SF_M_RG.get_Pw_pull(*param_vals),color='blue');"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "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"
Rostislav Chudoba's avatar
Rostislav Chudoba committed
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {
    "height": "calc(100% - 180px)",
    "left": "10px",
    "top": "150px",
    "width": "165px"
   },
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}