On 4/4/25 09:24, Sclah wrote:
- take the gradient of the previous solution
/fe_values[components].get_function_gradients(old_sol, local_old_grad);/
- for every quadrature point "q" compute the deformation gradient (F =
Identity + grad(u))
/Tensor<2, dim> F = Identity + local_old_grad(q);/
/Tensor<2, dim> F_inv = invert(F);/
Now I'd like to compute the divergence of /F_inv/, is there a way to do that?
I was thinking about automatic differentiation but maybe there is a more
straightforward way
You need to apply the chain rule. If I understand correctly, you need
div ( [I + grad(u)]^{-1} )
= trace grad ( [I + grad(u)]^{-1} )
which is of the form
grad ( A^{-1} )
and which you can compute by observing that on the one hand
grad ( A A^{-1} ) = grad I = 0
and on the other hand by using the product rule
grad ( A A^{-1} ) = (grad A) A^{-1} + A (grad A^{-1})
and so
grad A^{-1} = - A^{-1} (grad A) A^{-1}
with an appropriate choice of contraction over indices. So that gives you
something (you'll have to check the details) of the form
grad ( [I + grad(u)]^{-1} )
= - Finv grad (I + grad(u)) Finv
= - Finv [grad^2(u))] Finv
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: bange...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to dealii+unsubscr...@googlegroups.com.
To view this discussion visit
https://groups.google.com/d/msgid/dealii/da232778-3427-4aff-af30-bebd4b2564ef%40colostate.edu.