getfem-users
[Top][All Lists]
Advanced

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

Re: [Getfem-users] Divergence of the first Piola-Kirchhoff stress tensor


From: Yves Renard
Subject: Re: [Getfem-users] Divergence of the first Piola-Kirchhoff stress tensor
Date: Fri, 13 Jul 2018 08:59:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0


Dear Phuoc,

No, a priori this should work. To simplify a bit your _expression_, you can use Contract(Grad(...), 2, 3).[1,1,1] instead of the three traces in div_sigma.

If you give me a minimal code, I could have a look to the problem.

Best regards,

Yves


Le 12/07/2018 à 15:36, Huu Phuoc BUI a écrit :

Dear GetFEM-users,

As Grad(_expression_) is available in the new version of GetFEM++, I compute the divergence of the first Piola-Kirchhoff stress tensor as (python code):

div_sigma = "( Trace(Grad(first_Piola_Kirchhoff_stress)(1,:,:)) + Trace(Grad(first_Piola_Kirchhoff_stress)(2,:,:)) + Trace(Grad(first_Piola_Kirchhoff_stress)(3,:,:)) )"

in which first_Piola_Kirchhoff_stress is a macro of a model md, which is defined as:

md.add_macro("second_Piola_Kirchhoff_stress", "Compressible_Mooney_Rivlin_sigma(Grad_u, [c1;c2;d1])")
md.add_macro("first_Piola_Kirchhoff_stress", "(Id(meshdim)+Grad_u)*second_Piola_Kirchhoff_stress")

Then I use generic assembly to assembly this quantity as:

eta_L_1_tmp = gf.asm_generic(mim,1,"(("+div_sigma+").delta)*Test_t",-1
                             ,md
                             ,"delta", False, mfz, delta
                             ,"t", True,mfrj,np.zeros(mfrj.nbdof()) )

with delta a given vector on a meshfem mfz.

When executing the code, GetFEM++ only gives the error as

segmentation fault (core dumped)

If you see any problem in my code, please let me know. Thank you in advance.

Best regards,

Phuoc



-- 

  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

---------

reply via email to

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