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

Update the adapter for preCICE v3 and add test cases for Elmer-OpenFOAM coupling #4

Merged
merged 34 commits into from
Oct 23, 2024

Conversation

tapegoji
Copy link
Contributor

@tapegoji tapegoji commented Jul 1, 2024

Description

  • Ported Elmer adapter from preCICE v2 to v3.
  • Added comprehensive test cases for coupling Elmer with OpenFOAM.
  • Ensured compatibility and improved integration with the latest preCICE version.

Changes:

  • Updated adapter files to align with preCICE v3 API.
  • Included new test cases for Elmer to OpenFOAM coupling. This change required hard-coded naming translation in the Coupler_Solver.F90 code.
  • Enhanced documentation to reflect the changes and new usage instructions.

Testing:

  • Successfully ran all new test cases to verify the adapter's functionality with preCICE v3 and OpenFOAM.
  • Ensured backward compatibility and verified no breaking changes with existing setups.

Additional Notes:

  • Please review the updated documentation and test cases.
  • Looking forward to feedback and suggestions for further improvements.

tapegoji and others added 2 commits July 1, 2024 12:16
…mer to OpenFoam. A hard-coded naming convection was added to CoupleSolver.F90 for Elmer <-> OF coupling.
Ported the adapter for elmer from v2 to v3. Added a case to couple El…
Copy link
Member

@uekerman uekerman left a comment

Choose a reason for hiding this comment

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

Thanks a lot already! As this change is a bit larger, please be patient with the review 😁

Two things already to simplify the review. Please

  • Remove the precice-profiling folders
  • Strip the tools to what you actually need

@tapegoji
Copy link
Contributor Author

tapegoji commented Jul 5, 2024

I have removed the precice-profiling and the extra files in the tools folder. Let me know if you need anything else. I am happy to help make this a great tool.
Regards,

Copy link
Member

Choose a reason for hiding this comment

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

This log file can be removed.

Copy link
Member

@IshaanDesai IshaanDesai left a comment

Choose a reason for hiding this comment

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

@tapegoji thanks a lot for this contribution! Great work already 👏 Please have a look at my review comments. I did not run the test case and also did not have a look at the OpenFOAM things. After we do one iteration of the review, I can try running things. We can then finalize this pull request.

@IshaanDesai
Copy link
Member

@tapegoji please let me know when the pull request is ready to be reviewed again. No rush, but I will wait for your ping to have a look again.

@tapegoji
Copy link
Contributor Author

@IshaanDesai, I am a bit confused what I need to do. can you explain what I should do.
Thank you. I am a bit new and not too familiar with the process.

@tapegoji
Copy link
Contributor Author

I have applied all the changes. let me know if I am missing anything.

@tapegoji
Copy link
Contributor Author

Any update on this?

@IshaanDesai
Copy link
Member

Any update on this?

I'll review this week 👍 apologies for the delay, some other urgent things took time.

Copy link
Member

@IshaanDesai IshaanDesai left a comment

Choose a reason for hiding this comment

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

We are close to merging this. I have added some last comments. For the flow over heated plate tutorial, I see that you have copied over the OpenFOAM files from the precice/tutorials repository. Instead of copying the files here, a better idea would be to write a small README file here which describes how to copy Elmer files to the tutorials repository and run the tutorial there. This would avoid duplication. If it is not clear how to do this, I or someone else can do this.

Thanks once more for your contribution! Once you address the comments above, we can finalize this.

Flow_Over_Heated_Plate/Coupler_Solver.F90 Outdated Show resolved Hide resolved
Flow_Over_Heated_Plate/Fluid-elmer/elmersolver.log Outdated Show resolved Hide resolved
Flow_Over_Heated_Plate/README.md Outdated Show resolved Hide resolved
Flow_Over_Heated_Plate/Solid-elmer/elmersolver.log Outdated Show resolved Hide resolved
@IshaanDesai
Copy link
Member

@tapegoji thanks for making the final changes. Adapter-wise we are ready to merge this. The next step would be to move the files relevant to the flow-over-heated-plate tutorial to the precice/tutorials repository. I can do this in the next days, and then we can test if everything works. Once we are sure, we can merge this pull request, and also merge Elmer as a new participant to the tutorial.

@IshaanDesai
Copy link
Member

The Elmer fluid and solid participants for the flow-over-heated-plate tutorial are being added to the appropriate folder in the precice/tutorials repository via: precice/tutorials#565

The cases, and also the OpenFOAM cases copied over for testing have now been deleted. The reference problem has also been removed. The tools/ folder used for cleanups has also been removed.

I will continue cleaning up this pull request and finalizing the one mentioned above.

Copy link
Member

@IshaanDesai IshaanDesai left a comment

Choose a reason for hiding this comment

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

Here are somethings I noticed while moving the case files to the precice/tutorials repository.

.gitignore Outdated Show resolved Hide resolved
Flow_Over_Heated_Plate/Coupler_Solver.F90 Outdated Show resolved Hide resolved
@tapegoji
Copy link
Contributor Author

tapegoji commented Sep 5, 2024

I am good with all the changes. Please go ahead.

Copy link
Contributor Author

@tapegoji tapegoji left a comment

Choose a reason for hiding this comment

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

sounds good to me

@IshaanDesai
Copy link
Member

@tapegoji I opened a pull request in the tutorials repository to move the flow over heated plate case files to the respective folder: precice/tutorials#565 I tried running the case there, with both solid-elmer and fluid-elmer, but the solver did not run as the mesh file was not detected. Can you please have a look and try to run the cases there? I am a bit short on time until the end of next week due to the upcoming preCICE workshop.

@tapegoji
Copy link
Contributor Author

tapegoji commented Oct 2, 2024

did you use the mesh from OpenFoam or did you use the mesh that I provided?

@IshaanDesai
Copy link
Member

did you use the mesh from OpenFoam or did you use the mesh that I provided?

I used the mesh which was in the folder of the case in this pull request. Let us continue the discussion in precice/tutorials#565
I am sure it is just something minor. Once the case is running, we can merge everything. Thanks!

@IshaanDesai
Copy link
Member

Merging this PR and continuing testing precice/tutorials#565 for correctness. The changes in this PR make sense. Minor documentation polishing still needs to be done, but this can also be done on the main branch directly.

@IshaanDesai IshaanDesai merged commit 3f80721 into precice:main Oct 23, 2024
@fsimonis fsimonis linked an issue Dec 3, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change A change will break backwards compatibilty
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adapter is not yet ported to preCICE v3
4 participants