Author Topic: PARTition leave outer loop when converged  (Read 5053 times)

Anmo

  • New Member
  • *
  • Posts: 7
PARTition leave outer loop when converged
« on: March 03, 2023, 05:06:43 AM »
Dear all,

I am using a staggered approach in FEAP 8.6. Both partitions influence each other, but the number of needed outer iterations can vary a lot. So there is an iterationloop around both partitions additional to the loops around each partition. I want to check the monolithic residual after both partions are solved. When the residual is converged, the solution shall continue with the next time step immediately. In the manual I found the key word ‘FORM CONV’, which I thought would check the convergence and exit the loop, if convergence is reached. The corresponding part of the input file is as followed:

Code: [Select]
BATCH
  DT,,dt
  LOOP,,te/dt
    TIME

    LOOP,,10

      PART,,2
      LOOP,,10
        UTAN,,1
      NEXT
      PART,,1
      LOOP,,10
        UTAN,,1
      NEXT
     
      MONOlithic
      FORM CONVerge

    NEXT

  PVIE  TIME

  NEXT

END


FORM CONV calculates the residual norm as expected, but the loop is always exited even for residual norm = 1e-2. Did I mistake the functionality of FORM CONV or is there an additional command needed?

Thanks a lot in advance.

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1160
Re: PARTition leave outer loop when converged
« Reply #1 on: March 03, 2023, 08:23:01 AM »
Can you check that in pmacr1.f:921 that neq is the number appropriate for your monolithic computation (when calling form,conv)? 

The other thing I am wondering about is what will FEAP use for the initial residual of the monolithic problem in order to compute the relative residual (reln).  mono is just resetting things to use all the equations but when you call form,conv it will compute a relative residual and by dividing by the first residual it has seen in the loop which is not the monolithic residual in your case.  I am guessing it is using the first residual from your part,,1 loop.

To that end, perhaps you want to make an adjustment to pmacr1.f:991 to check on the size of the residual itself (grnorm) and not reln.

Please check along these lines and report back.

JStorm

  • Sr. Member
  • ****
  • Posts: 250
Re: PARTition leave outer loop when converged
« Reply #2 on: March 05, 2023, 02:14:32 PM »
I have defined a third partition with all DOFs being active instead of using MONOlithic.
When resetting the previously stored initial values for residuum norm and energy (http://feap.berkeley.edu/forum/index.php?topic=2720.msg11717#msg11717), then the convergence test on the monolithic problem works fine and the staggered loop will continue or exit.

Anmo

  • New Member
  • *
  • Posts: 7
Re: PARTition leave outer loop when converged
« Reply #3 on: March 07, 2023, 04:45:38 AM »
Hello,

Thanks a lot for the answers. Using a third partition sound interesting, but I am not sure whether I understood you right. Is it looking like
Code: [Select]
  PART,,3
  FORM CONVerge
instead of
Code: [Select]
     
  MONOlithic
   FORM CONVerge
Because in this case the energy norm is equal to zero and the loop is left even for high residuals, but maybe this is due to my user element.


Quote
Can you check that in pmacr1.f:921 that neq is the number appropriate for your monolithic computation (when calling form,conv)?
Neq is 7. Is neq the number of equations? In that case this corresponds to the non-prescribed degrees of freedom.

Quote
The other thing I am wondering about is what will FEAP use for the initial residual of the monolithic problem in order to compute the relative residual (reln).
The corresponding line in the outputfile is:
   Residual 1 norm =    5.8755125E-03   1.0000000E+00      t=     0.01     0.01
So I think, that this is set as the reference for the relative residual. But even hear the energy norm is zero accoding to the L-File.

Quote
To that end, perhaps you want to make an adjustment to pmacr1.f:991 to check on the size of the residual itself (grnorm) and not reln.
I did this in line 988:
Code: [Select]
      elseif(pcomp(lct(l),'conv',4) .and. grnorm.lt. sqrt(tol)) then
Afterwards I god the following error message
*ERROR* Use SOLVe before another FORM.
which I did not get before.

FEAP_Admin

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 993
Re: PARTition leave outer loop when converged
« Reply #4 on: March 08, 2023, 04:58:53 AM »
Make sure you declare a third partition that has all dofs active for the part,3 method.

Regarding the *ERROR*, that should not have occurred.  Can you run your problem interactively and tell us when the error is getting generated?  Also are you able to make an example for us to try that uses only built-in FEAP elements?

JStorm

  • Sr. Member
  • ****
  • Posts: 250
Re: PARTition leave outer loop when converged
« Reply #5 on: March 08, 2023, 11:07:45 PM »
Yes, I create three partitions like
Code: [Select]
PARTition
  1 1 1 0
  0 0 0 1
  1 1 1 1

and I am usually solve one monolithic iteration at the end of the staggered loop instead of just forming the residuum, because it accelerates the convergence of the staggered scheme for my problems.
Then you also can make use of the energy increment.

Code: [Select]
      ! check for global convergence
      PARTition,,3
      STAGgered,SETReferenceNorm
      TANG,,1
     
    NEXT,stag
    JUMP,stag

The STAGgered,SETReferenceNorm macro set the desired reference values for the residuum and energy increment norm.

Anmo

  • New Member
  • *
  • Posts: 7
Re: PARTition leave outer loop when converged
« Reply #6 on: March 13, 2023, 04:54:41 AM »
Hello,

Quote
Regarding the *ERROR*, that should not have occurred.  Can you run your problem interactively and tell us when the error is getting generated?
According to the Output-file the error occures, when "FORM CONVerge" shall be executed.

Quote
Also are you able to make an example for us to try that uses only built-in FEAP elements?
I attached my current Input-file.

Quote
The STAGgered,SETReferenceNorm macro set the desired reference values for the residuum and energy increment norm.
Is this the user macro, that you wrote about? I could not find it in the manual.