Wrong heat-flux direction with OpenFoam CHT

Hello,

I am making a simple case-study with OpenFOAM, I am using the CHT module.

My case consists in two 2D rectangular regions placed one over the other: in the lower one a fluid flows from left to right while the upper one is a solid. I am having big problems trying to make this set-up converge, so I tried to make some troubelshooting. In one attempts I tried to make the coupling just one directional: from the fluid to the solid. What I found is that it looks like the heat flux goes in the wrong direction: heat goes from the colder temperature to the hotter temperature. Here a contour from paraview to explain the problem (the fluid is at 400 K and the walls of the solid are imposed at 300K).

Note that in the channel the fluid heats up because of viscous dissipations, so it even makes sense that the heat exchange increases going toward the outlet… but the direction of the exchange should be the opposite.

I would like to ask what do you think is the problem and what I am doing wrong, I attach the two preciceDict files and the config

precice-config.xml (1.6 KB)
preciceDictSolid.txt (483 Bytes)
preciceDictFluid.txt (482 Bytes)

The direction of the heat flux is something we have to assume and both participants need to have the same assumption.

The OpenFOAM adapter automatically inverts the sign of the heat flux when reading heat flux:

Could this be the reason?

Hello Makis,

I’m not sure the problem is that: I tried to run twice again the same simulation adding a minus sign in front of the k of the fluid in the first run and in front of the k of the solid in the second but the results where the same. I also tried to recompile the adapter introducing a minus in front of the lines you have shown but also this change has not produced any effects.

Hi @Paolo,

did you maybe manage to solve this issue in the meantime?