Call to all viscous flux subroutine based on the drection and turbulence/transition model being used
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
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