.. _models-soil_and_foam:

*******************
Soil and Foam Model
*******************

Theory
======

The soil and crushable foam model is a plasticity model that can be used for modeling soil, crushable foam, or other highly compressible materials. 
Given the right input, the model is a Drucker-Prager model.

For the soil and crushable foam model, the yield surface is a surface of revolution about the hydrostat in principal stress space. A planar end cap is assumed for the yield 
surface so that the yield surface is closed. The yield stress :math:`\sigma_{yd}` is specified as a polynomial in pressure :math:`p`. The yield stress is given as:

.. math::
   :label: mat:eq:ystress

   \sigma _{yd}  = a_0  + a_1 p + a_2p^{2}\,,

where the pressure :math:`p` is positive in compression.
The determination of the yield stress from :eq:`mat:eq:ystress` places severe restrictions on the admissible values of :math:`a_{0}`, :math:`a_{1}`, and :math:`a_{2}`.
There are three valid cases for the yield surface.
In the first case, there is an elastic--perfectly plastic deviatoric response, and the yield surface is a cylinder oriented along the hydrostat in principal stress space.
In this case, :math:`a_{0}` is positive, and :math:`a_{1}` and :math:`a_{2}` are zero. 
In the second case, the yield surface is conical.
A conical yield surface is obtained by setting :math:`a_{2}` to zero and using appropriate values for :math:`a_{0}` and :math:`a_{1}`. In the third case, the yield surface has a parabolic shape.
For the parabolic yield surface, all three coefficients in :eq:`mat:eq:ystress` are nonzero.
The coefficients are checked to determine that a valid negative tensile-failure pressure can be derived based on the specified coefficients.

For the case of the cylindrical yield surface (e.g., :math:`a_0  > 0` and :math:`a_{1}  = a_{2}  = 0`), there is no tensile-failure pressure.
For the other two cases, the computed tensile-failure pressure may be too low.
To handle the situations where there is no tensile-failure pressure or the tensile-failure pressure is too low, a pressure cutoff can be defined.
If a pressure cutoff is defined, the tensile-failure pressure is the larger of the computed tensile-failure pressure and the defined cutoff pressure.

The plasticity theories for the volumetric and deviatoric parts of the material response are completely uncoupled.
The volumetric response is computed first.
The mean pressure :math:`p` is assumed to be positive in compression, and a yield function :math:`\phi_{p}` is written for the volumetric response as:

.. math::
   :label: mat:eq:yfunc

   \phi_p  = p - f_p \left( {\varepsilon _{V}  } \right)\,,

where :math:`f_p \left( {\varepsilon _{V} } \right)` defines the volumetric stress-strain curve for the pressure. The yield
function :math:`\phi_{p}` determines the motion of the end cap along the hydrostat.

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

The soil and crushable foam model is a rate-independent, hypoelastic model that splits and sequentially evaluates the 
volumetric and deviatoric response.  To determine the inelastic flow, an elastic predictor-inelastic corrector 
approach is adopted for each of the aforementioned responses.

For the volumetric response, an updated logarithmic volume strain, :math:`\varepsilon^{n+1}_{v}`, is computed by,

.. math::

   \varepsilon^{n+1}_{v}=\varepsilon^{n}_{v}-\Delta td_{kk}.

Note, in this case, the volume strain is defined such that it is positive in compression.  This strain value is then 
used to evaluate the volumetric yield function defined in :eq:`mat:eq:yfunc` and determine the appropriate 
pressure, :math:`p`, the material is subject to.   

To evaluate the deviatoric response, a trial deviatoric stress, :math:`s^{tr}_{ij}`, is defined as,

.. math::

   s^{tr}_{ij}=s^n_{ij}+2\mu\hat{d}_{ij}\Delta t,

with :math:`\hat{d}_{ij}` being the deviatoric part of the unrotated rate of deformation.  The deviatoric yield function, :math:`f`, 
is then used to evaluate if any deviatoric plastic flow is occurring and is written as,

.. math::

   f\left(s_{ij},p\right)=\phi\left(s_{ij}\right)-\sigma_{yd}\left(p\right),

where :math:`\sigma_{yd}` is the yield stress given in :eq:`mat:eq:ystress` and :math:`\phi\left(s_{ij}\right)` the 
effective stress given as,

.. math::

   \phi\left(s_{ij}\right)=\sqrt{\frac{3}{2}s_{ij}s_{ij}}.

If an elastic response is evident (:math:`f\leq 0`), then the final stress is simply,

.. math::

   T^{n+1}_{ij}=s^{tr}_{ij} - p\delta_{ij}.

Otherwise, if a plastic response is observed, a radial return approach like that discussed in :numref:`models-elastic_plastic-implementation` 
is utilized to find the equivalent plastic strain increment, :math:`\Delta\bar{\varepsilon}^p`.  Unlike that case, 
given the decoupling between the volumetric and deviatoric behaviors, the hardening component of the 
yield surface does not change leading to an expression of the form,

.. math::

   \Delta\bar{\varepsilon}^p=\frac{f}{3\mu},

and the final stress is,

.. math::

   T^{n+1}_{ij}=s^{tr}_{ij}-3\mu\Delta\bar{\varepsilon}^p\frac{s^{tr}_{ij}}{\phi}-p\delta_{ij}.

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

The soil and foam model is verified for a triaxial compression load path. First the material is biaxially loaded in plane strain using load control, then the prescribed loads are released while the material is compressed in displacement control.

Triaxial Compression
--------------------

The soil and foam model is tested in triaxial compression.
For this problem, both lateral stresses, :math:`\sigma_{11}` and :math:`\sigma_{33}`, are prescribed along with the axial strain, :math:`\varepsilon_{22}`.
Furthermore, the lateral stresses are equal, :math:`\sigma_{11} = \sigma_{33}`.
For the elastic response, the axial stress is

.. math::

   \sigma_{22} = E \varepsilon_{22} + 2\nu \sigma_{11}

where :math:`E` is the elastic modulus and :math:`\nu` is the Poisson's ratio.
The lateral strains are

.. math::

   \varepsilon_{11} = -\nu \left( \varepsilon_{22} - \sigma_{11}/\lambda \right)

where :math:`\lambda` is the Lame constant.

.. _fig-soilfoam1:

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

   Lateral strain, :math:`\varepsilon_{11}` and :math:`\varepsilon_{33}`, over the course of the prescribed triaxial loading path.

.. _fig-soilfoam2:

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

   Axial stress, :math:`\sigma_{22}`, over the course of the prescribed triaxial loading path.

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

.. code-block:: sierrainput

   BEGIN PARAMETERS FOR MODEL SOIL_FOAM
     #
     # Elastic constants
     #
     YOUNGS MODULUS = <real>
     POISSONS RATIO = <real>
     SHEAR MODULUS  = <real>
     BULK MODULUS   = <real>
     LAMBDA         = <real>
     TWO MU         = <real>
     #
     # Yield surface parameters
     #
     A0 = <real>
     A1 = <real>
     A2 = <real>
     PRESSURE CUTOFF   = <real>
     PRESSURE FUNCTION = <string>
   END [PARAMETERS FOR MODEL SOIL_FOAM]

In the above command blocks:

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

- The constant coefficient in the equation for the yield surface ( :eq:`mat:eq:ystress`) is defined with the ``A0`` command line.
- The coefficient for the linear term in the equation for the yield surface ( :eq:`mat:eq:ystress`) is defined with the ``A1`` command line.
- The coefficient for the quadratic term in the equation for the yield surface ( :eq:`mat:eq:ystress`) is defined with the ``A2`` command line.
- The user-defined maximum tensile-failure pressure is defined with the ``PRESSURE CUTOFF`` command line.
- The pressure as a function of volumetric strain is defined with the function named on the ``PRESSURE FUNCTION`` command line.

For information about the soil and crushable foam model, see the PRONTO3D document listed as Reference [:footcite:`int:ref:taylo`]. 
The soil and crushable foam model is the same as the soil and crushable foam model in PRONTO3D. The PRONTO3D model is based on a material model 
developed by Krieg [:footcite:`mat:ref:krie`]. The Krieg version of the soil and crushable foam model was later modified by Swenson and Taylor [:footcite:`mat:ref:swen`]. 
The soil and crushable foam model developed by Swenson and
Taylor is the model in PRONTO3D and is also the shared model for Presto and Adagio.

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

.. _out-tab-soilfoamstvar:

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

   ``EVOL_MAX``  &  maximum volumetric strain seen by the material point 
   ``EVOL_FRAC`` &  volumetric strain for tensile fracture 
   ``EVOL``      &  current volumetric strain 
   ``EQPS``      &  equivalent plastic strain 

.. raw::
   html

   <hr>

.. footbibliography::
