.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/aluminum_1100_2D.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_aluminum_1100_2D.py: Aluminum 1100 2D ================ This example is based on the iSALE example Aluminum 1100 2D and uses the same basic geometry, showing how you can use it for cylindrically symmetric simulations. .. GENERATED FROM PYTHON SOURCE LINES 9-36 .. rst-class:: sphx-glr-horizontal * .. image-sg:: /auto_examples/images/sphx_glr_aluminum_1100_2D_001.png :alt: aluminum 1100 2D :srcset: /auto_examples/images/sphx_glr_aluminum_1100_2D_001.png :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/images/sphx_glr_aluminum_1100_2D_002.png :alt: Materials :srcset: /auto_examples/images/sphx_glr_aluminum_1100_2D_002.png :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/images/sphx_glr_aluminum_1100_2D_003.png :alt: Velocity - x :srcset: /auto_examples/images/sphx_glr_aluminum_1100_2D_003.png :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/images/sphx_glr_aluminum_1100_2D_004.png :alt: Velocity - y :srcset: /auto_examples/images/sphx_glr_aluminum_1100_2D_004.png :class: sphx-glr-multi-img .. code-block:: Python import PySALESetup as pss import matplotlib.pyplot as plt cell_size = 1.5875e-4 projectile = pss.PySALEObject.generate_ellipse([0., 169.*cell_size], 20.*cell_size, 20.*cell_size, 0.) target = pss.PySALEObject(([(0., 0.), (200*cell_size, 0), (200*cell_size, 149*cell_size), (0., 149.*cell_size)])) projectile.set_material(1) target.set_material(2) projectile.set_velocity(0., -7e3) fig, ax = projectile.plot() target.plot(ax=ax) ax.set_aspect(1) plt.show() mesh = pss.PySALEMesh(200, 240, cell_size) mesh.project_polygons_onto_mesh([projectile, target]) mesh.plot_materials() mesh.plot_velocities() plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 1.263 seconds) .. _sphx_glr_download_auto_examples_aluminum_1100_2D.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: aluminum_1100_2D.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: aluminum_1100_2D.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: aluminum_1100_2D.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_