Author Topic: time, set, 0.0  (Read 5569 times)

dolesch

  • Jr. Member
  • **
  • Posts: 30
time, set, 0.0
« on: April 27, 2022, 06:36:30 AM »
Dear all,

Is there a possibility to program the command <time, set, 0.0> or to call the command within a subroutine?
Thank you in advance for your responses.

Kind regards,
dolesch

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1164
Re: time, set, 0.0
« Reply #1 on: April 27, 2022, 07:58:04 AM »
It you want to set the time variable to zero, you can create a user macro umacrXX.f and reset it.  The value is stored in ttim which can be found in tdata.h.
I'm not sure what havoc this will cause elsewhere in the program, but you can certainly do this.  Depending on your interests you may want to have a look at program/pnewprob.f which is used to initiate new problems.

JStorm

  • Sr. Member
  • ****
  • Posts: 250
Re: time, set, 0.0
« Reply #2 on: April 27, 2022, 08:29:00 AM »
There is the FEAP solution command BACK, which decrement the time by current time increment value DT.
I have not tested the behaviour, but
Code: [Select]
DT,,<current time>
BACK,,<new DT>
could work.

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: time, set, 0.0
« Reply #3 on: April 27, 2022, 08:40:46 AM »
There is a command 'TIME SET value' -- sets "ttim" in 'tdata.h' to 'value'.

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1164
Re: time, set, 0.0
« Reply #4 on: April 27, 2022, 08:47:55 AM »
BACK,,dt

will take you back to the last converged time and reset the dt to the given value.  It's main use is when iterations start to diverge due to a too large time step, as it allows you to re-try the time step but with a smaller value.
« Last Edit: April 27, 2022, 11:38:27 AM by Prof. S. Govindjee »

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: time, set, 0.0
« Reply #5 on: April 27, 2022, 09:53:30 AM »
A hint on available options for solution commands may be obtained in interactive mode using

HELP command_name

Thus

HELP TIME

will  display

    time,,<tmax>: Advance time by dt
                  quit after time > tmax
    time,set,ttim_new: Time set to ttim_new
    time,expl,<tmax>,c: Explicit critical time
                         dt = c * dt_cr

Usually, such things are also included as comments in the source