thermal expansion coefficient

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
s marco
Posts: 11
Joined: Fri Feb 14, 2020 3:59 pm

thermal expansion coefficient

Post by s marco »

Hi,

how does it works to set up a constant value for the thermal expansion coefficient?

Best regards,
Marco
Luciano Garelli
Posts: 280
Joined: Fri Dec 04, 2015 1:42 pm

Re: thermal expansion coefficient

Post by Luciano Garelli »

Hello,

First of all you have to activate the thermal model, then in the fluid property tab change density from constant to user law. In the mathematical expression editor you can write an equation for the density which include the thermal expansion coefficient, like the Boussinesq approximation for buoyancy.

Don't forget to set the gravity vector.

Regards,

Luciano
s marco
Posts: 11
Joined: Fri Feb 14, 2020 3:59 pm

Re: thermal expansion coefficient

Post by s marco »

Hi thanks Luciano it could be usefull.

I am using AFM for temperature and in code saturne v4 I have divrit.f90 in which beta is called in this way

if (ibeta.gt.0) then
call field_get_val_s(iprpfl(ipproc(ibeta)), cpro_beta)
endif

and then it is used in AFM formulation.

! AFM and EB-AFM models
! "-C_theta*k/eps*( xi* uT'.Grad u + eta*beta*g_i*T'^2)"
if (ityturt(iscal).eq.2.and.ibeta.gt.0) then
if (itt.gt.0) then
temp(ii) = temp(ii) - ctheta(iscal)*xtt* &
etaafm*cpro_beta(iel)*grav(ii)*cvara_tt(iel)



I didn't find anything in code saturne v6 so do you know how to set up and check it in the newest version?
Anyway do you think that changing beta in the density law will change also for AFM model?

Best regards,
Marco Santucci
Luciano Garelli
Posts: 280
Joined: Fri Dec 04, 2015 1:42 pm

Re: thermal expansion coefficient

Post by Luciano Garelli »

Hello,

In the file /turb/divrit.f90 are the same lines that you mention,

Code: Select all

 ! AFM model
        !  "-C_theta*k/eps*( xi* uT'.Grad u + eta*beta*g_i*T'^2)"
        if (iturt(iscal).eq.20) then
          if (itt.gt.0.and.ibeta.ge.0) then
            temp(ii) = temp(ii) - ctheta(iscal)*xtt*                           &
                       etaafm*cpro_beta(iel)*grav(ii)*cvara_tt(iel)
          endif
So, I think that you can use in the same way that in CS 4.

Regards,
Luciano
s marco
Posts: 11
Joined: Fri Feb 14, 2020 3:59 pm

Re: thermal expansion coefficient

Post by s marco »

Ok thanks.

So how can I change the value of ibeta?

Kind regards,
Marco
Post Reply