Combining convergence measures via OR

Hello all together,

I am running an FSI simulation case, where it takes some time, until the coupling becomes relevant i.e. the coupling data doesn’t change very much and has a quite small scale in the beginning.
But after a while, the interaction becomes large and also the coupling data becomes much larger.

It would be beneficial for me, to use an absolute-conergence-measure in the beginnning (for all coupling data sets), since a relative-convergence-measure results in too strict absolute thresholds and many iterations are necessary.
On the other hand, it would be beneficial to use a relative-convergence-measure later in the simulation, since the (initial) absolute measure are hard to fulfill.

The suffices=true option isn’t helpful in this case, since both data sets need to be considered independent.

So, is there a way to combine convergence measures by an OR statement?

@DavidSCN could you explain in more detail the following?

What do you mean by “independent”?

If the suffices=true (i.e. absolute-conergence-measure) has converged, then the other one (i.e. relative-convergence-measure) would not matter. I read this as “if absolute-conergence-measure is satisfied OR relative-convergence-measure is satisfied”.

@MakisH

Yes, this would be possible for a single data set. But in a usual setup, one want’s to have (at least) two data sets converged e.g.

       <relative-convergence-measure limit="5e-5" data="Stress" mesh="Fluid-Mesh-Centers"/>
        <absolute-convergence-measure limit="0.5" data="Stress" mesh="Fluid-Mesh-Centers" suffices="true"/>
        <absolute-convergence-measure limit="1e-7" data="Displacement" mesh="Solid_mesh" suffices="true"/>
        <relative-convergence-measure limit="1e-5" data="Displacement" mesh="Solid_mesh"/>

But in this case, the suffices keyword would be absolute i.e. if I reach an absolute convergence on my displacement data set, I will continue to the next time step, though the stress might not be converged.

1 Like

Could you then express what you want to do in pseudocode? Why isn’t this enough? If the relative-convergence-measure is too strict in the beginning, then it will not affect the convergence (as absolute-convergence-measure will have been satisfied), but afterwards it will be sufficient.

<relative-convergence-measure limit="5e-5" data="Stress" mesh="Fluid-Mesh-Centers"/>
<absolute-convergence-measure limit="0.5" data="Stress" mesh="Fluid-Mesh-Centers" suffices="true"/>
<absolute-convergence-measure limit="1e-7" data="Displacement" mesh="Solid_mesh" />
<relative-convergence-measure limit="1e-5" data="Displacement" mesh="Solid_mesh"/>

If you want to have a different convergence measure in the beginning (i.e. only criterion being simulated time), then you can maybe split your simulation in two parts, restarting after you reach a good initial state.

Maybe some other convergence measure could also help you, although they don’t really look very helpful here.

Ok let me try to explain it more in detail:

  • Let’s consider the case, where we just have on each data set a relative convergence measure: This hurts in the absolute limit, when there is not very much interaction between both participants. The l2 norm is already low in the first iteration, leading to incredible low absolute limits
  • Consider the case, where we have on each data set an absolute convergence measure: We need to select rather small values, in order to keep the simulation stable. In case the interaction is strong between both participants, the absolute values are hard to reach, since they vary on a much bigger scale
  • now we consider (as you proposed) a combination of both with a suffices tag: If one criterion with suffices is satisfied, I will go to the next step. But now, I don’t have any control about the other data set, where the data might not be converged. So, I’m looking for a configuration like this:
<convergence-measure absLimit="1e-7" relLimit="1e-5" data="Displacement" mesh="Solid_mesh" />

…and the same for the “Stress” data set.
This would lead to a configuration, where I can control the convergence measure for each data set independent and don’t have the problem of too low values due to low interaction.

If I understand this correctly, you want a configuration like

<relative-convergence-measure limit="5e-5" data="Stress" mesh="Fluid-Mesh-Centers"/>
<absolute-convergence-measure limit="0.5" data="Stress" mesh="Fluid-Mesh-Centers" suffices="true"/>
<absolute-convergence-measure limit="1e-7" data="Displacement" mesh="Solid_mesh" suffices="true" />
<relative-convergence-measure limit="1e-5" data="Displacement" mesh="Solid_mesh"/>

You want that satisfying a single criterion does not suffice, but only satisfying both criteria at the same time is sufficient. Correct? I do not think that the preCICE configuration offers this at the current state and we have to find a workaround.

Note: The config above is only meant for illustrative purposes and does not give you this functionality. The config above would lead to a case where either of the two criteria with suffices="true" is sufficient.

This might be a possible workaround for your problem, if I understand it correctly.

Yes, what you ask for is currently not possible. But could be implemented, of course. If you think this feature is helpful for others as well please feel free to open an issue on GitHub. Your config suggestion looks already suitable to me.

Just to avoid any confusion: a relative convergence measure normalizes the residual always with the current norm of the data field, so:

\frac{\|H(f^{k}) - f^{k}\|}{\|H(f^{k})\|} < \epsilon

It’s not that an initial residual needs to drop by \epsilon or whatever. The log output might be confusing. This is something we wanted to tackle since longer.

In my experience only having relative measures just works fine, but, of course, this depends on what convergence measures are used in the coupled solvers. Ideally, also there you only use relative measures then (but 1-2 orders tighter).

Thanks for the detailed answer!

I use relative measures, where possible, but (similar to my description) absolute measures, when the displacement scale becomes too small.

Maybe I don’t understand the log output correctly. However, tuning my acceleration scheme as a whole (different Filter and values) solves the problem for me i.e. I don’t need that many iterations (nearly) anywhere. Therefore, I guess this is not worth an issue.