Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

peprpendicular-flap solid-openfoam case needs tuning #515

Open
MakisH opened this issue Apr 5, 2024 · 7 comments
Open

peprpendicular-flap solid-openfoam case needs tuning #515

MakisH opened this issue Apr 5, 2024 · 7 comments

Comments

@MakisH
Copy link
Member

MakisH commented Apr 5, 2024

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
Copy link
Member Author

MakisH commented Apr 5, 2024

Even with nCorr 10000 (mesh 6x15):

tutorials-perpendicular-flap-displacement-openfoam-watchpoints

@MakisH
Copy link
Member Author

MakisH commented Apr 5, 2024

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

tutorials-perpendicular-flap-displacement-openfoam-watchpoints

@philipcardiff
Copy link
Contributor

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.

@MakisH
Copy link
Member Author

MakisH commented Apr 9, 2024

The OpenFOAM documentation states that:

image

Maybe the d2dt2 backward is a nice solids4foam-only feature? 😄

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.

@philipcardiff
Copy link
Contributor

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

@MakisH
Copy link
Member Author

MakisH commented Apr 9, 2024

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.

@precice-bot
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants