Allocate and pointer for molecular and turbulent viscosity
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 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