Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt the similarity condition to the residual of the fixed-point problem #60

Open
Fujikawas opened this issue Sep 25, 2023 · 4 comments · May be fixed by #64
Open

Adapt the similarity condition to the residual of the fixed-point problem #60

Fujikawas opened this issue Sep 25, 2023 · 4 comments · May be fixed by #64
Assignees
Labels
new-feature Adding a new feature

Comments

@Fujikawas
Copy link

Fujikawas commented Sep 25, 2023

Generally, we postulate that the micro simulations takes up most of the computing time when we are using the Micro Manager for multiscale simulations with large number of micro simulations.

As Delaisse's paper indicated, we could

achieve a significant speed-up by not converging to the final sub-problem tolerance in each solver call.

Although we are not supposed to control the tolerance of sub-problems (like what Nicolas did in the paper) in preCICE, we could control the numbers of micro simulations through the Micro Manager to get more coarse or fine solution of the whole field. That means, we could use loose similarity conditions to solve less micro problems and thus get coarse result and use strict similarity condition when we are close to the convergence.

Based on this idea, we need to discuss following points:

  • If we are going to adapt the similarity condition to the fixed-point tolerance from Quasi-Newton method and we only do QN computation at the end of each time window, we would also update the similarity condition in each time window between the implicit iterations, and restart from the most loose condition at each new time window.
  • This method is only available for implicit coupling.
  • How should we select the initial (relative) similarity condition and how do we rationally adapt the condition according to the fixed-point residual?
  • Can we retain the accuracy of the original method under the assumption that the total Newton-iterations in sub-problems would reduce?
@IshaanDesai
Copy link
Member

Thanks for suggesting this new idea! Very interesting and we should definitely discuss how we can design this in the Micro Manager.

That means, we could use loose similarity conditions to solve less micro problems and thus get coarse result and use strict similarity condition when we are close to the convergence.

The Micro Manager would somehow need to know that a particular implicit time window is close to converging, right? This would be tricky to implement, as right now preCICE does not return any information about convergence, just whether the implicit step has converged or not.

If we are going to adapt the similarity condition to the fixed-point tolerance from Quasi-Newton method and we only do QN computation at the end of each time window, we would also update the similarity condition in each time window between the implicit iterations, and restart from the most loose condition at each new time window.

Do you mean that we accelerate the data only once per time window? Updating the similarity condition for each implicit iteration would be easy, but we would need some pre-defined curve that each similarity variable follows (or more like a trend).

How should we select the initial (relative) similarity condition and how do we rationally adapt the condition according to the fixed-point residual?

I think we can derive the logic for this by taking one case (lets say porous media) and do a large number of simulations and create a database. It would start to go into the direction of "apriori learning" some relation between the similarity condition and the fixed-point residual for a particular set of simulations.

Can we retain the accuracy of the original method under the assumption that the total Newton-iterations in sub-problems would reduce?

This is probably the most important question to answer in all this.

@uekerman
Copy link
Member

Sounds worth investigating indeed!

The Micro Manager would somehow need to know that a particular implicit time window is close to converging, right? This would be tricky to implement, as right now preCICE does not return any information about convergence, just whether the implicit step has converged or not.

This is indeed a technical problem we need to solve. I see two hacks you could try:

  • (A) Either read in this information from the convergence file
  • (B) or hack an API function into preCICE in a test branch

I think (A) is easier during the trial and error phase. Once we know the methods works, we could start thinking about (B).

@Fujikawas
Copy link
Author

The Micro Manager would somehow need to know that a particular implicit time window is close to converging, right? This would be tricky to implement, as right now preCICE does not return any information about convergence, just whether the implicit step has converged or not.

I supposed that we could at first use the (A) idea from Benjamin above.

Do you mean that we accelerate the data only once per time window?

Yes, I meant that. Another straightforward idea is to interpolate the change of similarity condition into small substeps (if they exist), but I'm not sure if this makes sense, since we only check the overall convergence at time window end. That is I assume that the substeps in one TW are at the same overall convergence level, which results in same similarity condition for one TW.

I think we can derive the logic for this by taking one case (lets say porous media) and do a large number of simulations and create a database. It would start to go into the direction of "apriori learning" some relation between the similarity condition and the fixed-point residual for a particular set of simulations.

Yes, that's one practical option. We also need to know how strongly is this relationship case-specified, which means we may need to test multiple different cases.
And I still want to know if there exists the possibility to derive this OR the performance (concerning accuracy) in a more mathematical way. :)

@IshaanDesai
Copy link
Member

I supposed that we could at first use the (A) idea from Benjamin above.

We can implement something relatively simple in a branch of the Micro Manager. I can help here.

Another straightforward idea is to interpolate the change of similarity condition into small substeps (if they exist)

Do you mean changing the similarity condition based on a predefined interpolant?

We also need to know how strongly is this relationship case-specified, which means we may need to test multiple different cases. And I still want to know if there exists the possibility to derive this OR the performance (concerning accuracy) in a more mathematical way. :)

We would only find the answers to these questions when we try this for one case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature Adding a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants