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
46 logical,
save :: isFirst = .true.
48 integer(kind=kint) :: flag_u, ierror
49 integer(kind=kint),
optional :: iter
50 real(kind=kreal) :: f_t, t_t
52 integer(kind=kint) :: iiS, idofS, idofE
53 real(kind=kreal) :: ecoord(3, 20)
54 real(kind=kreal) :: v(6, 20), dv(6, 20), r(6*20)
55 real(kind=kreal) :: rhs
56 real(kind=kreal) :: unode_tmp(hecmat%NDOF*hecmesh%n_node)
59 integer(kind=kint) :: n_rot, rid, n_nodes, idof
61 real(kind=kreal) :: tval, normal(3), direc(3), ccoord(3), cdisp(3), cdiff(3)
64 call hecmw_mat_clear_b( hecmat )
67 if( fstrsolid%elemact%ELEMACT_egrp_tot > 0 )
then
68 t_t = fstrdynamic%t_curr
69 if( fstrdynamic%idx_eqa == 11 ) t_t = t_t - fstrdynamic%t_delta
76 n_rot = fstrsolid%CLOAD_ngrp_rot
79 do ig0 = 1, fstrsolid%CLOAD_ngrp_tot
80 grpid = fstrsolid%CLOAD_ngrp_GRPID(ig0)
83 ig = fstrsolid%CLOAD_ngrp_ID(ig0)
84 ityp = fstrsolid%CLOAD_ngrp_DOF(ig0)
85 val = fstrsolid%CLOAD_ngrp_val(ig0)
90 is0= hecmesh%node_group%grp_index(ig-1)+1
91 ie0= hecmesh%node_group%grp_index(ig )
93 if( fstrsolid%CLOAD_ngrp_rotID(ig0) > 0 )
then
94 rid = fstrsolid%CLOAD_ngrp_rotID(ig0)
95 if( .not. rinfo%conds(rid)%active )
then
96 rinfo%conds(rid)%active = .true.
97 rinfo%conds(rid)%center_ngrp_id = fstrsolid%CLOAD_ngrp_centerID(ig0)
98 rinfo%conds(rid)%torque_ngrp_id = ig
100 if( ityp>ndof ) ityp = ityp-ndof
101 rinfo%conds(rid)%vec(ityp) = val
106 in = hecmesh%node_group%grp_item(ik)
107 hecmat%B( ndof*(in-1)+ityp ) = hecmat%B( ndof*(in-1)+ityp )+val
113 if( .not. rinfo%conds(rid)%active ) cycle
115 n_nodes = hecmw_ngrp_get_number(hecmesh, rinfo%conds(rid)%torque_ngrp_id)
118 ig = rinfo%conds(rid)%center_ngrp_id
120 ccoord(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, hecmesh%node)
121 cdisp(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, fstrsolid%unode)
123 ccoord(1:ndof) = ccoord(1:ndof) + cdisp(1:ndof)
125 tval = dsqrt(dot_product(rinfo%conds(rid)%vec(1:ndof),rinfo%conds(rid)%vec(1:ndof)))
126 if( tval < 1.d-16 )
then
127 write(*,*)
'###ERROR### : norm of torque vector must be > 0.0'
128 call hecmw_abort( hecmw_comm_get_comm() )
130 normal(1:ndof) = rinfo%conds(rid)%vec(1:ndof)/tval
131 tval = tval/dble(n_nodes)
133 ig = rinfo%conds(rid)%torque_ngrp_id
134 is0 = hecmesh%node_group%grp_index(ig-1) + 1
135 ie0 = hecmesh%node_group%grp_index(ig )
137 in = hecmesh%node_group%grp_item(ik)
138 cdiff(1:ndof) = hecmesh%node(ndof*(in-1)+1:ndof*in)+fstrsolid%unode(ndof*(in-1)+1:ndof*in)-ccoord(1:ndof)
140 val = dot_product(vect(1:ndof),vect(1:ndof))
141 if( val < 1.d-16 )
then
142 write(*,*)
'###ERROR### : torque node is at the same position as that of center node in rotational surface.'
143 call hecmw_abort( hecmw_comm_get_comm() )
145 vect(1:ndof) = (tval/val)*vect(1:ndof)
146 hecmat%B(ndof*(in-1)+1:ndof*in) = hecmat%B(ndof*(in-1)+1:ndof*in)+vect(1:ndof)
154 do ig0 = 1, fstrsolid%DLOAD_ngrp_tot
155 ig = fstrsolid%DLOAD_ngrp_ID(ig0)
156 ltype = fstrsolid%DLOAD_ngrp_LID(ig0)
158 params(i) = fstrsolid%DLOAD_ngrp_params(i,ig0)
161 fg_surf = (ltype == 100)
163 is0 = hecmesh%surf_group%grp_index(ig-1) + 1
164 ie0 = hecmesh%surf_group%grp_index(ig )
166 is0 = hecmesh%elem_group%grp_index(ig-1) + 1
167 ie0 = hecmesh%elem_group%grp_index(ig )
172 ltype = hecmesh%surf_group%grp_item(2*ik)*10
173 icel = hecmesh%surf_group%grp_item(2*ik-1)
174 ic_type = hecmesh%elem_type(icel)
176 icel = hecmesh%elem_group%grp_item(ik)
177 ic_type = hecmesh%elem_type(icel)
181 if( fstrsolid%elements(icel)%elemact_flag == kelact_inactive ) cycle
184 nn = hecmw_get_max_node(ic_type)
186 is = hecmesh%elem_node_index(icel-1)
188 nodlocal(j) = hecmesh%elem_node_item (is+j)
190 xx(j) = hecmesh%node( 3*nodlocal(j)-2 )
191 yy(j) = hecmesh%node( 3*nodlocal(j)-1 )
192 zz(j) = hecmesh%node( 3*nodlocal(j) )
195 iwk(ndof*(j-1)+i) = ndof*(nodlocal(j)-1)+i
199 isect = hecmesh%section_ID(icel)
201 rho = fstrsolid%elements(icel)%gausses(1)%pMaterial%variables(m_density)
206 id = hecmesh%section%sect_opt(isect)
209 elseif( id == 1 )
then
211 elseif( id == 2 )
then
218 if( ic_type == 241 .or.ic_type == 242 .or. ic_type == 231 .or. ic_type == 232 )
then
219 call dl_c2(ic_type,nn,xx(1:nn),yy(1:nn),rho,pa1,ltype,params,vect(1:nn*ndof),nsize,iset)
221 elseif( ic_type == 341 .or. ic_type == 351 .or. ic_type == 361 .or. &
222 ic_type == 342 .or. ic_type == 352 .or. ic_type == 362 )
then
223 call dl_c3(ic_type,nn,xx(1:nn),yy(1:nn),zz(1:nn),rho,ltype,params,vect(1:nn*ndof),nsize)
225 elseif( ( ic_type == 741 ) .or. ( ic_type == 743 ) .or. ( ic_type == 731 ) )
then
226 call dl_shell(ic_type, nn, ndof, xx, yy, zz, rho, thick, ltype, params, vect, nsize, fstrsolid%elements(icel)%gausses)
227 elseif( ( ic_type==761 ) )
then
228 call dl_shell_33(ic_type, nn, ndof, xx, yy, zz, rho, thick, ltype, params, vect, nsize, &
229 fstrsolid%elements(icel)%gausses)
230 elseif( ( ic_type==781 ) )
then
231 call dl_shell_33(ic_type, nn, ndof, xx, yy, zz, rho, thick, ltype, params, vect, nsize, &
232 fstrsolid%elements(icel)%gausses)
244 if (dabs(params(0)) > 1.d-30)
then
245 f_t = f_t / params(0)
250 vect(j) = vect(j)*f_t
255 hecmat%B( iwk(j) )=hecmat%B( iwk(j) )+vect(j)
260 if (
present(iter) )
then
262 do i = 1, ndof*hecmesh%n_node
263 unode_tmp(i) = fstrsolid%unode(i)
266 do ig0 = 1, fstrsolid%BOUNDARY_ngrp_tot
267 ig = fstrsolid%BOUNDARY_ngrp_ID(ig0)
268 rhs = fstrsolid%BOUNDARY_ngrp_val(ig0)
269 ityp = fstrsolid%BOUNDARY_ngrp_type(ig0)
271 idofe = ityp-idofs*10
272 is0 = hecmesh%node_group%grp_index(ig-1) + 1
273 ie0 = hecmesh%node_group%grp_index(ig )
276 in = hecmesh%node_group%grp_item(ik)
277 do idof = idofs, idofe
278 unode_tmp( ndof*(in-1)+idof ) = rhs
283 do itype = 1, hecmesh%n_elem_type
284 ic_type = hecmesh%elem_type_item(itype)
285 if( ic_type == 3414 )
then
286 nn = hecmw_get_max_node(ic_type)
287 if( nn > 20 ) stop
"The number of elemental nodes > 20"
289 is = hecmesh%elem_type_index(itype-1)+1
290 ie = hecmesh%elem_type_index(itype )
292 if(fstrsolid%elements(icel)%gausses(1)%pMaterial%mtype /= incomp_newtonian)
then
293 write(*, *)
'###ERROR### : This element is not supported for this material'
294 write(*, *)
'ic_type = ', ic_type,
', mtype = ', fstrsolid%elements(icel)%gausses(1)%pMaterial%mtype
296 call hecmw_abort(hecmw_comm_get_comm())
301 iis = hecmesh%elem_node_index(icel-1)
303 nodlocal(j) = hecmesh%elem_node_item(iis+j)
306 ecoord(i,j) = hecmesh%node( 3*nodlocal(j)+i-3 )
308 v(i,j) = unode_tmp( ndof*nodlocal(j)+i-ndof )
309 fstrsolid%unode( ndof*nodlocal(j)+i-ndof ) = v(i,j)
311 dv(i,j) = fstrsolid%dunode( ndof*nodlocal(j)+i-ndof )
316 ( ic_type, nn, ecoord(:,1:nn), v(1:4,1:nn), dv(1:4,1:nn), &
317 r(1:nn*ndof), fstrsolid%elements(icel)%gausses(:), &
318 fstrdynamic%t_delta )
322 hecmat%B(ndof*(nodlocal(j)-1)+i) = hecmat%B(ndof*(nodlocal(j)-1)+i)+r(ndof*(j-1)+i)
330 do itype = 1, hecmesh%n_elem_type
331 ic_type = hecmesh%elem_type_item(itype)
332 if( ic_type == 3414 )
then
333 nn = hecmw_get_max_node(ic_type)
334 if( nn > 20 ) stop
"The number of elemental nodes > 20"
335 is = hecmesh%elem_type_index(itype-1)+1
336 ie = hecmesh%elem_type_index(itype )
338 iis = hecmesh%elem_node_index(icel-1)
340 nodlocal(j) = hecmesh%elem_node_item(iis+j)
344 hecmat%B(ndof*(nodlocal(j)-1)+i) = 0.0d0
358 if( fstrsolid%TEMP_ngrp_tot > 0 )
then
360 if( hecmesh%my_rank .eq. 0 )
then
361 write(
imsg,*)
'stop: THERMAL LOAD is not yet available in dynamic analysis!'
363 call hecmw_abort( hecmw_comm_get_comm())
365 allocate ( temp(hecmesh%n_node) )
367 do ig0= 1, fstrsolid%TEMP_ngrp_tot
368 ig= fstrsolid%TEMP_ngrp_ID(ig0)
369 val=fstrsolid%TEMP_ngrp_val(ig0)
371 is0= hecmesh%node_group%grp_index(ig-1) + 1
372 ie0= hecmesh%node_group%grp_index(ig )
374 in = hecmesh%node_group%grp_item(ik)
384 do itype = 1, hecmesh%n_elem_type
386 is = hecmesh%elem_type_index(itype-1)+1
387 ie = hecmesh%elem_type_index(itype )
388 ic_type = hecmesh%elem_type_item(itype)
389 if( hecmw_is_etype_link(ic_type) ) cycle
390 if( hecmw_is_etype_patch(ic_type) ) cycle
392 nn = hecmw_get_max_node(ic_type)
397 if( fstrsolid%elements(icel)%elemact_flag == kelact_inactive ) cycle
400 is= hecmesh%elem_node_index(icel-1)
402 nodlocal(j)=hecmesh%elem_node_item(is+j)
404 xx(j)=hecmesh%node(3*nodlocal(j)-2)
405 yy(j)=hecmesh%node(3*nodlocal(j)-1)
406 zz(j)=hecmesh%node(3*nodlocal(j) )
407 tt(j)=temp( nodlocal(j) )
411 iwk(ndof*(j-1)+i)=ndof*(nodlocal(j)-1)+i
416 isect= hecmesh%section_ID(icel)
417 cdsys_id = fstrsolid%elements(icel)%gausses(1)%pMaterial%cdsys_ID
418 call get_coordsys( cdsys_id, hecmesh, fstrsolid, coords, icel )
421 if( ndof .eq. 2 )
then
422 id=hecmesh%section%sect_opt(isect)
425 elseif( id.eq.1)
then
427 elseif( id.eq.2)
then
434 if( ic_type == 241 .or. ic_type == 242 .or. ic_type == 231 .or. ic_type == 232 )
then
435 call tload_c2( ic_type, nn, xx(1:nn), yy(1:nn), tt(1:nn), tt0(1:nn), &
436 fstrsolid%elements(icel)%gausses,pa1,iset, vect(1:nn*2) )
438 elseif( ic_type == 361 )
then
439 if( fstrsolid%sections(isect)%elemopt361 ==
kel361fi )
then
441 ( ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), &
442 fstrsolid%elements(icel)%gausses, vect(1:nn*ndof), cdsys_id, coords )
443 else if( fstrsolid%sections(isect)%elemopt361 ==
kel361bbar )
then
444 call tload_c3d8bbar &
445 ( ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), &
446 fstrsolid%elements(icel)%gausses, vect(1:nn*ndof), cdsys_id, coords )
447 else if( fstrsolid%sections(isect)%elemopt361 ==
kel361ic )
then
449 ( ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), &
450 fstrsolid%elements(icel)%gausses, vect(1:nn*ndof), cdsys_id, coords )
451 else if( fstrsolid%sections(isect)%elemopt361 ==
kel361fbar )
then
452 call tload_c3d8fbar &
453 ( ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), &
454 fstrsolid%elements(icel)%gausses, vect(1:nn*ndof), cdsys_id, coords )
455 else if( fstrsolid%sections(isect)%elemopt361 ==
kel361up )
then
460 stop
"FROM361=UP: TLOAD is not supported"
463 elseif (ic_type == 341 .or. ic_type == 351 .or. &
464 ic_type == 342 .or. ic_type == 352 .or. ic_type == 362 )
then
466 ( ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), &
467 fstrsolid%elements(icel)%gausses, vect(1:nn*ndof), cdsys_id, coords )
469 elseif ( ic_type == 741 .or. ic_type == 743 .or. ic_type == 731 )
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
real(kind=kreal), pointer ref_temp
REFTEMP.
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)