mesh2Ds_FS_port_comm Subroutine

public subroutine mesh2Ds_FS_port_comm(me)

Arguments

Type IntentOptional Attributes Name
type(mesh2D_t), intent(inout) :: me

Calls

proc~~mesh2ds_fs_port_comm~~CallsGraph proc~mesh2ds_fs_port_comm mesh2Ds_FS_port_comm proc~material_heat_capacity material_t%material_heat_capacity proc~mesh2ds_fs_port_comm->proc~material_heat_capacity proc~material_heat_capacity_der material_t%material_heat_capacity_der proc~mesh2ds_fs_port_comm->proc~material_heat_capacity_der proc~material_thermal_conductivity material_t%material_thermal_conductivity proc~mesh2ds_fs_port_comm->proc~material_thermal_conductivity proc~material_thermal_conductivity_der material_t%material_thermal_conductivity_der proc~mesh2ds_fs_port_comm->proc~material_thermal_conductivity_der

Called by

proc~~mesh2ds_fs_port_comm~~CalledByGraph proc~mesh2ds_fs_port_comm mesh2Ds_FS_port_comm proc~main_loop main_loop proc~main_loop->proc~mesh2ds_fs_port_comm program~reims_p reims_p program~reims_p->proc~main_loop

Source Code

subroutine mesh2Ds_FS_port_comm(me)
  type(mesh2D_t), intent(inout) :: me

  integer :: ii,nb_e,idx_prev,elem, i
  real(dp) :: cp, ro, dcpdT, lambdS, DerlambdS

  if(me%M2D_Prop%Nb_labelCh>0) then
    idx_prev=0
    do ii=1,me%M2D_Prop%Nb_labelCh
      do nb_e=1,me%label%Ch_Arr(ii)%NbElem
        elem=me%label%Ch_Arr(ii)%array(nb_e)
        me%M2D_Prop%thermP(idx_prev+nb_e)%p%TempS=me%StVar%temp(elem)
        do i = 1, size(me%label%regionArr)
            if(trim(me%M2D_Prop%elem(elem)%PhysE)==trim(me%label%regionArr(i)%id)) then
                cp=me%label%regionArr(i)%mat%heat_capacity(me%StVar%temp(elem))
                dcpdT=me%label%regionArr(i)%mat%heat_capacity_der(me%StVar%temp(elem))
                ro=me%label%regionArr(i)%mat%density
                lambdS = me%label%regionArr(i)%mat%thermal_conductivity(me%StVar%temp(elem))
                DerlambdS = me%label%regionArr(i)%mat%thermal_conductivity_der(me%StVar%temp(elem))
                exit
            endif
        enddo
        me%M2D_Prop%thermP(idx_prev+nb_e)%p%cpS        = cp
        me%M2D_Prop%thermP(idx_prev+nb_e)%p%dcpSdT     = dcpdT
        me%M2D_Prop%thermP(idx_prev+nb_e)%p%lambdS     = lambdS
        me%M2D_Prop%thermP(idx_prev+nb_e)%p%DerlambdS  = DerlambdS
        me%M2D_Prop%thermP(idx_prev+nb_e)%p%rhoS       = ro
        me%M2D_Prop%thermP(idx_prev+nb_e)%p%Dist4Grad  = me%M2D_Prop%elem(elem)%Delta(3) ! 3 forced here because 2 direct neighbors expected per 2D cell - Check is done during preprocessing
        me%M2D_Prop%thermP(idx_prev+nb_e)%p%LengthCont = me%M2D_Prop%elem(elem)%face(3)  ! 3 forced here because 2 direct neighbors expected per 2D cell - Check is done during preprocessing
        me%M2D_Prop%thermP(idx_prev+nb_e)%p%SurfS      = me%M2D_Prop%elem(elem)%surface
      enddo
      idx_prev=idx_prev+me%label%Ch_Arr(ii)%NbElem
    enddo
  endif
  
end subroutine mesh2Ds_FS_port_comm