Open juancamarotti opened 1 month ago
nice catch!
No wonder it never really worked for us, we basically always used the other criteria
Yes! This issue is causing slow convergence with the non-linear shell elements we are using in our coupled simulations.
The question is how to fix the bug. As far as I can tell, calling the solver's InitializeSolutionStep
and FinalizeSolutionStep
during coupling iterations is a no-go because it would flush the solution buffer and thus break time stepping.
A hackish solution I can think of is storing the initial residual in ProcessInfo
or ModelPart
's DataValueContainer
and manually overriding it during coupling iterations, but I don't particularly like this fix.
Any other ideas?
After further analysis of the problem, I have concluded that this is not a CoSim issue. The bug is related to the strategy used. Let's consider the ResidualBasedNewtonRaphsonStrategy
as an example:
1) In ResidualBasedNewtonRaphsonStrategy::SolveSolutionStep, the method ConvergenceCriteria::InilitializeNonLinearIteration is called with the LHS and RHS even before invoking the BuilderAndSolver
. This implies that the method is called with zero LHS and RHS vectors.
2) The second issue is that inside ResidualCriteria, the ConvergenceCriteria::InitializeNonLinearIteration
method is not overriden. The residual is calculated just once per time step inside ResidualCriteria::InitializeSolutionStep and not once per coupling iteration.
@KratosMultiphysics/technical-committee Why the ConvergenceCriteria::InilitializeNonLinearIteration is called before the BuilderAndSolver
?
FYI @matekelemen @philbucher
Hi,
Has this been solved? I've been working on FSI simulations using shell elements and encountered problems with convergence.
Hi,
Has this been solved? I've been working on FSI simulations using shell elements and encountered problems with convergence.
@philbucher @matekelemen
What I have seen is that at the end of the non-linear iterations in the FSI solver the residual norm is computed, so it is updated every coupling iteration. I'm no expert just started in Kratos recently for my Bachelor's 😃
As far as I understand, @yagofx is not using the CoSimulationApplication
so I don't think that his troubles have something to do with the issue @juancamarotti is referring to.
Issue
During coupled simulations, the initial residual of subdomains is not updated between coupling iterations. The convergence criterion is using incorrect residuals.
Reproducer
To reproduce, run the FSI mok example setting the structural domain echo level to 4 and looking at how the initial residual norm changes between coupling iterations (Spoiler alert: it does not change).
Bug
The initial residual of
ConvergenceCriteria
is updated inConvergenceCriteria::InitializeSolutionStep
, which is in turn called when the structural solver'sInitializeSolutionStep
is called.In the
GaussSeidelStrongCoupledSolver
, theConvergenceCriteria
of the structural domain is initialized once per time step (and not once per coupling iteration).FYI @philbucher @KratosMultiphysics/technical-committee