Hyperelasticity

Hyperelasticity#

Author: Jørgen S. Dokken and Garth N. Wells

This section shows how to solve the hyperelasticity problem for deformation of a beam.

We will also show how to create a constant boundary condition for a vector function space.

We start by importing DOLFINx and some additional dependencies. Then, we create a slender cantilever consisting of hexahedral elements and create the function space V for our unknown.

from dolfinx import log, default_scalar_type
from dolfinx.fem.petsc import NonlinearProblem
from dolfinx.nls.petsc import NewtonSolver
import pyvista
import numpy as np
import ufl

from mpi4py import MPI
from dolfinx import fem, mesh, plot
L = 20.0
domain = mesh.create_box(MPI.COMM_WORLD, [[0.0, 0.0, 0.0], [L, 1, 1]], [20, 5, 5], mesh.CellType.hexahedron)
V = fem.functionspace(domain, ("Lagrange", 2, (domain.geometry.dim, )))

We create two python functions for determining the facets to apply boundary conditions to

def left(x):
    return np.isclose(x[0], 0)


def right(x):
    return np.isclose(x[0], L)


fdim = domain.topology.dim - 1
left_facets = mesh.locate_entities_boundary(domain, fdim, left)
right_facets = mesh.locate_entities_boundary(domain, fdim, right)

Next, we create a marker based on these two functions

# Concatenate and sort the arrays based on facet indices. Left facets marked with 1, right facets with two
marked_facets = np.hstack([left_facets, right_facets])
marked_values = np.hstack([np.full_like(left_facets, 1), np.full_like(right_facets, 2)])
sorted_facets = np.argsort(marked_facets)
facet_tag = mesh.meshtags(domain, fdim, marked_facets[sorted_facets], marked_values[sorted_facets])

We then create a function for supplying the boundary condition on the left side, which is fixed.

u_bc = np.array((0,) * domain.geometry.dim, dtype=default_scalar_type)

To apply the boundary condition, we identity the dofs located on the facets marked by the MeshTag.

left_dofs = fem.locate_dofs_topological(V, facet_tag.dim, facet_tag.find(1))
bcs = [fem.dirichletbc(u_bc, left_dofs, V)]

Next, we define the body force on the reference configuration (B), and nominal (first Piola-Kirchhoff) traction (T).

B = fem.Constant(domain, default_scalar_type((0, 0, 0)))
T = fem.Constant(domain, default_scalar_type((0, 0, 0)))

Define the test and solution functions on the space \(V\)

v = ufl.TestFunction(V)
u = fem.Function(V)

Define kinematic quantities used in the problem

# Spatial dimension
d = len(u)

# Identity tensor
I = ufl.variable(ufl.Identity(d))

# Deformation gradient
F = ufl.variable(I + ufl.grad(u))

# Right Cauchy-Green tensor
C = ufl.variable(F.T * F)

# Invariants of deformation tensors
Ic = ufl.variable(ufl.tr(C))
J = ufl.variable(ufl.det(F))

Define the elasticity model via a stored strain energy density function \(\psi\), and create the expression for the first Piola-Kirchhoff stress:

# Elasticity parameters
E = default_scalar_type(1.0e4)
nu = default_scalar_type(0.3)
mu = fem.Constant(domain, E / (2 * (1 + nu)))
lmbda = fem.Constant(domain, E * nu / ((1 + nu) * (1 - 2 * nu)))
# Stored strain energy density (compressible neo-Hookean model)
psi = (mu / 2) * (Ic - 3) - mu * ufl.ln(J) + (lmbda / 2) * (ufl.ln(J))**2
# Stress
# Hyper-elasticity
P = ufl.diff(psi, F)

Comparison to linear elasticity

To illustrate the difference between linear and hyperelasticity, the following lines can be uncommented to solve the linear elasticity problem.

# P = 2.0 * mu * ufl.sym(ufl.grad(u)) + lmbda * ufl.tr(ufl.sym(ufl.grad(u))) * I

Define the variational form with traction integral over all facets with value 2. We set the quadrature degree for the integrals to 4.

metadata = {"quadrature_degree": 4}
ds = ufl.Measure('ds', domain=domain, subdomain_data=facet_tag, metadata=metadata)
dx = ufl.Measure("dx", domain=domain, metadata=metadata)
# Define form F (we want to find u such that F(u) = 0)
F = ufl.inner(ufl.grad(v), P) * dx - ufl.inner(v, B) * dx - ufl.inner(v, T) * ds(2)

As the varitional form is non-linear and written on residual form, we use the non-linear problem class from DOLFINx to set up required structures to use a Newton solver.

problem = NonlinearProblem(F, u, bcs)

and then create and customize the Newton solver

solver = NewtonSolver(domain.comm, problem)

# Set Newton solver options
solver.atol = 1e-8
solver.rtol = 1e-8
solver.convergence_criterion = "incremental"

We create a function to plot the solution at each time step.

pyvista.start_xvfb()
plotter = pyvista.Plotter()
plotter.open_gif("deformation.gif", fps=3)

topology, cells, geometry = plot.vtk_mesh(u.function_space)
function_grid = pyvista.UnstructuredGrid(topology, cells, geometry)

values = np.zeros((geometry.shape[0], 3))
values[:, :len(u)] = u.x.array.reshape(geometry.shape[0], len(u))
function_grid["u"] = values
function_grid.set_active_vectors("u")

# Warp mesh by deformation
warped = function_grid.warp_by_vector("u", factor=1)
warped.set_active_vectors("u")

# Add mesh to plotter and visualize
actor = plotter.add_mesh(warped, show_edges=True, lighting=False, clim=[0, 10])

# Compute magnitude of displacement to visualize in GIF
Vs = fem.functionspace(domain, ("Lagrange", 2))
magnitude = fem.Function(Vs)
us = fem.Expression(ufl.sqrt(sum([u[i]**2 for i in range(len(u))])), Vs.element.interpolation_points())
magnitude.interpolate(us)
warped["mag"] = magnitude.x.array

Finally, we solve the problem over several time steps, updating the z-component of the traction

log.set_log_level(log.LogLevel.INFO)
tval0 = -1.5
for n in range(1, 10):
    T.value[2] = n * tval0
    num_its, converged = solver.solve(u)
    assert (converged)
    u.x.scatter_forward()
    print(f"Time step {n}, Number of iterations {num_its}, Load {T.value}")
    function_grid["u"][:, :len(u)] = u.x.array.reshape(geometry.shape[0], len(u))
    magnitude.interpolate(us)
    warped.set_active_scalars("mag")
    warped_n = function_grid.warp_by_vector(factor=1)
    warped.points[:, :] = warped_n.points
    warped.point_data["mag"][:] = magnitude.x.array
    plotter.update_scalar_bar_range([0, 10])
    plotter.write_frame()
plotter.close()
[2024-12-16 08:05:58.645] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:06:01.216] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:06:03.324] [info] Newton iteration 2: r (abs) = 22.24548907411152 (tol = 1e-08), r (rel) = 0.1342779429427 (tol = 1e-08)
[2024-12-16 08:06:03.611] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:06:05.715] [info] Newton iteration 3: r (abs) = 2.432613387004531 (tol = 1e-08), r (rel) = 0.014683710503896342 (tol = 1e-08)
[2024-12-16 08:06:05.991] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:06:08.094] [info] Newton iteration 4: r (abs) = 4.431579458563597 (tol = 1e-08), r (rel) = 0.0267498445055792 (tol = 1e-08)
[2024-12-16 08:06:08.363] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:06:10.461] [info] Newton iteration 5: r (abs) = 0.1441891503961589 (tol = 1e-08), r (rel) = 0.000870352746363483 (tol = 1e-08)
[2024-12-16 08:06:10.733] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:06:12.856] [info] Newton iteration 6: r (abs) = 0.02142395087661431 (tol = 1e-08), r (rel) = 0.00012931898434928528 (tol = 1e-08)
[2024-12-16 08:06:13.128] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:06:15.240] [info] Newton iteration 7: r (abs) = 4.800650765296232e-06 (tol = 1e-08), r (rel) = 2.8977628111600535e-08 (tol = 1e-08)
Time step 1, Number of iterations 8, Load [ 0.   0.  -1.5]
[2024-12-16 08:06:15.516] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:06:17.637] [info] Newton iteration 8: r (abs) = 2.6576687328769084e-11 (tol = 1e-08), r (rel) = 1.6042186768064864e-13 (tol = 1e-08)
[2024-12-16 08:06:17.637] [info] Newton solver finished in 8 iterations and 8 linear solver iterations.
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
MESA: error: ZINK: failed to choose pdev
glx: failed to create drisw screen
[2024-12-16 08:06:18.098] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:06:20.480] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:06:22.613] [info] Newton iteration 2: r (abs) = 17.325417844303768 (tol = 1e-08), r (rel) = 0.11784222265438753 (tol = 1e-08)
[2024-12-16 08:06:22.887] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:06:25.002] [info] Newton iteration 3: r (abs) = 5.148824049644568 (tol = 1e-08), r (rel) = 0.03502073517181963 (tol = 1e-08)
[2024-12-16 08:06:25.271] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:06:27.384] [info] Newton iteration 4: r (abs) = 7.240032557943796 (tol = 1e-08), r (rel) = 0.049244499404597956 (tol = 1e-08)
[2024-12-16 08:06:27.660] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:06:29.798] [info] Newton iteration 5: r (abs) = 0.7778888038797866 (tol = 1e-08), r (rel) = 0.005290963049257456 (tol = 1e-08)
[2024-12-16 08:06:30.075] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:06:32.189] [info] Newton iteration 6: r (abs) = 1.2552533176963954 (tol = 1e-08), r (rel) = 0.008537851281911266 (tol = 1e-08)
[2024-12-16 08:06:32.460] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:06:34.577] [info] Newton iteration 7: r (abs) = 0.008495123844168218 (tol = 1e-08), r (rel) = 5.77812485977187e-05 (tol = 1e-08)
[2024-12-16 08:06:34.887] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:06:36.980] [info] Newton iteration 8: r (abs) = 0.00019210706900551987 (tol = 1e-08), r (rel) = 1.3066538540467734e-06 (tol = 1e-08)
[2024-12-16 08:06:37.254] [info] PETSc Krylov solver starting to solve system.
Time step 2, Number of iterations 9, Load [ 0.  0. -3.]
[2024-12-16 08:06:39.358] [info] Newton iteration 9: r (abs) = 1.709021236534951e-10 (tol = 1e-08), r (rel) = 1.1624242652424269e-12 (tol = 1e-08)
[2024-12-16 08:06:39.358] [info] Newton solver finished in 9 iterations and 9 linear solver iterations.
[2024-12-16 08:06:39.695] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:06:42.094] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:06:44.194] [info] Newton iteration 2: r (abs) = 10.001117236873005 (tol = 1e-08), r (rel) = 0.08874707902942588 (tol = 1e-08)
[2024-12-16 08:06:44.465] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:06:46.580] [info] Newton iteration 3: r (abs) = 5.330258435993069 (tol = 1e-08), r (rel) = 0.0472992022253551 (tol = 1e-08)
[2024-12-16 08:06:46.848] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:06:48.940] [info] Newton iteration 4: r (abs) = 11.990116716277255 (tol = 1e-08), r (rel) = 0.10639689652555262 (tol = 1e-08)
[2024-12-16 08:06:49.208] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:06:51.307] [info] Newton iteration 5: r (abs) = 2.2970192409224013 (tol = 1e-08), r (rel) = 0.020383097535809913 (tol = 1e-08)
[2024-12-16 08:06:51.584] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:06:53.686] [info] Newton iteration 6: r (abs) = 3.9023388029843677 (tol = 1e-08), r (rel) = 0.03462824821922908 (tol = 1e-08)
[2024-12-16 08:06:53.961] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:06:56.106] [info] Newton iteration 7: r (abs) = 0.23653543084877515 (tol = 1e-08), r (rel) = 0.0020989483552298553 (tol = 1e-08)
[2024-12-16 08:06:56.382] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:06:58.493] [info] Newton iteration 8: r (abs) = 0.04271420898976795 (tol = 1e-08), r (rel) = 0.000379033781037806 (tol = 1e-08)
[2024-12-16 08:06:58.769] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:07:00.884] [info] Newton iteration 9: r (abs) = 2.877976847117939e-05 (tol = 1e-08), r (rel) = 2.553835063090331e-07 (tol = 1e-08)
[2024-12-16 08:07:01.152] [info] PETSc Krylov solver starting to solve system.
Time step 3, Number of iterations 10, Load [ 0.   0.  -4.5]
[2024-12-16 08:07:03.223] [info] Newton iteration 10: r (abs) = 6.091459406196152e-10 (tol = 1e-08), r (rel) = 5.405388383340817e-12 (tol = 1e-08)
[2024-12-16 08:07:03.223] [info] Newton solver finished in 10 iterations and 10 linear solver iterations.
[2024-12-16 08:07:03.555] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:07:05.901] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:07:07.953] [info] Newton iteration 2: r (abs) = 5.506929937904466 (tol = 1e-08), r (rel) = 0.06539183684430351 (tol = 1e-08)
[2024-12-16 08:07:08.223] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:07:10.296] [info] Newton iteration 3: r (abs) = 26.24891969494894 (tol = 1e-08), r (rel) = 0.3116918307271015 (tol = 1e-08)
[2024-12-16 08:07:10.569] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:07:12.699] [info] Newton iteration 4: r (abs) = 2.309270517276505 (tol = 1e-08), r (rel) = 0.027421347755981797 (tol = 1e-08)
[2024-12-16 08:07:12.973] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:07:15.033] [info] Newton iteration 5: r (abs) = 14.056244587477249 (tol = 1e-08), r (rel) = 0.16691035896085923 (tol = 1e-08)
[2024-12-16 08:07:15.299] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:07:17.340] [info] Newton iteration 6: r (abs) = 0.22277413250167966 (tol = 1e-08), r (rel) = 0.0026453232363483556 (tol = 1e-08)
[2024-12-16 08:07:17.613] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:07:19.653] [info] Newton iteration 7: r (abs) = 0.2866705220675385 (tol = 1e-08), r (rel) = 0.0034040585623003423 (tol = 1e-08)
[2024-12-16 08:07:19.922] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:07:21.980] [info] Newton iteration 8: r (abs) = 0.0003218693539167365 (tol = 1e-08), r (rel) = 3.8220257954677744e-06 (tol = 1e-08)
Time step 4, Number of iterations 9, Load [ 0.  0. -6.]
[2024-12-16 08:07:22.251] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:07:24.330] [info] Newton iteration 9: r (abs) = 2.63796397740629e-07 (tol = 1e-08), r (rel) = 3.132440614948943e-09 (tol = 1e-08)
[2024-12-16 08:07:24.330] [info] Newton solver finished in 9 iterations and 9 linear solver iterations.
[2024-12-16 08:07:24.662] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:07:27.003] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:07:29.057] [info] Newton iteration 2: r (abs) = 3.194619708714672 (tol = 1e-08), r (rel) = 0.04964789515160881 (tol = 1e-08)
[2024-12-16 08:07:29.323] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:07:31.365] [info] Newton iteration 3: r (abs) = 7.714285842397931 (tol = 1e-08), r (rel) = 0.1198884654809222 (tol = 1e-08)
[2024-12-16 08:07:31.635] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:07:33.672] [info] Newton iteration 4: r (abs) = 0.850873121067315 (tol = 1e-08), r (rel) = 0.01322350181050775 (tol = 1e-08)
[2024-12-16 08:07:33.941] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:07:35.989] [info] Newton iteration 5: r (abs) = 0.3714343540930969 (tol = 1e-08), r (rel) = 0.00577249737031741 (tol = 1e-08)
[2024-12-16 08:07:36.263] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:07:38.294] [info] Newton iteration 6: r (abs) = 0.002150656449271473 (tol = 1e-08), r (rel) = 3.342356074786805e-05 (tol = 1e-08)
[2024-12-16 08:07:38.560] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:07:40.569] [info] Newton iteration 7: r (abs) = 2.546067958388237e-06 (tol = 1e-08), r (rel) = 3.9568689413047105e-08 (tol = 1e-08)
[2024-12-16 08:07:40.841] [info] PETSc Krylov solver starting to solve system.
Time step 5, Number of iterations 8, Load [ 0.   0.  -7.5]
[2024-12-16 08:07:42.890] [info] Newton iteration 8: r (abs) = 1.7369915835599454e-13 (tol = 1e-08), r (rel) = 2.6994754895100873e-15 (tol = 1e-08)
[2024-12-16 08:07:42.890] [info] Newton solver finished in 8 iterations and 8 linear solver iterations.
[2024-12-16 08:07:43.223] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:07:45.515] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:07:47.571] [info] Newton iteration 2: r (abs) = 2.0064883010780563 (tol = 1e-08), r (rel) = 0.039562203134381475 (tol = 1e-08)
[2024-12-16 08:07:47.843] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:07:49.895] [info] Newton iteration 3: r (abs) = 4.6097682272934195 (tol = 1e-08), r (rel) = 0.09089142803006316 (tol = 1e-08)
[2024-12-16 08:07:50.165] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:07:52.198] [info] Newton iteration 4: r (abs) = 0.18537214353432482 (tol = 1e-08), r (rel) = 0.003655007803444642 (tol = 1e-08)
[2024-12-16 08:07:52.472] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:07:54.538] [info] Newton iteration 5: r (abs) = 0.024688001493842943 (tol = 1e-08), r (rel) = 0.00048677668818530124 (tol = 1e-08)
[2024-12-16 08:07:54.810] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:07:56.861] [info] Newton iteration 6: r (abs) = 5.692545102089998e-06 (tol = 1e-08), r (rel) = 1.1224068715452317e-07 (tol = 1e-08)
[2024-12-16 08:07:57.131] [info] PETSc Krylov solver starting to solve system.
Time step 6, Number of iterations 7, Load [ 0.  0. -9.]
[2024-12-16 08:07:59.175] [info] Newton iteration 7: r (abs) = 2.6200570099858678e-11 (tol = 1e-08), r (rel) = 5.166002094157671e-13 (tol = 1e-08)
[2024-12-16 08:07:59.175] [info] Newton solver finished in 7 iterations and 7 linear solver iterations.
[2024-12-16 08:07:59.498] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:08:01.894] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:08:03.954] [info] Newton iteration 2: r (abs) = 1.3850621340169573 (tol = 1e-08), r (rel) = 0.0336621757045322 (tol = 1e-08)
[2024-12-16 08:08:04.221] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:08:06.255] [info] Newton iteration 3: r (abs) = 3.0373936007636577 (tol = 1e-08), r (rel) = 0.0738199930252921 (tol = 1e-08)
[2024-12-16 08:08:06.521] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:08:08.568] [info] Newton iteration 4: r (abs) = 0.04123862114946107 (tol = 1e-08), r (rel) = 0.0010022523010717154 (tol = 1e-08)
[2024-12-16 08:08:08.876] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:08:10.923] [info] Newton iteration 5: r (abs) = 0.002050566445156464 (tol = 1e-08), r (rel) = 4.9836412587848416e-05 (tol = 1e-08)
[2024-12-16 08:08:11.199] [info] PETSc Krylov solver starting to solve system.
Time step 7, Number of iterations 6, Load [  0.    0.  -10.5]
[2024-12-16 08:08:13.238] [info] Newton iteration 6: r (abs) = 1.7886722652583207e-08 (tol = 1e-08), r (rel) = 4.3471407233065016e-10 (tol = 1e-08)
[2024-12-16 08:08:13.238] [info] Newton solver finished in 6 iterations and 6 linear solver iterations.
[2024-12-16 08:08:13.568] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:08:15.863] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:08:17.941] [info] Newton iteration 2: r (abs) = 1.0633648536770233 (tol = 1e-08), r (rel) = 0.031085002055400286 (tol = 1e-08)
[2024-12-16 08:08:18.214] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:08:20.338] [info] Newton iteration 3: r (abs) = 2.047703133550441 (tol = 1e-08), r (rel) = 0.059859845748295164 (tol = 1e-08)
[2024-12-16 08:08:20.612] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:08:22.668] [info] Newton iteration 4: r (abs) = 0.008977192756641317 (tol = 1e-08), r (rel) = 0.0002624273825930661 (tol = 1e-08)
[2024-12-16 08:08:22.940] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:08:24.963] [info] Newton iteration 5: r (abs) = 0.0001674217868497817 (tol = 1e-08), r (rel) = 4.894187136567673e-06 (tol = 1e-08)
[2024-12-16 08:08:25.235] [info] PETSc Krylov solver starting to solve system.
Time step 8, Number of iterations 6, Load [  0.   0. -12.]
[2024-12-16 08:08:27.317] [info] Newton iteration 6: r (abs) = 3.2448763364689164e-11 (tol = 1e-08), r (rel) = 9.485642415194253e-13 (tol = 1e-08)
[2024-12-16 08:08:27.317] [info] Newton solver finished in 6 iterations and 6 linear solver iterations.
[2024-12-16 08:08:27.646] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:08:29.971] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:08:32.003] [info] Newton iteration 2: r (abs) = 0.89878861295836 (tol = 1e-08), r (rel) = 0.030966555668592563 (tol = 1e-08)
[2024-12-16 08:08:32.308] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:08:34.368] [info] Newton iteration 3: r (abs) = 1.3835366464849637 (tol = 1e-08), r (rel) = 0.04766789873082136 (tol = 1e-08)
[2024-12-16 08:08:34.636] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:08:36.696] [info] Newton iteration 4: r (abs) = 0.0018509604182366244 (tol = 1e-08), r (rel) = 6.377235759921814e-05 (tol = 1e-08)
[2024-12-16 08:08:36.963] [info] PETSc Krylov solver starting to solve system.
[2024-12-16 08:08:38.995] [info] Newton iteration 5: r (abs) = 7.871826891356691e-06 (tol = 1e-08), r (rel) = 2.712132331565423e-07 (tol = 1e-08)
[2024-12-16 08:08:39.261] [info] PETSc Krylov solver starting to solve system.
Time step 9, Number of iterations 6, Load [  0.    0.  -13.5]
[2024-12-16 08:08:41.281] [info] Newton iteration 6: r (abs) = 2.0599218895847923e-13 (tol = 1e-08), r (rel) = 7.097184471087099e-15 (tol = 1e-08)
[2024-12-16 08:08:41.281] [info] Newton solver finished in 6 iterations and 6 linear solver iterations.
gif