I’m attempting to couple OpenFOAM and Calculix to perform two-way FSI of flow through an artery. My coupling is extremely strong, so it was suggested (https://precice.discourse.group/t/openfoam-calculix-fsi-diverging-sim-never-ends/645/14) that I make sure I start with a fully converged fluid solution. Previously, I was only initializing my fluid solution with a potential flow solver (potentialFOAM), so I drummed up a simpleFOAM run in a different directory and then mapped the velocity and pressure solutions to the initial state of the FSI simulation. I then started up the sim. The flow solution converged fine, and so did the structural solver. Then, preCICE attempted to compute the convergence metrics to determine if another iteration of the solvers was necessary, and I was met with this:
Adapter writing coupling data...
(0) [cplscheme::BaseCouplingScheme]:352 in getThisTimeWindowRemainder: return 0.001
Writing DISPLACEMENTS coupling data with ID '2'.
Adapter calling advance()...
(0) [utils::Events]:59 in stop: Stopped event solver.advance
(0) [utils::Events]:40 in start: Started event advance
(0) [impl::SolverInterfaceImpl]:399 in advance: Synchronize timestep length
(0) [cplscheme::BaseCouplingScheme]:352 in getThisTimeWindowRemainder: return 0
(0) [cplscheme::BaseCouplingScheme]:352 in getThisTimeWindowRemainder: return 0
(0) [cplscheme::BaseCouplingScheme]:352 in getThisTimeWindowRemainder: return 0
(0) [impl::SolverInterfaceImpl]:426 in advance: Advance coupling scheme
(0) [cplscheme::BaseCouplingScheme]:352 in getThisTimeWindowRemainder: return 0
(0) [cplschemes::SerialCouplingSchemes]:115 in exchangeDataAndAccelerate: Test Convergence and accelerate...
(0) [cplscheme::BaseCouplingScheme]:657 in accelerate: measure convergence of the coupling iteration
(0) [cplscheme::BaseCouplingScheme]:555 in measureConvergence: relative convergence measure: relative two-norm diff = -nan, limit = 0.001, normalization = 0.0122898, conv = false
(0) [cplscheme::BaseCouplingScheme]:555 in measureConvergence: relative convergence measure: relative two-norm diff = 0, limit = 0.001, normalization = 0.244577, conv = true
(0) [utils::Events]:40 in start: Started event advance/cpl.computeQuasiNewtonUpdate
(0) [acceleration::BaseQNAcceleration]:208 in updateDifferenceMatrices: Update Difference Matrices
(0) [acceleration::BaseQNAcceleration]:326 in performAcceleration: Performing quasi-Newton Step
(0) [acceleration::ResidualSumPreconditioner]:72 in _update_: preconditioner scaling factor[0] = -nan
(0) [acceleration::BaseQNAcceleration]:133 in computeQNUpdate: Compute Newton factors
(0) [acceleration::BaseQNAcceleration]:192 in computeQNUpdate: Apply Newton factors
(0) [acceleration::BaseQNAcceleration]:418 in performAcceleration: ERROR: The quasi-Newton update contains NaN values. This means that the quasi-Newton acceleration failed to converge. When writing your own adapter this could indicate that you give wrong information to preCICE, such as identical data in succeeding iterations. Or you do not properly save and reload checkpoints. If you give the correct data this could also mean that the coupled problem is too hard to solve. Try to use a QR filter or increase its threshold (larger epsilon).
Certainly, this could just be an issue with my IQN-ILS acceleration settings, but the I tested it using Aitken under-relaxation and received a very similar error:
Adapter writing coupling data...
(0) [cplscheme::BaseCouplingScheme]:352 in getThisTimeWindowRemainder: return 0.001
Writing DISPLACEMENTS coupling data with ID '2'.
Adapter calling advance()...
(0) [utils::Events]:59 in stop: Stopped event solver.advance
(0) [utils::Events]:40 in start: Started event advance
(0) [impl::SolverInterfaceImpl]:399 in advance: Synchronize timestep length
(0) [cplscheme::BaseCouplingScheme]:352 in getThisTimeWindowRemainder: return 0
(0) [cplscheme::BaseCouplingScheme]:352 in getThisTimeWindowRemainder: return 0
(0) [cplscheme::BaseCouplingScheme]:352 in getThisTimeWindowRemainder: return 0
(0) [impl::SolverInterfaceImpl]:426 in advance: Advance coupling scheme
(0) [cplscheme::BaseCouplingScheme]:352 in getThisTimeWindowRemainder: return 0
(0) [cplschemes::SerialCouplingSchemes]:115 in exchangeDataAndAccelerate: Test Convergence and accelerate...
(0) [cplscheme::BaseCouplingScheme]:657 in accelerate: measure convergence of the coupling iteration
(0) [cplscheme::BaseCouplingScheme]:555 in measureConvergence: relative convergence measure: relative two-norm diff = -nan, limit = 0.001, normalization = 0.0122898, conv = false
(0) [cplscheme::BaseCouplingScheme]:555 in measureConvergence: relative convergence measure: relative two-norm diff = 0, limit = 0.001, normalization = 0.244577, conv = true
(0) [acceleration::AitkenAcceleration]:91 in performAcceleration: AitkenFactor: -nan
(0) [com::SocketCommunication]:528 in send: ERROR: Send using sockets failed with system error: write: Broken pipe
(0) [utils::Events]:59 in stop: Stopped event _GLOBAL
Why is the displacement convergence value -nan instead of 1? Why is the force convergence value 0 instead of 1? Whatever it is, it’s affecting the acceleration parameter, driving it to nan, and crashing the analysis.
I read somewhere on here that there may be residual information left over from previous runs in the precice-run
directory, so I made sure to delete this directory before each test.
Any help is most appreciated.
Here are the relevant files:
precice-config.xml (3.3 KB)
zuncp_fsi.o46104.txt (812.3 KB)
zuncp_fsi.o461045.txt (814.0 KB)
precice-Solid-convergence.log (159 Bytes)
solid.log (34.6 KB)
fluid.log (753.3 KB)