Subroutine to apply a roughness table to a surface for a multiscale problem
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(MS_FE_FILM), | intent(inout) | :: | ms_fe_f | |||
real(kind=R8), | intent(in), | dimension(:,:) | :: | tab_s |
subroutine apply_roughness_MS(ms_fe_f, tab_s)
implicit none
type(MS_FE_FILM), intent(inout) :: ms_fe_f
real(kind=R8), intent(in ), dimension(:,:) :: tab_s
real(kind=R8) :: xp, yp
integer(kind=I4) :: k, i, j, e
do k = 1, ms_fe_f%ts_fe_f%m%n
xp = ms_fe_f%ts_fe_f%m%x(k)
yp = ms_fe_f%ts_fe_f%m%y(k)
i = int((ms_fe_f%ts_fe_f%m%nx - 1) * xp / ms_fe_f%ts_fe_f%m%lx) + 1
j = int((ms_fe_f%ts_fe_f%m%ny - 1) * yp / ms_fe_f%ts_fe_f%m%ly) + 1
ms_fe_f%ts_fe_f%vn(k, H2_N) = ms_fe_f%ts_fe_f%data_f%h_0 - tab_s(i, j)
enddo
ms_fe_f%ts_fe_f%vn(:, H_N) = ms_fe_f%ts_fe_f%vn(:, H2_N) - ms_fe_f%ts_fe_f%vn(:, H1_N)
do e = 1, ms_fe_f%ts_fe_f%m%ne
call apply_roughness(ms_fe_f%bs_fe_f(e), tab_s)
enddo
return
endsubroutine apply_roughness_ms