How to make the Modulus stopping criterion more sensitive

Hi, previously, there was a bug which cause the stopping criterion not to work.

It has now been fixed, as given in

However, I found that using the stopping criterion cause Modulus to stop rather early. I need to compute and compare the wall shear stress with my OpenFOAM results. Hence, in Modulus, I’ll be computing du/dy (u__y) etc. To get accurate result, I need to run about 600,000 to 800,000 steps.

My stopping criterion are:

metric: ‘l2_relative_error_u’
min_delta: 0.1
patience: 10000
mode: ‘min’
freq: 2000
strict: true

I found that even if I reduce min_delta to 1e-5, Modulus stops at around 80,0000. If I resume running, it goes for another 10,000 steps due to the patience parameters. But my wall shear stress results are still far from the ideal result. How should I tune to ensure that it will run till I reach my satisfied accurate wall shear stress?


Hi @tsltaywb

For your stopping criteria is the loss l2_relative_error_u based on the entire flow field you’re trying to solve? Perhaps mean flow is converging while the near-wall interaction takes longer to develop correctly. If so I would suggest trying to formulate a loss that is focused on the near wall region you’re interested in and use this for the metric. This can be achieved by using lambda_weighting in your constraint with the SDF function (or its inverse if you want near wall to be weighted higher).

There are many examples that use the SDF function to spatially weight the loss. E.g. the annular ring problem.

1 Like

Ok sure. I’ll try it out. Thanks!