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

Add Elmer as a fluid and solid participant to the flow-over-heated-plate tutorial #565

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

Conversation

IshaanDesai
Copy link
Member

In a contribution to the Elmer adapter, the Elmer case setup for fluid and solid participants for the flow-over-heated-plate tutorial were updated: precice/elmer-adapter#4 Until now the entire tutorial lived in the adapter repository, but as part of the current update, it is now being moved to the tutorials repository, to ensure maintainability.

The updates were done by @tapegoji

Checklist:

  • I added a summary of any user-facing changes (compared to the last release) in the changelog-entries/<PRnumber>.md.
  • I will remember to squash-and-merge, providing a useful summary of the changes of this PR.

@MakisH
Copy link
Member

MakisH commented Sep 2, 2024

Nice!
I want to have a look and try it when it's ready for review.
Don't forget to add some information in the README, and (if needed) any hints in https://precice.org/tutorials-visualization.html or in the visualization script of the case.

@IshaanDesai
Copy link
Member Author

@tapegoji I added you as contributor via an empty commit so that you will show up at the appropriate places, like the future release of the tutorials.

Additionally here is the error I face when trying to run the fluid-elmer participant:

ListTagKeywords: No parameters width suffix: normalize by volume
ERROR:: LoadMesh: Requested mesh > Fluid_Participant_Mesh < does not exist!
STOP 1

I compiled the adapter and manually copied the .so files from elmer-adapter/Adapter to fluid-elmer/ and then tried to run the case. Any clue what is going wrong?

@tapegoji
Copy link

tapegoji commented Oct 6, 2024

Hi, it looks like the name in case.sif file is different that the name in precice-config.xml file. If you want we can have a google meet to resolve this. my time is US MDT.

@IshaanDesai
Copy link
Member Author

I managed to run the Elmer participants, and as a first attempt I tried out fluid-elmer and solid-nutils. The simulation starts but the diverges at some point, with the following error:

CouplerSolver: Reading the data from preCICE
CouplerSolver: Ended
MAIN: *** Elmer Solver: ALL DONE ***
MAIN: The end
SOLVER TOTAL TIME(CPU,REAL):         5.24       34.48
ELMER SOLVER FINISHED AT: 2024/10/23 09:23:03
corrupted double-linked list

Program received signal SIGABRT: Process abort signal.

Backtrace for this error:
#0  0x77920e8c5960 in ???
#1  0x77920e8c4ac5 in ???
#2  0x77920e6bb51f in ???
...

From the logs one can see that the coupling is not converging in a time window. Looking into the Elmer adapter a bit I saw that there is no real checkpointing in the main adapter file Coupler_Solver.F90. This can be one reason why the coupling does not converge. @tapegoji is there an implementing of checkpointing of values that I am missing? Did you manage to run the flow over heated plate tutorial at some point?

@tapegoji
Copy link

I did not implement the checkpoint, I don't recall why I commented them out; I think for simplicity. Yes, I ran the original case and it worked. I have to say, this was a few months ago and I have not tried it recently.

That being said, from the log file I see here, it looks like that Elmer finished normally. The error that is here is that because the coupler does terminate properly. I think when preCICE is done, we should add a check point in the Elmer_adapter so that, it releases all the memory and terminates properly. does that make sense?
Is there a way that ask preCICE if we are at the end of the simulation?

@IshaanDesai
Copy link
Member Author

That being said, from the log file I see here, it looks like that Elmer finished normally. The error that is here is that because the coupler does terminate properly. I think when preCICE is done, we should add a check point in the Elmer_adapter so that, it releases all the memory and terminates properly. does that make sense?

Looking at the adapter code again, this actually makes sense. I would now merge the adapter PR and continue testing this.

@uekerman
Copy link
Member

Is there a way that ask preCICE if we are at the end of the simulation?

That's exactly the purpose of isCouplingOngoing, step-by-step docs.

@tapegoji
Copy link

Okay, so we have that in that code. I think the problem was that Elmer was not de-allocating the memory when the coupling was finished.
I just added a few lines to remedy this. I did a test (on my development branch) and it seems to be working. Let me know if that works.

@IshaanDesai
Copy link
Member Author

I tested both fluid-elmer and solid-elmer again, and because the Elmer adapter does not have checkpointing, the coupling does not converge. It would make sense to test the Elmer participants after we have checkpointing in the adapter.

@tapegoji
Copy link

Ishaan,
I think I added check points in the Elmer participants. It should remove the previous crashing at the end of the simulations?
Is this the same or different? we can have a call to see how we can fix this.

Thanks

@IshaanDesai
Copy link
Member Author

Is this the same or different? we can have a call to see how we can fix this.

Checkpointing is different that what was added to ensure that the simulation does not crash at the end. Let's discuss over a call 👍

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.

4 participants