compute_corner_fluxes Subroutine

public subroutine compute_corner_fluxes(fe_f, mat, bf)


Arguments

Type IntentOptional AttributesName
type(FE_FILM), intent(inout) :: fe_f

FE film

type(MAT_SOLV), intent(inout) :: mat

solver type matrices

real(kind=R8), intent(out), dimension(MAX_NNC):: bf

table of fluxes at the corner


Calls

proc~~compute_corner_fluxes~~CallsGraph proc~compute_corner_fluxes compute_corner_fluxes proc~assembly_fe_film_reynolds assembly_FE_film_reynolds proc~compute_corner_fluxes->proc~assembly_fe_film_reynolds proc~elementary_assembly_fe_film_reynolds elementary_assembly_FE_film_reynolds proc~assembly_fe_film_reynolds->proc~elementary_assembly_fe_film_reynolds proc~assemble_in_mat_sol assemble_in_mat_sol proc~assembly_fe_film_reynolds->proc~assemble_in_mat_sol proc~compute_prc_tables_reynolds_supg compute_prc_tables_reynolds_supg proc~elementary_assembly_fe_film_reynolds->proc~compute_prc_tables_reynolds_supg proc~dj4 dj4 proc~compute_prc_tables_reynolds_supg->proc~dj4 proc~length_width_elem length_width_elem proc~compute_prc_tables_reynolds_supg->proc~length_width_elem proc~ni4_up_2d ni4_up_2d proc~compute_prc_tables_reynolds_supg->proc~ni4_up_2d proc~ni4_up_1d ni4_up_1d proc~ni4_up_2d->proc~ni4_up_1d

Called by

proc~~compute_corner_fluxes~~CalledByGraph proc~compute_corner_fluxes compute_corner_fluxes proc~elementary_full_domain_fe_film_reynolds elementary_full_domain_FE_film_reynolds proc~elementary_full_domain_fe_film_reynolds->proc~compute_corner_fluxes proc~solve_fe_prob solve_fe_prob proc~solve_fe_prob->proc~compute_corner_fluxes proc~test_rough_fe test_rough_fe proc~test_rough_fe->proc~solve_fe_prob proc~test_bearing_x_fe test_bearing_x_fe proc~test_bearing_x_fe->proc~solve_fe_prob proc~test_slider_fe test_slider_fe proc~test_slider_fe->proc~solve_fe_prob proc~test_pocket_fe test_pocket_fe proc~test_pocket_fe->proc~solve_fe_prob proc~test_bearing_y_fe test_bearing_y_fe proc~test_bearing_y_fe->proc~solve_fe_prob proc~run_test run_test proc~run_test->proc~test_rough_fe proc~run_test->proc~test_bearing_x_fe proc~run_test->proc~test_slider_fe proc~run_test->proc~test_pocket_fe proc~run_test->proc~test_bearing_y_fe program~main main program~main->proc~run_test

Contents

Source Code


Source Code

   subroutine compute_corner_fluxes(fe_f, mat, bf)
   implicit none
   type(FE_FILM),  intent(inout)                     :: fe_f      !! *FE film*
   type(MAT_SOLV), intent(inout)                     :: mat       !! *solver type matrices*
   real(kind=R8),  intent(out  ), dimension(MAX_NNC) :: bf        !! *table of fluxes at the corner*

      integer(kind=I4) :: ind2, ind1, ind, e, i
      real(kind=R8)    :: x1, x2, y1, y2, d, l

      ! calculation of the fluxes on the boundaries by assembly ass_c = no_bc
      call assembly_FE_film_reynolds(fe_f = fe_f,     & !
                                      mat = mat,      & !
                                    ass_c = NO_BC)      !

      ! projection of the fluxes on the corners
      ! loop on edges
      bf   = 0.0_R8
      ind1 = 1
      x1 = fe_f%m%x(fe_f%m%cor(1))
      y1 = fe_f%m%y(fe_f%m%cor(1))
      do e = fe_f%m%ned, 1, -1
         ind2 = ind1
         x2 = x1
         y2 = y1
         ind1 = e
         x1 = fe_f%m%x(fe_f%m%cor(e))
         y1 = fe_f%m%y(fe_f%m%cor(e))
         ! length of the edge
         l = ((x2 - x1)**2 + (y2 - y1) ** 2) ** 0.5_R8
         ! loop on all the nodes - 1 on the edge
         ! without -1, the corner contribution is counted two times
         do i = 1, fe_f%m%ed(e)%n - 1
            ind = fe_f%m%ed(e)%nm(i)
            ! distance to point 2
            d = ((x2 - fe_f%m%x(ind))**2 + (y2 - fe_f%m%y(ind)) ** 2) ** 0.5_R8
            d = d / l
            ! linear projection along the edge of the local flux
            bf(ind1) = bf(ind1) + d * mat%b(ind)
            bf(ind2) = bf(ind2) + (1._R8 - d) * mat%b(ind)
         enddo
      enddo
   return
   endsubroutine compute_corner_fluxes