.. _models-viscoplastic_foam:

***********************
Viscoplastic Foam Model
***********************

Theory
======

The viscoplastic foam model is used to model the rate (and temperature) dependent crushing of foams [:footcite:`mat:ref:neilsen4`].
It is based on an additive split of the rate of deformation into an elastic and plastic portion

.. math::

   D_{ij} = D^{\text{e}}_{ij} + D^{\text{p}}_{ij}.

The stress in the material is due strictly to the elastic portion of the rate of deformation so that

.. math::

  \stackrel{\circ}{\sigma}_{ij} = \mathbb{C}_{ijkl}D^{\text{e}}_{kl},

where :math:`\mathbb{C}_{ijkl}` are the components of the fourth-order, isotropic elasticity tensor.
The stress rate is arbitrary, as long as it is objective.
Two objective stress rates are commonly used: the Jaumann rate and the Green-McInnis rate.
For problems with fixed principal axes of deformation, these two rates give the same answers.
For problems where the principal axes of deformation rotate during deformation, the two rates can give different answers.

To describe the rate-dependent response, an over-stress-type yield function is
used.  Specifically, the rate-independent foam plasticity yield function

.. math::
   :label: eqn:vpf:theory:yield

   f=\frac{\bar{\sigma}^2}{a^2}+\frac{p^2}{b^2}-1

where :math:`\sigma^*` is the effective stress given by 

.. math::
   :label: eqn:vpf-effStress

   \sigma^*=\sqrt{\bar{\sigma}^2+\frac{a^2}{b^2}p^2}.


In :eq:`eqn:vpf-effStress`, :math:`\bar{\sigma}` is the von Mises effective stress (:math:`\bar{\sigma}=\sqrt{\frac{3}{2}s_{ij}s_{ij}}`) 
and :math:`p` is the pressure resulting from a stress decomposition of the form,

.. math::

   s_{ij}=\sigma_{ij}-p\delta_{ij}.

Furthermore, :math:`a` and :math:`b` are state variables that are functions of the absolute temperature, :math:`\theta`, and 
maximum solid volume fraction, :math:`\phi`, and are defined as 

.. math::
   :label: eqn:vpf-stateA

   a\left(\theta,\phi\right) = \left(A_{0}\left(\theta\right) + A_{1}\left(\theta\right)\phi^{A_{2}}\right)f_a\left(\phi\right),

.. math::
   :label: eqn:vpf-stateB

   b\left(\theta,\phi\right) = \left(B_{0}\left(\theta\right) + B_{1}\left(\theta\right)\phi^{B_{2}}\right)f_b\left(\phi\right).

In :eq:`eqn:vpf-stateA` and :eq:`eqn:vpf-stateB`, the functional forms are chosen to provide flexibility in terms of representation.  To this end, 
:math:`f_a` and :math:`f_b` default to constant values of one and the expression reduce to legacy analytical functions.  This both provides for backward compatibility 
with previous user input decks while allowing for user defined definitions.  Further, if :math:`A_1\left(\theta\right)=0`, :math:`a\left(\theta,\phi\right)=A_0\left(\theta\right)f_a\left(\phi\right)`; 
a multiplicative decomposition of dependencies.

The temperature dependent material properties in the preceding relations are all defined as, 
:math:`A_{0}\left(\theta\right)=A_0h_{A_0}\left(\theta\right)` where :math:`A_0` is the reference material parameter and 
:math:`h_{A_0}\left(\theta\right)` is the relative value as a function of temperature.  In addition to the :math:`a` and :math:`b` 
state variables, the Young's modulus and Poisson's ratio are also functions of the absolute temperature.  The latter 
may be written as :math:`\nu\left(\theta\right)=\nu h_{\nu}\left(\theta\right)` while the former is also dependent on the 
maximum volume fraction of solid material and is given as :math:`E\left(\theta,\phi\right)=Eh_E\left(\theta\right)f_E\left(\phi\right)`.

The maximum volume fraction of solid material, :math:`\phi`, is given by 

.. math::

   \phi=\max_{t>0}\tilde{\phi}\left(t\right)

where :math:`\tilde{\phi}\left(t\right)` is the current volume fraction of solid material and is defined as, 

.. math::

  \tilde{\phi}\left(t\right) = \frac{\phi_{0}}{\exp\left(\varepsilon^{\text{p}}_v\right)}

with :math:`\phi_0` being the initial solid volume fraction and :math:`\varepsilon^{\text{p}}_v` is

.. math::

  \varepsilon^{\text{p}}_v = \int_{0}^{t} D_{kk}^{\text{p}} dt.

During inelastic deformation (:math:`f>0`), the corresponding rate of plastic deformation is given in a Perzyna-type form as, 

.. math::

  D_{ij}^{\text{p}} = \left\{ 
    \begin{array}{ccc}
    \displaystyle{\exp\left(h\left(\theta\right)\right)\left( \frac{\sigma^{*}}{a} - 1 \right)^{n\left(\theta\right)}g_{ij}}
    & \mbox{if} &
    f > 0 \\
    & & \\
    0 & \mbox{if} &
    f \leq 0 \\
    \end{array}
  \right.

where :math:`h\left(\theta\right)` and :math:`n\left(\theta\right)` are the flow rate and power exponent respectively.  The inelastic flow direction, :math:`g_{ij}`, 
is given as a linear combination of the associated (with respect to :eq:`eqn:vpf:theory:yield`), :math:`g^{\text{a}}_{ij}`, 
and radial, :math:`g^{\text{r}}_{ij}`, 

.. math::
   :label: eqn:vpf-imp:flowDirection

   g_{ij}=\frac{\left(1-\beta\right)g_{ij}^{\text{a}}+\beta g_{ij}^{\text{r}}}{|\left(1-\beta\right)g_{kl}^{\text{a}}+\beta g_{kl}^{\text{r}}|}

The directions :math:`g^{\text{a}}_{ij}` and :math:`g^{\text{r}}_{ij}` are given by

.. math::

   g^{\text{a}}_{ij} & =\frac{\frac{\partial f}{\partial \sigma_{ij}}}{|\frac{\partial f}{\partial\sigma_{kl}}|} = 
                    \frac{\frac{3}{a^2}s_{ij}-\frac{2}{3b^2}p\delta_{ij}}{|\frac{3}{a^2}s_{ij}-\frac{2}{3b^2}p\delta_{ij}|},\\
   g^{\text{r}}_{ij} & = \frac{\sigma_{ij}}{|\sigma_{kl}|}=\frac{\sigma_{ij}}{\sqrt{\sigma_{kl}\sigma_{kl}}},

in Equations :eq:`eqn:fp:theory:associated` and :eq:`eqn:fp:theory:rad`,

respectively.  In this model, the flow rule weight, :math:`\beta`, may be specified as either a 
constant value or as a function of the maximum solid volume fraction (:math:`\beta=\beta_0f_{\beta}\left(\phi\right)`).

.. _models-viscoplastic_foam-implementation:

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

As the viscoplastic foam model is a time-dependent, hypoelastic model it is integrated using an explicit, forward Euler scheme.  
Given this approach, a critical time step for stability is computed based on the shear strength, current modulus, and deviatoric deformation rate.  
If the input time step is acceptable, the new material state at time :math:`t=t_{n+1}` is computed.  On the other hand, if the time step is too large 
a series of sub-increments are used.  In this case, the total time step :math:`\Delta t` is subdivided into :math:`N` sub-increments.  Each such sub-interval 
(denoted by :math:`k`) has a time increment :math:`\delta t^k` such that :math:`\Delta t = \sum_{k=1}^{N}\delta t^k` and the forward Euler time stepping scheme 
is performed over each sub-interval until the desired material state at time :math:`t_{n+1}` is determined.  For the case of temperature dependent variables (e.g. the 
Poisson's ratio :math:`\nu`), the value at the start of the sub-increment is determined by linearly interpolating over the total time step,

.. math::

   \nu^k=\nu_n+\frac{\Delta t^k}{\Delta t}\left(\nu_{n+1}-\nu_{n}\right),




where :math:`\Delta t^k` is the current sub-increment time, :math:`\Delta t^k=\sum_{r=1}^k\delta t^r`.  For simplicity, in the remainder of this section it is 
assumed that the input time step is acceptable and only a single increment is needed.  If additional sub-increments are needed, the below steps 
would be repeated :math:`N` times with time intervals of :math:`\delta t^k`.

Noting the forward Euler approach adopted in this formulation, the first step is to determine the temperature (and solid volume fraction) 
dependent model parameters (:math:`E,~\nu,~A_0,~A_1,~B_0,~B_1,~h` and :math:`n`).  With the parameters established, state variables :math:`a` and :math:`b` are 
easily determined through :eq:`eqn:vpf-stateA` and :eq:`eqn:vpf-stateB`, respectively, enabling the calculation of the effective stress 
via :eq:`eqn:vpf-effStress`. The effective inelastic (plastic) strain rate, :math:`\dot{\bar{\varepsilon}}^p`, is then given as,

.. math::

  \dot{\bar{\varepsilon}}^p=\exp\left(h\left(\theta_n\right)\right)\left<\frac{\sigma^*_n}{a_n}-1\right>^{n\left(\theta_n\right)},


with :math:`\left< \right>` being the Macaulay brackets such that,

.. math::

   \left<x\right>=\left\{\begin{array}{cc} x & x \geq 0 \\ 0 & x < 0\end{array}\right..

Knowing the magnitude of the rate of inelastic deformation, the change in deviatoric and hydrostatic stresses is simply,

.. math::

   \dot{s}_{ij}=2\mu\left(\theta_n,\phi_n\right)\left(\hat{d}_{ij}-\hat{d}^{\text{p}}_{ij}\right), \\
   \dot{p}=K\left(\theta_n,\phi_n\right)\left(d_{kk}-d^{\text{p}}_{kk}\right),

where :math:`d_{ij}` is the total unrotated rate of deformation, :math:`\hat{x}_{ij}` denotes the deviatoric portion of tensor :math:`x_{ij}`, and 
:math:`d^{\text{p}}_{ij}` is the plastic rate of deformation given by,

.. math::
   :label: eqn:vpf-imp:plasticRate

   d^{\text{p}}_{ij}=\dot{\bar{\varepsilon}}^pg^n_{ij}.

In :eq:`eqn:vpf-imp:plasticRate`, :math:`g_{ij}` is the inelastic flow direction and can be calculated via :eq:`eqn:vpf-imp:flowDirection`.

An additional comment is needed with respect to accounting for temperature and solid volume fraction dependence in the shear and bulk moduli.  
This careful consideration is necessary due to the fact that the temperature dependence is only given with respect to the elastic moduli and 
Poisson's ratio.  As such, the shear and bulk moduli inherit the associated dependencies and are calculated for isotropic elastic relations.  
For the bulk moduli, this leads to an expression of the form,

.. math::

   K\left(\theta,\phi\right)=\frac{Eh_E\left(\theta\right)f_E\left(\phi\right)}{3\left(1-2\nu h_{\nu}\left(\theta\right)\right)}.

The updated stress state is then easily computed by explicitly integrating the established expressions.  Specifically,

.. math::

   s^{n+1}_{ij}=\frac{\mu_{n+1}}{\mu_{n}}s_{ij}^n+\dot{s}_{ij}\Delta t, \\
   p^{n+1}=\frac{K_{n+1}}{K_n}p^n+\dot{p}\Delta t, \\
   T^{n+1}_{ij}=s^{n+1}_{ij}+p^{n+1}\delta_{ij},
 

with :math:`\mu_n` and :math:`K_n` representing :math:`\mu\left(\theta_n,\phi_n\right)` and :math:`K\left(\theta_n,\phi_n\right)`, respectively, 
and :math:`T_{ij}` being the unrotated stress.

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

The viscoplastic foam model was verified in both uniaxial and hydrostatic compression. The
material properties and model parameters for both of these investigations are given in :numref:`tab-vpf-verProps`. As both loadings 
are isothermal, temperature dependence is neglected in the relevant model parameters.  Furthermore,
analytical solutions could not be found directly, so semi-analytical solutions
were found.

.. raw:: latex

   \noindent\begin{minipage}{\textwidth}

.. _tab-vpf-verProps:

.. csv-table:: The material properties for the viscoplastic foam model tested in uniaxial stress.
   :align: center
   :delim: &

   :math:`E`    & 4,807 psi & :math:`A_{0}`  & 63.03 psi
   :math:`\nu` & 0.33  & :math:`A_{1}` & 7000 psi
   :math:`h`    & -8.12 & :math:`A_{2}` & 3.7878
   :math:`n`    & 2 & :math:`B_{0}` & 93 psi
   :math:`\beta` & 0.9  & :math:`B_{1}` & 1483.4 psi
   :math:`\phi_{0}` & 0.1148 & :math:`B_{2}` & 3.7878

.. raw:: latex

   \end{minipage}

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

To obtain a semi-analytical solution for the uniaxial compression test, the model 
was reduced to a one-dimensional form and then numerically integrated.
The results obtained from the implemented model and the semi-analytical solution 
are shown below in :numref:`fig-vpf-uniaxial-compression`.

.. _fig-vpf-uniaxial-compression:

.. figure:: ../../_static/figures/viscoplastic_foam_compression.png
   :align: center
   :scale: 15 %

   Verification of the viscoplastic foam model in uniaxialcompression showing the axial stress as a function of thelogarithmic strain

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

The response of the model through hydrostatic compression.  To this end, a displacement of the form :math:`u_i=\lambda\left(t\right)` 
is considered.  The applied displacement scales linearly from :math:`\lambda=0` at :math:`t=0.0` to :math:`\lambda=-0.7` at :math:`t=t_{\text{max}}`.  Rate-dependent 
effects are considered through the use of two cases each with a different :math:`t_{\text{max}}`.  Creatively denoted Fast and Slow, the two 
cases correspond to :math:`t_{\text{max}}=1` s and :math:`t_{\text{max}}=100` s, respectively.  With such a displacement field, 
the engineering volume strain, :math:`\varepsilon_{\text{V}}`, is simply :math:`\varepsilon_{\text{V}}=\left(1+\lambda\right)^3-1`.  Additionally, 
the stress state reduces trivially to :math:`\sigma_{ij}=-p\delta_{ij}`.

Given the rate-dependent overstress form of the constitutive model, an analytical solution is not readily available.  Therefore, a semi-analytical 
analysis using a model reduction specialized for hydrostatic loadings is considered.  Specifically, noting :math:`s_{ij}=0`, the overstress reduces to,

.. math::

   \sigma^*=\frac{a}{b}|p|.


Furthermore, the associated and radial flow direction vectors simplify to the same form and are given as,

.. math::

   g^{\text{a}}_{ij}=g^{\text{r}}_{ij}=-\frac{1}{\sqrt{3}}\text{sgn}\left(p\right)\delta_{ij},


where :math:`\text{sgn}\left(p\right)` is the sign of :math:`p`.  The semi-analytical (integrated in a forward Euler fashion) and numerical results are 
presented in :numref:`fig-vpf-hydrostatic-compression`.

.. _fig-vpf-hydrostatic-compression:

.. figure:: ../../_static/figures/vpf_hydroCompression.png
   :align: center
   :scale: 15 %

   Pressure-engineering volume strain results of viscoplastic foam model subjected to a hydrostatic loading at both fast and slow rates determined semi-analytically and numerically.

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

.. code-block:: sierrainput

   BEGIN PARAMETERS FOR MODEL VISCOPLASTIC_FOAM
     #
     # Elastic constants
     #
     YOUNGS MODULUS = <real>
     POISSONS RATIO = <real>
     SHEAR MODULUS  = <real>
     BULK MODULUS   = <real>
     LAMBDA         = <real>
     TWO MU         = <real>

     FLOW RATE      = <real>
     POWER EXPONENT = <real>
     BETA           = <real> (1.0)
     PHI            = <real>

     SHEAR STRENGTH  = <real> (1.0)
     SHEAR HARDENING = <real> (0.0)
     SHEAR EXPONENT  = <real> (1.0)
     HYDRO STRENGTH  = <real> (1.0)
     HYDRO HARDENING = <real> (0.0)
     HYDRO EXPONENT  = <real> (1.0)

     YOUNGS FUNCTION    = <string>
     POISSONS FUNCTION  = <string>
     SS FUNCTION        = <string>
     SH FUNCTION        = <string>
     HS FUNCTION        = <string>
     HH FUNCTION        = <string>
     RATE FUNCTION      = <string>
     EXPONENT FUNCTION  = <string>
     STIFFNESS FUNCTION = <string>

     SHEAR HARDENING FUNCTION = <string>
     HYDRO HARDENING FUNCTION = <string>
     BETA FUNCTION            = <string>
   END [PARAMETERS FOR MODEL VISCOPLASTIC_FOAM]

In the above command blocks:

.. Consult \ifdevelopment the \Theusersguide\ :numref:`user:mat:elasticConstants` \else :numref:`mat:elasticConstants` \fi for more information on elastic constants input.

- Since the model requires functions to describe the temperature dependence of the elastic modulus and Poisson's ratio, it is recommended that one inputs these properties at some reference temperature. However, any two of the elastic constants can be used for input.
- The reference value for the flow rate, :math:`h`, is defined with the ``FLOW RATE`` command line.
- The reference value of the over-stress exponent, :math:`n`, is defined with the ``POWER EXPONENT`` command line.
- The user-defined scalar scaling between associated and radial flow, :math:`\beta`, is defined with the ``BETA`` command line.
- The initial volume fraction of solid material, :math:`\phi_0`, is defined with the ``PHI`` command line.
- The reference value for the shear strength, :math:`A_{0}`, is defined with the ``SHEAR STRENGTH`` command line.
- The reference value for the shear hardening modulus, :math:`A_1`, is defined with the ``SHEAR HARDENING`` command line.
- The shear hardening exponent, :math:`A_{2}`, is defined with the ``SHEAR EXPONENT`` command line.
- The reference value for the hydrostatic strength, :math:`B_{0}`, is defined with the ``HYDRO STRENGTH`` command line.
- The reference value for the hydrostatic hardening modulus, :math:`B_{1}`, is defined with the ``HYDRO HARDENING`` command line.
- The hydrostatic hardening exponent, :math:`B_{2}`, is defined with the ``HYDRO EXPONENT`` command line.
- The user-defined and normalized function that gives the elastic modulus as a function of temperature, :math:`h_{E}(\theta)`, is defined with the ``YOUNGS FUNCTION`` command line.
- The user-defined and normalized function that gives the Poisson's ratio as a function of temperature, :math:`h_{\nu}(\theta)`, is defined with the ``POISSONS FUNCTION`` command line.
- The user-defined and normalized function that gives the shear strength as a function of temperature, :math:`h_{A_0}(\theta)`, is defined with the ``SS FUNCTION`` command line.
- The user-defined and normalized function that gives the shear hardening modulus as a function of temperature, :math:`h_{A_1}(\theta)`, is defined with the ``SH FUNCTION`` command line.
- The user-defined and normalized function that gives the hydrostatic strength as a function of temperature, :math:`h_{B_0}(\theta)`, is defined with the ``HS FUNCTION`` command line.
- The user-defined and normalized function that gives the hydrostatic hardening modulus as a function of temperature, :math:`h_{B_1}(\theta)`, is defined with the ``HH FUNCTION`` command line.
- The user-defined and normalized function that gives the flow rate as a function of temperature, :math:`h_{h}(\theta)`, is defined with the ``RATE FUNCTION`` command line.
- The user-defined and normalized function that gives the over-stress exponent as a function of temperature, :math:`h_{n}(\theta)`, is defined with the ``EXPONENT FUNCTION`` command line.
- The user-defined and normalized function that gives the elastic modulus as a function of maximum solid volume fraction, :math:`f_{E}(\phi)`, is defined with the ``STIFFNESS FUNCTION`` command line.
- The optional user-defined function that gives the shear strength as a function of the maximum solid volume fraction, :math:`a\left(\phi\right)`, is defined with the ``SHEAR HARDENING FUNCTION`` command line.  Note, if this function is defined the ``SHEAR STRENGTH``, ``SHEAR HARDENING``, and ``SHEAR EXPONENT`` values should not be specified.
- The optional user-defended function that gives the hydrostatic strength as a function of the maximum solid volume fraction, :math:`b\left(\phi\right)`, is defined with the ``HYDRO HARDENING FUNCTION`` command line.  Note, if this function is defined the ``HYDRO STRENGTH``, ``HYDRO HARDENING``, and ``HYDRO EXPONENT`` values should not be specified.
- The optional user-defined function that gives the scaling between associated and radial flow as a function of maximum solid volume fraction, :math:`\beta\left(\phi\right)`, is defined with the ``BETA FUNCTION`` command line.  Note, if this function is defined the ``BETA`` value should not be specified.

Output variables available for this model are listed in :numref:`out-tab-viscoplasticfoamstvar`.

.. More information on the model can be found in the report by Neilsen, et. al. [:footcite:`mat:ref:neilsen3`].

.. _out-tab-viscoplasticfoamstvar:

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

   ``ITER``  &  number of sub-increments 
   ``EPVOL`` &  inelastic volumetric strain, :math:`\varepsilon^{\text{p}}_v`
   ``EDOT``  &  effective inelastic strain rate, :math:`\dot{\bar{\varepsilon}}^{p}` 
   ``PHI``   &  maximum volume fraction of solid material, :math:`\phi` 
   ``FA``    &  shear strength, :math:`a` 
   ``FB``    &  hydrostatic strength, :math:`b` 
   ``STIF``  &  elastic stiffness as a function of :math:`\phi` 

.. raw::
   html

   <hr>

.. footbibliography::
