Skip to content

added tutorial for foam-extend #654

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

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

hoehnp
Copy link
Contributor

@hoehnp hoehnp commented Jul 4, 2025

I added a modified version of the quickstart tutorial for foam-extend with the purpose of testing the foam-extend adapter.

@MakisH MakisH self-requested a review July 4, 2025 14:55
Copy link
Member

@MakisH MakisH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! A first quick review of the changes, without having tried to run the code.

We generally have alternatives for the perpendicular-flap tutorial (which is meant to be something to copy from), not for the Quickstart (which is meant to be a specific first case to run). With that said, I do understand that this is a minimal case for you.

Since the changes are very minimal, I wonder if we could make the original case compatible with foam-extend, even if we just applied a small patch automatically. Some of the changes for foam-extend should still work with OpenFOAM (e.g., the noSlip/zeroGradient or the path of the preCICE config) or not be that relevant (e.g., the forces function object).


List of differences compared to fluid-openfoam:

0/U:

- type            noSlip;
+ type            zeroGradient;

dynamicMeshDict:

- motionSolverLibs ("libfvMotionSolvers.so");
+ motionSolverLibs ("libfvMotionSolver.so");
+ diffusivity uniform;

controlDict:

  libs
  (
+    "libforces.so"
+    "liblduSolvers.so"
     "libpreciceAdapterFunctionObject.so"
  );
  • forces function object configuration (do we actually need that?).

fvSchemes:

-     div((nuEff*dev2(T(grad(U))))) Gauss linear;
+     div((nuEff*dev(T(grad(U))))) Gauss linear;

fvSolution:

     p
     {
         solver           GAMG;
         tolerance        1e-6;
         relTol           1e-4;
         smoother         DICGaussSeidel;
+        agglomerator    faceAreaPair;
+        nCellsInCoarsestLevel 10;
+        mergeLevels 1;
     }

preciceDict:

- preciceConfig "../precice-config.xml";
+ preciceConfig ".."/"precice-config.xml";

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For easier maintenance, it would be good if this file followed the same order and formatting as the one in fluid-openfoam, so that we can easily take a diff.


timePrecision 8;

runTimeModifiable true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be needed.


adjustTimeStep no;

maxCo 0.9;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this explicitly needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, without it, it was not running.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I start to wonder if this only applies to the debug version for some reason.

Copy link
Member

@MakisH MakisH Jul 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But is this even a valid combination? If adjustTimeStep is disabled, what effect should maxCo have? We could still set one with a comment that it is not used and only there for compatibility reasons.

Co-authored-by: Gerasimos Chourdakis <gerasimos.chourdakis@ipvs.uni-stuttgart.de>
@hoehnp hoehnp marked this pull request as draft July 10, 2025 18:20
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

Successfully merging this pull request may close these issues.

2 participants