.. _models-low_density_foam:

**********************
Low Density Foam Model
**********************

Theory
======

The low density foam material model is a phenomenological model for rigid, low density polyurethane foams.
Development of this model followed extensive characterization efforts at Sandia National Laboratory 
with special emphasis placed on hydrostatic and triaxial compression tests [:footcite:`mat:ref:neilsen`].  
A key observation of this investigation was the impact of trapped air inside the foam on the load bearing 
capabilities of the material.

In constructing a model describing the response of the low-density foams, Neilsen et al. [:footcite:`mat:ref:neilsen`]
decomposed the response into that of the polymeric skeleton and the air such that,

.. math::
   :label: eqn:ldf-theory:decomp

   \sigma_{ij}=\sigma_{ij}^{\text{sk}} + \sigma^{\text{air}}\delta_{ij},

where the super script sk is used to refer to variables relating to the skeleton and air to the air.  
The contribution of the air component is only present, however, in constrained cases when the internal gases 
are trapped and not allowed to escape.  If the foam material in not encased or encapsulated in someway, the air 
may escape and :math:`\sigma^{\text{air}}=0`.  A model parameter, :math:`N_{\text{air}}`, is included to distinguish between 
these cases.  If :math:`N_{\text{air}}` is set to :math:`0`, the air pressure term is set to zero.  For any other value, it 
is included.
  
Using the ideal gas law, it can be found that for an isothermal case,

.. math::
   :label: eqn:ldf-theory:air

   \sigma^{\text{air}}=\frac{p_{0}\varepsilon_{\text{V}}}{\varepsilon_{\text{V}}+1-\phi},

where :math:`p_{0}`, :math:`\varepsilon_{\text{V}}`, and :math:`\phi` are the initial air pressure, volumetric strain, and 
the volume fraction of the solid (skeleton) material.  Knowing the total stress of the material volume and 
air contribution, the skeleton stress may be found via :eq:`eqn:ldf-theory:decomp`.  Furthermore, it should be 
noted that the foam (total) and skeleton strains are the same.
 
Based on their experimental observations, Neilsen et al. [:footcite:`mat:ref:neilsen`] noted a decoupling between the 
skeleton principal stresses.  Therefore, the Poisson's ratio of the skeleton is zero and that the yielding 
behavior in each principal direction is independent.  A yield function of the form,

.. math::

   f_i=\sigma^{\text{sk}}_i-\bar{\sigma},

where :math:`f_i` and :math:`\sigma^{\text{sk}}_i` are the :math:`i^{th}` yield function and skeleton principal stress, 
respectively, and

.. math::
   :label: eq:ldf1

   \bar{\sigma} = A \left< I_{2}^{\prime} \right> +
               B \left( 1.0 + C \varepsilon_{V} \right)

with A, B, and C are material parameters, and :math:`\left< \cdot \right>` denoting the Heaviside step function where

.. math::
   :label: eq:ldf2

   \left< x \right> = \begin{cases}
   0 \;\;\; \text{if } x \leq 0 \\
   1 \;\;\; \text{if } x > 0
   \end{cases},

was proposed.  Additionally, :math:`I_{2}^{\prime}` is the second invariant of the deviatoric strain.  If a skeleton principal stress 
indicates yielding, it is set to the effective yield stress value, :math:`\bar{\sigma}`.

Implementation
==============

The low density foam material model is implemented in a hypoelastic fashion.  
Therefore, a trial material state of,

.. math::
   :label: eqn:ldf-imp:trialStress

   T^{\text{sk}-tr}_{ij}=T^{\text{sk}-n}_{ij}+E\Delta td_{ij}, \\
   \varepsilon^{n+1}_{ij}=\varepsilon^n_{ij}+\Delta td_{ij},

with :math:`d_{ij}`, :math:`T^{\text{sk}}_{ij}`, and :math:`\varepsilon_{ij}` are the unrotated rate of deformation, 
unrotated skeleton stress, and foam strain, respectively, is calculated.  The superscript :math:`tr` denotes a trial stress while 
:math:`E` is the Young's Modulus and :eq:`eqn:ldf-imp:trialStress` leverages the fact that the Poisson's ratio of the 
skeleton is zero.  The principal stresses of the trial skeleton stress state, :math:`T^{\text{sk}-tr}_i`, are then 
computed via the algorithm of Scherzinger and Dohrmann [:footcite:`mat:ref:wmsch3`].

To check the yielding behavior, the (logarithmic) volumetric strain, :math:`\varepsilon^{n+1}_{\text{V}}`, and second 
invariant of the deviatoric strain, :math:`I_2'`, are needed.  These values are simply calculated as,

.. math::

   \varepsilon_{\text{V}}^{n+1} & = \exp\left(\varepsilon^{n+1}_{kk}\right)-1, \\
    I'^{n+1}_2 & = \hat{\varepsilon}_{11}^{n+1}\hat{\varepsilon}_{22}^{n+1}
         +\hat{\varepsilon}_{11}^{n+1}\hat{\varepsilon}_{33}^{n+1}
         +\hat{\varepsilon}_{22}^{n+1}\hat{\varepsilon}_{33}^{n+1} 
         -\left[\left(\hat{\varepsilon}^{n+1}_{12}\right)^2 + \left(\hat{\varepsilon}^{n+1}_{23}\right)^2 
          +\left(\hat{\varepsilon}^{n+1}_{31}\right)^2\right], 

with :math:`\hat{\varepsilon}^{n+1}_{ij}` being the deviatoric strain tensor.  The effective yield stress, :math:`\bar{\sigma}^{n+1}`, 
may be written as,

.. math::

   \bar{\sigma}^{n+1}=A\left<I'^{n+1}_2\right>+B\left(1+C\varepsilon^{n+1}_{\text{V}}\right).

It should also be noted that a steep sinusoidal approximation of the Heaviside step function to alleviate 
numerical issues associated with the sharp discontinuity inherit to the use of the Heaviside function.  The updated 
principal stresses may then be determined as,

.. math::

   T^{\text{sk}-n+1}_i=\left\{\begin{array}{cc} T^{\text{sk}-tr}_i, & |T^{\text{sk}-tr}_i| \leq |\bar{\sigma}| \\
                   \text{sgn}\left(T^{\text{sk}-tr}_i\right)\bar{\sigma}, & |T^{\text{sk}-tr}_i| > |\bar{\sigma}| \end{array} \right. ,

where :math:`\text{sgn}\left(x\right)` denotes the sign of :math:`x`.  An updated air pressure is then computed from :eq:`eqn:ldf-theory:air` and 
the current stress is found to be,

.. math::

   T^{n+1}_{ij}=\sum_{k=1}^3T^{\text{sk}-n+1}_k\hat{e}^k_i\hat{e}^k_j+\sigma^{\text{air}-n+1}\left(\varepsilon_{\text{V}}^{n+1}\right)\delta_{ij},

where :math:`\hat{e}^k_i` is the eigenvector associated with the :math:`k^{th}` principal skeleton stress.

Verification
============

The low density foam model is implemented through two compression tests -- uniaxial and hydrostatic.  
Cases both including (:math:`N_{\text{air}}=1.0`) and excluding (:math:`N_{\text{air}}=0.0`) the contribution of the air 
are investigated.  The rest of the properties and parameters used for these tests are given in :numref:`tab-ldf-verProps` 
and are originally from [:footcite:`mat:ref:wmsch2`].

.. _tab-ldf-verProps:

.. csv-table:: Material properties and model parameters for the low density foam model used during verification testing.
   :align: center
   :delim: &

   :math:`E` & 3010 psi & :math:`\nu` & 0.0
   :math:`A` & 49.2 psi & :math:`B` & 60.8 psi
   :math:`C` & -0.517 & :math:`p_0` & 14.7 psi
   :math:`\phi` & 0.09 & &

Uniaxial Compression
--------------------

First, a uniaxial compression test under displacement control is considered with and without the contribution of air.  
In this case, a displacement of the form :math:`u_1=\lambda` is applied while the other two directions are left traction free.  When 
air pressure does not play a role, the model response reduces to that of the skeleton and the problem becomes one-dimensional.  The 
deformation rate can be easily integrated to find that :math:`\varepsilon_{11}=\ln\left(1+\lambda\right)` and :math:`\varepsilon_{\text{V}}=\lambda`.  
Additionally, the uniaxial compression loading considered here is obviously deviatoric in nature 
leading to :math:`\left<I_2'\right>` evaluating to 1.  
Therefore,

.. math::
   :label: eqn:ldf-ver:sigEval

   \bar{\sigma} & =  A + B\left(1+C\lambda\right), \\
   \sigma_{11} & = \left\{\begin{array}{cc} E\varepsilon_{11} & |\sigma_{11}| \leq |\bar{\sigma}| \\ 
                  \text{sgn}\left(\varepsilon_{11}\right)\bar{\sigma} & |\sigma_{11}| > |\bar{\sigma}| \end{array} \right. .

The corresponding stress and strain results are presented in :numref:`fig-ldf-skeletonCompression`\ (a) and :numref:`fig-ldf-skeletonCompression`\ (b).

.. _fig-ldf-skeletonCompression:

.. subfigure:: AB
   :subcaptions: below
   :align: center

   .. image:: ../../_static/figures/skeletonStress.png
      :alt: Skeleton stress
      :scale: 25 %

   .. image:: ../../_static/figures/skeletonStrain.png
      :alt: Skeleton strain
      :scale: 25 %

   Skeleton (a) stress and (b) strain determined analytically and numerically (with :math:`N_{\text{air}}=0`) with the low density foam model during a displacement controlled uniaxial compression test.

The case of internal air pressure is also considered by setting :math:`N_{\text{air}}=1`.  This, however, complicates the response and turns 
it into a three-dimensional case given the pressure components in the off-loading directions.  Specifically, it can be found trivially that, 
:math:`\varepsilon_{22}=\varepsilon_{33}=-\sigma^{\text{air}}/E`.  The complication arises as the volumetric strain is now,

.. math::

   \varepsilon_{\text{V}}=\left(1+\lambda\right)\exp\left(-2\sigma^{\text{air}}/E\right)-1,
 
leading to an implicit expression for :math:`\sigma^{\text{air}}`.  By evaluating :math:`\sigma^{\text{air}}` in a forward Euler fashion, noting 
:math:`\bar{\sigma}=A+B\left(1+C\varepsilon_{\text{V}}\right)`, and treating :eq:`eqn:ldf-ver:sigEval` as an expression 
for :math:`\sigma^{\text{sk}}_{11}` the stress and strain responses may be found as given in :numref:`fig-ldf-foam`\ (a) 
and :numref:`fig-ldf-foam`\ (b).  The impact of the air on the model response is clear by comparing the two sets of figures.

.. _fig-ldf-foam:

.. subfigure:: AB
   :subcaptions: below
   :align: center

   .. image:: ../../_static/figures/foamStress.png
      :alt: Skeleton stress
      :scale: 25 %

   .. image:: ../../_static/figures/foamStrain.png
      :alt: Skeleton strain
      :scale: 25 %

   Foam (a) stress and (b) strain determined analytically and numerically (with :math:`N_{\text{air}}=1`) with the load density foam model during a displacement controlled uniaxial compression test.

Hydrostatic Compression
-----------------------

The volumetric deformation capabilities of the model are also investigated through displacement controlled hydrostatic 
compression.  Specifically, an imposed displacement of the form :math:`u_i=\lambda` is considered.  The resultant strain field is 
:math:`\varepsilon_{11}=\varepsilon_{22}=\varepsilon_{33}=\ln\left(1+\lambda\right)` leading to a volumetric strain of 
the form :math:`\varepsilon_{\text{V}}=\left(1+\lambda\right)^3-1`.  As there is no deviatoric deformation it is apparent that :math:`\left<I_2'\right>=0`.  
Therefore, the effective yield stress is :math:`\bar{\sigma}=B\left(1+C\varepsilon_{\text{V}}\right)`.  
Also noting that :math:`\sigma=\sigma_{11}=\sigma_{22}=\sigma_{33}`, the foam response through such a loading may easily be determined.  
The foam stress for both the with and without air case is presented in :numref:`fig-ldf-hydroComp` along with :math:`\sigma^{\text{air}}` for 
the appropriate case.

.. _fig-ldf-hydroComp:

.. figure:: ../../_static/figures/hydroStress.png
   :align: center
   :scale: 25 %

   Foam stress determined analytically and numerically for both :math:`N_{\text{air}}=0.0` and :math:`N_{\text{air}}=1.0` cases for the low density foam model during displacement controlled hydrostatic compression

User Guide
==========

.. code-block:: sierrainput

   BEGIN PARAMETERS FOR MODEL LOW_DENSITY_FOAM
     #
     # Elastic constants
     #
     YOUNGS MODULUS = <real>
     POISSONS RATIO = <real>
     SHEAR MODULUS  = <real>
     BULK MODULUS   = <real>
     LAMBDA         = <real>
     TWO MU         = <real>
     #
     A    = <real>
     B    = <real>
     C    = <real>
     NAIR = <real>
     P0   = <real>
     PHI  = <real>
   END [PARAMETERS FOR MODEL LOW_DENSITY_FOAM]

.. See :numref:`mat:elasticConstants` for more information on elastic constants input.

State variables for this model are listed in :numref:`out-tab-lowdenfoamstvar`. For more information on the low density foam material model, see [:footcite:`mat:ref:neilsen`].

.. _out-tab-lowdenfoamstvar:

.. csv-table:: State Variables for LOW DENSITY FOAM Model
   :align: center
   :delim: &
   :header: Name, Description

   ``PAIR`` & Air pressure 

.. raw::
   html

   <hr>

.. footbibliography::
