Subroutine to create a FE_FILM
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(DATA_FILM), | intent(inout) | :: | data_f | data of the film |
||
type(NUM_PAR), | intent(in) | :: | num_p | numerical param for iterative solution |
||
type(FE_FILM), | intent(inout) | :: | fe_f | FE film data type |
subroutine create_rect_FE_film(data_f, num_p, fe_f)
implicit none
type(DATA_FILM), intent(inout) :: data_f !! *data of the film*
type(NUM_PAR), intent(in ) :: num_p !! *numerical param for iterative solution*
type(FE_FILM), intent(inout) :: fe_f !! *FE film data type*
! mesh creation
call create_rect_x_ymesh(fe_f%m)
! copy of data
fe_f%data_f = data_f
! allocation and initialisation of the variables and bc table
select case (fe_f%data_f%pb_type)
case(HD)
! nodal tables
fe_f%n_vn = 10
allocate (fe_f%vn(fe_f%m%n, fe_f%n_vn), fe_f%vn_name(fe_f%n_vn))
fe_f%vn_name(H1_N) = 'h1(m)'
fe_f%vn_name(H2_N) = 'h2(m)'
fe_f%vn_name(H_N) = 'h(m)'
fe_f%vn_name(P_N) = 'p(Pa)'
fe_f%vn_name(RHO_N) = 'rho(kg.m-3)'
fe_f%vn_name(T_N) = 'T(K)'
fe_f%vn_name(DRHODP_N) = 'drhodp(kg.m-3.Pa-1)'
fe_f%vn_name(MU_N) = 'mu(Pa.s)'
fe_f%vn_name(VX_N) = 'Vx(m.s-1)'
fe_f%vn_name(VY_N) = 'Vy(m.s-1)'
fe_f%vn = 0._R8
fe_f%vn(:, H2_N) = fe_f%data_f%h_0
fe_f%vn(:, H_N) = fe_f%vn(:, H2_N) - fe_f%vn(:, H1_N)
fe_f%vn(:, P_N) = fe_f%data_f%fl%p_0
fe_f%vn(:, RHO_N) = fe_f%data_f%fl%rho(fe_f%data_f%fl%p_0, fe_f%data_f%fl%T_0)
fe_f%vn(:, T_N) = fe_f%data_f%fl%T_0
fe_f%vn(:, MU_N) = fe_f%data_f%fl%mu_0
fe_f%vn(:, VX_N) = fe_f%data_f%v_x
fe_f%vn(:, VY_N) = fe_f%data_f%v_y
fe_f%vn(:, DRHODP_N) = fe_f%data_f%fl%drhodp(fe_f%data_f%fl%p_0, fe_f%data_f%fl%T_0)
! bondary condition table
allocate (fe_f%bc(fe_f%m%n, 1))
! all the nodes are initialized as unknown
fe_f%bc = 1
! cell variable
fe_f%n_vc = 3
allocate (fe_f%vc(fe_f%m%ne, fe_f%n_vc), fe_f%vc_name(fe_f%n_vc))
fe_f%vc_name(HG_C) = 'h_grv(m)'
fe_f%vc_name(PEK_C) = 'Pek'
fe_f%vc_name(PEE_C) = 'Pee'
fe_f%vc = 0._R8
! numerical parameters for iterative problems
fe_f%num_p = num_p
case default
stop 'the problem type is undefined in create_rect_FE_film'
endselect
return
endsubroutine create_rect_FE_film