28 SUBROUTINE heatload_hex(Q_ex, numnp, InterfaceHeatFlux, InterfaceNumElems, InterfaceNumNodes, &
29 interfaceelemconn, mapnode, lwrbnd, uppbnd, coor)
33 INTEGER :: lwrbnd,uppbnd
35 INTEGER :: interfacenumelems,interfacenumnodes
36 INTEGER,
DIMENSION(1:UppBnd,1:InterfaceNumElems) :: interfaceelemconn
37 INTEGER,
DIMENSION(1:InterfaceNumNodes) :: mapnode
38 REAL*8,
DIMENSION(1:InterfaceNumElems) :: interfaceheatflux
42 REAL*8,
DIMENSION(1:numnp) :: q_ex
47 INTEGER,
DIMENSION(1:4) :: conn2d
52 REAL*8,
DIMENSION(1:3,1:numnp) :: coor
54 REAL*8,
DIMENSION(1:3) :: veca, vecb, outwd_surface_normal, &
55 half_normal_veca, half_normal_vecb
57 DO i = 1, interfacenumelems
61 conn2d(1:4) = interfaceelemconn(1:4,
i)
68 veca(1:3) = coor(1:3,mapnode(conn2d(2)))- coor(1:3,mapnode(conn2d(1)))
70 vecb(1:3) = coor(1:3,mapnode(conn2d(4)))- coor(1:3,mapnode(conn2d(1)))
74 half_normal_veca(1) = veca(2)*vecb(3) - vecb(2)*veca(3)
75 half_normal_veca(2) = veca(3)*vecb(1) - vecb(3)*veca(1)
76 half_normal_veca(3) = veca(1)*vecb(2) - vecb(1)*veca(2)
79 veca(1:3) = coor(1:3,mapnode(conn2d(4))) - coor(1:3,mapnode(conn2d(3)))
81 vecb(1:3) = coor(1:3,mapnode(conn2d(2))) - coor(1:3,mapnode(conn2d(3)))
85 half_normal_vecb(1) = veca(2)*vecb(3) - vecb(2)*veca(3)
86 half_normal_vecb(2) = veca(3)*vecb(1) - vecb(3)*veca(1)
87 half_normal_vecb(3) = veca(1)*vecb(2) - vecb(1)*veca(2)
92 outwd_surface_normal = half_normal_veca + half_normal_vecb
97 elemarea = elemarea + outwd_surface_normal(
j) * outwd_surface_normal(
j)
99 elemarea =
sqrt(elemarea) * 0.50d0
104 qmag = interfaceheatflux(
i)*0.250d0
105 qmag = qmag * elemarea
111 conn2d(1:4) = interfaceelemconn(lwrbnd:uppbnd,
i)
116 q_ex(mapnode(conn2d(
j))) = q_ex(mapnode(conn2d(
j))) + qmag
subroutine heatload_hex(Q_ex, numnp, InterfaceHeatFlux, InterfaceNumElems, InterfaceNumNodes, InterfaceElemConn, MapNode, LwrBnd, UppBnd, coor)