Hi
I think I might have a rather trivial question but I couldn’t find an answer in the tutorials or the forum. It builds on the hyperelastic demo https://jorgensd.github.io/dolfinx-tutorial/chapter2/hyperelasticity.html:
msh = mesh.create_box(MPI.COMM_WORLD, [np.array([0.0, 0.0, 0.0]), np.array([L, H, H])], [10, 1, 1],
mesh.CellType.hexahedron)
V = fem.VectorFunctionSpace(domain, ("CG", 1))
wf = fem.Function(V) # change of director
Af = fem.Constant(msh, PETSc.ScalarType((1.0, 0.0, 0.0))) # undeformed director
af = ufl.variable(Af + wf) # deformed director
L4f = ufl.variable(ufl.inner(af, af)) # director stretch
psi_f = c4f * (L4f**2 - 1.0) # stored strain energy
df = ufl.diff(psi_f, af) # director stress
I would like to get an expression for the director stress, df, in the reference configuration where wf = 0, i.e. I would like to substitute variable, af, with the constant, Af, in the expression for df. Is this possible?
Thanks in advance.