18 type(hecmwst_local_mesh) :: hecMESH
21 real(kind=kreal),
intent(in) :: t_curr
22 integer(kind=kint),
intent(in) :: ndof
23 type(trotinfo) :: rinfo
24 integer(kind=kint),
optional :: cstep
26 integer(kind=kint) :: ig0, ig, ityp, idofS, idofE, idof, rid, grpid, flag_u
27 real(kind=kreal) :: rhs
30 do ig0 = 1, fstrsolid%VELOCITY_ngrp_tot
31 if( fstrsolid%VELOCITY_ngrp_rotID(ig0) <= 0 ) cycle
32 grpid = fstrsolid%VELOCITY_ngrp_GRPID(ig0)
33 if(
present(cstep) )
then
37 rhs = fstrsolid%VELOCITY_ngrp_val(ig0)
40 rid = fstrsolid%VELOCITY_ngrp_rotID(ig0)
41 ig = fstrsolid%VELOCITY_ngrp_ID(ig0)
42 if( .not. rinfo%conds(rid)%active )
then
43 rinfo%conds(rid)%active = .true.
44 rinfo%conds(rid)%center_ngrp_id = fstrsolid%VELOCITY_ngrp_centerID(ig0)
45 rinfo%conds(rid)%torque_ngrp_id = ig
48 ityp = fstrsolid%VELOCITY_ngrp_type(ig0)
50 idofe = ityp - idofs*10
51 do idof = idofs, idofe
52 if( idof > ndof )
then
53 rinfo%conds(rid)%vec(idof-ndof) = rhs
55 rinfo%conds(rid)%vec(idof) = rhs
67 type(hecmwst_local_mesh) :: hecmesh
69 integer(kind=kint),
intent(in) :: ig, ndof
70 real(kind=kreal),
intent(out) :: ccoord(3)
72 integer(kind=kint) :: idof
73 real(kind=kreal) :: cdisp(3)
78 ccoord(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, hecmesh%node)
79 cdisp(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, fstrsolid%unode)
81 ccoord(1:ndof) = ccoord(1:ndof) + cdisp(1:ndof)
88 subroutine dynamic_mat_ass_bc_vl(cstep, hecMESH, hecMAT, fstrSOLID, fstrDYNAMIC, fstrPARAM, hecLagMAT, hecEBC, &
97 integer(kind=kint) :: cstep
98 type(hecmwst_matrix) :: hecMAT
99 type(hecmwst_local_mesh) :: hecMESH
103 type(hecmwst_matrix_lagrange) :: hecLagMAT
104 type(hecmwst_ebc) :: hecEBC
105 real(kind=kreal) :: t_curr
106 type(hecmwst_matrix),
optional :: conmat
108 integer,
optional :: iter
110 integer(kind=kint) :: ig0, ig, ityp, ndof, is0, ie0, ik, in, idofs, idofe, idof
111 integer(kind=kint) :: flag_u, grpid
112 real(kind=kreal) :: b2, b3, b4, c1
113 real(kind=kreal) :: rhs, rhs0
116 integer(kind=kint) :: n_rot, rid
117 type(trotinfo) :: rinfo
118 real(kind=kreal) :: ccoord(3), cdiff(3), vnode(3), omega(3)
120 if( fstrsolid%VELOCITY_type ==
kbcinitial )
return
124 if(dabs(fstrdynamic%gamma) .lt. 1.0e-20)
then
125 if( hecmesh%my_rank == 0 )
then
126 write(
imsg,*)
'stop due to fstrDYNAMIC%gamma = 0'
128 call hecmw_abort( hecmw_comm_get_comm())
131 b2 = fstrdynamic%t_delta &
132 *(fstrdynamic%gamma-fstrdynamic%beta)/fstrdynamic%gamma
133 b3 = fstrdynamic%t_delta**2 &
134 *(fstrdynamic%gamma-2.0*fstrdynamic%beta) &
135 /(2.0*fstrdynamic%gamma)
136 b4 = fstrdynamic%t_delta*fstrdynamic%beta/fstrdynamic%gamma
137 c1 = 2.0*fstrdynamic%t_delta
141 n_rot = fstrsolid%VELOCITY_ngrp_rot
143 call fstr_rotinfo_init(n_rot, rinfo)
150 if( fstrdynamic%idx_eqa /= 11 )
then
152 do ig0 = 1, fstrsolid%VELOCITY_ngrp_tot
153 if( fstrsolid%VELOCITY_ngrp_rotID(ig0) > 0 ) cycle
154 ig = fstrsolid%VELOCITY_ngrp_ID(ig0)
155 grpid = fstrsolid%VELOCITY_ngrp_GRPID(ig0)
157 rhs = fstrsolid%VELOCITY_ngrp_val(ig0)
162 ityp = fstrsolid%VELOCITY_ngrp_type(ig0)
165 idofe = ityp - idofs*10
167 is0 = hecmesh%node_group%grp_index(ig-1) + 1
168 ie0 = hecmesh%node_group%grp_index(ig )
171 in = hecmesh%node_group%grp_item(ik)
172 do idof = idofs, idofe
174 if(
present(iter) )
then
179 + b2*fstrdynamic%VEL (ndof*in-(ndof-idof),1) &
180 + b3*fstrdynamic%ACC (ndof*in-(ndof-idof),1) &
184 rhs = fstrdynamic%DISP(ndof*in-(ndof-idof),1) &
185 + b2*fstrdynamic%VEL (ndof*in-(ndof-idof),1) &
186 + b3*fstrdynamic%ACC (ndof*in-(ndof-idof),1) &
191 .and. fstrparam%nlgeom .and. fstrdynamic%idx_resp == 1 )
then
192 if(
present(conmat))
then
193 call hecmw_mat_ass_bc_contactlag(conmat,heclagmat,in,idof,rhs)
195 call hecmw_mat_ass_bc_contactlag(hecmat,heclagmat,in,idof,rhs)
204 if( .not. rinfo%conds(rid)%active ) cycle
205 omega(1:3) = rinfo%conds(rid)%vec(1:3)
206 call get_rotcenter_coord(hecmesh, fstrsolid, rinfo%conds(rid)%center_ngrp_id, ndof, ccoord)
207 ig = rinfo%conds(rid)%torque_ngrp_id
208 is0 = hecmesh%node_group%grp_index(ig-1) + 1
209 ie0 = hecmesh%node_group%grp_index(ig )
211 in = hecmesh%node_group%grp_item(ik)
213 cdiff(1:ndof) = hecmesh%node(ndof*(in-1)+1:ndof*in) &
214 + fstrsolid%unode(ndof*(in-1)+1:ndof*in) - ccoord(1:ndof)
217 if(
present(iter) )
then
221 rhs = b2*fstrdynamic%VEL(ndof*in-(ndof-idof),1) &
222 + b3*fstrdynamic%ACC(ndof*in-(ndof-idof),1) &
226 rhs = fstrdynamic%DISP(ndof*in-(ndof-idof),1) &
227 + b2*fstrdynamic%VEL(ndof*in-(ndof-idof),1) &
228 + b3*fstrdynamic%ACC(ndof*in-(ndof-idof),1) &
233 .and. fstrparam%nlgeom .and. fstrdynamic%idx_resp == 1 )
then
234 if(
present(conmat))
then
235 call hecmw_mat_ass_bc_contactlag(conmat,heclagmat,in,idof,rhs)
237 call hecmw_mat_ass_bc_contactlag(hecmat,heclagmat,in,idof,rhs)
250 else if( fstrdynamic%idx_eqa == 11 )
then
252 do ig0 = 1, fstrsolid%VELOCITY_ngrp_tot
253 if( fstrsolid%VELOCITY_ngrp_rotID(ig0) > 0 ) cycle
254 ig = fstrsolid%VELOCITY_ngrp_ID(ig0)
255 rhs = fstrsolid%VELOCITY_ngrp_val(ig0)
260 ityp = fstrsolid%VELOCITY_ngrp_type(ig0)
262 is0 = hecmesh%node_group%grp_index(ig-1) + 1
263 ie0 = hecmesh%node_group%grp_index(ig )
265 idofe = ityp - idofs*10
268 in = hecmesh%node_group%grp_item(ik)
269 do idof = idofs, idofe
270 rhs = fstrdynamic%DISP(ndof*in-(ndof-idof),3) &
272 hecmat%B (ndof*in-(ndof-idof)) = rhs
273 fstrdynamic%VEC1(ndof*in-(ndof-idof)) = 1.0d0
280 if( .not. rinfo%conds(rid)%active ) cycle
281 omega(1:3) = rinfo%conds(rid)%vec(1:3)
282 call get_rotcenter_coord(hecmesh, fstrsolid, rinfo%conds(rid)%center_ngrp_id, ndof, ccoord)
283 ig = rinfo%conds(rid)%torque_ngrp_id
284 is0 = hecmesh%node_group%grp_index(ig-1) + 1
285 ie0 = hecmesh%node_group%grp_index(ig )
287 in = hecmesh%node_group%grp_item(ik)
289 cdiff(1:ndof) = hecmesh%node(ndof*(in-1)+1:ndof*in) &
290 + fstrsolid%unode(ndof*(in-1)+1:ndof*in) - ccoord(1:ndof)
293 rhs = fstrdynamic%DISP(ndof*in-(ndof-idof),3) + c1*vnode(idof)
294 hecmat%B (ndof*in-(ndof-idof)) = rhs
295 fstrdynamic%VEC1(ndof*in-(ndof-idof)) = 1.0d0
304 if( n_rot > 0 )
call fstr_rotinfo_finalize(rinfo)
319 type(hecmwst_matrix) :: hecmat
320 type(hecmwst_local_mesh) :: hecMESH
324 integer(kind=kint) :: NDOF, ig0, ig, ityp, iS0, iE0, ik, in, idofS, idofE, idof
326 integer(kind=kint) :: flag_u, grpid
327 real(kind=kreal) :: rhs, t_curr
330 integer(kind=kint) :: n_rot, rid
331 type(trotinfo) :: rinfo
332 real(kind=kreal) :: ccoord(3), cdiff(3), vnode(3), omega(3)
334 if( fstrsolid%VELOCITY_type ==
kbctransit )
return
339 n_rot = fstrsolid%VELOCITY_ngrp_rot
341 call fstr_rotinfo_init(n_rot, rinfo)
345 do ig0 = 1, fstrsolid%VELOCITY_ngrp_tot
346 if( fstrsolid%VELOCITY_ngrp_rotID(ig0) > 0 ) cycle
347 ig = fstrsolid%VELOCITY_ngrp_ID(ig0)
348 rhs = fstrsolid%VELOCITY_ngrp_val(ig0)
349 grpid = fstrsolid%VELOCITY_ngrp_GRPID(ig0)
354 ityp = fstrsolid%VELOCITY_ngrp_type(ig0)
356 is0 = hecmesh%node_group%grp_index(ig-1) + 1
357 ie0 = hecmesh%node_group%grp_index(ig )
359 idofe = ityp - idofs*10
362 in = hecmesh%node_group%grp_item(ik)
364 do idof = idofs, idofe
365 fstrdynamic%VEL (ndof*in-(ndof-idof),1) = rhs
372 if( .not. rinfo%conds(rid)%active ) cycle
373 omega(1:3) = rinfo%conds(rid)%vec(1:3)
374 call get_rotcenter_coord(hecmesh, fstrsolid, rinfo%conds(rid)%center_ngrp_id, ndof, ccoord)
375 ig = rinfo%conds(rid)%torque_ngrp_id
376 is0 = hecmesh%node_group%grp_index(ig-1) + 1
377 ie0 = hecmesh%node_group%grp_index(ig )
379 in = hecmesh%node_group%grp_item(ik)
381 cdiff(1:ndof) = hecmesh%node(ndof*(in-1)+1:ndof*in) &
382 + fstrsolid%unode(ndof*(in-1)+1:ndof*in) - ccoord(1:ndof)
385 fstrdynamic%VEL (ndof*in-(ndof-idof),1) = vnode(idof)
390 if( n_rot > 0 )
call fstr_rotinfo_finalize(rinfo)
402 type(hecmwst_matrix) :: hecmat
403 type(hecmwst_local_mesh) :: hecMESH
406 real(kind=kreal) :: t_curr
407 integer,
optional :: iter
409 integer(kind=kint) :: ig0, ig, ityp, NDOF, iS0, iE0, ik, in, idofS, idofE, idof
410 integer(kind=kint) :: flag_u
411 real(kind=kreal) :: b2, b3, b4, c1
412 real(kind=kreal) :: rhs, rhs0
415 integer(kind=kint) :: n_rot, rid
416 type(trotinfo) :: rinfo
417 real(kind=kreal) :: ccoord(3), cdiff(3), vnode(3), omega(3)
419 if( fstrsolid%VELOCITY_type ==
kbcinitial )
return
423 if(dabs(fstrdynamic%gamma) .lt. 1.0e-20)
then
424 if( hecmesh%my_rank == 0 )
then
425 write(
imsg,*)
'stop due to fstrDYNAMIC%gamma = 0'
427 call hecmw_abort( hecmw_comm_get_comm())
430 b2 = fstrdynamic%t_delta &
431 *(fstrdynamic%gamma-fstrdynamic%beta)/fstrdynamic%gamma
432 b3 = fstrdynamic%t_delta**2 &
433 *(fstrdynamic%gamma-2.0*fstrdynamic%beta) &
434 /(2.0*fstrdynamic%gamma)
435 b4 = fstrdynamic%t_delta*fstrdynamic%beta/fstrdynamic%gamma
436 c1 = 2.0*fstrdynamic%t_delta
440 n_rot = fstrsolid%VELOCITY_ngrp_rot
442 call fstr_rotinfo_init(n_rot, rinfo)
447 do ig0 = 1, fstrsolid%VELOCITY_ngrp_tot
448 if( fstrsolid%VELOCITY_ngrp_rotID(ig0) > 0 ) cycle
449 ig = fstrsolid%VELOCITY_ngrp_ID(ig0)
450 rhs = fstrsolid%VELOCITY_ngrp_val(ig0)
455 ityp = fstrsolid%VELOCITY_ngrp_type(ig0)
457 is0 = hecmesh%node_group%grp_index(ig-1) + 1
458 ie0 = hecmesh%node_group%grp_index(ig )
460 idofe = ityp - idofs*10
463 in = hecmesh%node_group%grp_item(ik)
464 do idof = idofs, idofe
465 rhs = fstrdynamic%DISP(ndof*in-(ndof-idof),3) &
467 hecmat%B(ndof*in-(ndof-idof)) = rhs* fstrdynamic%VEC1(ndof*in-(ndof-idof))
475 if( .not. rinfo%conds(rid)%active ) cycle
476 omega(1:3) = rinfo%conds(rid)%vec(1:3)
477 call get_rotcenter_coord(hecmesh, fstrsolid, rinfo%conds(rid)%center_ngrp_id, ndof, ccoord)
478 ig = rinfo%conds(rid)%torque_ngrp_id
479 is0 = hecmesh%node_group%grp_index(ig-1) + 1
480 ie0 = hecmesh%node_group%grp_index(ig )
482 in = hecmesh%node_group%grp_item(ik)
484 cdiff(1:ndof) = hecmesh%node(ndof*(in-1)+1:ndof*in) &
485 + fstrsolid%unode(ndof*(in-1)+1:ndof*in) - ccoord(1:ndof)
488 rhs = fstrdynamic%DISP(ndof*in-(ndof-idof),3) + c1*vnode(idof)
489 hecmat%B(ndof*in-(ndof-idof)) = rhs* fstrdynamic%VEC1(ndof*in-(ndof-idof))
494 if( n_rot > 0 )
call fstr_rotinfo_finalize(rinfo)
Essential boundary conditions kept as per-DOF marks and values so that they can be imposed on the mat...
subroutine, public hecmw_ebc_set(hecEBC, inode, idof, val)
This module contains functions to set velocity boundary condition in dynamic analysis.
subroutine get_rotcenter_coord(hecMESH, fstrSOLID, ig, ndof, ccoord)
Return the current-configuration coordinate of the rotation center node group.
subroutine dynamic_explicit_ass_vl(hecMESH, hecMAT, fstrSOLID, fstrDYNAMIC, t_curr, iter)
subroutine dynamic_bc_init_vl(hecMESH, hecMAT, fstrSOLID, fstrDYNAMIC, t_curr)
This function sets initial condition of velocity.
subroutine dynamic_mat_ass_bc_vl(cstep, hecMESH, hecMAT, fstrSOLID, fstrDYNAMIC, fstrPARAM, hecLagMAT, hecEBC, t_curr, iter, conMAT)
This subrouitne set velocity boundary condition in dynamic analysis.
subroutine gather_rotvel_info(hecMESH, fstrSOLID, fstrDYNAMIC, t_curr, ndof, rinfo, cstep)
Gather rotational velocity information (!VELOCITY, ROT_CENTER=) into rinfo. For each velocity BC with...
This module defines common data and basic structures for analysis.
integer(kind=kint), parameter imsg
integer(kind=kint), parameter kcaslagrange
contact analysis algorithm
integer(kind=kint), parameter kbcinitial
integer(kind=kint), parameter kbctransit
logical function fstr_isboundaryactive(fstrSOLID, nbc, cstep)
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)