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: Konstantinos Poulios
Subject: Re: [Getfem-users] How to calculate pressure/stress tensor from displacement in linear elasticity problems
Date: Thu, 26 Jan 2017 09:07:23 +0100

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, sigma))

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



On Thu, Jan 26, 2017 at 2:48 AM, samyak jain <address@hidden> wrote:
Dear Yves,

Thanks a lot for your reply. I am not sure what you mean there. I have gone through the example and they calculate Von Mises Stress but there is already a function for that. Could you please tell me which physical quantity or _expression_ is being interpolated in that example so that I can use it as a basis for my pressure calculation. It would be really helpful if you would elaborate a bit on the usage and the example for calculating any _expression_ as I am quite new to fem and getfem. Thanks a lot.

Yours sincerely
Samyak

On Wed, Jan 25, 2017 at 6:44 PM, Yves Renard <address@hidden> wrote:

Dear Samyak,

There is no specific function for that, but you can use the interpolation facilities of the model object. You can see an example of use for instance in the demo_thermo_elasticity_electrical_coupling example which has a  python, Matlab, Scilab and C++ version. You can interpolate any _expression_. Be aware that the stress being discontinuous across the element edges/faces, the value will be averaged.

Regards,

Yves


Le 25/01/2017 à 06:08, samyak jain a écrit :
Dear getfem-users,

I have started using getfem recently to work on few contact problems between elastic bodies. 

I am able to solve few simple cases and I am able to compute displacement (u) and Von-Mises/Tresca values on my mesh nodes.

The problem I am facing is that I have to calculate pressure at the mesh points and for that I believe I need the stress tensor values at these discrete mesh points. Could someone please guide me or tell me how to get the value of these variables. I went through the documentation and checked everywhere but I couldn't find a way to calculate stress tensor/pressure.

Thanks a lot.

Samyak



_______________________________________________
Getfem-users mailing list
address@hidden
https://mail.gna.org/listinfo/getfem-users


-- 

  Yves Renard (address@hidden)       tel : (33) 04.72.43.87.08
  Pole de Mathematiques, INSA-Lyon             fax : (33) 04.72.43.85.29
  20, rue Albert Einstein
  69621 Villeurbanne Cedex, FRANCE
  http://math.univ-lyon1.fr/~renard

---------

_______________________________________________
Getfem-users mailing list
address@hidden
https://mail.gna.org/listinfo/getfem-users



_______________________________________________
Getfem-users mailing list
address@hidden
https://mail.gna.org/listinfo/getfem-users



reply via email to

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