Algorithm ========== Internal variables ------------------ The modified Hoek-Brown law of behavior is governed by the following three internal variables: 1. *the work-hardening parameter* :math:`\mathrm{\gamma }` corresponding to the major irreversible deformation. 2. *the cumulative plastic volume deformation* :math:`{\mathrm{\varepsilon }}_{\mathrm{\nu }}^{p}` whose law of evolution is given by :math:`d{\varepsilon }_{\nu }^{p}=3\eta d\lambda =\frac{3\eta }{\eta +1}d\gamma`. 3. *the state of plasticization*; it is 0 if the Gauss point is in elastic charge or under discharge, and 1 if the Gauss point is in plastic charge. Algorithm ---------- An implicit formulation with respect to the criterion and to the direction of flow is retained. We place ourselves at a material point and we assume we know :math:`{t}^{\text{-}}`: * The deformation increase tensor :math:`\Delta \varepsilon` from which we deduce :math:`\Delta e`, :math:`\Delta {\varepsilon }_{\nu }` * The constraints at the start of time step :math:`{\sigma }^{\text{-}}` from which we deduce :math:`{s}^{\text{-}},{I}_{1}^{\text{-}}` * The value of the internal variables :math:`{\gamma }^{\text{-}}` and :math:`{\varepsilon }_{\nu }^{p\text{-}}` at the start of the time step that give us :math:`(S{\sigma }_{c}^{2}{)}^{\text{-}},(m{\sigma }_{c}{)}^{\text{-}},{b}^{\text{-}},{\phi }^{\text{-}}` The aim of the algorithm is then to calculate: * Constraints at the end of a time step :math:`\sigma` * The internal variables at the end of the time step * Tangent behavior at the end of a time step: :math:`\frac{\partial \sigma }{\partial \varepsilon }` if the law is in effective constraints * Tangent behavior at the end of the time step: :math:`\frac{\partial \sigma }{\partial \varepsilon }` and :math:`\frac{\partial \sigma }{\partial {\sigma }_{p}}` if the law is under total constraints. **Algorithm:** *Calculation of the elastic solution*: If the law is under effective constraints: :math:`\{\begin{array}{c}{s}^{e}\text{=}{s}^{\text{-}}\text{+}2\mu \Delta e\\ {I}_{1}^{e}\text{=}{I}_{1}^{\text{-}}+\mathrm{3K}\Delta {\varepsilon }_{\nu }\end{array}` If the law is under total constraints: :math:`\{\begin{array}{c}{s}^{e}\text{=}{s}^{\text{-}}\text{+}2\mu \Delta e\\ {I}_{1}^{e}\text{=}{I}_{1}^{\text{-}}+\mathrm{3K}\Delta {\varepsilon }_{\nu }\text{+}3\Delta {\sigma }_{p}\end{array}` *Calculation of the elastic criterion* :math:`F({\sigma }^{e},{\gamma }^{-})`. If :math:`S{\sigma }_{c}^{2}-{\sigma }_{3}^{e}\text{.}m{\sigma }_{c}<0`, the function :math:`F` is not defined in point :math:`({\sigma }^{e},{\gamma }^{-})`. We then consider that we are in the plastic case. *Resolution*: calculation of :math:`\sigma ,\gamma` If :math:`F({\sigma }^{e},{\gamma }^{-})\le 0`, then :math:`\Delta \varepsilon =\Delta {\varepsilon }^{e},{\gamma }^{p}\text{=}{\gamma }^{{p}^{\text{-}}},\Delta \sigma \text{=}H\Delta \varepsilon`. Otherwise, we're looking for :math:`\sigma ,\gamma` such as :math:`F(\sigma ,\gamma )\le 0`, which is the same as looking for :math:`\Delta \gamma` such as :math:`F(\Delta \gamma )=\stackrel{ˉ}{F}(\Delta \gamma )=0`. This problem is solved using a Newton method on :math:`\stackrel{ˉ}{F}`. *Newton algorithm:* Initialization: :math:`{\mathrm{\Delta \gamma }}^{0}=0` After each iteration: * if :math:`\Delta {\gamma }^{n\text{+}1}\le 0`, there was no convergence: we subdivide the time step * if :math:`\Delta {\gamma }^{n\text{+}1}\le \frac{{\sigma }_{\text{eq}}^{e}}{3\mu [:ref:`\eta (\Delta {\gamma }^{n+1})+1 <\eta (\Delta {\gamma }^{n+1})+1>`]} `, there is no solution (see paragraph :ref:`4.2 `): we subdivide the time step *Update variables*: constraints, internal variables *Calculation of the coherent tangent matrix* :math:`\frac{\partial \sigma }{\partial \varepsilon }` *if the law is in effective constraints and* :math:`\frac{\partial \sigma }{\partial \varepsilon }` *and* :math:`\frac{\partial \sigma }{\partial {\sigma }_{p}}` *if the* *law is in total constraints for the option* RIGI_MECA_TANG or FULL_MECA.