Author Topic: Understanding history variables  (Read 9256 times)

anshulfy

  • Full Member
  • ***
  • Posts: 63
Understanding history variables
« on: December 10, 2016, 12:05:37 PM »
Dear all,

I am new to FEAP. I am having problem in understanding the storage of history variable in user element routine.

-I am not able to understand the difference between history variables assositaed with nh1/nh2 and nh3. What does it mean by history variable not associated with any time (nh3)?
-Which one of nh1/nh2/nh3 should I use to store internal variable for a user element?
-Will these variables be saved for each element?
-How can I access a history variable for a particular element outside the element routine (say in a user macro)?

Thanks
Anshul


 
« Last Edit: December 10, 2016, 12:30:00 PM by anshulfy »

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1165
Re: Understanding history variables
« Reply #1 on: December 10, 2016, 09:33:29 PM »
The complete set of history variables are stored starting at hr( np(49) ).  Data is extracted from this array an passed to the elements when they are called.  At appropriate moments the information from the elements is inserted back into this array.  The location of various entries (time n, time n+1, and the time independent values) can be inferred by looking in program/pform.f.   Try looking around line 259 (or search for np(49)) and you will see how the code computes finds the correct history for each element and associated material.  Also note that the data for each element is a list the history values for each gauss point.

anshulfy

  • Full Member
  • ***
  • Posts: 63
Re: Understanding history variables
« Reply #2 on: December 10, 2016, 11:59:53 PM »
Dear Prof. Govindjee,

Thanks for your reply. I will try to understand the code.

Thanks,
Anshul

Yaakov

  • Sr. Member
  • ****
  • Posts: 323
Re: Understanding history variables
« Reply #3 on: December 11, 2016, 05:57:40 PM »
HI Anshul,

maybe you can check history parameter in subroutine inmate.f in ver84\ \element\material. It can help you to better understand, how FEAP solver work with history variables  under ISW 1.

Best regards,
Yaakov
« Last Edit: December 11, 2016, 06:04:17 PM by zheliu »
Let's boost FEAP's performance!

anshulfy

  • Full Member
  • ***
  • Posts: 63
Re: Understanding history variables
« Reply #4 on: December 12, 2016, 12:27:08 AM »
Thanks zheliu. I will surely check that.

regards,
Anshul

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: Understanding history variables
« Reply #5 on: December 12, 2016, 09:53:05 AM »
You asked about the differences between nh1/nh2 and nh3 history variables.

The nh1/nh2 variables are meant to be associated with quantities that change in "TIME",  that is if you have a solution that advances from time t_n to t_n+1 the history variables for t_n are in hr(nh1) and those for t_n+1 are in hr(nh2).  These can be state variables in incremental stress-strain relations.  In your solution algorithm you must use the solution commands TIME and DT

If the history variable does not depend in this way then we consider them to be independent of "TIME", then you could use the hr(nh3) type as it only stores one copy of each value in stead of two (nh1) and (nh2) values.

These values are saved for each element as you can observe in the routine "pform.f" for hr(np(49)) as given in Professor Govinjee's reply.

Accessing from a user macro can be done by following how pform.f works.

anshulfy

  • Full Member
  • ***
  • Posts: 63
Re: Understanding history variables
« Reply #6 on: December 12, 2016, 11:19:43 PM »
Thanks a lot Prof. Taylor. This will help a lot.

regards,
Anshul