Temperature_boundary_wall

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
C0st4s
Posts: 48
Joined: Fri May 11, 2018 12:21 pm

Temperature_boundary_wall

Post by C0st4s »

Hello,

I wanted to ask if there is a way to print the temperature of the wall boundary i.e. between two parallel plates in a file.

Thanks,
Costas
Yvan Fournier
Posts: 4081
Joined: Mon Feb 20, 2012 3:25 pm

Re: Temperature_boundary_wall

Post by Yvan Fournier »

Hello,

I am not sure I understand where you want to print the temperature at the wall boundary.

If you activate the postprocessing output for the boundary temperature, you will hae access to the whole boundary temperature field, so this may be what you need. Depending on the automation level you need then, you can extract field values near specific points in cs_user_extra_operations.c, or use the visualization output.

Regards,

Yvan
C0st4s
Posts: 48
Joined: Fri May 11, 2018 12:21 pm

Re: Temperature_boundary_wall

Post by C0st4s »

Dear Yvan,

Thanks for your reply. Basically I am extracting data using cs_user_extra_operations.f90 and I want to extract the boundary wall temperature. I would like to know what is the function that I have to call in order to get the wall temperature (boundary) of my domain?

Best regards,
Costas
Yvan Fournier
Posts: 4081
Joined: Mon Feb 20, 2012 3:25 pm

Re: Temperature_boundary_wall

Post by Yvan Fournier »

Hello,

The simplest solution is to activate the postprocessing output of the boundary temperature in the "surface variables" postprocessing output in the GUI. Then in cs_user_extra_operations.f90, just use:

Code: Select all

call field_get_val_s_by_name("boundary_temperature", tb)
where you have declared tb as "double precision, dimension(:), pointer :: tb".

You can then access the value for any boundary face. You can also force the existence of the "boundary_temeprature" field in s_user_parameters.c even with no visualization output if you prefer (I beleive this is in the examples).

Best regards,

Yvan
C0st4s
Posts: 48
Joined: Fri May 11, 2018 12:21 pm

Re: Temperature_boundary_wall

Post by C0st4s »

Thanks, that's exactly what I was looking for!

Best regards,
Costas
Post Reply