I have a question regarding the coupling of my OpenFOAM turbulence model and my nutils heat conduction problem. The case is a steady state, incompressible case. I am already solving my velocity and pressure field beforehand in OpenFOAM and using it as an input, for the coupled case. In the coupled case, a material is added with simple heat conduction and is solved with Nutils. Only the temperature has to be calculated now and since it is incompressible it doesn’t influence my velocity field.
Since my Openfoam turbulence model is non-linear and therefore iterating towards a solution, it is very inefficient to solve my linear Nutils case every iteration. This would increase my computation time severely. Currently I am only calling nutils every 100th iteration by setting the time window size on 100 and the max-time-windows on 50 (in total I am running the openfoam model for 5000 iterations). Is this the right approach? or are there more elegant ways to do this.
I guess additionally you use a pseudo timestep of 1 in OpenFOAM and a pseudo timestep of 100 in Nutils. Correct? Then, this is doing what you described, yes.
I do however not yet get your case completely. OpenFOAM velocity and pressure is already in steady-state, right? And then you basically couple two (or three, in your config you have two Nutils participants) temperature equations. They are all linear then, right? Why treat fluid and sold then differently?
The real alternative is to use an implicit coupling and no pseudo timestepping, but treat the steady-state problems as a single timestep. You could then use the quasi-Newton coupling to accelerate the coupling.
Thank you for your answer! That makes things clearer. Indeed in this case it would be possible to solve all Temperature equations linear and solve the temperature in Nutils. However in the case if we would like to go to a compressible solver, this will change and this method is probably required. The velocity and pressure field mostly serve as an initial guess for the simulations, so it will converge faster, when it is coupled.
I have an extra question about the implicit coupling you suggested. I have started playing around with it, since I think the implicity scheme will be more stable. I have done the tutorial and have tried some things out myself with a case, however I am not fully understanding how the convergence criterion works.
In a tutorial it states:
For implicit coupling, the tags first and second do not only determine the order of execution (for serial coupling), but they also determine where preCICE computes the convergence measures and the acceleration: Both are executed on the second participant.
Does this then mean that the second participant is solved and checked, whether the quantity is below that threshold? Is it also possible for the first participant?
Currently I want the first participant (OpenFOAM) to be converged to a certain threshold and then the Nutils case can be solved. It will give the results to OpenFOAM and openfoam starts iterating again. However this is not happening as of current.
The convergence measure is checked within the advance call of the second participant and then sent to the first participant. From a user perspective it makes no difference whether the first or the second participant does this (other than some minor increased computational load on the second participant).
The internal convergence threshold of OpenFOAM is sth that you need to set in OpenFOAM. This has nothing to do with preCICE. Am I misunderstanding sth?
Okay, I made the mistake in thinking it checked the convergence of that parameter in the solver itself.
Yes, I am setting a convergence criterion in OpenFOAM for the Temperature, however I wanted to acquire that convergence first, then proceed with Nutils, and then call Openfoam again to iterate towards that convergence critetion again (since the solution in nutils will have altered the boundary condition and thus the convergence is not reached)
Thank you, I will have a look at it and report back if it works!
@CarsvO did you manage to solve this issue? If yes, please mark one of the posts as a solution. If not, no problem, just let us know to keep this under the radar.
Sorry, I forgot about this post. Yes, I have solved it. I am using a multi-coupling scheme when coupling 2 other solvers to my Openfoam solver. I am not getting any errors anymore. I have another post, with another question, however the error I got here was solved with that post. I will post the full solution of what I did there soon! I am doing some last tests.
If the answer is the same in both, answer there. If these are two different issues, please post the one answer here and the other in the other topic. I am sorry if I may be overseeing something at the moment, we are just trying to moderate a bit the open threads at the moment.