getfem-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Getfem-users] How to calculate pressure/stress tensor from displace


From: Huu Phuoc BUI
Subject: Re: [Getfem-users] How to calculate pressure/stress tensor from displacement in linear elasticity problems
Date: Wed, 7 Mar 2018 15:32:14 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

Dear Kostas,

I'm interested in computation of stress of a linear elasticity problem. I found this discussion in the getfem-users archive.

Could you please explain me what is the "mass matrix" in GetFEM++, and how do you need the line "sigmaij = np.transpose(gf.linsolve_mumps(mass_mat_t, sigmaij))" to get sigmaij?

Thank you in advance.

Best regards,

Phuoc

On Thu, Jan 26, 2017 at 5:07 PM, Konstantinos Poulios <address@hiddenom> wrote:

Dear Samyak

It would be helpful to know which material law you use (small or large strains?) and which programming language (python, matlab, scilab, C++?).

E.g for small strains elasticity in python, something like this should work:

mass_mat_t = gf.asm_mass_matrix(mim, mft)
for i,j in [[1,1],[2,2],[1,2]]:
  sigmaij = gf.asm_generic(mim, 1, "
({Lambda}*Div_u*Id(qdim(u)) + {Mu}*(Grad_u+Grad_u'))({i},{j})*Test_t".format(Lambda=Lambda, Mu=Mu, i=i, j=j), -1,
                           "u", False, mfu, md.variable("u"),
                           "t", True, mft, np.zeros(mft.nbdof()))
  sigmaij = np.transpose(gf.linsolve_mumps(mass_mat_t, sigmaij))

Then sigmaij has the ij component of the stress tensor projected on the finite element space defined in mft. If mft is a Lagrangian FEM the values of sigmaij will correspond to the nodes of mft. The projection from gauss points to the finite element space is as Yves mentioned some kind of averaging.

I hope this helps.

Best regards
Kostas


reply via email to

[Prev in Thread] Current Thread [Next in Thread]