From fc8d169df3f16e62f890fdc816071ef05a2f8cdf Mon Sep 17 00:00:00 2001 From: wehrle Date: Mon, 5 Oct 2020 11:35:09 +0200 Subject: [PATCH 1/6] Kratos mdpa tutorial with new version --- tutorials/tutorial-7-mdpa.ipynb | 198 +++++++++++++++++++++++--------- 1 file changed, 144 insertions(+), 54 deletions(-) diff --git a/tutorials/tutorial-7-mdpa.ipynb b/tutorials/tutorial-7-mdpa.ipynb index d31d056..ff61864 100644 --- a/tutorials/tutorial-7-mdpa.ipynb +++ b/tutorials/tutorial-7-mdpa.ipynb @@ -11,48 +11,52 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "###### Tutorial 6: Free Form Deformation on a k mesh on cylinder: continuity of the deformation" + "###### Tutorial 7: Free Form Deformation on a Kratos mdpa mesh on cylinder: continuity of the deformation" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "In this tutorial we show how to perform the Free Form Deformation on a hexaedral mesh of a cylinder. As seen in Tutorial 3, but with a LS-Dyna k file.\n", + "In this tutorial we show how to perform the Free Form Deformation on a hexaedral mesh of a cylinder. As seen in Tutorial 3, but with a Kratos mdpa file.\n", + "\n", + "As PyGeM cannot visualize mdpa files directly, meshio and vedo are needed to convert the file to a vtk file and then plot it. The library vedo allows for interactive plot within Jupyter. See below. These can be installed with pip install vedo meshio.\n", "\n", "First of all we just import the required PyGeM classes and we read a parameters file." ] }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ - "from pygem import FFD\n", - "from pygem.mdpahandler import MdpaHandler" + "import pygem as pg\n", + "from pygem.mdpahandler import MdpaHandler\n", + "import vedo\n", + "import meshio" ] }, { - "cell_type": "code", - "execution_count": 14, + "cell_type": "markdown", "metadata": {}, - "outputs": [], "source": [ - "ffd = FFD()\n", - "ffd.read_parameters(filename='../tests/test_datasets/parameters_test_ffd_pipe_unv_C0.prm')" + "The following is the parameters file for the case at hand. In particular, if you look at the Box info section, there is 2-by-2-by-3 lattice around a cylinder. Since we want to shift the middle section of the cylinder along the x direction we modify only the parameter x weights corresponding to the middle point in z direction (index==1). In the following we show only the important parts of the parameters file" ] }, { - "cell_type": "markdown", + "cell_type": "code", + "execution_count": 2, "metadata": {}, + "outputs": [], "source": [ - "The following is the parameters file for the case at hand. In particular, if you look at the Box info section, there is 2-by-2-by-3 lattice around a cylinder. Since we want to shift the middle section of the cylinder along the x direction we modify only the parameter x weights corresponding to the middle point in z direction (index==1). In the following we show only the important parts of the parameters file" + "ffd = pg.FFD()\n", + "ffd.read_parameters('../tests/test_datasets/parameters_test_ffd_pipe_unv_C0.prm')" ] }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 3, "metadata": {}, "outputs": [ { @@ -159,63 +163,109 @@ "collapsed": true }, "source": [ - "We now load the k file!" + "We now load the mdpa file!" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "mdpa_handler = MdpaHandler()\n", + "mesh_points = mdpa_handler.parse('../tests/test_datasets/test_pipe.mdpa')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "and visualize the undeformed mesh by tranlating with meshio from MPDA to VTK format." ] }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 5, "metadata": {}, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "[[ 1.00000000e+00 -1.22464675e-16 0.00000000e+00]\n", - " [ 1.00000000e+00 -1.22464675e-16 1.00000000e+01]\n", - " [ 6.12323400e-17 1.00000000e+00 0.00000000e+00]\n", - " ...\n", - " [-9.19198149e-01 1.94291324e-01 9.90000000e+00]\n", - " [-9.53327549e-01 9.77311899e-02 9.90000000e+00]\n", - " [-9.78719220e-01 -2.06085149e-15 9.90000000e+00]]\n" - ] + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "e49ed22f13254e80a29c103b9e975abc", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Plot(antialias=3, axes=['x', 'y', 'z'], axes_helper=1.0, background_color=16777215, camera=[5.469634129164876,…" + ] + }, + "metadata": {}, + "output_type": "display_data" } ], "source": [ - "mdpa_handler = MdpaHandler()\n", - "mesh_points = mdpa_handler.parse('../tests/test_datasets/test_pipe.mdpa')\n", - "print(mesh_points)" + "UndeformedMDPA = meshio.read('../tests/test_datasets/test_pipe.mdpa')\n", + "meshio.write('test_pipe_undeformed_mdpa.vtk', UndeformedMDPA)\n", + "UndeformedVTK = vedo.load('test_pipe_undeformed_mdpa.vtk')\n", + "vedo.settings.embedWindow(backend='k3d', verbose=True)\n", + "vedo.show(UndeformedVTK, viewup=\"z\", resetcam=True)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "and visualize the undeformed mesh.\n", - "\n", - "![](pictures/cylinder_orig_unv.png)\n", - "\n", - "We now, as always, perform the FFD and write out the results in a new k file." + "We now perform the FFD and write out the results with a new mdpa file." ] }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ - "new_mesh_points = ffd(mesh_points)\n", - "mdpa_handler.write(new_mesh_points, 'test_pipe_mod_C0.mdpa')" + "new_mesh_points = ffd(mesh_points)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let us see the result." + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "ee82ba37eaa0415ea5c279d2e3edd4d6", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Plot(antialias=3, axes=['x', 'y', 'z'], axes_helper=1.0, background_color=16777215, camera=[6.017318527774512,…" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "DeformedMDPA = meshio.read('test_pipe_mod_C0.mdpa')\n", + "meshio.write('test_pipe_deformed_mdpa.vtk', DeformedMDPA)\n", + "DeformedVTK = vedo.load('test_pipe_deformed_mdpa.vtk')\n", + "vedo.settings.embedWindow(backend='k3d', verbose=True)\n", + "vedo.show(DeformedVTK, viewup=\"z\", resetcam=True)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Let us see the result.\n", - "\n", - "![](pictures/cylinder_mod_unv_C0.png)\n", - "\n", "As you can easily see the deformation makes the mesh only C0 continuous.\n", "\n", "This is not wrong a priori, but it can have some drawbacks.\n", @@ -231,7 +281,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 9, "metadata": {}, "outputs": [ { @@ -360,31 +410,71 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We again load the new parameter file, perform the FFD and write out the results with a new k file." + "We again load the new parameter file, perform the FFD and write out the results with a new mdpa file." ] }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 10, "metadata": {}, "outputs": [], "source": [ - "ffd = FFD()\n", - "ffd.read_parameters(filename='../tests/test_datasets/parameters_test_ffd_pipe_unv_C1.prm')\n", + "ffd = pg.FFD()\n", + "ffd.read_parameters('../tests/test_datasets/parameters_test_ffd_pipe_unv_C1.prm')\n", "new_mesh_points = ffd(mesh_points)\n", - "\n", - "mdpa_handler.write(new_mesh_points, 'test_pipe_mod_C0.mdpa')" + "mdpa_handler.write(new_mesh_points, 'test_pipe_mod_C1.mdpa')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "And here it is the C1 mesh on the cylinder.\n", - "\n", - "![](pictures/cylinder_mod_unv_C1.png)\n", - "\n", - "You can add some other points to increase again the continuity of the mesh!" + "And here it is the C1 mesh on the cylinder." + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [], + "source": [ + "mesh = meshio.read('test_pipe_mod_C1.mdpa')\n", + "meshio.write('test_pipe_mod_C1_mdpa.vtk', mesh)" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "5ff5725b547e4a2c90a31e337e794bf8", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Plot(antialias=3, axes=['x', 'y', 'z'], axes_helper=1.0, background_color=16777215, camera=[5.876968904869433,…" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "DeformedMDPA = meshio.read('test_pipe_mod_C1.mdpa')\n", + "meshio.write('test_pipe_deformed_mdpa.vtk', DeformedMDPA)\n", + "DeformedVTK = vedo.load('test_pipe_deformed_mdpa.vtk')\n", + "vedo.settings.embedWindow(backend='k3d', verbose=True)\n", + "vedo.show(DeformedVTK, viewup=\"z\", resetcam=True)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "You can add further points to increase again the continuity of the mesh!" ] } ], @@ -404,7 +494,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.8" + "version": "3.8.2" }, "latex_envs": { "LaTeX_envs_menu_present": true, From 2e3a9f5530844b02c364792d0c5cb33cc2063d30 Mon Sep 17 00:00:00 2001 From: wehrle Date: Mon, 5 Oct 2020 11:35:34 +0200 Subject: [PATCH 2/6] Kratos mdpa tutorial as script --- tutorials/tutorial-7-mdpa.py | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 tutorials/tutorial-7-mdpa.py diff --git a/tutorials/tutorial-7-mdpa.py b/tutorials/tutorial-7-mdpa.py new file mode 100755 index 0000000..2fd9e8b --- /dev/null +++ b/tutorials/tutorial-7-mdpa.py @@ -0,0 +1,42 @@ +import pygem as pg +from pygem.mdpahandler import MdpaHandler +import vedo +import meshio + +ffd = pg.FFD() +ffd.read_parameters('../tests/test_datasets/parameters_test_ffd_pipe_unv_C0.prm') + +%cat ../tests/test_datasets/parameters_test_ffd_pipe_unv_C0.prm + +mdpa_handler = MdpaHandler() +mesh_points = mdpa_handler.parse('../tests/test_datasets/test_pipe.mdpa') + +UndeformedMDPA = meshio.read('../tests/test_datasets/test_pipe.mdpa') +meshio.write('test_pipe_undeformed_mdpa.vtk', UndeformedMDPA) +UndeformedVTK = vedo.load('test_pipe_undeformed_mdpa.vtk') +vedo.settings.embedWindow(backend='k3d', verbose=True) +vedo.show(UndeformedVTK, viewup="z", resetcam=True) + +new_mesh_points = ffd(mesh_points) + +DeformedMDPA = meshio.read('test_pipe_mod_C0.mdpa') +meshio.write('test_pipe_deformed_mdpa.vtk', DeformedMDPA) +DeformedVTK = vedo.load('test_pipe_deformed_mdpa.vtk') +vedo.settings.embedWindow(backend='k3d', verbose=True) +vedo.show(DeformedVTK, viewup="z", resetcam=True) + +%cat ../tests/test_datasets/parameters_test_ffd_pipe_unv_C1.prm + +ffd = pg.FFD() +ffd.read_parameters('../tests/test_datasets/parameters_test_ffd_pipe_unv_C1.prm') +new_mesh_points = ffd(mesh_points) +mdpa_handler.write(new_mesh_points, 'test_pipe_mod_C1.mdpa') + +mesh = meshio.read('test_pipe_mod_C1.mdpa') +meshio.write('test_pipe_mod_C1_mdpa.vtk', mesh) + +DeformedMDPA = meshio.read('test_pipe_mod_C1.mdpa') +meshio.write('test_pipe_deformed_mdpa.vtk', DeformedMDPA) +DeformedVTK = vedo.load('test_pipe_deformed_mdpa.vtk') +vedo.settings.embedWindow(backend='k3d', verbose=True) +vedo.show(DeformedVTK, viewup="z", resetcam=True) From c41313f913cf56786bd6b31da8803e7af9cf6e66 Mon Sep 17 00:00:00 2001 From: wehrle Date: Mon, 5 Oct 2020 14:04:54 +0200 Subject: [PATCH 3/6] Dyna k tutorial as script --- tutorials/tutorial-6-k.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 tutorials/tutorial-6-k.py diff --git a/tutorials/tutorial-6-k.py b/tutorials/tutorial-6-k.py new file mode 100755 index 0000000..4df14cb --- /dev/null +++ b/tutorials/tutorial-6-k.py @@ -0,0 +1,23 @@ +import pygem as pg +from pygem.khandler import KHandler +import vedo +import meshio + +ffd = pg.FFD() +ffd.read_parameters('../tests/test_datasets/parameters_test_ffd_pipe_unv_C0.prm') + +%cat ../tests/test_datasets/parameters_test_ffd_pipe_unv_C0.prm + +handler = KHandler() +mesh_points = handler.parse('../tests/test_datasets/test_pipe.k') + +new_mesh_points = ffd(mesh_points) + +%cat ../tests/test_datasets/parameters_test_ffd_pipe_unv_C1.prm + +ffd = pg.FFD() +ffd.read_parameters('../tests/test_datasets/parameters_test_ffd_pipe_unv_C1.prm') + +new_mesh_points = ffd(mesh_points) + +handler.write(new_mesh_points, 'test_pipe_mod_C1.k') \ No newline at end of file From 7f5b30017d7adb059407781edbb0795c7d552bbd Mon Sep 17 00:00:00 2001 From: wehrle Date: Mon, 5 Oct 2020 14:14:06 +0200 Subject: [PATCH 4/6] removed cat command --- tutorials/tutorial-6-k.py | 6 +----- tutorials/tutorial-7-mdpa.py | 4 ---- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/tutorials/tutorial-6-k.py b/tutorials/tutorial-6-k.py index 4df14cb..901bd0c 100755 --- a/tutorials/tutorial-6-k.py +++ b/tutorials/tutorial-6-k.py @@ -6,18 +6,14 @@ ffd = pg.FFD() ffd.read_parameters('../tests/test_datasets/parameters_test_ffd_pipe_unv_C0.prm') -%cat ../tests/test_datasets/parameters_test_ffd_pipe_unv_C0.prm - handler = KHandler() mesh_points = handler.parse('../tests/test_datasets/test_pipe.k') new_mesh_points = ffd(mesh_points) -%cat ../tests/test_datasets/parameters_test_ffd_pipe_unv_C1.prm - ffd = pg.FFD() ffd.read_parameters('../tests/test_datasets/parameters_test_ffd_pipe_unv_C1.prm') new_mesh_points = ffd(mesh_points) -handler.write(new_mesh_points, 'test_pipe_mod_C1.k') \ No newline at end of file +handler.write(new_mesh_points, 'test_pipe_mod_C1.k') diff --git a/tutorials/tutorial-7-mdpa.py b/tutorials/tutorial-7-mdpa.py index 2fd9e8b..f035539 100755 --- a/tutorials/tutorial-7-mdpa.py +++ b/tutorials/tutorial-7-mdpa.py @@ -6,8 +6,6 @@ ffd = pg.FFD() ffd.read_parameters('../tests/test_datasets/parameters_test_ffd_pipe_unv_C0.prm') -%cat ../tests/test_datasets/parameters_test_ffd_pipe_unv_C0.prm - mdpa_handler = MdpaHandler() mesh_points = mdpa_handler.parse('../tests/test_datasets/test_pipe.mdpa') @@ -25,8 +23,6 @@ vedo.settings.embedWindow(backend='k3d', verbose=True) vedo.show(DeformedVTK, viewup="z", resetcam=True) -%cat ../tests/test_datasets/parameters_test_ffd_pipe_unv_C1.prm - ffd = pg.FFD() ffd.read_parameters('../tests/test_datasets/parameters_test_ffd_pipe_unv_C1.prm') new_mesh_points = ffd(mesh_points) From e553d74e28fd6dd6b9da446cad32ecbbac9d383c Mon Sep 17 00:00:00 2001 From: wehrle Date: Mon, 5 Oct 2020 17:01:00 +0200 Subject: [PATCH 5/6] removed unnecessary libaries --- tutorials/tutorial-6-k.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tutorials/tutorial-6-k.py b/tutorials/tutorial-6-k.py index 901bd0c..0be7bef 100755 --- a/tutorials/tutorial-6-k.py +++ b/tutorials/tutorial-6-k.py @@ -1,7 +1,5 @@ import pygem as pg from pygem.khandler import KHandler -import vedo -import meshio ffd = pg.FFD() ffd.read_parameters('../tests/test_datasets/parameters_test_ffd_pipe_unv_C0.prm') From a7d107eb667b2b5a840ce6881afa72e1de696777 Mon Sep 17 00:00:00 2001 From: wehrle Date: Wed, 7 Oct 2020 12:02:53 +0200 Subject: [PATCH 6/6] forgot line --- tutorials/tutorial-7-mdpa.ipynb | 168 ++++---------------------------- 1 file changed, 18 insertions(+), 150 deletions(-) diff --git a/tutorials/tutorial-7-mdpa.ipynb b/tutorials/tutorial-7-mdpa.ipynb index ff61864..9eb6bf2 100644 --- a/tutorials/tutorial-7-mdpa.ipynb +++ b/tutorials/tutorial-7-mdpa.ipynb @@ -27,7 +27,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ @@ -46,7 +46,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 9, "metadata": {}, "outputs": [], "source": [ @@ -56,7 +56,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 10, "metadata": {}, "outputs": [ { @@ -168,7 +168,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 16, "metadata": {}, "outputs": [], "source": [ @@ -185,13 +185,13 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 17, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "e49ed22f13254e80a29c103b9e975abc", + "model_id": "2ddd63dcb9bd4991aca20282974a2d7f", "version_major": 2, "version_minor": 0 }, @@ -220,11 +220,12 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 18, "metadata": {}, "outputs": [], "source": [ - "new_mesh_points = ffd(mesh_points)" + "new_mesh_points = ffd(mesh_points)\n", + "mdpa_handler.write(new_mesh_points, 'test_pipe_mod_C0.mdpa')" ] }, { @@ -236,13 +237,13 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 19, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "ee82ba37eaa0415ea5c279d2e3edd4d6", + "model_id": "07a27a24f4b340679146689d9b14896c", "version_major": 2, "version_minor": 0 }, @@ -281,127 +282,9 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\r\n", - "[Box info]\r\n", - "# This section collects all the properties of the FFD bounding box.\r\n", - "\r\n", - "# n control points indicates the number of control points in each direction (x, y, z).\r\n", - "# For example, to create a 2 x 3 x 2 grid, use the following: n control points: 2, 3, 2\r\n", - "n control points x: 2\r\n", - "n control points y: 2\r\n", - "n control points z: 5\r\n", - "\r\n", - "# box length indicates the length of the FFD bounding box along the three canonical directions (x, y, z).\r\n", - "# It uses the local coordinate system.\r\n", - "# For example to create a 2 x 1.5 x 3 meters box use the following: box length: 2.0, 1.5, 3.0\r\n", - "box length x: 2.2\r\n", - "box length y: 2.2\r\n", - "box length z: 6.0\r\n", - "\r\n", - "# box origin indicates the x, y, and z coordinates of the origin of the FFD bounding box. That is center of\r\n", - "# rotation of the bounding box. It corresponds to the point coordinates with position [0][0][0].\r\n", - "# See section \"Parameters weights\" for more details.\r\n", - "# For example, if the origin is equal to 0., 0., 0., use the following: box origin: 0., 0., 0.\r\n", - "box origin x: -1.1\r\n", - "box origin y: -1.1\r\n", - "box origin z: 2.0\r\n", - "\r\n", - "# rotation angle indicates the rotation angle around the x, y, and z axis of the FFD bounding box in degrees.\r\n", - "# The rotation is done with respect to the box origin.\r\n", - "# For example, to rotate the box by 2 deg along the z direction, use the following: rotation angle: 0., 0., 2.\r\n", - "rotation angle x: 0.0\r\n", - "rotation angle y: 0.0\r\n", - "rotation angle z: 0.0\r\n", - "\r\n", - "\r\n", - "[Parameters weights]\r\n", - "# This section describes the weights of the FFD control points.\r\n", - "# We adopt the following convention:\r\n", - "# For example with a 2x2x2 grid of control points we have to fill a 2x2x2 matrix of weights.\r\n", - "# If a weight is equal to zero you can discard the line since the default is zero.\r\n", - "#\r\n", - "# | x index | y index | z index | weight |\r\n", - "# --------------------------------------\r\n", - "# | 0 | 0 | 0 | 1.0 |\r\n", - "# | 0 | 1 | 1 | 0.0 | --> you can erase this line without effects\r\n", - "# | 0 | 1 | 0 | -2.1 |\r\n", - "# | 0 | 0 | 1 | 3.4 |\r\n", - "\r\n", - "# parameter x collects the displacements along x, normalized with the box length x.\r\n", - "parameter x: 0 0 0 0.0\r\n", - " 0 0 1 0.0\r\n", - " 0 0 2 0.8\r\n", - " 0 0 3 0.0\r\n", - " 0 0 4 0.0\r\n", - " 0 1 0 0.0\r\n", - " 0 1 1 0.0\r\n", - " 0 1 2 0.8\r\n", - " 0 1 3 0.0\r\n", - " 0 1 4 0.0\r\n", - " 1 0 0 0.0\r\n", - " 1 0 1 0.0\r\n", - " 1 0 2 0.8\r\n", - " 1 0 3 0.0\r\n", - " 1 0 4 0.0\r\n", - " 1 1 0 0.0\r\n", - " 1 1 1 0.0\r\n", - " 1 1 2 0.8\r\n", - " 1 1 3 0.0\r\n", - " 1 1 4 0.0\r\n", - "\r\n", - "# parameter y collects the displacements along y, normalized with the box length y.\r\n", - "parameter y: 0 0 0 0.0\r\n", - " 0 0 1 0.0\r\n", - " 0 0 2 0.0\r\n", - " 0 0 3 0.0\r\n", - " 0 0 4 0.0\r\n", - " 0 1 0 0.0\r\n", - " 0 1 1 0.0\r\n", - " 0 1 2 0.0\r\n", - " 0 1 3 0.0\r\n", - " 0 1 4 0.0\r\n", - " 1 0 0 0.0\r\n", - " 1 0 1 0.0\r\n", - " 1 0 2 0.0\r\n", - " 1 0 3 0.0\r\n", - " 1 0 4 0.0\r\n", - " 1 1 0 0.0\r\n", - " 1 1 1 0.0\r\n", - " 1 1 2 0.0\r\n", - " 1 1 3 0.0\r\n", - " 1 1 4 0.0\r\n", - "\r\n", - "# parameter z collects the displacements along z, normalized with the box length z.\r\n", - "parameter z: 0 0 0 0.0\r\n", - " 0 0 1 0.0\r\n", - " 0 0 2 0.0\r\n", - " 0 0 3 0.0\r\n", - " 0 0 4 0.0\r\n", - " 0 1 0 0.0\r\n", - " 0 1 1 0.0\r\n", - " 0 1 2 0.0\r\n", - " 0 1 3 0.0\r\n", - " 0 1 4 0.0\r\n", - " 1 0 0 0.0\r\n", - " 1 0 1 0.0\r\n", - " 1 0 2 0.0\r\n", - " 1 0 3 0.0\r\n", - " 1 0 4 0.0\r\n", - " 1 1 0 0.0\r\n", - " 1 1 1 0.0\r\n", - " 1 1 2 0.0\r\n", - " 1 1 3 0.0\r\n", - " 1 1 4 0.0\r\n" - ] - } - ], + "outputs": [], "source": [ "%cat ../tests/test_datasets/parameters_test_ffd_pipe_unv_C1.prm" ] @@ -415,7 +298,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -434,7 +317,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -444,24 +327,9 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "5ff5725b547e4a2c90a31e337e794bf8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Plot(antialias=3, axes=['x', 'y', 'z'], axes_helper=1.0, background_color=16777215, camera=[5.876968904869433,…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "DeformedMDPA = meshio.read('test_pipe_mod_C1.mdpa')\n", "meshio.write('test_pipe_deformed_mdpa.vtk', DeformedMDPA)\n", @@ -494,7 +362,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.2" + "version": "3.8.5" }, "latex_envs": { "LaTeX_envs_menu_present": true,