21 integer(kind=kint) :: k, icel, ic_type, isect, isuf, iamp, nn, is, j
22 real(kind=kreal) :: ctime, dtime, qq, val, asect, thick, vol
25 type(hecmwst_matrix) :: hecMAT
26 type(hecmwst_local_mesh) :: hecMESH
27 real(kind=kreal) :: xx(20), yy(20), zz(20)
28 real(kind=kreal) :: vect(20)
29 integer(kind=kint) :: ig0, ig, iS0, iE0, nodLocal(20)
30 real(kind=kreal),
allocatable :: bbak(:)
37 do k = 1, fstrheat%Q_SUF_tot
39 icel = fstrheat%Q_SUF_elem(k)
40 ic_type = hecmesh%elem_type(icel)
41 if( ic_type == 761 ) ic_type = 731
42 if( ic_type == 781 ) ic_type = 741
43 isect = hecmesh%section_ID(icel)
44 isuf = fstrheat%Q_SUF_surf(k)
45 iamp = fstrheat%Q_SUF_ampl(k)
47 if( fstrsolid%elements(icel)%elemact_flag == kelact_inactive ) cycle
50 val = fstrheat%Q_SUF_val (k) * qq
51 if( dabs(val) < 1.d-16 ) cycle
53 nn = hecmw_get_max_node(ic_type)
55 is = hecmesh%elem_node_index(icel-1)
57 nodlocal(j) = hecmesh%elem_node_item(is+j)
58 xx(j) = hecmesh%node( 3*nodlocal(j)-2 )
59 yy(j) = hecmesh%node( 3*nodlocal(j)-1 )
60 zz(j) = hecmesh%node( 3*nodlocal(j) )
63 if ( ic_type.eq.111 )
then
64 is = hecmesh%section%sect_R_index(isect)
65 asect = hecmesh%section%sect_R_item(is)
68 elseif( ic_type.eq.231 )
then
69 is = hecmesh%section%sect_R_index(isect)
70 thick = hecmesh%section%sect_R_item(is)
73 elseif( ic_type.eq.232 )
then
74 is = hecmesh%section%sect_R_index(isect)
75 thick = hecmesh%section%sect_R_item(is)
78 elseif( ic_type.eq.241 )
then
79 is = hecmesh%section%sect_R_index(isect)
80 thick = hecmesh%section%sect_R_item(is)
83 elseif( ic_type.eq.242 )
then
84 is = hecmesh%section%sect_R_index(isect)
85 thick = hecmesh%section%sect_R_item(is)
88 elseif( ic_type.eq.341 )
then
91 elseif( ic_type.eq.342 )
then
94 elseif( ic_type.eq.351 )
then
97 elseif( ic_type.eq.352 )
then
100 elseif( ic_type.eq.361 )
then
103 elseif( ic_type.eq.362 )
then
106 elseif( ic_type.eq.731 )
then
107 is = hecmesh%section%sect_R_index(isect)
108 thick = hecmesh%section%sect_R_item(is)
111 elseif( ic_type.eq.741 )
then
112 is = hecmesh%section%sect_R_index(isect)
113 thick = hecmesh%section%sect_R_item(is)
120 hecmat%B( nodlocal(j) ) = hecmat%B( nodlocal(j) ) - vect(j)
126 if( fstrheat%WL_tot>0 )
then
127 allocate( bbak(
size(hecmat%B)) )
129 do ig0 = 1, fstrheat%WL_tot
130 ig = fstrheat%weldline(ig0)%egrpid
131 is0= hecmesh%elem_group%grp_index(ig-1) + 1
132 ie0= hecmesh%elem_group%grp_index(ig )
135 icel = hecmesh%elem_group%grp_item(k)
136 ic_type = hecmesh%elem_type(icel)
137 isect = hecmesh%section_ID(icel)
140 nn = hecmw_get_max_node(ic_type)
141 is = hecmesh%elem_node_index(icel-1)
143 nodlocal(j) = hecmesh%elem_node_item(is+j)
144 xx(j) = hecmesh%node( 3*nodlocal(j)-2 )
145 yy(j) = hecmesh%node( 3*nodlocal(j)-1 )
146 zz(j) = hecmesh%node( 3*nodlocal(j) )
149 if( .not.
isweldactive(nn, xx,yy,zz, fstrheat%weldline(ig0), ctime-0.5d0*dtime) ) cycle
151 vol = vol +
volume_c3(ic_type,nn,xx,yy,zz)
152 val = fstrheat%weldline(ig0)%I * fstrheat%weldline(ig0)%U * &
153 fstrheat%weldline(ig0)%coe
154 write(
idbg,*)
"Element", hecmesh%global_elem_id(icel),
"with dflux", val, vol
156 if( ic_type.eq.341 )
then
159 elseif( ic_type.eq.342 )
then
162 elseif( ic_type.eq.351 )
then
165 elseif( ic_type.eq.352 )
then
168 elseif( ic_type.eq.361 )
then
171 elseif( ic_type.eq.362 )
then
176 write(*,*)
'###ERROR### : Element type not supported for heat analysis'
177 write(*,*)
' ic_type = ', ic_type
178 call hecmw_abort(hecmw_comm_get_comm())
183 bbak( nodlocal(j) ) = bbak( nodlocal(j) ) - vect(j)
189 hecmat%B = hecmat%B + bbak
199 integer,
intent(in) :: nn
200 real(kind=kreal),
intent(in) :: xx(:), yy(:), zz(:)
202 real(kind=kreal),
intent(in) :: ctime
205 real(kind=kreal) :: cpos, wpos, tend
208 tend = weldline%tstart+ (weldline%n2-weldline%n1)/weldline%v
209 if( ctime<weldline%tstart .or. ctime>tend )
return
212 if( weldline%xyz==1 )
then
214 elseif( weldline%xyz==2 )
then
221 wpos = weldline%n1 + weldline%v*(ctime-weldline%tstart)
222 if( dabs(cpos-wpos)<weldline%distol )
isweldactive = .true.
This module defines common data and basic structures for analysis.
integer(kind=kint), parameter idbg
This module provide a function to get amplitude definition.
subroutine heat_get_amplitude(fstrHEAT, id, TT, QQ, OutOfRange)
This module provides subroutines for calculating distributed heat flux for various elements.
subroutine heat_dflux_351(NN, XX, YY, ZZ, LTYPE, val, VECT)
subroutine heat_dflux_341(NN, XX, YY, ZZ, LTYPE, val, VECT)
subroutine heat_dflux_352(NN, XX, YY, ZZ, LTYPE, val, VECT)
subroutine heat_dflux_241(NN, XX, YY, THICK, LTYPE, val, VECT)
subroutine heat_dflux_242(NN, XX, YY, THICK, LTYPE, val, VECT)
subroutine heat_dflux_231(NN, XX, YY, ZZ, THICK, LTYPE, val, VECT)
subroutine heat_dflux_741(NN, XX, YY, ZZ, THICK, LTYPE, val, VECT)
subroutine heat_dflux_111(NN, XX, YY, ZZ, ASECT, LTYPE, val, VECT)
subroutine heat_dflux_232(NN, XX, YY, THICK, LTYPE, val, VECT)
subroutine heat_dflux_342(NN, XX, YY, ZZ, LTYPE, val, VECT)
subroutine heat_dflux_731(NN, XX, YY, ZZ, THICK, LTYPE, val, VECT)
subroutine heat_dflux_362(NN, XX, YY, ZZ, LTYPE, val, VECT)
subroutine heat_dflux_361(NN, XX, YY, ZZ, LTYPE, val, VECT)
This module provides a subroutine for setting distributed heat flux boundary conditions.
subroutine heat_mat_ass_bc_dflux(hecMESH, hecMAT, fstrSOLID, fstrHEAT, CTIME, DTIME)
logical function isweldactive(nn, xx, yy, zz, weldline, ctime)
This module provides common functions of Solid elements.
real(kind=kreal) function volume_c3(etype, nn, XX, YY, ZZ)
Volume of element.
Data for HEAT ANSLYSIS (fstrHEAT)
-1:not relation, >1:index of coupled_node