14 type(hecmwst_matrix) :: hecMAT
15 type(hecmwst_local_mesh) :: hecMESH
16 integer(kind=kint) :: i, in, j, nodLOCAL(20), ip, inod
17 integer(kind=kint) :: itype, iS, iE, ic_type, icel, isect, IMAT, in0, nn
18 real(kind=kreal) :: temp(20), lumped(120), mass(20*6, 20*6), ecoord(3,20)
19 real(kind=kreal) :: delta_time, surf, thick, alfa, beta
23 do itype = 1, hecmesh%n_elem_type
24 is = hecmesh%elem_type_index(itype-1) + 1
25 ie = hecmesh%elem_type_index(itype )
26 ic_type = hecmesh%elem_type_item(itype)
28 if (hecmw_is_etype_link(ic_type)) cycle
29 if (hecmw_is_etype_patch(ic_type)) cycle
30 if(ic_type == 3414) cycle
37 isect = hecmesh%section_ID(icel)
38 imat = hecmesh%section%sect_mat_ID_item(isect)
39 in0 = hecmesh%elem_node_index(icel-1)
40 nn = hecmw_get_max_node(ic_type)
42 nodlocal(i) = hecmesh%elem_node_item(in0+i)
44 ecoord(j,i) = hecmesh%node(3*(nodlocal(i)-1)+j)
46 temp(i) = fstrheat%TEMP0(nodlocal(i))
50 if(ic_type == 231 .or. ic_type == 232 .or. ic_type == 241 .or. ic_type == 242)
then
51 in = hecmesh%section%sect_R_index(isect)
52 thick = hecmesh%section%sect_R_item(in)
53 call heat_capacity_c2(ic_type, nn, ecoord(1:2,1:nn), temp, imat, thick, lumped, mass, &
54 fstrheat%CPtab(imat), fstrheat%CPtemp(imat,:), fstrheat%CPfuncA(imat,:) ,fstrheat%CPfuncB(imat,:), &
55 fstrheat%RHOtab(imat), fstrheat%RHOtemp(imat,:), fstrheat%RHOfuncA(imat,:), fstrheat%RHOfuncB(imat,:))
57 elseif(ic_type == 341 .or. ic_type == 342 .or. ic_type == 351 .or. ic_type == 352 .or. &
58 & ic_type == 361 .or. ic_type == 362)
then
59 call heat_capacity_c3(ic_type, nn, ecoord(1:3,1:nn), temp, imat, lumped, mass, &
60 fstrheat%CPtab(imat), fstrheat%CPtemp(imat,:), fstrheat%CPfuncA(imat,:) ,fstrheat%CPfuncB(imat,:), &
61 fstrheat%RHOtab(imat), fstrheat%RHOtemp(imat,:), fstrheat%RHOfuncA(imat,:), fstrheat%RHOfuncB(imat,:))
63 elseif (ic_type == 541)
then
66 elseif(ic_type == 731)
then
67 in = hecmesh%section%sect_R_index(isect)
68 thick = hecmesh%section%sect_R_item(in)
70 fstrheat%CPtab(imat), fstrheat%CPtemp(imat,:), fstrheat%CPfuncA(imat,:) ,fstrheat%CPfuncB(imat,:), &
71 fstrheat%RHOtab(imat), fstrheat%RHOtemp(imat,:), fstrheat%RHOfuncA(imat,:), fstrheat%RHOfuncB(imat,:))
73 elseif(ic_type == 741)
then
74 in = hecmesh%section%sect_R_index(isect)
75 thick = hecmesh%section%sect_R_item(in)
77 fstrheat%CPtab(imat), fstrheat%CPtemp(imat,:), fstrheat%CPfuncA(imat,:) ,fstrheat%CPfuncB(imat,:), &
78 fstrheat%RHOtab(imat), fstrheat%RHOtemp(imat,:), fstrheat%RHOfuncA(imat,:), fstrheat%RHOfuncB(imat,:))
80 elseif(ic_type == 111 .or. ic_type == 301 .or. ic_type == 611 .or. ic_type == 641)
then
81 in = hecmesh%section%sect_R_index(isect)
82 surf = hecmesh%section%sect_R_item(in)
83 call heat_capacity_c1(ic_type, nn, ecoord(1:3,1:nn), temp, imat, surf, lumped, mass, &
84 fstrheat%CPtab(imat), fstrheat%CPtemp(imat,:), fstrheat%CPfuncA(imat,:) ,fstrheat%CPfuncB(imat,:), &
85 fstrheat%RHOtab(imat), fstrheat%RHOtemp(imat,:), fstrheat%RHOfuncA(imat,:), fstrheat%RHOfuncB(imat,:))
88 write(*,*)
"** error setMASS"
94 hecmat%D(inod) = hecmat%D(inod) + lumped(ip) / delta_time
96 hecmat%B(inod) = hecmat%B(inod) + lumped(ip)*temp(ip) / delta_time