Author Topic: Looping over the elements to perform nonlocal integral  (Read 4897 times)

Paolo Di Re

  • Jr. Member
  • **
  • Posts: 14
Looping over the elements to perform nonlocal integral
« on: April 29, 2022, 11:35:23 AM »
Dear all,
I'm working with solid elements and implementing a user material that includes nonlocal integral regularization. To do that, at each Newton-Raphson iteration of each step, I need to loop over all quadrature points of all elements and be sure that the program calls the user material subroutine.

So far, I have exploited the command STREss ALL to force FEAP to perform the loop and I have implemented the computation of the nonlocal integral in the user material subroutine under isw 4. This expedient works fine. However, it makes the program printing all the element stresses in the Output file at each iteration, sensibly increasing the size of the file. I also tried to use STREss AVERage, instead of STREss ALL. It works better but I noticed it doesn't work when one defines HISTory PLOTs for the material (not sure why).

Is there a better why to perfom a loop over all quadrature points of all elements and call the user material subroutine, without interfering with other FEAP commands?

I'm using FEAP 85.

Thank you very much in advance.

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1164
Re: Looping over the elements to perform nonlocal integral
« Reply #1 on: April 30, 2022, 12:27:35 AM »
I may be best to write a user macro that calls formfe

Code: [Select]
call formfe( np(40),np(26),na,nal,   fa,fa,fa,fa,  isw , 1,numel,1 )

set isw to a value that FEAP does not use (see the programmer's manual).  The meaning of the arguments is documented in program/formfe.f.  The actual loop over the elements occurs in program/pform.f.  You may need to customize pform.f slightly to make sure the elements get called -- which is the call to elmlib( ).

Paolo Di Re

  • Jr. Member
  • **
  • Posts: 14
Re: Looping over the elements to perform nonlocal integral
« Reply #2 on: April 30, 2022, 11:05:08 AM »
Thank you Professor.
This works great for user elements. I actually used:

Code: [Select]
call formfe(np(40),np(26),np(26),np(26),   .false.,.false.,.false.,.false.,  isw, 1,numel,1)
with isw = 30.

However, for user materials, I had to modify the solid element (in particular elements/solid2d/sld2d1.f). Indeed, I noticed that this calls the material subroutine (modlsd.f) only for specific isw values (3,5,6,13,14 and 4,8,16,22,25). So I have added a call to modlsd for isw == 30.
Perhaps the same modification is required in sld1d1 and sld3d1, isn't it?

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: Looping over the elements to perform nonlocal integral
« Reply #3 on: April 30, 2022, 11:38:55 PM »
It would be required in any element you use.