-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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";
Co-authored-by: Gerasimos Chourdakis <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, just needs some comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you once more for the contribution. I have added some documentation, and I think that this is now ready to merge.
Note that this tutorial is not meant to provide alternatives (and this is why we should not have an alternative folder - I missed the context when we talked in person). A better tutorial to have a foam-extend alternative for would be the perpendicular-flap. However, since foam-extend can be seen as an alternative version of the same solver, and since this is a test case for you, I see the value and I hold back my general objection to modifying this tutorial.
I also notice now that the "porting" script is actually in the tools/
, so it is rather reusable across tutorials. This is a great step in the right direction. As a user, I would expect an overview of needed configuration changes in the adapter documentation (currently the best place would be https://precice.org/adapter-openfoam-support.html, which is sourced from the openfoam-adapter repository).
I added a modified version of the quickstart tutorial for foam-extend with the purpose of testing the foam-extend adapter.