I am developing an Abaqus UEL with 3D 8 nodes brick elements and I need second order derivatives of the shape functions, I have already mapped the first order derivatives from the element coordinates to the physical coordinates through: $\frac{\partial N}{\partial \textbf{X} } = J^{-1} \frac{\partial N}{\partial \textbf{x}} $ where $N$ are the shape functions, $X$ the physical coordinates, $x$ the local coordinates and the Jacobian matrix is $J_{ij}=\frac{\partial N}{\partial x_i} X_j$.
How can I compute and implement the second order derivatives of the shape functions with respect to global coordinates?