Code Saturne 4.0.6 access boundary face temperature

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Jundi He
Posts: 106
Joined: Fri Jan 13, 2017 3:23 pm

Code Saturne 4.0.6 access boundary face temperature

Post by Jundi He »

Hi Code Saturne team:

I am using Code Saturne 4.0.6 and I need to access the temperature of a boundary face, can I call the function:

field_get_val_s_by_name('boundary_face', xvart) ? Thanks for the time.

Regards!
Jundi
Jundi He
Posts: 106
Joined: Fri Jan 13, 2017 3:23 pm

Re: Code Saturne 4.0.6 access boundary face temperature

Post by Jundi He »

Hi:

I've done a test case and know that this function can only be used in Code Saturne 5.0, not for 4.0.

I have another question, I know that if I need to get the mass flux of a face (ifac), I will use:

call field_get_key_int(ivarfl(iw),kimasf,iflmas)
call field_get_val_s(iflmas, imasfl)

then the mass flux across this face is imasfl(ifac).

What if I need to get access to the heat flux of this face (ifac), can I do the similar thing? Thanks!

Regards!
Jundi
Luciano Garelli
Posts: 280
Joined: Fri Dec 04, 2015 1:42 pm

Re: Code Saturne 4.0.6 access boundary face temperature

Post by Luciano Garelli »

Hello,

The user subroutine "cs_user_extra_operations-energy_balance.f90" has several examples about computing energy fluxes. Also, you can check the subroutine post_boundary_thermal_flux in the post_util.f90 file, where is post-processed the thermal flux.

In the post you mention boundary faces, be careful because kimasf is the interior mass flux id and kbmasf is the boundary mass flux id.

Regards,

Luciano
Jundi He
Posts: 106
Joined: Fri Jan 13, 2017 3:23 pm

Re: Code Saturne 4.0.6 access boundary face temperature

Post by Jundi He »

Hi Luciano:

Many thanks for the information.

Regards!
Jundi
Jundi He
Posts: 106
Joined: Fri Jan 13, 2017 3:23 pm

Re: Code Saturne 4.0.6 access boundary face temperature

Post by Jundi He »

Hi Luciano:

When I look into the example subroutine, I found it uses the normal vector of the boundary face and the time step to calculate the heat flux, as shown below, is it calculating the budget, or the total heat flux from the begin? If I only need to use the instantaneous heat flux of the boundary face, should I just delete "- surfbn(ifac) * dt(iel)"? Thanks!

xfluxf = - surfbn(ifac) * dt(iel) &
* (cofafp(ifac) + cofbfp(ifac)*treco(ifac))

Regards!
Jundi
Luciano Garelli
Posts: 280
Joined: Fri Dec 04, 2015 1:42 pm

Re: Code Saturne 4.0.6 access boundary face temperature

Post by Luciano Garelli »

Hello,

If I'm not wrong , in this example an energy (Joule) balance is made, surface(m2)*time(s)*heat_flux(W/m2)=Energy(joule).

The surfbn(ifac) gives the surface of the boundary face. In the post_util.f90 the heat boundary flux is compute as

Code: Select all

bflux(iloc) =                    (cofafp(ifac) + cofbfp(ifac)*tcel) + convective flux
Regards,

Luciano
Post Reply