-
Notifications
You must be signed in to change notification settings - Fork 24
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
time loop conditional in monolithic.py
#42
Comments
Hey Kei - I do think the time loop needs some work, and this is one aspect that would be nice to fix. It seems to be fairly independant of the rest of the solver, but I am not positive. Multiple parts of the solver and post processing depend on the time loop and it is easy to break it, so I would recommend testing it it you want to take this on. Another consideration with the time loop is ensuring even temporal spacing in the visualization file after a restart when save step >=2 is used. I found a fix for this but it is not currently incorporated in the time loop, so if one restarts the solver there will be uneven time spacing between the visualization steps. In general, I think the order of things in the time loop is a bit strange currently, and could use some work; I also think "counter" should be in sync with "dt". We can discuss this more in our meeting on Thursday. |
Hi David, Thanks for the input! I agree with you that it is fairly independent of the rest of the solver, but also have to be really careful when it comes to fixing time loop.
while fixing the conditional to
Therefore, assuming that turtle is printing out the correct information, I’m pretty confident that the conditional should be fixed as I proposed. Yet, I will look into a bit more to make sure that this change won’t affect the solver. Regarding the counter, I think |
Another issue with current implementation of time loop is that we save the visualization at the first time step turtleFSI/turtleFSI/monolithic.py Lines 181 to 186 in 0b95d44
Because the counter is incremented after we call For example, if we set |
Hi Kei,
You raise very relevant issues. WOuld be good to discuss with the rest of
the group later today.
KVS
…On Thu, 16 Mar 2023 at 10:59, Kei Yamamoto ***@***.***> wrote:
Another issue with current implementation of time loop is that we save the
visualization at the first time step t=dt due to the definition of counter
.
https://github.com/KVSlab/turtleFSI/blob/0b95d443e3d694a118c1aab16599a7b58c5118e5/turtleFSI/monolithic.py#L181-L186
Because the counter is incremented after we call save_files_visualization,
if counter % save_step == 0: becomes True at the first time loop no
matter what value we give to save_step.
For example, if we set T=1, dt=0.1, and save_step=2, I would expect the
visualization file to contain the results from dt=0.2, 0.4, 0.6, 0.8, 1.0
but current implementation gives dt=0.1, 0.3, 0.5, 0.7, 0.9, which is not
intuitive for me.
—
Reply to this email directly, view it on GitHub
<#42 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4X54PTR2LOWKELCQHVOKLW4LQALANCNFSM6AAAAAAV2YUMGI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Inside
monolithic.py
, we have a conditional for time loop as follows.turtleFSI/turtleFSI/monolithic.py
Line 156 in 0b95d44
I think
+ dt/10
should really be-dt/10
to ensuret==T
because addingdt/10
makes it go into while loop even whent==T
and this will end upt=T+dt
as the final time step.I wanna make sure that others agree on this, as this is important part of turtle.
Could I have your opinion on this?
@johannesring @jorgensd @dbruneau-mie
The text was updated successfully, but these errors were encountered: