Author Topic: Analysis in a loop with "end time"  (Read 5076 times)

jbruss

  • Jr. Member
  • **
  • Posts: 36
Analysis in a loop with "end time"
« on: January 20, 2018, 10:17:37 AM »
Hello -

I am trying to perform the same analysis in a loop with different parameters but I would like to use auto time step control. My problem is as follows:

Code: [Select]
LOOP,,num_iterations
    ! Set some parameters here

    ! Reset time and do a complete analysis
    TIME,SET,0.0
    AUTO,TIME,10,50,50
    AUTO,DT,1e-9,1e-1
    ZERO
    LOOP,,max_steps
      TIME,,1.0
      LOOP,,51
        UTAN,,1
      NEXT
    NEXT

    ! Write out some things
NEXT

My problem is that once the analysis reaches the end time, 1.0, FEAP not only breaks out of the inner two loops but also breaks out of the outer-most loop (i.e. FEAP only does 1 iteration). If I set a constant dt and do the exact number of time steps to get to the time I want (also setting the end time larger than the final time... e.g. dt = 1, num_steps = 10, and using "TIME,,20.0" for instance) then the LOOP is not exited and all of the iterations are completed. However, I really need to use auto time stepping including stopping at a particular time. Is there a way to have FEAP only break out of the 2 inner-most loops whenever the final analysis time is reached?

Thank you in advance for your help!
Jonathan

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: Analysis in a loop with "end time"
« Reply #1 on: January 20, 2018, 03:37:27 PM »
It appears that one of the tests is still passed and the problem quits.  The step I tried was to set

           ljump = .false.

at line 1185 in pmacr3.f (this is just after ttim = 0.0d0 in the 'zero' command).  This allowed the next problem to run o.k.  I was not using auto so there could still be other tests causing the failure.

jbruss

  • Jr. Member
  • **
  • Posts: 36
Re: Analysis in a loop with "end time"
« Reply #2 on: January 21, 2018, 01:15:40 PM »
Great! I did exactly this and it solved my problem! Thank you Professor Taylor!