Computation of ustar during a restart on a frozen field

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
C.FLAG.
Posts: 32
Joined: Fri Apr 08, 2016 2:19 pm

Computation of ustar during a restart on a frozen field

Post by C.FLAG. »

Hello,

It looks like the field "ustar" is zero when trying to use it when imposing scalar boundary conditions after a restart on a frozen velocity field. Any idea to force the code to estimate it ?

Thanks,
Cédric
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: Computation of ustar during a restart on a frozen field

Post by Yvan Fournier »

Hello Cédric,

I am not sure how it is recomputed or read in the general (non-frozen) case, but it would probably be safe to try to apply the same step in the frozen case. I do not remember in detail, but at some point, we also had similar issues for the mass flux (at least when not reading the auxiliairy checkpoint).

Regards,

Yvan
C.FLAG.
Posts: 32
Joined: Fri Apr 08, 2016 2:19 pm

Re: Computation of ustar during a restart on a frozen field

Post by C.FLAG. »

Thanks Yvan,

During initialization and at the first time step, the friction velocity is exactly zero when used in scalar boundary conditions. But at the second time step, it is updated and no longer zero! I will try to figure out how to force earlier update of the field.

Regards,
Cédric
C.FLAG.
Posts: 32
Joined: Fri Apr 08, 2016 2:19 pm

Re: Computation of ustar during a restart on a frozen field

Post by C.FLAG. »

Hello,

Here is the modification in tridim so that I can use ustar in the scalar boundary conditions when doing a restart on a frozen velocity field : I simply call condli twice at the first time step of the restart.

Code: Select all

iterns = 1
do while (iterns.le.nterup)

  ! Calls user BCs and computes BC coefficients
  !
  ! If first time step after restart, call it twice so we can use ustar in cs_user_boundary_conditions.f90
  !
  if (ntpabs.gt.0 .and. iterns.eq.1 .and. ntcabs.eq.ntpabs+1) then
    call condli &
      (nvar   , nscal  , iterns ,                                    &
       isvhb  ,                                                      &
       itrale , italim , itrfin , ineefl , itrfup ,                  &
       cofale , xprale ,                                             &
       icodcl , isostd ,                                             &
       dt     , rcodcl ,                                             &
       visvdr , hbord  , theipb )
  endif
  call condli &
    (nvar   , nscal  , iterns ,                                    &
     isvhb  ,                                                      &
     itrale , italim , itrfin , ineefl , itrfup ,                  &
     cofale , xprale ,                                             &
     icodcl , isostd ,                                             &
     dt     , rcodcl ,                                             &
     visvdr , hbord  , theipb )
Regards,
Cédric
Post Reply