Author Topic: Energy computation in parfeap  (Read 7705 times)

Mari

  • Jr. Member
  • **
  • Posts: 11
Energy computation in parfeap
« on: August 03, 2020, 02:31:38 AM »
Hello!

I currently use parfeap (v8.5) and calculate the energies of a model with an user element using the procedure described in the programmers manual Sec. 5.10. With this procedure I get an energy file (Pxxxx.ene) for each partition, which I currently simply sum up to get the total energies. Through various discussions in this forum (e.g. http://feap.berkeley.edu/forum/index.php?topic=1509.msg8276#msg8276) the following questions have arisen for me.

If isw=13, does it take into account that the elements at the ghost nodes do not contribute energy? Or do I count some parts multiple times by this procedure?


Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1165
Re: Energy computation in parfeap
« Reply #1 on: August 03, 2020, 11:57:56 AM »
Looking at program/ptimpl.f, it looks like it is going to accumulate over all elements.

The ghost elements should be tagged with region number 21.  So you could add a check in your element to skip isw.eq.13
if ix(nen1-1).eq.21, this would then avoid double counting.

You should create a very simple problem (say, one row of elements and two partitions).  Run in serial mode and then in parallel
to double check.

JStorm

  • Sr. Member
  • ****
  • Posts: 250
Re: Energy computation in parfeap
« Reply #2 on: August 03, 2020, 11:57:57 PM »
Is that going to be corrected in the next 8.6 update? I use FEAP's elements and the energy feature.

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1165
Re: Energy computation in parfeap
« Reply #3 on: August 04, 2020, 12:04:37 AM »
If we can make a clean efficient fix in 8.6 we will add it to the next bug-fix release, else it will be fixed in 8.7.
If you want to make a quick patch to 8.6 right away, you can add an if check in pform for isw.eq.13 checking the
region number.

For 8.7, we plan a more integrated fix.

JStorm

  • Sr. Member
  • ****
  • Posts: 250
Re: Energy computation in parfeap
« Reply #4 on: August 04, 2020, 12:49:37 AM »
i have applied your workaround into pform after the check for active regions:
Code: [Select]
c         Check for ghost elements (no energy contribution)

          if (jsw.eq.13 .and. ix(nen1-1,n).eq.21) then
            cycle
          end if
Thank you.

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1165
Re: Energy computation in parfeap
« Reply #5 on: August 04, 2020, 01:13:15 AM »
That should work; though I guess it would look cleaner as a single line statement
Code: [Select]
if (jsw.eq.13 .and. ix(nen1-1,n).eq.21) cycle

Mari

  • Jr. Member
  • **
  • Posts: 11
Re: Energy computation in parfeap
« Reply #6 on: August 04, 2020, 05:26:57 AM »
The proposed solution works very well! Thank you very much for your quick and helpful contributions!