I will first sketch the situation for more clarity. I am using OpenFOAM to solve the velocity field in a turbulent flow. I am using simpleFOAM with a RANS model, so this model will reach a steady state, with in the end the average velocity field in the flow.
There is also a solid attached at the bottom of the flow (just like in the example from CHT), however with a constant heat source at the bottom of the solid. The solid is solved in python using Nutils. After the average velocity field is obtained in the fluid, I want to use this as an input for another model, which solves the Temperature distribution in the fluid and solid together until it has also reached a steady state.
I want to use preCICE however I have a few questions about what is possible with it and how it works.
One idea was to solve the velocity field in OpenFOAM and then export this to Nutils, and solving the temperature distribution in fluid and solid in Nutils. I saw one way coupling was possible in preCICE. I saw in the examples that data was transfered via an interface boundary. Is it also possible to export data from a whole mesh, to another mesh? so for example the velocity field in the fluid mesh of OpenFOAM to a velocity field in the nutils mesh of the fluid.
In the other case, the velocity field will be solved using OpenFOAM and then another model is used in OpenFOAM for the temperature distribution. Then nutils and openfoam run simultaneous in the temperature distribution calculation and distribute temperature data every iteration until it reaches steady state (It is not a time dependent problem, but i assume that is also possible?). I was however wondering how OpenFOAM is calling the preCICE adapter. I saw that a function was defined in the controlDict. See the figure below. However is there no other adjustment required for OpenFOAM in the solver or somewhere else?
A figure would help, but I think I understand your scenario: you want something like our flow over a heated plate tutorial, with a fluid-fluid volume coupling between the flow channel and a clone of itself. This will require some code changes in the OpenFOAM adapter, but it is doable.
But beware that this is kind of unexplored territory and you will need to do a bit more coding than usual and we have no tutorial for this. However, this Pull Request to the precice/openfoam-adapter may help. If you want, you are very welcome to help drive the review process forward as well (this is a bit old and stalled by now).
I am renaming the topic to give it a more specific title, feel free to follow-up with anything else we should clarify in terms of concepts already, or open new topics for any individual issues you get while trying this out. Of course, I would be very happy to know if you better understand everything now!
Thank you for your explanation! It is a lot clearer now and the links to the pages with extra information will be very helpful. I think everything is clear to me, but I will let you know if I don’t understand something.