{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Boundary profile ``3d`` with pressure balance" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", "import numpy as np\n", "\n", "from mnflow.mfda.cad.dld.theme.block import DLD" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "dld = DLD(\n", " d_c=10.0,\n", " Np=10,\n", " # boundary\n", " boundary_treatment='3d',\n", " #\n", " rotation_angle_deg_before_array=90,\n", " # image\n", " opt_save_image=True,\n", " img_dpu=5,\n", ")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Output layout:\n", "![Layout](layout_overlay.png)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Visualization of gap profiles\n", "\n", "Here is how dimensionless gap profiles look like for depletion and accumulation sidewalls:" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "Np=dld.Np\n", "gap_a=dld.gap_a\n", "gap_w=dld.gap_w\n", "phi=dld.phi\n", "boundary_gaps=dld.get_boundary_gaps()\n", "\n", "dep_gap=np.array(boundary_gaps['dep'][:,:-1]).flatten()\n", "acc_gap=np.array(boundary_gaps['acc']).flatten()\n", "if boundary_gaps['acc_usm_gap_a_widening'] is None:\n", " boundary_gaps['acc_usm_gap_a_widening']=0\n", "acc_Nth_lat_gap=boundary_gaps['acc_usm_gap_a_widening']+gap_a\n", "\n", "fig, ax=plt.subplots(1,2,figsize=(7,3),dpi=300, layout=\"constrained\")\n", "ax[0].plot(np.arange(1,Np+1), dep_gap[::-1]/gap_w, '--o', label=\"Dep.\")\n", "ax[1].plot(np.arange(1,Np+1), acc_gap[::-1]/gap_w, '--gp', label=\"Acc.\")\n", "ax[0].set_xlabel('Row #')\n", "ax[1].set_xlabel('Row #')\n", "ax[0].set_ylabel(r'$g/g_w$')\n", "ax[1].set_ylabel(r'$g/g_w$')\n", "ax[0].legend()\n", "ax[1].legend()\n", "plt.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "And, values of important parameters and variables:" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "print(\"Np: \", Np)\n", "print(\"gap_w: \", gap_w)\n", "print(\"phi: \", phi)\n", "print('gap dep: ', dep_gap)\n", "print('gap acc: ', acc_gap)\n", "print('gap acc widening -- Nth row, lat: ', boundary_gaps['acc_usm_gap_a_widening'])\n", "print('gap acc -- Nth row, lat: ', acc_Nth_lat_gap)" ] } ], "metadata": { "kernelspec": { "display_name": "mnflow", "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.12.8" } }, "nbformat": 4, "nbformat_minor": 2 }