Page 1 of 1

Code Saturne 4.0.6 access boundary face temperature

Posted: Thu Nov 29, 2018 5:03 pm
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

Re: Code Saturne 4.0.6 access boundary face temperature

Posted: Thu Nov 29, 2018 7:23 pm
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

Re: Code Saturne 4.0.6 access boundary face temperature

Posted: Fri Nov 30, 2018 2:56 pm
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

Re: Code Saturne 4.0.6 access boundary face temperature

Posted: Fri Nov 30, 2018 4:07 pm
by Jundi He
Hi Luciano:

Many thanks for the information.

Regards!
Jundi

Re: Code Saturne 4.0.6 access boundary face temperature

Posted: Fri Nov 30, 2018 5:35 pm
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

Re: Code Saturne 4.0.6 access boundary face temperature

Posted: Fri Nov 30, 2018 6:33 pm
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