tutorials
tutorials copied to clipboard
peprpendicular-flap solid-openfoam case needs tuning
In #507, while comparing all the solver options we have, it became apparent that the solid-openfoam (solidDisplacementFoam) gives very different results than everything else. Still, it is a nice technical test that only requires OpenFOAM. The solid-solids4foam case is mostly fine already.
I have tried the following:
- Varying the mesh size: I get completely different results
- Varying the
fvSolution/stressAnalysis/nCorrectors
(suggestion by @philipcardiff): I get a bit different results, but not enough.
Some pictures that might help someone pick it up later on:
For now, I just give up, and document that this is an outlier at the moment.
One case use the plot-all-displacements.sh
script to generate these pictures (see #507).
Even with nCorr 10000
(mesh 6x15):
For solid-solids4foam
, increating nCorr
from 1000 to 10k given exactly the same results as before (no improvement):
I suspect another reason for the difference with openfoam-openfoam
is that the 1st-order Euler
ddt and d2dt schemes are used (solids4foam uses the 2nd-order backward
scheme). You could try switching openfoam-openfoam
to backward
.
The OpenFOAM documentation states that:
Maybe the d2dt2 backward
is a nice solids4foam-only feature? :smile:
with:
d2dt2Schemes
{
default Euler;
}
ddtSchemes
{
default backward;
}
and with also varying the nCorr
, I get the following:
At least the ddtSchemes
alone does not seem to help.
Ah, OK, yes, we added a d2dt2 backward
option in solids4foam.
In that case, using a smaller deltaT would improve the OpenFOAM predictions, if that is an option (probably also the solids4foam predictions).
Decreasing the deltaT
is indeed not really an option, as we wanted to have this consistent among the possible case combinations.
I compared the solid-openfoam
and solid-solids4foam
directories in a diff tool, and one other difference I found was the tolerances we use:
# solid-openfoam/system/fvSolution
solvers
{
"(D|T)"
{
solver GAMG;
tolerance 1e-06; # Made this 1e-09
relTol 0.9; # Made this 0.1
smoother GaussSeidel;
nCellsInCoarsestLevel 20;
}
}
# solid-solids4foam/system/fvSolution
solvers
{
"D|DD"
{
solver PCG;
preconditioner FDIC;
tolerance 1e-09;
relTol 0.1;
}
}
I changed these tolerances, but it did not seem to improve the results.
Since we have the solid-solids4foam
case, it is fine for me if this issue stays open for longer. Maybe someone else stumbles upon it and gets another idea, while it still helps as documentation.
This issue has been mentioned on preCICE Forum on Discourse. There might be relevant details there:
https://precice.discourse.group/t/the-perpendicular-flap-model-using-openfoam/1695/25