Closed BenjaminRodenberg closed 4 years ago
I can confirm this issue: OpenFOAM.org changed the expected structure of residualControl in version 6, see e.g. this discussion on CFDOnline. The Fluid simulation exits already in the beginning of pimpleFoam
:
--> FOAM FATAL ERROR:
Solution convergence criteria specified in PIMPLE.residualControl must be given as single values. Corrector loop convergence criteria, if appropriate, are specified as dictionaries in PIMPLE.<loopName>ResidualControl.
From function bool Foam::singleRegionConvergenceControl::readResidualControls()
in file cfdTools/general/solutionControl/convergenceControl/singleRegionConvergenceControl/singleRegionConvergenceControl.C at line 73.
residualControl
and adds the OpenFOAM 6 or newer alternative.On the rest of the comments:
Check whether the proposed fix worsens the performance
I would not worry so much about performance, but about convergence. We should compare both cases, but this can take hours. In any case, this tutorial should only be a starting point to learn how to use preCICE and the adapters.
Test tutorials and OF-adapter for different versions of OF.
This works with all the versions we currently support (quickly tested OpenFOAM 5, 6, 7, and v1912).
Test cylinderFlap.
Good point, but the case is currently too large and long to run on Travis. I prefer that we just keep an eye on such differences for now, until we have better testing infrastructure. The case itself is already quite coarse.
follow up: there are quite some differences in the tolerances provided in fvSolution of the both cases. Why?
I am not sure about the default values, but I think the primary objective here was to improve the results compared to the reference. But this tutorial is already a simplified version, so it does not make much sense to enforce this.
automatically choose pimpleFoam or pimpleDyMFoam
This is something I want to work on as a follow-up of https://github.com/precice/openfoam-adapter/pull/128. I may be able to cover also this case there.
What's the problem?
I am using OpenFOAM6 on my machine and the tutorial cases
tutorials/FSI/cylinderFlap/*
do not work. I explicitly tested the casetutorials/FSI/cylinderFlap/OpenFOAM-FEniCS
while checking #38. For the other cases I tried executingrunFluid
and it always resulted in an error thrown by OpenFOAM (OF), even before the coupling was initialized.My proposed workaround
Commenting out some lines in
Fluid/system/fvSolution
does the trick and it works:Note again: I only explicitly tested the case with OpenFOAM and FEniCS. For OpenFOAM and deal.II, OpenFOAM and CalculiX respectively, I only ran
runFluid
and with the changes mentioned above OpenFOAM does not exit with an error, but executes until coupling is initialized and it is waiting for the second participant.What I already did
What should we do now?
The fix I am proposing above seems to work. However, there are some more things we should do in order to improve the compatibility of the tutorials with different version of OpenFOAM (bold for important ones and italics for less important):
residualControl
. I am not an OpenFOAM expert and I did not compare with the performance using a different OpenFOAM version that acceptsresidualControl
.flap_perp
. Here,residualControl
is not provided infvSolution
(see here). Therefore, I also did not observe any problems when runningflap_perp
under OF6 and I did not expect any problems to show up runningcylinderFlap
.fvSolution
of the both cases. Why?pimpleFoam
orpimpleDyMFoam
InFluid/system/controlDict
one has to manually choose the fitting solver. This straightforward, but still has to be done manually.