CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens > STAR-CCM+

Oscilating residuals and non convergence

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By cwl

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 1, 2022, 20:52
Question Oscilating residuals and non convergence
  #1
New Member
 
Magnus
Join Date: Feb 2022
Posts: 2
Rep Power: 0
mvalentin is on a distinguished road
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
Attached Images
File Type: jpg residualm03.jpg (112.1 KB, 51 views)
File Type: png dragm03.PNG (110.2 KB, 30 views)
File Type: png masflowm03.PNG (94.7 KB, 25 views)
File Type: png velocitym03.PNG (35.5 KB, 28 views)
mvalentin is offline   Reply With Quote

Old   March 3, 2022, 20:05
Default
  #2
cwl
Senior Member
 
Chaotic Water
Join Date: Jul 2012
Location: Elgrin Fau
Posts: 436
Rep Power: 17
cwl is on a distinguished road
Quote:
The residuals that I get are oscilating
These oscillations represent residuals behavior over time steps - like in: high at the first inner iteration of a time step (not converged solution for a time step) and dropping as inner iterations progress.

Quote:
and the drag force resulting from the pressure are decreasing over time and not converging.
I have a guess that your total physical time is not enough to reach the convergence.
mvalentin likes this.
cwl is offline   Reply With Quote

Old   March 3, 2022, 20:24
Default
  #3
New Member
 
Magnus
Join Date: Feb 2022
Posts: 2
Rep Power: 0
mvalentin is on a distinguished road
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
mvalentin is offline   Reply With Quote

Old   March 4, 2022, 11:57
Default
  #4
Member
 
Pietro
Join Date: Jun 2021
Location: London
Posts: 40
Rep Power: 4
pi120 is on a distinguished road
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.
pi120 is offline   Reply With Quote

Old   March 4, 2022, 15:38
Default
  #5
Senior Member
 
Matt
Join Date: Aug 2014
Posts: 947
Rep Power: 17
fluid23 is on a distinguished road
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.
fluid23 is offline   Reply With Quote

Old   March 5, 2022, 07:03
Default
  #6
Member
 
Pietro
Join Date: Jun 2021
Location: London
Posts: 40
Rep Power: 4
pi120 is on a distinguished road
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?
pi120 is offline   Reply With Quote

Old   March 5, 2022, 10:46
Default
  #7
Senior Member
 
Matt
Join Date: Aug 2014
Posts: 947
Rep Power: 17
fluid23 is on a distinguished road
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
fluid23 is offline   Reply With Quote

Old   March 5, 2022, 13:18
Default
  #8
Member
 
Pietro
Join Date: Jun 2021
Location: London
Posts: 40
Rep Power: 4
pi120 is on a distinguished road
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...
pi120 is offline   Reply With Quote

Reply

Tags
drag analysis, residual oscillations, ship resistance, vof model


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 09:22.