From: David K. <dav...@ak...> - 2018-11-04 14:34:16
|
On Sat, Nov 3, 2018 at 11:46 PM Yuxiang Wang <yw...@vi...> wrote: > Hi David, > > Greetings again. > > I found the answer from this link > <http://www.joinville.udesc.br/portal/professores/pablo/materiais/CIL26_0053.pdf> > and yes, we will get a globally smooth distribution at the cost of much > more computation. > That looks like a good reference. I think the most common approach to getting a smooth stress plot is to compute element-based stress and then do nodal averaging. But there are obviously many different approaches that one can use. David > > On Fri, Nov 2, 2018 at 10:01 PM Yuxiang Wang <yw...@vi...> wrote: > >> Hi David, >> >> Thank you for your response! Yes I was indeed reading your example and >> thinking about it. Your insight helps a lot. Thank you so much! >> >> Since we are discussing on this topic, if you wouldn't mind, I'd like to >> ask one more question: >> >> During the L2 projection process, we solved the system per element. If we >> assemble the element mass matrices and the RHS to a global one with all >> elements, and similarly solve the global equation, would we be getting a >> globally smoothed stress distribution? >> >> I'd really love to hear your comment. Thanks in advance! >> >> Best, >> Shawn >> >> On Fri, Nov 2, 2018 at 7:27 PM David Knezevic <dav...@ak...> >> wrote: >> >>> On Fri, Nov 2, 2018 at 9:50 PM Yuxiang Wang <yw...@vi...> wrote: >>> >>>> Dear all, >>>> >>>> I have been using the matrix notation (following the Bathe textbook) >>>> with >>>> libmesh recently to code finite element solutions for basic continuum >>>> structural elements. I realized that I need to compute those matrices >>>> twice >>>> - once when I assemble the global stiffness matrix, and another time >>>> when I >>>> get the solutions and need to post-process to compute the >>>> stresses/strains. >>>> Being curious, do we have any best practices (or special >>>> considerations) to >>>> save those matrices so that we don't have to compute them twice? For >>>> example, should I just create a huge vector of DenseMatrix, and each >>>> matrix >>>> for each quadrature point? Or that libmesh has some tools for this book >>>> keeping? >>>> >>>> Explanation for what I meant by "matrix notation" and what are those >>>> finite >>>> element matrices: for example, for each quadrature point I have an >>>> interpolation matrix [H], a strain-displacement matrix [B] (constructed >>>> from derivatives of [H]). With the constitutive tensor matrix being >>>> [C], we >>>> can easily get the element stiffness matrix by [K] = >>>> integrate([B]^T[C][B]). After the solution [uhat] is obtained, we can >>>> also >>>> get the strain and stress by again [strain] = [B][uhat] or [stress] = >>>> [C][B][uhat]. >>>> >>>> Just wondering whether anyone else has done this before and whether >>>> there >>>> would be a better practice to do it more elegantly. Thanks :) >>>> >>>> Best, >>>> Shawn >>> >>> >>> See systems_of_equations_ex6 for an example of computing stresses in >>> libMesh. In that case we do not store and re-use the per-element strain and >>> stress matrices (C and B in your notation) You could store and reuse that >>> data, but it's not clear to me whether it'd be worth it. You'd presumably >>> get some speedup in the evaluation of the stress at the cost of extra >>> storage, so you'd have to decide if you want that or not (in my experience >>> I would not want that since memory is usually more of a limiting factor >>> than speed). >>> >>> Best, >>> David >>> >> >> >> -- >> Yuxiang "Shawn" Wang, PhD >> yw...@vi... >> +1 (434) 284-0836 >> > > > -- > Yuxiang "Shawn" Wang, PhD > yw...@vi... > +1 (434) 284-0836 > |