Dear all,
I would like to set my output frequency without the GUI using usnpst.f90. I am using a variable in time and uniform in space time step so I would like to control my output frequency using ttcabs (in order to have an output every second between 300 and 500s for example). Consequently, I put the following in usnpst.f90:
call pstntc(ntcabs) ! indwri = 0 indact = 0 ! time = 0.d0 ! do i = 2, 252, 50 time = dble(i) if (ttcabs.ge.time.and.ttpabs.lt.time) then indwri = 0 indact = 1 endif enddo ! do i = 300, 500 time = dble(i) if (ttcabs.ge.time.and.ttpabs.lt.time) then indwri = 0 indact = 1 endif enddo ! call pstact(indwri, indact)
But the result I get is that the output files are written when the physical time step is almost equal to 2 (that's what I want) but then, I got an output at every time step and not when the physical time is almost equal to 52.
Please let me know if you have any suggestions, my being to have an output every 50 s between 2s and 252s and then an output every second between 300s and 500s.
Regards.
Nicolas
set output frequency using usnpst.f90
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
Re: set output frequency using usnpst.f90
Sorry about the last post, I realised ttpbas was the time related to the previous calculation. I used dt(icel) instead and it seems to work fine.
Please let me know if there is a better way to do what I want.
Regards.
Nicolas
Please let me know if there is a better way to do what I want.
Regards.
Nicolas
Re: set output frequency using usnpst.f90
Hello,
Using an cell-defined array (dt(icel)) may be dangerous if you ever move to a space-varying time step.
Maybe you could define a static (local) variable that tracks the last physical time step at which you forced an output, for example ttcprv, so that you may check the value of (ttcabs -ttcprev), and set ttcprev = ttcabs whenever you set indact to 1.
Regards,
Yvan
Using an cell-defined array (dt(icel)) may be dangerous if you ever move to a space-varying time step.
Maybe you could define a static (local) variable that tracks the last physical time step at which you forced an output, for example ttcprv, so that you may check the value of (ttcabs -ttcprev), and set ttcprev = ttcabs whenever you set indact to 1.
Regards,
Yvan