Relaxation factors_Multiphase

Hello SimScalers,

Could someone tell me where I can assign relaxation factors to the variables in ‘Multiphase’ simulation?? I could not find the Relax. factors section in Numerics and/or Simulation setup.
Thank you.

Regards,
Rajan

Hi @rajan19us and nice to see you again!

Are you using k-omega as a turbulence model? Change it to k-omega SST if it is suitable for your case and you will see the relaxation factors for k and omega in the tab Numerics. Let me know if you have any further questions.

Cheers,

Jousef

2 Likes

Hi Jousef,

Thanks for the quick answer.
The material flowing through the domain has high viscosity and hence the flow will be laminar. I was wondering if there is an option to tweak the relax_factors of p_rgh and U.

Also, it would be helpful if you could point me to the document/link that will enlighten how these relaxation factors affect the simulation and how their values should ideally be chosen.

Regards,
Rajan

1 Like

Hi @smittag,

Like Jousef mentioned, there should be an option to adjust the relaxation factors under the numerics tab.

As for how the relaxation factor affects the simulation, this was a post from awhile back by Hannes from SimScale.

Apply under-relaxation

Under-relaxation is a simple yet effective technique for updating the fields between iterations. The default way to update the field values in a new iteration would be to simply ignore the old value and replace it with the new values. Imagine you’re starting a simulation and have made an estimation for initial conditions. Most likely, this will be far off the final results, so you hope that the iterations will gradually change the values to make them converge to the final result. But what if the new field values are actually worse than the old ones? And what if the values for the next iteration will be even worse? This will lead to divergence.

The standard way to deal with this is called under-relaxation and is very effective. Instead of replacing the field values with the new result, it gets updated with a weighted average between the old and the new values. An under-relaxation factor of 1 corresponds to fully accepting the new result (hence no under-relaxation at all) while an under-relaxation factor of 0 corresponds to completely ignoring the new result (hence no updating with subsequent iterations). Values between 0 and 1 are used to stabilize the convergence process. Typically, we suggest starting with

  • 0.7 for velocity
  • 0.3 for pressure and other scalar fields

If the simulation diverges, try using lower relaxation factors (say 0.3 for velocity and 0.1 for pressure).

That is condensed explanation of how relaxation works. More detailed and in depth information such as the mathematics behind it can surely be found with a quick google search.

Hope this helps.

Cheers.

Regards,
Barry

1 Like

Hi Rajan (@smittag)!

Some posts that might be helpful here:


The second link is quite useful. Some general hints regarding the relaxation factor:

  • If you have to change the under-relaxation factor(s), start by decreasing the values of
    the under-relaxation factors in order to improve the stability of the solution

  • A low under-relaxation factor will slow down the solver while high under-relaxation
    factor will speed up the computation but result in instabilities

\rightarrow As always trial and error will be the way to go but be careful when using such settings as the physics might not be represented correctly.

If you are more interested into the physics and the OpenFOAM page is not satisfying enough you can come back and we will help you out.

Best,

Jousef

1 Like

Thanks @Get_Barried and @jousefm for the usedful information. I will take a look at the provided link.

But, the original question remains unanswered. How can I assign the Relaxation values on SimScale platform if my simulation type is “Multiphase-laminar flow” ?? I am not able to find them in Numerics.

Regards,
Rajan

Hi @smittag,

Ah sorry I thought you just asking about the meaning of relaxation factors. Laminar flow, LES and its variants do not have relaxation factors to adjust from what I can see. You will have to use RANS models like K-eps and k-w for access to them. As for the reason why relaxation factors are not available for laminar and LES, I’m not too sure. A quick read up online dosen’t seem to yield the answer i’m looking for.

Hope this helps.

Cheers.

Regards,
Barry

1 Like

Hi @Get_Barried and @smittag, relaxation factors are used when there are more outer iterations than 1, the PIMPLE algorithm, for example, can be set to iterate at each time step with many outer correctors much like the steady state solver SIMPLE, and the relaxation factors are used to gain stability when many iterations are required to get to a converged state. In contrast when there is only a single iteration from one-time step to another (like PISO) then relaxation is 1, and the solution must be found in that iteration, if you do not then the residuals start to raise and you may incur divergence. If you download a case you can see that the outer correctors are not specified, and therefore default to 1. If Courant number is low this shouldn’t bare any issues.

If you need more info however, you might be best reading up on the different algorithms and interDyMFoam which is used.

Hope this helps,
Darren

3 Likes

Hi Darren,

@Get_Barried thanks for the info and thanks @1318980 for jumping in. I am currently trying to solve water-atmosphere interface in a quite complex fluid domain using interFoam with 50 outer correctors. After trying various permutations and combinations with relax_factors, I have finally got it running (converging).

This same case, I would like to validate using SimScale. Thus, I was searching for this utility on the platform. But, it seems that there is no option to input nOuterCorrectors and the relaxation on SimScale.

Regards,
Rajan

Hi Rajan (@smittag),

Ok, from what I have read in the case file this might not be a hard implementation, please add this as a vote for features post in the product feedback category. This will prioritise the requirement. In the meantime are you able to share the project on SimScale? Our PowerUsers_CFD might be able to find a solution that the platform can currently do, and might get you unstuck in the short term, this might be interesting as you could compare those results with your local results and add to your vote for feature post.

Cheers,
Darren

2 Likes