FrontISTR  5.9.0
Large-scale structural analysis program with finit element method
heat_mat_ass_conductivity.f90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
2 ! Copyright (c) 2019 FrontISTR Commons
3 ! This software is released under the MIT License, see LICENSE.txt
4 !-------------------------------------------------------------------------------
6 contains
7 
8  subroutine heat_mat_ass_conductivity( hecMESH,hecMAT,fstrSOLID,fstrHEAT,beta )
9  use hecmw
10  use m_fstr
11  use m_heat_lib
12  use m_static_lib
13  implicit none
14  type(fstr_heat) :: fstrHEAT
15  type(hecmwst_matrix) :: hecMAT
16  type(fstr_solid) :: fstrSOLID
17  type(hecmwst_local_mesh) :: hecMESH
18  integer(kind=kint) :: itype, is, iE, ic_type, icel, isect, IMAT, ntab, itab, NDOF
19  integer(kind=kint) :: in0, nn, i, in, j, nodLOCAL(20), jsect, ic, ip, inod, jp, jnod, isU, ieU, ik, isL, ieL
20  real(kind=kreal) :: beta, tzero, alpha, temp(1000), funca(1000), funcb(1000), tt(20), t0(20), ss(400)
21  real(kind=kreal) :: asect, thick, gth, ghh, gr1, gr2
22  real(kind=kreal) :: lumped(20), stiff(20, 20), ecoord(3,20)
23  real(kind=kreal), allocatable :: s(:)
24 
25  ndof = hecmesh%n_dof
26  tzero = hecmesh%zero_temp
27  alpha = 1.0 - beta
28 
29  call hecmw_mat_clear(hecmat)
30  call hecmw_mat_clear_b(hecmat)
31 
32  do itype = 1, hecmesh%n_elem_type
33  is = hecmesh%elem_type_index(itype-1) + 1
34  ie = hecmesh%elem_type_index(itype )
35  ic_type= hecmesh%elem_type_item(itype)
36  ! 761/781 hold the rotational dummy nodes after the translational ones,
37  ! and heat analysis uses the translational part only
38  if( ic_type == 761 ) ic_type = 731
39  if( ic_type == 781 ) ic_type = 741
40  if (hecmw_is_etype_link(ic_type)) cycle
41  if (hecmw_is_etype_patch(ic_type)) cycle
42 
43  !$omp parallel default(none), &
44  !$omp& private(icel,isect,IMAT,ntab,itab,temp,funcA,funcB,in0,nn,i,j,nodLOCAL,SS,TT,GTH,GHH,GR1,GR2,ecoord,&
45  !$omp& stiff,in,ASECT,thick,jsect), &
46  !$omp& shared(iS,iE,hecMESH,fstrSOLID,ic_type,hecMAT,fstrHEAT,TZERO)
47  !$omp do
48  do icel = is, ie
49  if( fstrsolid%elements(icel)%elemact_flag == kelact_inactive ) cycle
50  isect = hecmesh%section_ID(icel)
51  imat = hecmesh%section%sect_mat_ID_item(isect)
52 
53  if( hecmesh%section%sect_type(isect) .ne. 4 ) then
54  ntab = fstrheat%CONDtab(imat)
55  do itab = 1, ntab
56  temp(itab) = fstrheat%CONDtemp (imat,itab)
57  funca(itab) = fstrheat%CONDfuncA(imat,itab)
58  funcb(itab) = fstrheat%CONDfuncB(imat,itab)
59  enddo
60  funca(ntab+1) = fstrheat%CONDfuncA(imat,ntab+1)
61  funcb(ntab+1) = fstrheat%CONDfuncB(imat,ntab+1)
62  endif
63 
64  in0 = hecmesh%elem_node_index(icel-1)
65  nn = hecmw_get_max_node(ic_type)
66  do i = 1, nn
67  nodlocal(i) = hecmesh%elem_node_item(in0+i)
68  tt(i) = fstrheat%TEMP ( nodlocal(i) )
69  !T0(i) = fstrHEAT%TEMP0( nodLOCAL(i) )
70  do j = 1, 3
71  ecoord(j,i) = hecmesh%node(3*(nodlocal(i)-1)+j)
72  enddo
73  enddo
74  do i = 1, nn*nn
75  ss(i) = 0.0
76  enddo
77 
78  if(ic_type == 111) then
79  in = hecmesh%section%sect_R_index(isect)
80  asect = hecmesh%section%sect_R_item(in)
81  call heat_conductivity_c1(ic_type, nn, ecoord(1:2,1:nn), tt, imat, asect, stiff, &
82  fstrheat%CONDtab(imat), fstrheat%CONDtemp(imat,:), fstrheat%CONDfuncA(imat,:) ,fstrheat%CONDfuncB(imat,:))
83 
84  elseif(ic_type == 231 .or. ic_type == 232 .or. ic_type == 241 .or. ic_type == 242)then
85  in = hecmesh%section%sect_R_index(isect)
86  thick = hecmesh%section%sect_R_item(in)
87  call heat_conductivity_c2(ic_type, nn, ecoord(1:2,1:nn), tt, imat, thick, stiff, &
88  fstrheat%CONDtab(imat), fstrheat%CONDtemp(imat,:), fstrheat%CONDfuncA(imat,:) ,fstrheat%CONDfuncB(imat,:))
89 
90  elseif(ic_type == 341 .or. ic_type == 342 .or. ic_type == 351 .or. ic_type == 352 .or. &
91  & ic_type == 361 .or. ic_type == 362)then
92  call heat_conductivity_c3(ic_type, nn, ecoord(1:3,1:nn), tt, imat, stiff, &
93  fstrheat%CONDtab(imat), fstrheat%CONDtemp(imat,:), fstrheat%CONDfuncA(imat,:) ,fstrheat%CONDfuncB(imat,:))
94 
95  elseif (ic_type == 541) then
96  jsect = hecmesh%section%sect_R_index(isect-1)+1
97  gth = hecmesh%section%sect_R_item(jsect)
98  ghh = hecmesh%section%sect_R_item(jsect+1)
99  gr1 = hecmesh%section%sect_R_item(jsect+2)
100  gr2 = hecmesh%section%sect_R_item(jsect+3)
101  call heat_conductivity_541(nn, ecoord, tt, tzero, gth, ghh, gr1, gr2, ss, stiff)
102 
103  elseif(ic_type == 731)then
104  nn = 4
105  nodlocal(nn) = hecmesh%elem_node_item(in0+nn-1)
106  in = hecmesh%section%sect_R_index(isect)
107  thick = hecmesh%section%sect_R_item(in)
108  ss = 0.0d0
109  call heat_conductivity_shell_731(ic_type, nn, ecoord(1:3,1:nn), tt, imat, thick, ss, stiff, &
110  fstrheat%CONDtab(imat), fstrheat%CONDtemp(imat,:), fstrheat%CONDfuncA(imat,:) ,fstrheat%CONDfuncB(imat,:))
111 
112  elseif(ic_type == 741)then
113  in = hecmesh%section%sect_R_index(isect)
114  thick = hecmesh%section%sect_R_item(in)
115  call heat_conductivity_shell_741(ic_type, nn, ecoord(1:3,1:nn), tt, imat, thick, ss, stiff, &
116  fstrheat%CONDtab(imat), fstrheat%CONDtemp(imat,:), fstrheat%CONDfuncA(imat,:) ,fstrheat%CONDfuncB(imat,:))
117 
118  else
119  !$omp critical
120  write(*,*)"** error setMASS"
121  !$omp end critical
122  endif
123 
124  if(ic_type == 541 .or. ic_type == 731 .or. ic_type == 741)then
125  stiff = 0.0d0
126  in = 1
127  do i = 1, nn
128  do j = 1, nn
129  stiff(j,i) = ss(in)
130  in = in + 1
131  enddo
132  enddo
133  endif
134 
135  call hecmw_mat_ass_elem(hecmat, nn, nodlocal, stiff)
136 
137  enddo
138  !$omp end do
139  !$omp end parallel
140  enddo
141 
142  allocate(s(hecmat%NP))
143  s = 0.0d0
144 
145  call hecmw_matvec(hecmesh, hecmat, fstrheat%TEMP0, s)
146 
147  hecmat%D = beta*hecmat%D
148  hecmat%AU = beta*hecmat%AU
149  hecmat%AL = beta*hecmat%AL
150  hecmat%B(1:hecmat%N) = hecmat%B(1:hecmat%N) - alpha*s(1:hecmat%N)
151 
152  deallocate(s)
153 
154  end subroutine heat_mat_ass_conductivity
Definition: hecmw.f90:6
This module defines common data and basic structures for analysis.
Definition: m_fstr.F90:15
This modules just summarizes all modules used in heat analysis.
Definition: heat_LIB.f90:6
subroutine heat_mat_ass_conductivity(hecMESH, hecMAT, fstrSOLID, fstrHEAT, beta)
This modules just summarizes all modules used in static analysis.
Definition: static_LIB.f90:6
Data for HEAT ANSLYSIS (fstrHEAT)
Definition: m_fstr.F90:463