## Re: [Libmesh-devel] Second derivatives on non-affine elements...

 Re: [Libmesh-devel] Second derivatives on non-affine elements... From: John Peterson - 2010-12-22 20:24:22 On Wed, Dec 22, 2010 at 12:22 PM, Derek Gaston wrote: > So... I'm currently needing things like d2xyzdxideta on non-planar (ie slightly twisted) faces of 3d elements (ie a quad4 in 3d that is not perfectly planar).  When I call fe::reinit() to get these... I get a warning message like so: "WARNING: Second derivatives are not currently correctly calculated on non-affine elements!" > > My question is... is that really true in this case?  It seems like for a linear quad4 d2xyzdxideta and it's like should be exactly defined.... even if the element isn't perfectly planar.  But I'm sure there might be something I'm not thinking of. > > If there is some error involved... how much error are we talking about.  I mean, will it be manageable as long as the element isn't too distorted (which none of mine will be) or is it instantaneously extremely wrong? Hi Derek, I don't think there should be any error in computing something like \frac{d^2 x}{d \xi^2}, \frac{d^2 x}{d\xi d\eta}, and friends. The errors are in second derivatives of the shape functions wrt physical coordinates, for example (all "d's" should be treated as partial derivs) \frac{ d^2 \phi}{d x^2} = \frac{d \phi}{d \xi} \frac{d^2 \xi}{d x^2} + \frac{d^2 \phi}{d \xi^2} (\frac{d \xi}{d x})^2 We currently compute \frac{d \xi}{d x} of course, but we don't compute the \frac{d^2 \xi}{d x^2} term, though I guess you could approximate it via finite differencing. For a 2D bilinear element, the formulae are a bit more complicated, it's possible this term is zero but I don't know for sure... -- John 

 [Libmesh-devel] Second derivatives on non-affine elements... From: Derek Gaston - 2010-12-22 18:22:38 So... I'm currently needing things like d2xyzdxideta on non-planar (ie slightly twisted) faces of 3d elements (ie a quad4 in 3d that is not perfectly planar). When I call fe::reinit() to get these... I get a warning message like so: "WARNING: Second derivatives are not currently correctly calculated on non-affine elements!" My question is... is that really true in this case? It seems like for a linear quad4 d2xyzdxideta and it's like should be exactly defined.... even if the element isn't perfectly planar. But I'm sure there might be something I'm not thinking of. If there is some error involved... how much error are we talking about. I mean, will it be manageable as long as the element isn't too distorted (which none of mine will be) or is it instantaneously extremely wrong? Thanks, Derek 
 Re: [Libmesh-devel] Second derivatives on non-affine elements... From: John Peterson - 2010-12-22 20:24:22 On Wed, Dec 22, 2010 at 12:22 PM, Derek Gaston wrote: > So... I'm currently needing things like d2xyzdxideta on non-planar (ie slightly twisted) faces of 3d elements (ie a quad4 in 3d that is not perfectly planar).  When I call fe::reinit() to get these... I get a warning message like so: "WARNING: Second derivatives are not currently correctly calculated on non-affine elements!" > > My question is... is that really true in this case?  It seems like for a linear quad4 d2xyzdxideta and it's like should be exactly defined.... even if the element isn't perfectly planar.  But I'm sure there might be something I'm not thinking of. > > If there is some error involved... how much error are we talking about.  I mean, will it be manageable as long as the element isn't too distorted (which none of mine will be) or is it instantaneously extremely wrong? Hi Derek, I don't think there should be any error in computing something like \frac{d^2 x}{d \xi^2}, \frac{d^2 x}{d\xi d\eta}, and friends. The errors are in second derivatives of the shape functions wrt physical coordinates, for example (all "d's" should be treated as partial derivs) \frac{ d^2 \phi}{d x^2} = \frac{d \phi}{d \xi} \frac{d^2 \xi}{d x^2} + \frac{d^2 \phi}{d \xi^2} (\frac{d \xi}{d x})^2 We currently compute \frac{d \xi}{d x} of course, but we don't compute the \frac{d^2 \xi}{d x^2} term, though I guess you could approximate it via finite differencing. For a 2D bilinear element, the formulae are a bit more complicated, it's possible this term is zero but I don't know for sure... -- John 
 Re: [Libmesh-devel] Second derivatives on non-affine elements... From: Derek Gaston - 2010-12-22 20:48:22 On Dec 22, 2010, at 1:23 PM, John Peterson wrote: > Hi Derek, > > I don't think there should be any error in computing something like > \frac{d^2 x}{d \xi^2}, \frac{d^2 x}{d\xi d\eta}, and friends. Perfect... these are what I am using... and everything seems to be working well (even for arbitrarily distorted elements). > The errors are in second derivatives of the shape functions wrt > physical coordinates, for example (all "d's" should be treated as > partial derivs) > > \frac{ d^2 \phi}{d x^2} = \frac{d \phi}{d \xi} \frac{d^2 \xi}{d x^2} + > \frac{d^2 \phi}{d \xi^2} (\frac{d \xi}{d x})^2 Indeed - that is what I suspected. Thanks for the info! Derek