.. _bullet_collision:

****************
Bullet Collision
****************

Product: Sierra/SolidMechanics - Explicit Analysis

.. figure:: bullet_collision/figs/MESH.png
   :align: center
   :width: 600px
	   
   Initial Setup

* :download:`Mesh <bullet_collision/Bullet.g>`   
* :download:`Input Deck <bullet_collision/Bullet.i>`

.. Problem Description
.. ===================

.. .. _fig-bullet_mesh:

.. .. figure:: ../../../../tests/adagio_rtest/ExampleProblemsManual/ContactExampleProblems/Bullet_Collision/figs/MESH.png
..    :align: center
..    :scale: 80 %

..    Initial Setup

.. The primary purpose of this example problem is to demonstrate both the analytic functions and the user defined output.  In the problem, a bullet is given initial angular and translational velocities.  The bullet then collides with a block, and the non-dimensional torque is output.  The initial configuration can be seen in :numref:`fig-bullet_mesh`.

.. Loading and Boundary Conditions
.. ===============================

.. The bullet is constrained to translation along the X axis, and rotation about the X axis. The surfaces of the block in the XY and XZ planes are given a fixed displacement in the X, Y, and Z directions. The block is still allowed to deform when it is hit by the bullet. Contact is enforced by setting general contact ON and creating a constant friction model.

.. Material Model
.. ==============

.. The bullet is modeled as an elastic plastic body and is given material properties similar to steel. The block is given arbitrary material properties and is also modeled as an elastic plastic body. The material models can be seen in :numref:`tab-bullet` and :numref:`tab-block`. Metric units are used: displacement is in meters, mass is in kilograms, time is in seconds, force is in Newtons, and temperature is in Kelvin.

.. .. _tab-bullet:

.. .. csv-table:: Bullet Material Properties
..    :align: center
..    :delim: &

..    Young's Modulus & E & :math:`350\times10^9`
..    Poisson's Ratio & :math:`\nu` & :math:`0.3333`
..    Density & :math:`\rho` & :math:`10^4`
..    Yield Stress &  :math:`\sigma_{yield}` & :math:`4.5\times10^8`

.. .. _tab-block:

.. .. csv-table:: Block Material Properties
..    :align: center
..    :delim: &

..    Young's Modulus & E & :math:`170\times10^6`
..    Poisson's Ratio & :math:`\nu` & :math:`0.15`
..    Density & :math:`\rho` & :math:`2\times10^3`
..    Yield Stress &  :math:`\sigma _{yield}` & :math:`2.0\times10^6`

.. Finite Element Model
.. ====================

.. This problem contains just under 7000 elements, 6200 of which are associated with the block.  There are just over 800 elements in the bullet.  :numref:`fig-bullet_mesh` shows the mesh generated for the problem.

.. Feature Tested
.. ==============

.. The user defined output and analytic functions are the main features tested in this problem.  Secondary features include explicit contact and the use of aprepro variables.

.. Results and Discussion
.. ======================

.. .. _tab-variables:

.. .. csv-table:: Table of Variables
..    :align: center
..    :delim: &

..    Contact Reaction Force & :math:`P`
..    Poisson's Ratio & :math:`\nu`
..    Contact Radius & :math:`R_c`
..    Bullet Radius & :math:`R_b`
..    Non-dimensional Torque & :math:`T`
..    Young's Modulus of Elasticity & :math:`E`
..    Friction Coefficient & :math:`\mu`
..    Reaction Force on far end of Bullet & :math:`Ty\_top`

.. After initial rotational and translational velocities are applied, the bullet collides with the block. This can be seen in :numref:`fig-contact`. Due to its rotation, a reaction torque is applied to the bullet by the block. The non-dimensional form of the torque is found using analytic functions and a user defined output. The equations used to find the non-dimensional torque are based on the Hertz solution. While the torque is calculated for the entirety of the problem, it is found using contact and is thus zero for parts of the problem. :numref:`fig-NDT` shows the graph of the non-dimensional torque. The initial equations for the calculation contained two issues.  First, the sign of the contact reaction force normal to the contact surface, defined as a variable :math:`P`, may or may not be negative depending on where the global origin is set. If :math:`P` is negative, the equation for the contact radius, :math:`R_c`, will contain a negative cubed root, as shown below. :numref:`tab-variables` contains a list of the variables used in the following calculations.

.. Compute global :math:`P` as the sum of nodal contact forces in the :math:`x` direction,

.. .. math::
..    :label: eq:Xreaction

..    P = \sum{\rm{Force\_Contact}(x)} .

.. Compute global :math:`R_{c}` from the expression,

.. .. math::

..    R_{c} = \frac{3}{4}^{(1/3)}\times\Bigl((-1+{\nu}^2)\times P\times\frac{R_b}{{E}}\Bigr)^{(1/3)} .

.. The user defined output cannot calculate the cubed root of a negative number.  To account for this case, the absolute value is taken inside the cubed root.  The updated equation for the contact radius is,
.. % The correct sign is applied outside the cubed root.  A simplified equation for this fix is :math:`R_{c}=(x/abs(x))\times abs(x)^{(1/3)}`.  The new calculation for the contact radius is:

.. .. math::

..    R_{c} = \frac{3}{4}^{(1/3)}\times\biggl(\frac{((-1+{\nu}^2)\times P\times \frac{R_b}{{E}})}{{\rm abs}((-1+{\nu}^2)\times P\times \frac{R_b}{{E}})}\biggr)\times\Bigl({\rm abs}((-1+{\nu}^2)\times P\times \frac{R_b}{{E}})\Bigr)^{(1/3)} .

.. .. % \ldots \\ \nonumber \ldots b=c

.. The second issue is that the torque and contact radius calculations are based on contact.  When the bullet and the concrete slab are not in contact, :math:`P` is zero. This causes both the contact radius calculation above and the non-dimensional torque calculation below to have division by zero.

.. Compute global :math:`T` from the expression,

.. .. math::
..    :label: eq:nondimtorque

..    T = {\rm abs}\biggl(\frac{\rm Ty\_top}{({\mu}\times P\times R_c)}\biggr) .

.. While the simulation will still run, the non-dimensional torque and contact radius cannot be graphed.  To visualize the results, a small constant perturbation is introduced in both equations.  The perturbation only affects the results during contact, and it is shown below.

.. Compute global :math:`R_c` from the expression,

.. .. math::

..    R_c = \frac{3}{4}^{(1/3)}\times\biggl(\frac{((-1+{\nu}^2)\times P\times \frac{R_b}{{E}}+0.0001)}{{\rm abs}((-1+{\nu}^2)\times P\times \frac{R_b}{{E}}+0.0001)}\biggr)\times\Bigl({\rm abs}((-1+{\nu}^2)\times P\times \frac{R_b}{{E}})\Bigr)^{(1/3)} .

.. Compute global :math:`T` from the expression,

.. .. math::
..    :label: eq:finalnondimtorque

..    T = {\rm abs}\biggl(\frac{Ty\_top}{({\mu}\times P\times R_c+0.0001)}\biggr) .

.. .. _fig-contact:

.. .. figure:: ../../../../tests/adagio_rtest/ExampleProblemsManual/ContactExampleProblems/Bullet_Collision/figs/Contact.png
..    :align: center
..    :scale: 80 %

..    Bullet in contact with block.

.. .. _fig-NDT:

.. .. figure:: ../../../../tests/adagio_rtest/ExampleProblemsManual/ContactExampleProblems/Bullet_Collision/figs/ndTorque.png
..    :align: center
..    :scale: 40 %

..    Non-dimensional torque; see equation :eq:`eq:finalnondimtorque`.

.. .. _fig-Reaction:

.. .. figure:: ../../../../tests/adagio_rtest/ExampleProblemsManual/ContactExampleProblems/Bullet_Collision/figs/Reaction_Force_Vs_Time.png
..    :align: center
..    :scale: 60 %

..    Reaction force; see equation :eq:`eq:Xreaction`.
