how to change the value for parameter icalhy in cs-3.0.1

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
gxuxg

how to change the value for parameter icalhy in cs-3.0.1

Post by gxuxg »

Hi
I am testing cs-3.0.1 for a heat transfer problem with buoyancy effect. As indicated in the user guide, icalhy = 1, if iphydr = 1 and gravity is different from zero, which is the case that I am testing. However, I do see the velocity oscillation and unphysical high velocity occur at the outlet boundary, which eventually leads to the divergence. Thus I try to set icalhy to be zero, but failed to find the suitable subroutine or any alternative. Can anybody kindly tell me where to go for the changes?
Thanks.

George XU
from Singapore
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: how to change the value for parameter icalhy in cs-3.0.1

Post by Yvan Fournier »

Hello,

In the GUI, check Numerical Parameters / Global Parameters / Improved pressure interpolation in stratified flow.

In cs_user_parameters.f90, iphydr is defined in subroutine usipgl, and icalhy may be set anywhere inside subroutine usipsu (even if no example is present).

Regards,

Yvan
gxuxg

Re: how to change the value for parameter icalhy in cs-3.0.1

Post by gxuxg »

HI Yvan,
I have tried as per your instruction, but the solver failed to change the value for icalhy. It is still equal to 1, as shown in the log file.

regards,
George
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: how to change the value for parameter icalhy in cs-3.0.1

Post by Yvan Fournier »

Hello,

Looking at varpos.f90, the settings for icalhy are as follow:

Code: Select all

  if(iphydr.eq.0.or.iphydr.eq.2) then
    icalhy = 0
  elseif(iphydr.eq.1) then
    gravn2 = gx**2+gy**2+gz**2
    if (gravn2.lt.epzero**2) then
      icalhy = 0
    else
      icalhy = 1
    endif
  endif
So you need to make sure both iphydr = 1 and gravity is defined.

Is this the case in you setup ?

Regards,

Yvan
gxuxg

Re: how to change the value for parameter icalhy in cs-3.0.1

Post by gxuxg »

Hi Yvan,
Yes, in my case, the gravity in the Z direction is set as -9.81. I guess that was the reason to fail to set icalhy = 0.

As defined in the code, the gravity needs to be disabled, which is not physically true for buoyancy-driven problem as I intend to simulate.

Appreciate your clarification on this.

regards,

George
Post Reply