tutorials icon indicating copy to clipboard operation
tutorials copied to clipboard

peprpendicular-flap solid-openfoam case needs tuning

Open MakisH opened this issue 10 months ago • 7 comments

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:

tutorials-perpendicular-flap-displacement-openfoam-watchpoints

tutorials-perpendicular-flap-displacement-openfoam-convergence-watchpoints

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).

MakisH avatar Apr 05 '24 21:04 MakisH

Even with nCorr 10000 (mesh 6x15):

tutorials-perpendicular-flap-displacement-openfoam-watchpoints

MakisH avatar Apr 05 '24 21:04 MakisH

For solid-solids4foam, increating nCorr from 1000 to 10k given exactly the same results as before (no improvement):

tutorials-perpendicular-flap-displacement-openfoam-watchpoints

MakisH avatar Apr 05 '24 22:04 MakisH

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.

philipcardiff avatar Apr 08 '24 11:04 philipcardiff

The OpenFOAM documentation states that:

image

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:

openfoam-tuning

At least the ddtSchemes alone does not seem to help.

MakisH avatar Apr 09 '24 07:04 MakisH

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).

philipcardiff avatar Apr 09 '24 08:04 philipcardiff

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.

MakisH avatar Apr 09 '24 11:04 MakisH

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

precice-bot avatar May 15 '24 07:05 precice-bot