26 integer(kind=kint) :: cstep
27 real(kind=kreal) :: t_curr
28 type(hecmwst_matrix) :: hecmat
29 type(hecmwst_local_mesh) :: hecMESH
34 real(kind=kreal) :: xx(20), yy(20), zz(20)
35 real(kind=kreal) :: params(0:6)
36 real(kind=kreal) :: vect(60)
37 integer(kind=kint) :: iwk(60)
38 integer(kind=kint) :: nodLocal(20)
39 real(kind=kreal) :: tt(20), tt0(20), coords(3,3)
40 real(kind=kreal),
pointer:: temp(:)
41 integer(kind=kint) :: ndof, ig0, ig, ityp, ltype, iS0, iE0, ik, in, i, j, grpid
42 integer(kind=kint) :: icel, ic_type, nn, is, isect, id, iset, nsize
43 integer(kind=kint) :: itype, iE, cdsys_ID
44 real(kind=kreal) :: val, rho, thick, pa1
47 integer(kind=kint) :: flag_u
48 integer(kind=kint),
optional :: iter
49 real(kind=kreal) :: f_t, t_t
51 integer(kind=kint) :: iiS, idofS, idofE
52 real(kind=kreal) :: ecoord(3, 20)
53 real(kind=kreal) :: v(6, 20), dv(6, 20), r(6*20)
54 real(kind=kreal) :: rhs
55 real(kind=kreal) :: unode_tmp(hecmat%NDOF*hecmesh%n_node)
58 integer(kind=kint) :: n_rot, rid, n_nodes, idof
60 real(kind=kreal) :: tval, normal(3), ccoord(3), cdisp(3), cdiff(3)
63 call hecmw_mat_clear_b( hecmat )
66 if( fstrsolid%elemact%ELEMACT_egrp_tot > 0 )
then
67 t_t = fstrdynamic%t_curr
68 if( fstrdynamic%idx_eqa == 11 ) t_t = t_t - fstrdynamic%t_delta
75 n_rot = fstrsolid%CLOAD_ngrp_rot
78 do ig0 = 1, fstrsolid%CLOAD_ngrp_tot
79 grpid = fstrsolid%CLOAD_ngrp_GRPID(ig0)
82 ig = fstrsolid%CLOAD_ngrp_ID(ig0)
83 ityp = fstrsolid%CLOAD_ngrp_DOF(ig0)
84 val = fstrsolid%CLOAD_ngrp_val(ig0)
89 is0= hecmesh%node_group%grp_index(ig-1)+1
90 ie0= hecmesh%node_group%grp_index(ig )
92 if( fstrsolid%CLOAD_ngrp_rotID(ig0) > 0 )
then
93 rid = fstrsolid%CLOAD_ngrp_rotID(ig0)
94 if( .not. rinfo%conds(rid)%active )
then
95 rinfo%conds(rid)%active = .true.
96 rinfo%conds(rid)%center_ngrp_id = fstrsolid%CLOAD_ngrp_centerID(ig0)
97 rinfo%conds(rid)%torque_ngrp_id = ig
99 if( ityp>ndof ) ityp = ityp-ndof
100 rinfo%conds(rid)%vec(ityp) = val
105 in = hecmesh%node_group%grp_item(ik)
106 hecmat%B( ndof*(in-1)+ityp ) = hecmat%B( ndof*(in-1)+ityp )+val
112 if( .not. rinfo%conds(rid)%active ) cycle
114 n_nodes = hecmw_ngrp_get_number(hecmesh, rinfo%conds(rid)%torque_ngrp_id)
117 ig = rinfo%conds(rid)%center_ngrp_id
119 ccoord(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, hecmesh%node)
120 cdisp(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, fstrsolid%unode)
122 ccoord(1:ndof) = ccoord(1:ndof) + cdisp(1:ndof)
124 tval = dsqrt(dot_product(rinfo%conds(rid)%vec(1:ndof),rinfo%conds(rid)%vec(1:ndof)))
125 if( tval < 1.d-16 )
then
126 write(*,*)
'###ERROR### : norm of torque vector must be > 0.0'
127 call hecmw_abort( hecmw_comm_get_comm() )
129 normal(1:ndof) = rinfo%conds(rid)%vec(1:ndof)/tval
130 tval = tval/dble(n_nodes)
132 ig = rinfo%conds(rid)%torque_ngrp_id
133 is0 = hecmesh%node_group%grp_index(ig-1) + 1
134 ie0 = hecmesh%node_group%grp_index(ig )
136 in = hecmesh%node_group%grp_item(ik)
137 cdiff(1:ndof) = hecmesh%node(ndof*(in-1)+1:ndof*in)+fstrsolid%unode(ndof*(in-1)+1:ndof*in)-ccoord(1:ndof)
139 val = dot_product(vect(1:ndof),vect(1:ndof))
140 if( val < 1.d-16 )
then
141 write(*,*)
'###ERROR### : torque node is at the same position as that of center node in rotational surface.'
142 call hecmw_abort( hecmw_comm_get_comm() )
144 vect(1:ndof) = (tval/val)*vect(1:ndof)
145 hecmat%B(ndof*(in-1)+1:ndof*in) = hecmat%B(ndof*(in-1)+1:ndof*in)+vect(1:ndof)
153 do ig0 = 1, fstrsolid%DLOAD_ngrp_tot
154 ig = fstrsolid%DLOAD_ngrp_ID(ig0)
155 ltype = fstrsolid%DLOAD_ngrp_LID(ig0)
157 params(i) = fstrsolid%DLOAD_ngrp_params(i,ig0)
160 fg_surf = (ltype == 100)
162 is0 = hecmesh%surf_group%grp_index(ig-1) + 1
163 ie0 = hecmesh%surf_group%grp_index(ig )
165 is0 = hecmesh%elem_group%grp_index(ig-1) + 1
166 ie0 = hecmesh%elem_group%grp_index(ig )
171 ltype = hecmesh%surf_group%grp_item(2*ik)*10
172 icel = hecmesh%surf_group%grp_item(2*ik-1)
173 ic_type = hecmesh%elem_type(icel)
175 icel = hecmesh%elem_group%grp_item(ik)
176 ic_type = hecmesh%elem_type(icel)
180 if( fstrsolid%elements(icel)%elemact_flag == kelact_inactive ) cycle
183 nn = hecmw_get_max_node(ic_type)
185 is = hecmesh%elem_node_index(icel-1)
187 nodlocal(j) = hecmesh%elem_node_item (is+j)
189 xx(j) = hecmesh%node( 3*nodlocal(j)-2 )
190 yy(j) = hecmesh%node( 3*nodlocal(j)-1 )
191 zz(j) = hecmesh%node( 3*nodlocal(j) )
194 iwk(ndof*(j-1)+i) = ndof*(nodlocal(j)-1)+i
198 isect = hecmesh%section_ID(icel)
200 rho = fstrsolid%elements(icel)%gausses(1)%pMaterial%variables(m_density)
205 id = hecmesh%section%sect_opt(isect)
208 elseif( id == 1 )
then
210 elseif( id == 2 )
then
217 if( ic_type == 241 .or.ic_type == 242 .or. ic_type == 231 .or. ic_type == 232 )
then
218 call dl_c2(ic_type,nn,xx(1:nn),yy(1:nn),rho,pa1,ltype,params,vect(1:nn*ndof),nsize,iset)
220 elseif( ic_type == 341 .or. ic_type == 351 .or. ic_type == 361 .or. &
221 ic_type == 342 .or. ic_type == 352 .or. ic_type == 362 )
then
222 call dl_c3(ic_type,nn,xx(1:nn),yy(1:nn),zz(1:nn),rho,ltype,params,vect(1:nn*ndof),nsize)
224 elseif( ( ic_type == 741 ) .or. ( ic_type == 743 ) .or. ( ic_type == 731 ) )
then
225 call dl_shell(ic_type, nn, ndof, xx, yy, zz, rho, thick, ltype, params, vect, nsize, fstrsolid%elements(icel)%gausses)
226 elseif( ( ic_type==761 ) )
then
227 call dl_shell_33(ic_type, nn, ndof, xx, yy, zz, rho, thick, ltype, params, vect, nsize, &
228 fstrsolid%elements(icel)%gausses)
229 elseif( ( ic_type==781 ) )
then
230 call dl_shell_33(ic_type, nn, ndof, xx, yy, zz, rho, thick, ltype, params, vect, nsize, &
231 fstrsolid%elements(icel)%gausses)
243 if (dabs(params(0)) > 1.d-30)
then
244 f_t = f_t / params(0)
249 vect(j) = vect(j)*f_t
254 hecmat%B( iwk(j) )=hecmat%B( iwk(j) )+vect(j)
259 if (
present(iter) )
then
261 do i = 1, ndof*hecmesh%n_node
262 unode_tmp(i) = fstrsolid%unode(i)
265 do ig0 = 1, fstrsolid%BOUNDARY_ngrp_tot
266 ig = fstrsolid%BOUNDARY_ngrp_ID(ig0)
267 rhs = fstrsolid%BOUNDARY_ngrp_val(ig0)
268 ityp = fstrsolid%BOUNDARY_ngrp_type(ig0)
270 idofe = ityp-idofs*10
271 is0 = hecmesh%node_group%grp_index(ig-1) + 1
272 ie0 = hecmesh%node_group%grp_index(ig )
275 in = hecmesh%node_group%grp_item(ik)
276 do idof = idofs, idofe
277 unode_tmp( ndof*(in-1)+idof ) = rhs
282 do itype = 1, hecmesh%n_elem_type
283 ic_type = hecmesh%elem_type_item(itype)
284 if( ic_type == 3414 )
then
285 nn = hecmw_get_max_node(ic_type)
286 if( nn > 20 ) stop
"The number of elemental nodes > 20"
288 is = hecmesh%elem_type_index(itype-1)+1
289 ie = hecmesh%elem_type_index(itype )
291 if(fstrsolid%elements(icel)%gausses(1)%pMaterial%mtype /= incomp_newtonian)
then
292 write(*, *)
'###ERROR### : This element is not supported for this material'
293 write(*, *)
'ic_type = ', ic_type,
', mtype = ', fstrsolid%elements(icel)%gausses(1)%pMaterial%mtype
295 call hecmw_abort(hecmw_comm_get_comm())
300 iis = hecmesh%elem_node_index(icel-1)
302 nodlocal(j) = hecmesh%elem_node_item(iis+j)
305 ecoord(i,j) = hecmesh%node( 3*nodlocal(j)+i-3 )
307 v(i,j) = unode_tmp( ndof*nodlocal(j)+i-ndof )
308 fstrsolid%unode( ndof*nodlocal(j)+i-ndof ) = v(i,j)
310 dv(i,j) = fstrsolid%dunode( ndof*nodlocal(j)+i-ndof )
315 ( ic_type, nn, ecoord(:,1:nn), v(1:4,1:nn), dv(1:4,1:nn), &
316 r(1:nn*ndof), fstrsolid%elements(icel)%gausses(:), &
317 fstrdynamic%t_delta )
321 hecmat%B(ndof*(nodlocal(j)-1)+i) = hecmat%B(ndof*(nodlocal(j)-1)+i)+r(ndof*(j-1)+i)
329 do itype = 1, hecmesh%n_elem_type
330 ic_type = hecmesh%elem_type_item(itype)
331 if( ic_type == 3414 )
then
332 nn = hecmw_get_max_node(ic_type)
333 if( nn > 20 ) stop
"The number of elemental nodes > 20"
334 is = hecmesh%elem_type_index(itype-1)+1
335 ie = hecmesh%elem_type_index(itype )
337 iis = hecmesh%elem_node_index(icel-1)
339 nodlocal(j) = hecmesh%elem_node_item(iis+j)
343 hecmat%B(ndof*(nodlocal(j)-1)+i) = 0.0d0
357 if( fstrsolid%TEMP_ngrp_tot > 0 )
then
359 if( hecmesh%my_rank .eq. 0 )
then
360 write(
imsg,*)
'stop: THERMAL LOAD is not yet available in dynamic analysis!'
362 call hecmw_abort( hecmw_comm_get_comm())
364 allocate ( temp(hecmesh%n_node) )
366 do ig0= 1, fstrsolid%TEMP_ngrp_tot
367 ig= fstrsolid%TEMP_ngrp_ID(ig0)
368 val=fstrsolid%TEMP_ngrp_val(ig0)
370 is0= hecmesh%node_group%grp_index(ig-1) + 1
371 ie0= hecmesh%node_group%grp_index(ig )
373 in = hecmesh%node_group%grp_item(ik)
383 do itype = 1, hecmesh%n_elem_type
385 is = hecmesh%elem_type_index(itype-1)+1
386 ie = hecmesh%elem_type_index(itype )
387 ic_type = hecmesh%elem_type_item(itype)
388 if( hecmw_is_etype_link(ic_type) ) cycle
389 if( hecmw_is_etype_patch(ic_type) ) cycle
391 nn = hecmw_get_max_node(ic_type)
396 if( fstrsolid%elements(icel)%elemact_flag == kelact_inactive ) cycle
399 is= hecmesh%elem_node_index(icel-1)
401 nodlocal(j)=hecmesh%elem_node_item(is+j)
403 xx(j)=hecmesh%node(3*nodlocal(j)-2)
404 yy(j)=hecmesh%node(3*nodlocal(j)-1)
405 zz(j)=hecmesh%node(3*nodlocal(j) )
406 tt(j)=temp( nodlocal(j) )
407 tt0(j)=fstrparam%ref_temp
410 iwk(ndof*(j-1)+i)=ndof*(nodlocal(j)-1)+i
415 isect= hecmesh%section_ID(icel)
416 cdsys_id = fstrsolid%elements(icel)%gausses(1)%pMaterial%cdsys_ID
417 call get_coordsys( cdsys_id, hecmesh, fstrsolid, coords, icel )
420 if( ndof .eq. 2 )
then
421 id=hecmesh%section%sect_opt(isect)
424 elseif( id.eq.1)
then
426 elseif( id.eq.2)
then
433 if( ic_type == 241 .or. ic_type == 242 .or. ic_type == 231 .or. ic_type == 232 )
then
434 call tload_c2( ic_type, nn, xx(1:nn), yy(1:nn), tt(1:nn), tt0(1:nn), &
435 fstrsolid%elements(icel)%gausses,pa1,iset, vect(1:nn*2) )
437 elseif( ic_type == 361 )
then
438 if( fstrsolid%sections(isect)%elemopt361 ==
kel361fi )
then
440 ( ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), fstrparam%ref_temp, &
441 fstrsolid%elements(icel)%gausses, vect(1:nn*ndof), cdsys_id, coords )
442 else if( fstrsolid%sections(isect)%elemopt361 ==
kel361bbar )
then
443 call tload_c3d8bbar &
444 ( ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), fstrparam%ref_temp, &
445 fstrsolid%elements(icel)%gausses, vect(1:nn*ndof), cdsys_id, coords )
446 else if( fstrsolid%sections(isect)%elemopt361 ==
kel361ic )
then
448 ( ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), fstrparam%ref_temp, &
449 fstrsolid%elements(icel)%gausses, vect(1:nn*ndof), cdsys_id, coords )
450 else if( fstrsolid%sections(isect)%elemopt361 ==
kel361fbar )
then
451 call tload_c3d8fbar &
452 ( ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), fstrparam%ref_temp, &
453 fstrsolid%elements(icel)%gausses, vect(1:nn*ndof), cdsys_id, coords )
454 else if( fstrsolid%sections(isect)%elemopt361 ==
kel361up )
then
459 stop
"FROM361=UP: TLOAD is not supported"
462 elseif (ic_type == 341 .or. ic_type == 351 .or. &
463 ic_type == 342 .or. ic_type == 352 .or. ic_type == 362 )
then
465 ( ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), fstrparam%ref_temp, &
466 fstrsolid%elements(icel)%gausses, vect(1:nn*ndof), cdsys_id, coords )
468 elseif ( ic_type == 741 .or. ic_type == 743 .or. ic_type == 731 .or. &
469 ic_type == 641 .or. ic_type == 761 .or. ic_type == 781 )
then
471 write(
imsg,*)
'*------------------------', &
472 '-------------------*'
473 write(
imsg,*)
' Thermal loading option ', &
475 write(
imsg,*)
'*------------------------', &
476 '-------------------*'
477 call hecmw_abort( hecmw_comm_get_comm())
482 hecmat%B( iwk(j) ) = hecmat%B( iwk(j) )+vect(j)
This modules defines common structures for fem analysis.
subroutine fstr_rotinfo_init(n, rinfo)
subroutine fstr_rotinfo_finalize(rinfo)
This module contains function to set boundary condition of external load in dynamic analysis.
subroutine dynamic_mat_ass_load(cstep, t_curr, hecMESH, hecMAT, fstrSOLID, fstrDYNAMIC, fstrPARAM, iter)
This function sets boundary condition of external load.
This module provide a function to elemact elements.
subroutine fstr_update_elemact_solid(hecMESH, fstrSOLID, cstep, ctime)
This module provides the entry point for ELEMCHECK (pre-analysis input validation)
subroutine fstr_get_thickness(hecMESH, mid, thick)
This module defines common data and basic structures for analysis.
integer(kind=kint), parameter kel361bbar
integer(kind=kint) myrank
PARALLEL EXECUTION.
integer(kind=kint), parameter imsg
integer(kind=kint), parameter kel361up
logical function fstr_isloadactive(fstrSOLID, nbc, cstep)
integer(kind=kint), parameter kel361fi
subroutine get_coordsys(cdsys_ID, hecMESH, fstrSOLID, coords, icel)
This subroutine fetch coords defined by local coordinate system.
integer(kind=kint), parameter kel361ic
integer(kind=kint), parameter kel361fbar
This modules just summarizes all modules used in static analysis.
Amplitude evaluation for loading conditions in dynamic analysis.
subroutine fstr_get_amplitude_dyn(hecMESH, fstrSOLID, fstrDYNAMIC, ig0, t_curr, value, flag_u)
Evaluate the amplitude-scaled target value a(t) for dynamic analysis.
This module provides aux functions.
subroutine cross_product(v1, v2, vn)
Data for DYNAMIC ANSLYSIS (fstrDYNAMIC)
FSTR INNER CONTROL PARAMETERS (fstrPARAM)