Author Topic: implement feap solver to an user element code  (Read 4540 times)

ryagh

  • Jr. Member
  • **
  • Posts: 17
implement feap solver to an user element code
« on: November 26, 2016, 04:06:13 PM »
Dear Admin,

I am trying to implement feap's mechanical solver module in an user element subroutine. The reason for this is that I need to couple this mechanical solver with a multi-physics program and use a spectral time integration in an outer loop of all the modules where the time step is now in the order of mechanical excitation period. This way, it will be more flexible to control the coupling between the mechanical problem and multi-physics fields, convergence and time integration.

I added a customized pmacr1.f to the user element code with replacing the solution variables hr(np(40)), hr(np(42)) and hr(np(26)) with customized variables. I passed the correct inputs for (lct,ct,j) as the original pmacr1.f however my results are 0. Please let me know the steps to implement the mechanical solver in the user element code. I will truly appreciate your help on this matter.

Regards,
-RY

FEAP_Admin

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 993
Re: implement feap solver to an user element code
« Reply #1 on: November 26, 2016, 09:35:43 PM »
This sounds highly unlikely to work.   The code of pmacr1.f is not designed to be embedded inside a user element.

If you describe in better detail what you would like compute from FEAP, perhaps we can suggest something sensible.


ryagh

  • Jr. Member
  • **
  • Posts: 17
Re: implement feap solver to an user element code
« Reply #2 on: November 27, 2016, 09:31:47 AM »
Dear Admin,

Please find the attached flowchart.

I only need feap to compute the displacement fields under cyclic loading in finite deformation in the user element code. I need to call the feap solver a couple of times in the user element code to integrate a few time increments. Since the ICs, BCs, material model, time integration and cyclic loads are already input to the feap, I only need to pass the initial conditions for u, urate to the feap solver to obtain the next increment results in a coupled simulation. If umacr1.f does not work, can I customize umacr1.f such that with specific calls to pform.f, formfe.f, psolve.f and update.f, I solve the mechanical problem?

Thanks a lot!
-RY

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1165
Re: implement feap solver to an user element code
« Reply #3 on: November 27, 2016, 12:47:27 PM »
What you describe looks like some thing that is better done with a user macro instead of a user element.  From a user macro you can implement custom calls implement timestepping and equation solving plus calls to other codes.

ryagh

  • Jr. Member
  • **
  • Posts: 17
Re: implement feap solver to an user element code
« Reply #4 on: November 27, 2016, 01:18:33 PM »
Dear Professor Govindjee,

I apologize, I think I had typos in the question. I am not using any user element code. I am trying to implement pmacr1.f into a user macro code (not user element).

Apparently it is possible. I am looking for a modification in the pmacr1.f such that I can input the displacement field at a specific time and then let feap numerically integrate in time and solve the nonlinear problem and output the displacement field at the end of the desired time as e.g.

loop t=dt,10*dt
     call user_pmacr1(lct,ct,j,u_input,u_output)
end

How would you modify pmacr1.f to get the user_pmacr1.f? I have replaced hr(np(40)), hr(np(42)) and hr(np(26)) with user defined variables but the user_pmacr1.f does not solve my system. That is why I get 0 for the displacement.

Thanks again!
-RY