compute_viscous_fluxes Subroutine

public subroutine compute_viscous_fluxes(F, G, H, qp, cells, Ifaces, Jfaces, Kfaces, scheme, flow, dims)

Call to all viscous flux subroutine based on the drection and turbulence/transition model being used

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(inout), dimension(:, :, :, :):: F
real(kind=wp), intent(inout), dimension(:, :, :, :):: G
real(kind=wp), intent(inout), dimension(:, :, :, :):: H
real(kind=wp), intent(in), dimension(-2:dims%imx+2, -2:dims%jmx+2, -2:dims%kmx+2, 1:dims%n_var):: qp
type(celltype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+2):: cells

Input cell quantities: volume

type(facetype), intent(in), dimension(-2:dims%imx+3,-2:dims%jmx+2,-2:dims%kmx+2):: Ifaces

Store face quantites for I faces

type(facetype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+3,-2:dims%kmx+2):: Jfaces

Store face quantites for J faces

type(facetype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+3):: Kfaces

Store face quantites for K faces

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~~compute_viscous_fluxes~~CallsGraph proc~compute_viscous_fluxes compute_viscous_fluxes proc~compute_viscous_fluxes_kkl compute_viscous_fluxes_kkl proc~compute_viscous_fluxes->proc~compute_viscous_fluxes_kkl proc~compute_viscous_fluxes_lctm2015 compute_viscous_fluxes_lctm2015 proc~compute_viscous_fluxes->proc~compute_viscous_fluxes_lctm2015 proc~compute_viscous_fluxes_laminar compute_viscous_fluxes_laminar proc~compute_viscous_fluxes->proc~compute_viscous_fluxes_laminar proc~compute_viscous_fluxes_sst compute_viscous_fluxes_sst proc~compute_viscous_fluxes->proc~compute_viscous_fluxes_sst proc~compute_viscous_fluxes_sa compute_viscous_fluxes_sa proc~compute_viscous_fluxes->proc~compute_viscous_fluxes_sa

Called by

proc~~compute_viscous_fluxes~~CalledByGraph proc~compute_viscous_fluxes compute_viscous_fluxes proc~get_total_conservative_residue get_total_conservative_Residue proc~get_total_conservative_residue->proc~compute_viscous_fluxes proc~get_next_solution get_next_solution proc~get_next_solution->proc~get_total_conservative_residue proc~iterate_one_more_time_step iterate_one_more_time_step proc~iterate_one_more_time_step->proc~get_next_solution program~main main program~main->proc~iterate_one_more_time_step

Contents


Source Code

    subroutine compute_viscous_fluxes(F, G, H, qp, cells, Ifaces, Jfaces, Kfaces, scheme, flow, dims)
      !< Call to all viscous flux subroutine based on 
      !< the drection and turbulence/transition model being
      !< used

        implicit none
        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
        real(wp), dimension(-2:dims%imx+2, -2:dims%jmx+2, -2:dims%kmx+2, 1:dims%n_var), intent(in) :: qp
        real(wp), dimension(:, :, :, :), intent(inout) :: F, G, H
        type(celltype), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+2), intent(in) :: cells
        !< Input cell quantities: volume
        type(facetype), dimension(-2:dims%imx+3,-2:dims%jmx+2,-2:dims%kmx+2), intent(in) :: Ifaces
        !< Store face quantites for I faces 
        type(facetype), dimension(-2:dims%imx+2,-2:dims%jmx+3,-2:dims%kmx+2), intent(in) :: Jfaces
        !< Store face quantites for J faces 
        type(facetype), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+3), intent(in) :: Kfaces
        !< Store face quantites for K faces 
        integer, dimension(3) :: flagsi=(/1,0,0/)
        integer, dimension(3) :: flagsj=(/0,1,0/)
        integer, dimension(3) :: flagsk=(/0,0,1/)

        imx = dims%imx
        jmx = dims%jmx
        kmx = dims%kmx

        call compute_viscous_fluxes_laminar(F, qp, cells, Ifaces, flagsi, scheme, flow, dims)
        call compute_viscous_fluxes_laminar(G, qp, cells, Jfaces, flagsj, scheme, flow, dims)
        call compute_viscous_fluxes_laminar(H, qp, cells, Kfaces, flagsk,scheme, flow, dims)
        
        select case(trim(scheme%turbulence))
          case('none')
            !do nothing
            continue

          case('sa', 'saBC')
            call compute_viscous_fluxes_sa(F, qp, cells, Ifaces, flagsi,dims)
            call compute_viscous_fluxes_sa(G, qp, cells, Jfaces, flagsj,dims)
            call compute_viscous_fluxes_sa(H, qp, cells, Kfaces, flagsk,dims)
          case('sst', 'sst2003')
            call compute_viscous_fluxes_sst(F, qp,cells,  Ifaces, flagsi,dims)
            call compute_viscous_fluxes_sst(G, qp,cells,  Jfaces, flagsj,dims)
            if(kmx==2)then
              continue
            else
              call compute_viscous_fluxes_sst(H, qp,cells, Kfaces, flagsk,dims)
            end if
          case('kkl')
            call compute_viscous_fluxes_kkl(F, qp,cells, Ifaces, flagsi,dims)
            call compute_viscous_fluxes_kkl(G, qp,cells, Jfaces, flagsj,dims)
            call compute_viscous_fluxes_kkl(H, qp,cells, Kfaces, flagsk,dims)
          case DEFAULT
            Fatal_error
        end select


        select case(trim(scheme%transition))
          case('lctm2015')
            call compute_viscous_fluxes_lctm2015(F, qp,cells, Ifaces, flagsi,dims)
            call compute_viscous_fluxes_lctm2015(G, qp,cells, Jfaces, flagsj,dims)
            if(kmx==2)then
              continue
            else
              call compute_viscous_fluxes_lctm2015(H, qp,cells, Kfaces, flagsk,dims)
            end if
          case('none', 'bc')
            !do nothing
            continue
          case DEFAULT
            Fatal_error
        end select


            if (any(isnan(G))) then
              Fatal_error
            end if
            if (any(isnan(F))) then
              Fatal_error
            end if
            if (any(isnan(H))) then
              Fatal_error
            end if

    end subroutine compute_viscous_fluxes