2D Incns solver(tutorial) restart simulation raises error
******************* This email originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list https://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address. ******************* Hi all, I am new to Nektar++, I was running tutorial: Incompressible Flow Simulation. When I tried to restart simulation by running code in 6.5 Optional additional tasks (Exercise1), it raised error Initial Conditions: - Field u: from file cyl2DMesh.fld - Field v: from file cyl2DMesh.fld - Field p: from file cyl2DMesh.fld Fatal : Level 0 assertion violation m_timestep < 0 I followed all instructions before, I’m not sure where I was wrong. It’s really confusing. Could you please help me with that? Thank you so much and have a good day. Best, Zhikang Dong
Hi Zhikang Dong, I believe you are using the Jupyter tutorials, right? In those tutorials, we set the "FinalTime" parameter for the simulation where together with the time step it will calculate the required number of steps. the problem you are facing is that after you use the previous simulation as initial conditions, you need to set a new "FinalTime" greater that in your initial conditions. Let's say you run the first simulation for 10 unit time, now in your second simulation you want to run the simulation for an additional 15 unit time, hence the final time becomes 10+15=25. You can also simply delete the "FinalTime" parameter and based on your TimeStep and desired simulation time, calculate the number of steps manually and set it in the session file. Hope this solve your problem Cheers, Mohsen ________________________________ From: nektar-users-bounces@imperial.ac.uk <nektar-users-bounces@imperial.ac.uk> on behalf of 董智康 <darrendongzhikang@gmail.com> Sent: Sunday, February 20, 2022 5:35 AM To: nektar-users <nektar-users@imperial.ac.uk> Subject: [Nektar-users] 2D Incns solver(tutorial) restart simulation raises error This email from darrendongzhikang@gmail.com originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list<https://spam.ic.ac.uk/SpamConsole/Senders.aspx> to disable email stamping for this address. Hi all, I am new to Nektar++, I was running tutorial: Incompressible Flow Simulation. When I tried to restart simulation by running code in 6.5 Optional additional tasks (Exercise1), it raised error Initial Conditions: - Field u: from file cyl2DMesh.fld - Field v: from file cyl2DMesh.fld - Field p: from file cyl2DMesh.fld Fatal : Level 0 assertion violation m_timestep < 0 I followed all instructions before, I’m not sure where I was wrong. It’s really confusing. Could you please help me with that? Thank you so much and have a good day. Best, Zhikang Dong
Hi Mohsen, Thanks for your email! Your methods did work! Thank you so much! I have one more question is that when I restart the simulation, I didn’t get the exactly same result. Say first I simulated 20 unit time from initial conditions (1, 0, 0). In order to compare with the results, then I simulated 10 unit time from initial conditions (1, 0, 0) and restarted at the 10th unit time to get another 10 unit time. And I found, for example, the 11th solution from my first simulation is really close to 11th simulation from second but not exactly the same. I think the reason is the approximation and unsteady of the algorithm. Is that correct? Best, Zhikang
On Feb 22, 2022, at 5:23 AM, Lahooti, Mohsen <m.lahooti@imperial.ac.uk> wrote:
Hi Zhikang Dong,
I believe you are using the Jupyter tutorials, right? In those tutorials, we set the "FinalTime" parameter for the simulation where together with the time step it will calculate the required number of steps. the problem you are facing is that after you use the previous simulation as initial conditions, you need to set a new "FinalTime" greater that in your initial conditions. Let's say you run the first simulation for 10 unit time, now in your second simulation you want to run the simulation for an additional 15 unit time, hence the final time becomes 10+15=25.
You can also simply delete the "FinalTime" parameter and based on your TimeStep and desired simulation time, calculate the number of steps manually and set it in the session file.
Hope this solve your problem
Cheers, Mohsen From: nektar-users-bounces@imperial.ac.uk <mailto:nektar-users-bounces@imperial.ac.uk> <nektar-users-bounces@imperial.ac.uk <mailto:nektar-users-bounces@imperial.ac.uk>> on behalf of 董智康 <darrendongzhikang@gmail.com <mailto:darrendongzhikang@gmail.com>> Sent: Sunday, February 20, 2022 5:35 AM To: nektar-users <nektar-users@imperial.ac.uk <mailto:nektar-users@imperial.ac.uk>> Subject: [Nektar-users] 2D Incns solver(tutorial) restart simulation raises error
This email from darrendongzhikang@gmail.com <mailto:darrendongzhikang@gmail.com> originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list <https://spam.ic.ac.uk/SpamConsole/Senders.aspx> to disable email stamping for this address.
Hi all,
I am new to Nektar++, I was running tutorial: Incompressible Flow Simulation. When I tried to restart simulation by running code in 6.5 Optional additional tasks (Exercise1), it raised error
Initial Conditions: - Field u: from file cyl2DMesh.fld - Field v: from file cyl2DMesh.fld - Field p: from file cyl2DMesh.fld Fatal : Level 0 assertion violation m_timestep < 0
I followed all instructions before, I’m not sure where I was wrong. It’s really confusing. Could you please help me with that? Thank you so much and have a good day.
Best, Zhikang Dong
Hi Zhikang, I am not sure how you measure the closeness and being exact. Nevertheless, I wouldn't concern about this. There are several reasons that could contribute to this observation. For turbulent flows, the very nature of turbulence can play a role here but as far as I remember the Re was quite low in that tutorial. Another thing is that when using IMEXOrder2 integration scheme, which is a second order one, you need the data from time step n and n+1 to predict n+2, when restarting the solution, we only provide the solver with solution at n, so it need to do one step integration to estimate n+1 and after that it can use the second order scheme. This can introude some deviation over the time as well. However, these effects should be small and I am guessing negligible as far as we have a good resolution. The main contributor in your case, is the resolution. In the jupyter tutorial, to be able to run the cases fast we set up the mesh quite coarse and used a low polynomial order. That is fine because the objective of these tutorials is to show the user how to set up and run the simulation but not to get a very accurate results. If you run the cases on your machine and increase the polynomial order, I expect this difference fade away. Please let me know of the outcome if you happen to try my suggestion Cheers, Mohsen ________________________________ From: 董智康 <darrendongzhikang@gmail.com> Sent: Tuesday, February 22, 2022 9:33 PM To: Lahooti, Mohsen <m.lahooti@imperial.ac.uk> Cc: nektar-users <nektar-users@imperial.ac.uk> Subject: Re: [Nektar-users] 2D Incns solver(tutorial) restart simulation raises error Hi Mohsen, Thanks for your email! Your methods did work! Thank you so much! I have one more question is that when I restart the simulation, I didn’t get the exactly same result. Say first I simulated 20 unit time from initial conditions (1, 0, 0). In order to compare with the results, then I simulated 10 unit time from initial conditions (1, 0, 0) and restarted at the 10th unit time to get another 10 unit time. And I found, for example, the 11th solution from my first simulation is really close to 11th simulation from second but not exactly the same. I think the reason is the approximation and unsteady of the algorithm. Is that correct? Best, Zhikang On Feb 22, 2022, at 5:23 AM, Lahooti, Mohsen <m.lahooti@imperial.ac.uk<mailto:m.lahooti@imperial.ac.uk>> wrote: Hi Zhikang Dong, I believe you are using the Jupyter tutorials, right? In those tutorials, we set the "FinalTime" parameter for the simulation where together with the time step it will calculate the required number of steps. the problem you are facing is that after you use the previous simulation as initial conditions, you need to set a new "FinalTime" greater that in your initial conditions. Let's say you run the first simulation for 10 unit time, now in your second simulation you want to run the simulation for an additional 15 unit time, hence the final time becomes 10+15=25. You can also simply delete the "FinalTime" parameter and based on your TimeStep and desired simulation time, calculate the number of steps manually and set it in the session file. Hope this solve your problem Cheers, Mohsen ________________________________ From: nektar-users-bounces@imperial.ac.uk<mailto:nektar-users-bounces@imperial.ac.uk> <nektar-users-bounces@imperial.ac.uk<mailto:nektar-users-bounces@imperial.ac.uk>> on behalf of 董智康 <darrendongzhikang@gmail.com<mailto:darrendongzhikang@gmail.com>> Sent: Sunday, February 20, 2022 5:35 AM To: nektar-users <nektar-users@imperial.ac.uk<mailto:nektar-users@imperial.ac.uk>> Subject: [Nektar-users] 2D Incns solver(tutorial) restart simulation raises error This email from darrendongzhikang@gmail.com<mailto:darrendongzhikang@gmail.com> originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list<https://spam.ic.ac.uk/SpamConsole/Senders.aspx> to disable email stamping for this address. Hi all, I am new to Nektar++, I was running tutorial: Incompressible Flow Simulation. When I tried to restart simulation by running code in 6.5 Optional additional tasks (Exercise1), it raised error Initial Conditions: - Field u: from file cyl2DMesh.fld - Field v: from file cyl2DMesh.fld - Field p: from file cyl2DMesh.fld Fatal : Level 0 assertion violation m_timestep < 0 I followed all instructions before, I’m not sure where I was wrong. It’s really confusing. Could you please help me with that? Thank you so much and have a good day. Best, Zhikang Dong
Dear Mohsen, Your explanation really makes sense! Thank you so much! Best, Zhikang
On Feb 23, 2022, at 1:27 PM, Lahooti, Mohsen <m.lahooti@imperial.ac.uk> wrote:
Hi Zhikang,
I am not sure how you measure the closeness and being exact. Nevertheless, I wouldn't concern about this. There are several reasons that could contribute to this observation. For turbulent flows, the very nature of turbulence can play a role here but as far as I remember the Re was quite low in that tutorial.
Another thing is that when using IMEXOrder2 integration scheme, which is a second order one, you need the data from time step n and n+1 to predict n+2, when restarting the solution, we only provide the solver with solution at n, so it need to do one step integration to estimate n+1 and after that it can use the second order scheme. This can introude some deviation over the time as well. However, these effects should be small and I am guessing negligible as far as we have a good resolution.
The main contributor in your case, is the resolution. In the jupyter tutorial, to be able to run the cases fast we set up the mesh quite coarse and used a low polynomial order. That is fine because the objective of these tutorials is to show the user how to set up and run the simulation but not to get a very accurate results. If you run the cases on your machine and increase the polynomial order, I expect this difference fade away.
Please let me know of the outcome if you happen to try my suggestion
Cheers, Mohsen From: 董智康 <darrendongzhikang@gmail.com> Sent: Tuesday, February 22, 2022 9:33 PM To: Lahooti, Mohsen <m.lahooti@imperial.ac.uk> Cc: nektar-users <nektar-users@imperial.ac.uk> Subject: Re: [Nektar-users] 2D Incns solver(tutorial) restart simulation raises error
Hi Mohsen,
Thanks for your email! Your methods did work! Thank you so much! I have one more question is that when I restart the simulation, I didn’t get the exactly same result.
Say first I simulated 20 unit time from initial conditions (1, 0, 0). In order to compare with the results, then I simulated 10 unit time from initial conditions (1, 0, 0) and restarted at the 10th unit time to get another 10 unit time. And I found, for example, the 11th solution from my first simulation is really close to 11th simulation from second but not exactly the same. I think the reason is the approximation and unsteady of the algorithm. Is that correct?
Best, Zhikang
On Feb 22, 2022, at 5:23 AM, Lahooti, Mohsen <m.lahooti@imperial.ac.uk <mailto:m.lahooti@imperial.ac.uk>> wrote:
Hi Zhikang Dong,
I believe you are using the Jupyter tutorials, right? In those tutorials, we set the "FinalTime" parameter for the simulation where together with the time step it will calculate the required number of steps. the problem you are facing is that after you use the previous simulation as initial conditions, you need to set a new "FinalTime" greater that in your initial conditions. Let's say you run the first simulation for 10 unit time, now in your second simulation you want to run the simulation for an additional 15 unit time, hence the final time becomes 10+15=25.
You can also simply delete the "FinalTime" parameter and based on your TimeStep and desired simulation time, calculate the number of steps manually and set it in the session file.
Hope this solve your problem
Cheers, Mohsen From: nektar-users-bounces@imperial.ac.uk <mailto:nektar-users-bounces@imperial.ac.uk> <nektar-users-bounces@imperial.ac.uk <mailto:nektar-users-bounces@imperial.ac.uk>> on behalf of 董智康 <darrendongzhikang@gmail.com <mailto:darrendongzhikang@gmail.com>> Sent: Sunday, February 20, 2022 5:35 AM To: nektar-users <nektar-users@imperial.ac.uk <mailto:nektar-users@imperial.ac.uk>> Subject: [Nektar-users] 2D Incns solver(tutorial) restart simulation raises error
This email from darrendongzhikang@gmail.com <mailto:darrendongzhikang@gmail.com> originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list <https://spam.ic.ac.uk/SpamConsole/Senders.aspx> to disable email stamping for this address.
Hi all,
I am new to Nektar++, I was running tutorial: Incompressible Flow Simulation. When I tried to restart simulation by running code in 6.5 Optional additional tasks (Exercise1), it raised error
Initial Conditions: - Field u: from file cyl2DMesh.fld - Field v: from file cyl2DMesh.fld - Field p: from file cyl2DMesh.fld Fatal : Level 0 assertion violation m_timestep < 0
I followed all instructions before, I’m not sure where I was wrong. It’s really confusing. Could you please help me with that? Thank you so much and have a good day.
Best, Zhikang Dong
participants (2)
- 
                
                Lahooti, Mohsen
- 
                
                董智康