Friction heating in heat transfer

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Ruonan
Posts: 136
Joined: Mon Dec 14, 2020 11:38 am

Friction heating in heat transfer

Post by Ruonan »

Hello Yvan,

Please could I talk with you about the friction heating (kinetic energy effect) in rotating flows with heat transfer.

The case is a rotating cavity with two adiabatic discs, as shown in the figure below. There is expected to be a temperature rise on the discs from low to high radii, because the adiabatic discs will be heated by the rotating flow due to viscous friction. The temperature rise should be (Ωb)^2/(2*Cp)-(Ωa)^2/(2*Cp). In my case of Reφ=2*10^7, the temperature difference between r=b and r=a should be ~237K.
Model.png
I ran the case in the incompressible module, selected the thermal scalar to Temperature, did wall-resolved RANS without wall function. In the results, the temperature on the disc was uniform, showing no frictional heating term was included in the energy equation. Then I switched the thermal scalar from Temperature to Enthalpy. The results are the same. So I suppose in the incompressible module, "friction term" is not included in the energy equation. In high Reφ cases, this may give wrong results, since the frictional heating will be significant and should not be neglected.

Then I switched the module from incompressible to compressible, ran wall-resolved RANS without wall function. Luckily, the temperature rise was correct on the adiabatic discs. So I suppose the energy equation in compressible module is fully formed, including friction term.

So my questions are:

1. How could I get the friction heating included in the incompressible module? Do I need to go into the source code and revise the energy equation (maybe add a source term)?

2. I want to use wall-modelled solutions to save computing time. But in the compressible module, when I switched the wall-resolved RANS to wall-modelled RANS (using 1-scale log law), the temperature rise on the adiabatic discs again went wrong. So I suppose in the compressible module, if I want to do wall-modelled solutions, I need to do some revisions to the thermal wall function. My supervisor told me to modify the definition of T+
Thermal wall function tplus.png
(10.68 KiB) Not downloaded yet
Please could you suggest to me how could I achieve this? Should I go to code_saturne-master/src/base/cs_wall_function.h to modify it?

Sorry for the long post. Thank you very much for your very important help!

Best regards,
Ruonan
Yvan Fournier
Posts: 4074
Joined: Mon Feb 20, 2012 3:25 pm

Re: Friction heating in heat transfer

Post by Yvan Fournier »

Hello,

I do not believe we include a specific term for friction heating, which is consistent with your observations.

I am not familiar enough with the details of the compressible model to confirm that t does handle the required terms.

In any case, if you need to add a source term, you can probably add it as a user source term, without needing to modify the main source code. Though once a model is set up an working, adapting it to the main code can be interesting for the user community and as a way of making the development more permanent.

Best regards,

Yvan
Ruonan
Posts: 136
Joined: Mon Dec 14, 2020 11:38 am

Re: Friction heating in heat transfer

Post by Ruonan »

Hello Yvan,

Thanks for your reply. In GUI, I find /Volume conditions/Volume zone types/Momentum or thermal source term, where we can add user source terms, though I'm not familiar with it now.

As for the second question in the post, I also want to modify the definition of tplus (T+) in the wall functions, for including the friction heating effect when using wall functions.
tplus modification.png
(10.68 KiB) Not downloaded yet
Please do you know if it's the correct way: I need to modify in the cs_wall_function.h (attached below), then re-compile the codes?

Best regards,
Ruonan
Attachments
cs_wall_functions.h
(48.63 KiB) Downloaded 102 times
Yvan Fournier
Posts: 4074
Joined: Mon Feb 20, 2012 3:25 pm

Re: Friction heating in heat transfer

Post by Yvan Fournier »

Hello,

Regarding the wall functions, I think this is OK, as the system is designed so as to be able to handle the addition of different wall functions (though "clean" addition might require handling options in other parts of the code, while modification is easier to test).

I'll check next week with a colleague who has better knowledge of wall functions it this is the cleanest solution, but it should work in any case.

Best regards,

Yvan
Ruonan
Posts: 136
Joined: Mon Dec 14, 2020 11:38 am

Re: Friction heating in heat transfer

Post by Ruonan »

Hi Yvan,

Thank you very much for checking with your colleagues! Look forward to your reply.

Best regards,
Ruonan
Ruonan
Posts: 136
Joined: Mon Dec 14, 2020 11:38 am

Re: Friction heating in heat transfer

Post by Ruonan »

Hello Yvan,

Please could I ask if you had time to kindly helped me confirm this is the cleanest way to change the thermal wall function (the definition of tplus)? Because it is a bit difficult for me to understand the codes in cs_wall_functions.h and cs_wall_functions.c (sorry about this), so I think maybe it's better to first make sure if this is the cleanest solution, as discussed above.

Thank you very much!

Best regards,
Ruonan
Martin FERRAND
Posts: 47
Joined: Wed Mar 14, 2012 10:06 am

Re: Friction heating in heat transfer

Post by Martin FERRAND »

Hello,

Just to answer to your first question: in the incompressible module the friction source term is neglected and not in the code. You can add it as a user source terme.
For the compressible module, the solved equation is the total energy and the terme is handelled.

Concerning the wall function, you can hard code the modification you want in cs_wall_functions.h and recompile the code.

Best regards
Martin
Ruonan
Posts: 136
Joined: Mon Dec 14, 2020 11:38 am

Re: Friction heating in heat transfer

Post by Ruonan »

Dear Martin,

Thank you very much for the answer-very helpful. I have a further question about the first question, please could you help me:

I learned the viscous work term is written as:
∇∙(U∙τ)=∂/∂x (u_1 * τ_11+u_2 * τ_21+u_3 * τ_31)+∂/∂y (u_1 * τ_12+u_2 * τ_22+u_3 * τ_32)+∂/∂z (u_1 * τ_13+u_2 * τ_23+u_3 * τ_33 )
I thought as a FVM based solver, this term, as a flux, should contribute to the surfaces of the control volumn, rather than the centre of the control volumn. So am I correct that: I should calculate the flux on each surface and do some integrations, instead of simply add it as a source term?

If this is correct, then it might be more complicated than just adding a source term in cs_user_source_terms.f90.

Best regards,
Ruonan
Ruonan
Posts: 136
Joined: Mon Dec 14, 2020 11:38 am

Re: Friction heating in heat transfer

Post by Ruonan »

Dear Martin and Yvan,

Besides the question in the last post, I have another question please:

For the viscous work term, we know it is included in the compressible's energy equation, but not in the incompressible's energy equation (temperature scalar transport equation). I think maybe I can just copy the viscous heating term in the compressible's equation to the incompressible's equation, so my problem could be solved? Or at least refer to it.

But I can't find the energy equation. Could you guide me in which subroutine I can find the energy equation?

Many thanks,
Ruonan
Yvan Fournier
Posts: 4074
Joined: Mon Feb 20, 2012 3:25 pm

Re: Friction heating in heat transfer

Post by Yvan Fournier »

Hello Ruonan,

For the compressible module, the thermal equation is based on the total energy, but for the incompressible model, the energy does not appear directly. The Navier-Stokes equations include conservation of momentum, and if you have a thermal variable (temperature or enthalpy), its convection-diffusion equation matches a form of energy, but there is no explicit coupling between the two (as you would have with friction heating).

So you probably need to compute the viscous heating term based on the viscous terms, or associated deformation tensor.

If anyone else can complete/refine my answer, they are welcome...

Best regards,

Yvan
Post Reply