Extraction of heat Transfert coefficient

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Olivier Brero

Extraction of heat Transfert coefficient

Post by Olivier Brero »

Hello ,
 
I'm performing calculation of a simple pipe with wall dirichlet for the temperature.
I would like to extract the heat transfert coefficient calculated by Code_Saturne (HFLUI) which is saved in the array HBORD(IFAC) as i set ISVHB = 1 in tridim.F.
I have tryied to extract it via usvpst.F, but the code crashes, the error message is the following :

SIGSEGV signal (forbidden memory area access) intercepted!
Call stack:
   1: 0x2ad817ee3110 ?                                (?)
   2: 0x42f42f     <usvpst_+0xa3>                   (cs13.exe)
   3: 0x46f751     <pstvar_+0x102b>                 (cs13.exe)
   4: 0x50af85     <caltri_+0x62a5>                 (cs13.exe)
   5: 0x450087     <main+0x5e7>                     (cs13.exe)
   6: 0x2ad817ed04ca <__libc_start_main+0xda>         (libc.so.6)
   7: 0x417b2a     ?                                (?)
End of stack


I made it work by copying HBORD in RTUSER in condli.F and reading RTUSER in usvpst.F. But, i'm not sure that the value is correct as i've seen that the HFLUI calculated by clptur.F is slightly different then the one calculated by condli.F.
So my questions are :
      1 : How can i read the array HBORD from any user subroutines ?
      2 : If 1 can't be done, how can i be sure that i'm reading the good value of HFLUI ?
      3 : What the dimension of HFLUI written in HBORD ? W/(m.°C) or W/°C ?
Thanks for you help.
Yvan Fournier

Re: Extraction of heat Transfert coefficient

Post by Yvan Fournier »

Hello,
HBORD is only a temporary array in tridim.F, and does not exist anymore when usvpst.F is called, so saving it as you did in RTUSER is the correct thing to do.
I am not sure why the value calculated by condli.F and that calculated by clptur.F is slightly different (I'll let others answer, but I'll check with colleagues better versed in that part of the code).
I am not sure about the dimensions of HFLUI, but it should be in W/(m^2.C).
In any case, be very careful with HFLUI: there is a reason that in SYRTHES couplings, we output the wall temperature and heat flux for postprocessing, but not the heat transfer coefficient:
HFLUI is a local numerical coefficient: the flux at a given boundary face is expressed as (Twall - Tfluid)*Hflui
but Tfluid is the mean fluid temperature in the cell near the wall: so with a log wall boundary layer, the finer the mesh, the closer to the wall temperature Hflui will be. For a given heat flux, this means that as you refine the mesh, Hflui will increase to maintain a given heat flux as Tflui -> Twall (assuming we keep a reasonable y+, in the validity domain for the wall law).
So the HFLUI you are looking at is not the "engineering" hflui, where you would consider Tfluid not as a local value, but as a mean (or inlet value).
Just so you are not surprised if results seem surprising.
For an "engineering" heat transfer coefficient, the best would be to compute the heat transfer coefficient based on the local heat flux, local wall temperature, and mean (or inlet) fluid temperature.
Best regards,
  Yvan
Olivier Brero

Re: Extraction of heat Transfert coefficient

Post by Olivier Brero »

Thank you for your help and advices. Concerning the "engineering" heat flux, i already planned to rebuilt it not to post treat a local heat flux.
I ran different other calculations, and i think i made a mistake : condli.F and clptur.F are actually giving the same values.
 
Regards.
 
Olivier BRERO, EDF SEPTEN.
Post Reply