Here we extend the example from :ref:`fem_examples_small-strain_linear_dense` to a non-linear constitutive response, which is however still subjected to a **small deformations** assumption. We treat the constitutive response as a black-box here:
.. math::
\bm{\varepsilon}
\;
\rightarrow
\;
\bm{\sigma}, \mathbb{K}
where it must be emphasized that :math:`\mathbb{K}` symmetrizes. To understand more about the constitutive response, please consult the `documentation of GooseSolid <https://github.com/tdegeus/GooseSolid/blob/master/docs/LinearElastic/NonLinearElastic.pdf>`_
There a very important concept hidden here. Because we prescribe :math:`\delta \underline{x}_{p}` directly to the correct value -- which we do not iteratively update -- we need to set
.. math::
\delta \underline{x}_{p}^{(i)}
=
\begin{cases}
\delta \underline{x}_{p} \quad & \mathrm{if}\, i = 0 \\
0 \quad & \mathrm{otherwise}
\end{cases}
(Which means that one does not have to compute the product :math:`\underline{\underline{K}}_{up}^{(i)} \delta \underline{x}_{p}^{(i)}` for :math:`i > 0`, as it will be zero.)
.. note:: **Reaction forces**
To obtain the reaction forces on the prescribed DOFs simply use that
.. math::
\underline{t}_{p}^{(i)} = \underline{f}_{p}^{(i)}
Which should be evaluated once convergence has been reached (before that, this has no meaning).
Periodic problem
================
[:download:`source: periodic.cpp <periodic.cpp>`]
In some ways the periodic example is even easier than the example above. As discussed previously :math:`\delta \underline{\vec{x}}` only leads to periodic fluctuations. In summary we begin by setting
then only affects the fluctuations, and not the average. Also we do not need to worry about the above discussion on the prescribed displacements since they are always zero and traction free -- as they merely suppress rigid body modes.
.. note::
The periodic implementation with macroscopic DOFs is identically extended to the non-linear case as above. Here one does have care about properly adding the prescribed displacements.