|
[Sponsors] |
March 1, 2022, 21:52 |
Oscilating residuals and non convergence
|
#1 |
New Member
Magnus
Join Date: Feb 2022
Posts: 2
Rep Power: 0 |
Hi, this is the first time I am posting on this forum and I hope I am not breaking any rules.
I am a beginner and I followed the tutorials of star ccm to anlalyse the ship resistance of my own model. I have a mesh with 900000 cells and the physical conditions are set as in the tutorial. The residuals that I get are oscilating and the drag force resulting from the pressure are decreasing over time and not converging. The viscuos forces are fairly steady. I already checked if the mass flow is the same at the inlet and outlet. Images from results are in the attachments |
|
March 3, 2022, 21:05 |
|
#2 | ||
Senior Member
Chaotic Water
Join Date: Jul 2012
Location: Elgrin Fau
Posts: 438
Rep Power: 18 |
Quote:
Quote:
|
|||
March 3, 2022, 21:24 |
|
#3 |
New Member
Magnus
Join Date: Feb 2022
Posts: 2
Rep Power: 0 |
Does this mean that as long as the residuals are slowly decreasing, oscilation is not a problem?
Thank you! I will try to run the simulation for a longer physical time |
|
March 4, 2022, 12:57 |
|
#4 |
Member
Pietro
Join Date: Jun 2021
Location: London
Posts: 40
Rep Power: 5 |
As they already said, it is normal in an unsteady implicit simulation to have residuals jumping to a high value at the beginning of each time step.
You should make sure however that they converge inside each time step, and it doesn't seem like this is the case for your simulation. Try using a higher number of inner iterations (if you're using 50 go for 100) and make sure that inside each time step each residual drops and stays flat at the end of the inner iterations. As they already suggested, also go for higher total physical time to get convergence of the drag coefficient. |
|
March 4, 2022, 16:38 |
|
#5 |
Senior Member
Matt
Join Date: Aug 2014
Posts: 947
Rep Power: 18 |
50 inner iterations is too much. Your time step is too big if you need anymore than 15, really 10 is a better limit, if not fewer.
|
|
March 5, 2022, 08:03 |
|
#6 |
Member
Pietro
Join Date: Jun 2021
Location: London
Posts: 40
Rep Power: 5 |
Is it too much because it is not computationally efficient? Or because it leads to wrong results?
I cannot see how it can lead to wrong results as long as it converges (and as long as you are not interested in physic phenomena at lower time steps). Considering what you wrote, would you suggest to always keep inner iterations to 15 max and, if not converging inside a time step, just decrease time step size (with Courant constant)? Or is there an optimum value of inner iterations and time step size that depends from simulation to simulation? |
|
March 5, 2022, 11:46 |
|
#7 |
Senior Member
Matt
Join Date: Aug 2014
Posts: 947
Rep Power: 18 |
Both. "Converged" does not mean "correct". Choosing too coarse of a time step is both expensive and can lead to errors. Just because you think you care about something happening at a low frequency, doesn't mean you can ignore what is happening with the flow. You can effectively alias your flow like under sampling an electronic signal but since each successive time step assumes the previous time step result as it's initial guess, you end up compounding your problems.
There is no golden rule to setting inner iterations, but 50 is definitely too much. The time step is really the thing you have to watch for and there IS a golden rule there to be followed. The max CFL number for explicit unsteady simulations should be around 1, but I suspect that this is an implicit unsteady analysis which can tolerate higher max CFL values. The default value is 50 for implicit unsteady solver and I rarely ever exceed that. The rule can be summarized simply by considering a 1-D case. CFL max > U *dt/dx Where U is velocity, dt is time step size and dx is cell size. You would need to choose a time step size which satisfies this for every cell in your domain, and even then you may find that 50 is too high and causes you to miss something important. It is a little more complicated in 3D, but that is the gist. https://www.cfd-online.com/Wiki/Cour...Lewy_condition |
|
March 5, 2022, 14:18 |
|
#8 |
Member
Pietro
Join Date: Jun 2021
Location: London
Posts: 40
Rep Power: 5 |
True, I didn't consider that high frequency effects might affect low frequency ones.
I agree that for explicit simulations, you just set a Courant number, and the solver automatically sets the time-step size at each time-step based on the velocity field at such time-step. In fact, when you select the explicit solver, you are not allowed to select any time-step size. However in implicit simulations, you are free to set both Courant number and time-step size. I thought this was because the Courant number that you select is relative to the 'steady' simulation happening at each inner time-step, and not dependent on the time-step. From what you write however I understand that I should set my time-step size as dt < CFL_max * (dx/U)_min which sounds a bit counterintuitive as, if this was the case, I don't understand why they would let you freely choose any combination of Courant number and dt... |
|
Tags |
drag analysis, residual oscillations, ship resistance, vof model |
|
|