dolfinx-tutorial icon indicating copy to clipboard operation
dolfinx-tutorial copied to clipboard

Repeated variable name in Hyperelasticity demo

Open bibekanandadatta opened this issue 1 year ago • 4 comments

Hyperelasticity demo uses F as deformation gradient and then again as the left hand side of the nonlinear variational problem. While the code works fine; not sure how fem.petsc.NonlinearProblem(F, u, bcs) identifying the right F variable? I would probably rename one of the variables.

Also in the same example, the PyVista plot shows tetrahedron while rendering the plot for 2nd order Lagrange. Is it a bug from PyVista or VTK? Any idea if it would render properly on ParaView or some other package?

bibekanandadatta avatar Mar 22 '23 05:03 bibekanandadatta

For point 1: one should probably rename the second variable to residual

Also in the same example, the PyVista plot shows tetrahedron while rendering the plot for 2nd order Lagrange. Is it a bug from PyVista or VTK? Any idea if it would render properly on ParaView or some other package?

This is a bug in pyvista https://github.com/pyvista/pyvista/issues/947

If you use the VTXWriter to visualize it with Paraview it renders properly.

jorgensd avatar Mar 22 '23 05:03 jorgensd

Thank you for your quick response! Another request; might not be your priority right now, but adding problem description (or a link to the original problem) to this tutorial might help. Anyway, your tutorials are fantastic and helping me to learn FEniCSx fairly quickly.

bibekanandadatta avatar Mar 22 '23 16:03 bibekanandadatta

but adding problem description (or a link to the original problem) to this tutorial might help.

Do you mean a description of the setup for the hyperelasticity code?

jorgensd avatar Mar 22 '23 17:03 jorgensd

Geometry, material properties, the governing equation, and the boundary condition. Most of it is generally very clear for someone in the computational mechanics. It took me some time to understand that traction is being applied later for the deflection as initially it was set to zero.

bibekanandadatta avatar Mar 23 '23 22:03 bibekanandadatta