Skip to content

[TSI] Fix solver increment handling in partitioned solver#2022

Open
rjoussen wants to merge 1 commit into4C-multiphysics:mainfrom
rjoussen:fix-tsi-iterstagg-temperature-coupling
Open

[TSI] Fix solver increment handling in partitioned solver#2022
rjoussen wants to merge 1 commit into4C-multiphysics:mainfrom
rjoussen:fix-tsi-iterstagg-temperature-coupling

Conversation

@rjoussen
Copy link
Copy Markdown
Contributor

@rjoussen rjoussen commented May 7, 2026

Description and Context

The increment vectors need to store the current states before an outer iteration. This is done in every outer_iteration_loop except for IterStagg with temperature as the coupling variable.

Consequently, the corresponding tests tsi_lincompression_iterstaggtemp.4C.yaml-p1 so far never detected that the outer iteration loop is actually converged, as can be seen by its output:

**************************************************************
      OUTER ITERATION LOOP 
      Time Step   9/2000 
**************************************************************
|    95/100    |   1.000E-06[L_2 ]      |  1.641E+02         |  1.704E+00         |
|    96/100    |   1.000E-06[L_2 ]      |  1.039E+03         |  5.085E-03         |
|    97/100    |   1.000E-06[L_2 ]      |  1.641E+02         |  1.704E+00         |
|    98/100    |   1.000E-06[L_2 ]      |  1.039E+03         |  5.085E-03         |
|    99/100    |   1.000E-06[L_2 ]      |  1.641E+02         |  1.704E+00         |
|   100/100    |   1.000E-06[L_2 ]      |  1.039E+03         |  5.085E-03         |

With this change, we get:

**************************************************************
      OUTER ITERATION LOOP 
      Time Step   9/2000 
**************************************************************
|     1/100    |   1.000E-06[L_2 ]      |  1.751E+01         |  1.704E-01         |
|     2/100    |   1.000E-06[L_2 ]      |  5.660E-02         |  5.426E-04         |
|     3/100    |   1.000E-06[L_2 ]      |  1.829E-04         |  1.754E-06         |
|     4/100    |   1.000E-06[L_2 ]      |  5.911E-07         |  5.667E-09         |

Related Issues and Pull Requests

@rjoussen rjoussen requested a review from maxfirmbach May 7, 2026 15:22
@rjoussen rjoussen self-assigned this May 7, 2026
Copilot AI review requested due to automatic review settings May 7, 2026 15:22
@rjoussen rjoussen added the type: bug report Issues reporting a bug in the code label May 7, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes convergence behavior in the TSI partitioned (iterative staggered) solver when temperature is the coupling variable by ensuring the “previous outer-iterate” state is captured before the sub-solves overwrite it. This enables convergence_check() to compute correct increments and stop the outer loop when converged (as intended by the existing tests).

Changes:

  • Store the current temperature and displacement outer-iterates (tempnp, dispnp) at the start of each outer iteration for IterStagg + temperature coupling.
  • Align increment-handling behavior with the other outer_iteration_loop branches that already snapshot these states prior to sub-solves.

Copy link
Copy Markdown
Contributor

@maxfirmbach maxfirmbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. @rjoussen FYI: Partitioned TSI is in generally in a really bad shape ...

@maxfirmbach
Copy link
Copy Markdown
Contributor

@rjoussen Can you check if tsi_lincompression_iterstaggtemp.4C.yaml-p1 also runs on two processors and gives the same result?

@rjoussen
Copy link
Copy Markdown
Contributor Author

rjoussen commented May 7, 2026

Makes sense. @rjoussen FYI: Partitioned TSI is in generally in a really bad shape ...

Yeah that's my impression too, but it's at least conceptually doing the right things o believe. So when I want to make a material tsi-ready it's still worth to check. But yeah it needs an overhaul, just the algorithm class itself has a lot of duplicate code. Same for the thermo element's tsi capabilities

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug report Issues reporting a bug in the code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants