Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restart/non-restart time and TimeIter problems #42

Open
j-signorelli opened this issue Sep 9, 2024 · 0 comments
Open

Restart/non-restart time and TimeIter problems #42

j-signorelli opened this issue Sep 9, 2024 · 0 comments

Comments

@j-signorelli
Copy link
Contributor

j-signorelli commented Sep 9, 2024

Hi,

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 after SU2Driver.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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant