Page 1 of 1

thermal expansion coefficient

Posted: Mon Mar 16, 2020 6:18 pm
by s marco
Hi,

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

Best regards,
Marco

Re: thermal expansion coefficient

Posted: Tue Mar 17, 2020 1:33 pm
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

Re: thermal expansion coefficient

Posted: Tue Mar 17, 2020 1:51 pm
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

Re: thermal expansion coefficient

Posted: Tue Mar 17, 2020 3:01 pm
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

Re: thermal expansion coefficient

Posted: Tue Mar 17, 2020 3:19 pm
by s marco
Ok thanks.

So how can I change the value of ibeta?

Kind regards,
Marco