You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed an issue with the updating of the time and TimeIter variables in the run files with this preCICE v3 version of the adapter for restarts and ended up finding a bit of a deeper rabbithole than expected.
For the previous version of this SU2 v7 adapter with preCICE v2 I wrote, the time and TimeIter variables came at the end of the while loop afterSU2Driver.Output(TimeIter) is called - this is what all the pywrapper test cases in the main repo do. However, it was moved to before SU2Driver.Output(TimeIter) in the current version, which led to problems for me specifically when using a restart file as the initial condition and running with RESTART_ITER=1.
Unless I'm missing something: it seems to me that there is a bug in SU2 where specifically for non-restart simulations, what SU2 outputs as the time=0, TimeIter=0 flowfield (which really should be the initial condition) is actually the time=deltaT, TimeIter=1 flowfield. More information is here: su2code/SU2#2353. It seems that moving the updating of these two variables was probably made as a result of the same confusion I have.
Still waiting to hear back from the SU2 developers to confirm this, but a possible patch on the adapter-end for this could be to move the update of those two variables back to the end of the loop and manually increment time and TimeIter before the loop if it is not a restart simulation - I'll probably submit a PR for this in the near future.
The text was updated successfully, but these errors were encountered:
Hi,
I noticed an issue with the updating of the
time
andTimeIter
variables in the run files with this preCICE v3 version of the adapter for restarts and ended up finding a bit of a deeper rabbithole than expected.For the previous version of this SU2 v7 adapter with preCICE v2 I wrote, the
time
andTimeIter
variables came at the end of the while loop afterSU2Driver.Output(TimeIter)
is called - this is what all the pywrapper test cases in the main repo do. However, it was moved to beforeSU2Driver.Output(TimeIter)
in the current version, which led to problems for me specifically when using a restart file as the initial condition and running withRESTART_ITER=1
.Unless I'm missing something: it seems to me that there is a bug in SU2 where specifically for non-restart simulations, what SU2 outputs as the
time=0
,TimeIter=0
flowfield (which really should be the initial condition) is actually thetime=deltaT
,TimeIter=1
flowfield. More information is here: su2code/SU2#2353. It seems that moving the updating of these two variables was probably made as a result of the same confusion I have.Still waiting to hear back from the SU2 developers to confirm this, but a possible patch on the adapter-end for this could be to move the update of those two variables back to the end of the loop and manually increment
time
andTimeIter
before the loop if it is not a restart simulation - I'll probably submit a PR for this in the near future.The text was updated successfully, but these errors were encountered: