The subroutine usvort allows generating an unsteady inlet boundary condition for LES with the vortex method. This method is based on the generation of vortices in the 2D inlet plane with help from pre-defined functions. The fluctuation normal to the inlet plane is generated by a Langevin equation. The subroutine usvort specifies the parameters of this method.
To allow the application of the vortex method, ivrtex must set to 1 in the usipsu subroutine in the cs_user_parameters.f90 file.
Vortex method parameters setting
Arguments of usvort
The function usvort has the following arguments :
 
 
integer          nvar   , nscal
integer          iappel
 
double precision dt(ncelet)
 
  
Local variables declaration
Some local variables need to be declared as follows :
 
 
integer          ifac, ient
integer          ilelt, nlelt
 
integer, allocatable, dimension(:) :: lstelt
 
  
Allocation
The lstelt array is allocated.
 
Global parameters
The following part defines the number of inlets concerned by the vortex method (nnentt) and the number of vortices for each inlet (nvort).
 
 
 
nnent = 2
 
 
 
nvort(1) = 500
nvort(2) = 500
 
  
Inlets definition
Then, at the first call of usvort (iappel=1), one defines the boundary faces at which the vortex method is applicable. The irepvo array, which defines the number of inlets concerned with the vortex, is filled with ient .
 
if (iappel.eq.1) then
 
 
  do ifac = 1, nfabor
    irepvo(ifac) = 0
  enddo
 
  
 
  do ilelt = 1, nlelt
 
    ifac = lstelt(ilelt)
 
    ient = 1
    irepvo(ifac) = ient
 
  enddo
 
  
 
  do ilelt = 1, nlelt
 
    ifac = lstelt(ilelt)
 
    ient = 2
    irepvo(ifac) = ient
 
  enddo
 
  
Boundary conditions
The following part defines the complexity of the geometry.
 
elseif (iappel.eq.2) then
 
 
 
 
  ient = 1
  icas(ient) = 1
 
  ient = 2
  icas(ient) = 2
 
 
 
 
  ient = 1
  if(icas(ient).eq.1.or.icas(ient).eq.2.or.icas(ient).eq.3) then
    dir1(1,ient) = 1.d0
    dir1(2,ient) = 0.d0
    dir1(3,ient) = 0.d0
 
    dir2(1,ient) = 0.d0
    dir2(2,ient) = 1.d0
    dir2(3,ient) = 0.d0
  endif
 
  ient = 2
  if(icas(ient).eq.1.or.icas(ient).eq.2.or.icas(ient).eq.3) then
    dir1(1,ient) = 0.d0
    dir1(2,ient) = 1.d0
    dir1(3,ient) = 0.d0
 
    dir2(1,ient) = 0.d0
    dir2(2,ient) = 0.d0
    dir2(3,ient) = 1.d0
  endif
 
 
 
  ient = 1
 
  cen(1,ient) = 0.d0
  cen(2,ient) = 0.d0
  cen(3,ient) = -6.05d-1
 
  ient = 2
 
  cen(1,ient) = -3.664d-1
  cen(2,ient) = 0.d0
  cen(3,ient) = 0.d0
 
 
 
 
 
 
 
 
  ient = 1
 
  if(icas(ient).eq.1) then
    iclvor(1,ient) = 1
    iclvor(2,ient) = 2
    iclvor(3,ient) = 1
    iclvor(4,ient) = 2
  endif
 
 
 
  ient = 1
  lly(ient) = 0.2d0
  llz(ient) = 0.1d0
 
  ient = 2
  lld(2) = 0.154d0
 
  
Physical and time parameters
Depending on the complexity of the geometry, the main parameters of the method are defined.
 
 
 
 
 
  ient = 1
  itlivo(ient) = 1
 
  if(itlivo(ient).eq.1) then
    tlimvo(ient) = 10.d0*dtref
  endif
 
  ient = 2
  itlivo(ient) = 2
 
 
 
 
  ient = 1
  isgmvo(ient) = 1
 
  if(isgmvo(ient).eq.1) then
    xsgmvo(ient) = 0.01d0
  endif
 
  ient = 2
  isgmvo(ient) = 2
 
 
 
 
  ient = 1
  idepvo(ient) = 2
 
  ient = 2
  idepvo(ient) = 1
 
  if(idepvo(ient).eq.1) then
    ud(ient) = 0.7d0
  endif
 
  
Input/Output parameters
As icas is equal to 1 or 2 (see Boundary conditions), a data file ficvor must be defined for each inlet.
 
 
 
 
 
 
 
  ient = 1
  ndat(ient) = 2080
 
  ient = 2
  ndat(ient) = 2080
 
 
  ient = 1
  ficvor(ient) = 'entree_1.dat'
 
  ient = 2
  ficvor(ient) = 'entree_2.dat'
 
 
  if(icas(ient).eq.4) then
    udebit(ient) = 10.d0
    kdebit(ient) = 1.d0
    edebit(ient) = 1.d0
  endif
 
 
 
  isuivo = isuite
 
 
endif
 
  
Deallocation
The lstelt array needs to be deallocated.
 
Definition of the phidat function (interpolation)
The phidat function allows to define the interpolation used in the vortex method. It is called by the subroutines vorlgv, vorvit, vordep, and vorini.
 
implicit none
 
integer          nfecra, icas, ndat, iii
double precision zz, yy
double precision zdat(ndat), ydat(ndat)
double precision vardat(ndat)
 
integer          ii
double precision phidat, dist1
 
 
 
 
 
if(icas.eq.1.or.icas.eq.2.or.icas.eq.3) then
 
  if(iii.eq.0) then
    dist1 = 1.d20
    do ii = 1,ndat
      if(sqrt((yy-ydat(ii))**2+(zz-zdat(ii))**2).lt.dist1) then
        dist1 = sqrt((zz-zdat(ii))**2+(yy-ydat(ii))**2)
        iii   = ii
      endif
    enddo
  elseif(iii.ne.0) then
  endif
 
elseif(icas.eq.4) then
endif