precice / openfoam-adapter

OpenFOAM-preCICE adapter
https://precice.org/adapter-openfoam-overview.html
GNU General Public License v3.0
135 stars 80 forks source link

buoyantSimpleFoam crashing with implicit coupling #92

Closed MakisH closed 4 years ago

MakisH commented 5 years ago

@KyleDavisSA noticed that, if buoyantSimpleFoam (steady-state solver) is used with implicit coupling, it will crash while reading a checkpoint.

Example output, when ran with the shell-and-tubes heat exchanger tutorial:

---[preciceAdapter] [DEBUG] Advancing preCICE...
(0) 19:48:54 [cplscheme::BaseCouplingScheme]:673 in measureConvergence: relative convergence measure: two-norm diff = 1812.58, relative limit = 55.0467, conv = false
(0) 19:48:54 [impl::SolverInterfaceImpl]:382 in advance: it 2 of 50 | dt# 1 | t 0 of 500 | dt 1 | max dt 1 | ongoing yes | dt complete no | read-iteration-checkpoint | 
---[preciceAdapter] [DEBUG] Reading a checkpoint...
---[preciceAdapter] [DEBUG] Reloaded time value t = 0.000000

--> FOAM FATAL ERROR: 
updateCoeffs(const scalarField& snGradp) MUST be called before updateCoeffs() or evaluate() to set the boundary gradient.

    From function virtual void Foam::fixedFluxPressureFvPatchScalarField::updateCoeffs()
    in file fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C at line 157.

FOAM exiting

In this case, the solver Inner-Fluid is configured with:

write-data : 
  Sink-Temperature-Inner-Fluid
  Heat-Transfer-Coefficient-Inner-Fluid
read-data : 
  Sink-Temperature-Solid
  Heat-Transfer-Coefficient-Solid

For this I used OpenFOAM 5, the adapter from the latest develop (https://github.com/precice/openfoam-adapter/commit/88dfbbae21a0dbdc9f21357a2a1d5d1954646a61) and parallel-implicit coupling with constant under-relaxation.

Configuration file: precice-config_serial.xml.txt

davidscn commented 5 years ago

This is issue has already been opened in #15

MakisH commented 5 years ago

I hadn't noticed that the same occurs there as well, thanks! Now we have more clues to find and fix the problem. ;)