setup_viscosity Subroutine

public subroutine setup_viscosity(scheme, flow, dims)

Allocate and pointer for molecular and turbulent viscosity

Arguments

Type IntentOptional AttributesName
type(schemetype), intent(in) :: scheme

finite-volume Schemes

type(flowtype), intent(in) :: flow

Information about fluid flow: freestream-speed, ref-viscosity,etc.

type(extent), intent(in) :: dims

Extent of the domain:imx,jmx,kmx


Calls

proc~~setup_viscosity~~CallsGraph proc~setup_viscosity setup_viscosity interface~alloc alloc proc~setup_viscosity->interface~alloc proc~alloc_rank2_real alloc_rank2_real interface~alloc->proc~alloc_rank2_real proc~alloc_rank4_real alloc_rank4_real interface~alloc->proc~alloc_rank4_real proc~alloc_rank3_real alloc_rank3_real interface~alloc->proc~alloc_rank3_real proc~alloc_rank2_integer alloc_rank2_integer interface~alloc->proc~alloc_rank2_integer proc~alloc_rank1_integer alloc_rank1_integer interface~alloc->proc~alloc_rank1_integer proc~alloc_rank6_real alloc_rank6_real interface~alloc->proc~alloc_rank6_real proc~alloc_rank5_real alloc_rank5_real interface~alloc->proc~alloc_rank5_real proc~alloc_rank3_integer alloc_rank3_integer interface~alloc->proc~alloc_rank3_integer proc~alloc_rank1_real alloc_rank1_real interface~alloc->proc~alloc_rank1_real

Called by

proc~~setup_viscosity~~CalledByGraph proc~setup_viscosity setup_viscosity proc~setup_solver setup_solver proc~setup_solver->proc~setup_viscosity proc~start_run start_run proc~start_run->proc~setup_solver program~main main program~main->proc~start_run

Contents

Source Code


Source Code

    subroutine setup_viscosity(scheme,flow, dims)
      !< Allocate and pointer for molecular and turbulent viscosity
      implicit none
      type(extent), intent(in) :: dims
      !< Extent of the domain:imx,jmx,kmx
      type(schemetype), intent(in) :: scheme
      !< finite-volume Schemes
      type(flowtype), intent(in) :: flow
      !< Information about fluid flow: freestream-speed, ref-viscosity,etc.
      integer :: imx, jmx, kmx

      imx = dims%imx
      jmx = dims%jmx
      kmx = dims%kmx
      !setup_molecular_viscosity()
      if (flow%mu_ref/=0.) then
        call alloc(mu, -2, imx+2, -2, jmx+2, -2, kmx+2)
        mu = flow%mu_ref !intialize
      end if

      !--- setup_turbulent_viscosity ---!
      if (scheme%turbulence/='none') then
        call alloc(mu_t, -2,imx+2, -2,jmx+2, -2,kmx+2)


        select case (trim(scheme%turbulence))

          case ('none', 'sa', 'saBC', 'kkl')
            !do nothing
            continue

          case ('sst', 'sst2003')
            !-- sst blending funciton F1 --!
            call alloc(sst_F1, -2,imx+2, -2,jmx+2, -2,kmx+2)
            sst_F1=0.
            !-- sst blnding function setup compete--!

          case DEFAULT 
            Fatal_error

        end select
      end if
      ! --- end turbulent viscosity setup ---!

    end subroutine setup_viscosity