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, t_curr, iter, conMAT)
95 integer(kind=kint) :: cstep
96 type(hecmwst_matrix) :: hecMAT
97 type(hecmwst_local_mesh) :: hecMESH
101 type(hecmwst_matrix_lagrange) :: hecLagMAT
102 real(kind=kreal) :: t_curr
103 type(hecmwst_matrix),
optional :: conmat
105 integer,
optional :: iter
107 integer(kind=kint) :: ig0, ig, ityp, ndof, is0, ie0, ik, in, idofs, idofe, idof
108 integer(kind=kint) :: flag_u, grpid
109 real(kind=kreal) :: b2, b3, b4, c1
110 real(kind=kreal) :: rhs, rhs0, f_t
113 integer(kind=kint) :: n_rot, rid
114 type(trotinfo) :: rinfo
115 real(kind=kreal) :: ccoord(3), cdiff(3), vnode(3), omega(3)
117 if( fstrsolid%VELOCITY_type ==
kbcinitial )
return
121 if(dabs(fstrdynamic%gamma) .lt. 1.0e-20)
then
122 if( hecmesh%my_rank == 0 )
then
123 write(
imsg,*)
'stop due to fstrDYNAMIC%gamma = 0'
125 call hecmw_abort( hecmw_comm_get_comm())
128 b2 = fstrdynamic%t_delta &
129 *(fstrdynamic%gamma-fstrdynamic%beta)/fstrdynamic%gamma
130 b3 = fstrdynamic%t_delta**2 &
131 *(fstrdynamic%gamma-2.0*fstrdynamic%beta) &
132 /(2.0*fstrdynamic%gamma)
133 b4 = fstrdynamic%t_delta*fstrdynamic%beta/fstrdynamic%gamma
134 c1 = 2.0*fstrdynamic%t_delta
138 n_rot = fstrsolid%VELOCITY_ngrp_rot
140 call fstr_rotinfo_init(n_rot, rinfo)
147 if( fstrdynamic%idx_eqa == 1 )
then
149 do ig0 = 1, fstrsolid%VELOCITY_ngrp_tot
150 if( fstrsolid%VELOCITY_ngrp_rotID(ig0) > 0 ) cycle
151 ig = fstrsolid%VELOCITY_ngrp_ID(ig0)
152 grpid = fstrsolid%VELOCITY_ngrp_GRPID(ig0)
154 rhs = fstrsolid%VELOCITY_ngrp_val(ig0)
159 ityp = fstrsolid%VELOCITY_ngrp_type(ig0)
162 idofe = ityp - idofs*10
164 is0 = hecmesh%node_group%grp_index(ig-1) + 1
165 ie0 = hecmesh%node_group%grp_index(ig )
168 in = hecmesh%node_group%grp_item(ik)
169 do idof = idofs, idofe
171 if(
present(iter) )
then
176 + b2*fstrdynamic%VEL (ndof*in-(ndof-idof),1) &
177 + b3*fstrdynamic%ACC (ndof*in-(ndof-idof),1) &
181 rhs = fstrdynamic%DISP(ndof*in-(ndof-idof),1) &
182 + b2*fstrdynamic%VEL (ndof*in-(ndof-idof),1) &
183 + b3*fstrdynamic%ACC (ndof*in-(ndof-idof),1) &
186 if(
present(conmat))
then
187 call hecmw_mat_ass_bc(hecmat, in, idof, rhs, conmat)
189 call hecmw_mat_ass_bc(hecmat, in, idof, rhs)
192 .and. fstrparam%nlgeom .and. fstrdynamic%idx_resp == 1 )
then
193 if(
present(conmat))
then
194 call hecmw_mat_ass_bc_contactlag(conmat,heclagmat,in,idof,rhs)
196 call hecmw_mat_ass_bc_contactlag(hecmat,heclagmat,in,idof,rhs)
205 if( .not. rinfo%conds(rid)%active ) cycle
206 omega(1:3) = rinfo%conds(rid)%vec(1:3)
207 call get_rotcenter_coord(hecmesh, fstrsolid, rinfo%conds(rid)%center_ngrp_id, ndof, ccoord)
208 ig = rinfo%conds(rid)%torque_ngrp_id
209 is0 = hecmesh%node_group%grp_index(ig-1) + 1
210 ie0 = hecmesh%node_group%grp_index(ig )
212 in = hecmesh%node_group%grp_item(ik)
214 cdiff(1:ndof) = hecmesh%node(ndof*(in-1)+1:ndof*in) &
215 + fstrsolid%unode(ndof*(in-1)+1:ndof*in) - ccoord(1:ndof)
218 if(
present(iter) )
then
222 rhs = b2*fstrdynamic%VEL(ndof*in-(ndof-idof),1) &
223 + b3*fstrdynamic%ACC(ndof*in-(ndof-idof),1) &
227 rhs = fstrdynamic%DISP(ndof*in-(ndof-idof),1) &
228 + b2*fstrdynamic%VEL(ndof*in-(ndof-idof),1) &
229 + b3*fstrdynamic%ACC(ndof*in-(ndof-idof),1) &
232 if(
present(conmat))
then
233 call hecmw_mat_ass_bc(hecmat, in, idof, rhs, conmat)
235 call hecmw_mat_ass_bc(hecmat, in, idof, rhs)
238 .and. fstrparam%nlgeom .and. fstrdynamic%idx_resp == 1 )
then
239 if(
present(conmat))
then
240 call hecmw_mat_ass_bc_contactlag(conmat,heclagmat,in,idof,rhs)
242 call hecmw_mat_ass_bc_contactlag(hecmat,heclagmat,in,idof,rhs)
255 else if( fstrdynamic%idx_eqa == 11 )
then
257 do ig0 = 1, fstrsolid%VELOCITY_ngrp_tot
258 if( fstrsolid%VELOCITY_ngrp_rotID(ig0) > 0 ) cycle
259 ig = fstrsolid%VELOCITY_ngrp_ID(ig0)
260 rhs = fstrsolid%VELOCITY_ngrp_val(ig0)
265 ityp = fstrsolid%VELOCITY_ngrp_type(ig0)
267 is0 = hecmesh%node_group%grp_index(ig-1) + 1
268 ie0 = hecmesh%node_group%grp_index(ig )
270 idofe = ityp - idofs*10
273 in = hecmesh%node_group%grp_item(ik)
274 do idof = idofs, idofe
275 rhs = fstrdynamic%DISP(ndof*in-(ndof-idof),3) &
277 hecmat%B (ndof*in-(ndof-idof)) = rhs
278 fstrdynamic%VEC1(ndof*in-(ndof-idof)) = 1.0d0
285 if( .not. rinfo%conds(rid)%active ) cycle
286 omega(1:3) = rinfo%conds(rid)%vec(1:3)
287 call get_rotcenter_coord(hecmesh, fstrsolid, rinfo%conds(rid)%center_ngrp_id, ndof, ccoord)
288 ig = rinfo%conds(rid)%torque_ngrp_id
289 is0 = hecmesh%node_group%grp_index(ig-1) + 1
290 ie0 = hecmesh%node_group%grp_index(ig )
292 in = hecmesh%node_group%grp_item(ik)
294 cdiff(1:ndof) = hecmesh%node(ndof*(in-1)+1:ndof*in) &
295 + fstrsolid%unode(ndof*(in-1)+1:ndof*in) - ccoord(1:ndof)
298 rhs = fstrdynamic%DISP(ndof*in-(ndof-idof),3) + c1*vnode(idof)
299 hecmat%B (ndof*in-(ndof-idof)) = rhs
300 fstrdynamic%VEC1(ndof*in-(ndof-idof)) = 1.0d0
309 if( n_rot > 0 )
call fstr_rotinfo_finalize(rinfo)
324 type(hecmwst_matrix) :: hecmat
325 type(hecmwst_local_mesh) :: hecMESH
329 integer(kind=kint) :: NDOF, ig0, ig, ityp, iS0, iE0, ik, in, idofS, idofE, idof
331 integer(kind=kint) :: flag_u, grpid
332 real(kind=kreal) :: rhs, f_t, t_curr
335 integer(kind=kint) :: n_rot, rid
336 type(trotinfo) :: rinfo
337 real(kind=kreal) :: ccoord(3), cdiff(3), vnode(3), omega(3)
339 if( fstrsolid%VELOCITY_type ==
kbctransit )
return
344 n_rot = fstrsolid%VELOCITY_ngrp_rot
346 call fstr_rotinfo_init(n_rot, rinfo)
350 do ig0 = 1, fstrsolid%VELOCITY_ngrp_tot
351 if( fstrsolid%VELOCITY_ngrp_rotID(ig0) > 0 ) cycle
352 ig = fstrsolid%VELOCITY_ngrp_ID(ig0)
353 rhs = fstrsolid%VELOCITY_ngrp_val(ig0)
354 grpid = fstrsolid%VELOCITY_ngrp_GRPID(ig0)
359 ityp = fstrsolid%VELOCITY_ngrp_type(ig0)
361 is0 = hecmesh%node_group%grp_index(ig-1) + 1
362 ie0 = hecmesh%node_group%grp_index(ig )
364 idofe = ityp - idofs*10
367 in = hecmesh%node_group%grp_item(ik)
369 do idof = idofs, idofe
370 fstrdynamic%VEL (ndof*in-(ndof-idof),1) = rhs
377 if( .not. rinfo%conds(rid)%active ) cycle
378 omega(1:3) = rinfo%conds(rid)%vec(1:3)
379 call get_rotcenter_coord(hecmesh, fstrsolid, rinfo%conds(rid)%center_ngrp_id, ndof, ccoord)
380 ig = rinfo%conds(rid)%torque_ngrp_id
381 is0 = hecmesh%node_group%grp_index(ig-1) + 1
382 ie0 = hecmesh%node_group%grp_index(ig )
384 in = hecmesh%node_group%grp_item(ik)
386 cdiff(1:ndof) = hecmesh%node(ndof*(in-1)+1:ndof*in) &
387 + fstrsolid%unode(ndof*(in-1)+1:ndof*in) - ccoord(1:ndof)
390 fstrdynamic%VEL (ndof*in-(ndof-idof),1) = vnode(idof)
395 if( n_rot > 0 )
call fstr_rotinfo_finalize(rinfo)
407 type(hecmwst_matrix) :: hecmat
408 type(hecmwst_local_mesh) :: hecMESH
411 real(kind=kreal) :: t_curr
412 integer,
optional :: iter
414 integer(kind=kint) :: ig0, ig, ityp, NDOF, iS0, iE0, ik, in, idofS, idofE, idof
415 integer(kind=kint) :: flag_u
416 real(kind=kreal) :: b2, b3, b4, c1
417 real(kind=kreal) :: rhs, rhs0, f_t
420 integer(kind=kint) :: n_rot, rid
421 type(trotinfo) :: rinfo
422 real(kind=kreal) :: ccoord(3), cdiff(3), vnode(3), omega(3)
424 if( fstrsolid%VELOCITY_type ==
kbcinitial )
return
428 if(dabs(fstrdynamic%gamma) .lt. 1.0e-20)
then
429 if( hecmesh%my_rank == 0 )
then
430 write(
imsg,*)
'stop due to fstrDYNAMIC%gamma = 0'
432 call hecmw_abort( hecmw_comm_get_comm())
435 b2 = fstrdynamic%t_delta &
436 *(fstrdynamic%gamma-fstrdynamic%beta)/fstrdynamic%gamma
437 b3 = fstrdynamic%t_delta**2 &
438 *(fstrdynamic%gamma-2.0*fstrdynamic%beta) &
439 /(2.0*fstrdynamic%gamma)
440 b4 = fstrdynamic%t_delta*fstrdynamic%beta/fstrdynamic%gamma
441 c1 = 2.0*fstrdynamic%t_delta
445 n_rot = fstrsolid%VELOCITY_ngrp_rot
447 call fstr_rotinfo_init(n_rot, rinfo)
452 do ig0 = 1, fstrsolid%VELOCITY_ngrp_tot
453 if( fstrsolid%VELOCITY_ngrp_rotID(ig0) > 0 ) cycle
454 ig = fstrsolid%VELOCITY_ngrp_ID(ig0)
455 rhs = fstrsolid%VELOCITY_ngrp_val(ig0)
460 ityp = fstrsolid%VELOCITY_ngrp_type(ig0)
462 is0 = hecmesh%node_group%grp_index(ig-1) + 1
463 ie0 = hecmesh%node_group%grp_index(ig )
465 idofe = ityp - idofs*10
468 in = hecmesh%node_group%grp_item(ik)
469 do idof = idofs, idofe
470 rhs = fstrdynamic%DISP(ndof*in-(ndof-idof),3) &
472 hecmat%B(ndof*in-(ndof-idof)) = rhs* fstrdynamic%VEC1(ndof*in-(ndof-idof))
480 if( .not. rinfo%conds(rid)%active ) cycle
481 omega(1:3) = rinfo%conds(rid)%vec(1:3)
482 call get_rotcenter_coord(hecmesh, fstrsolid, rinfo%conds(rid)%center_ngrp_id, ndof, ccoord)
483 ig = rinfo%conds(rid)%torque_ngrp_id
484 is0 = hecmesh%node_group%grp_index(ig-1) + 1
485 ie0 = hecmesh%node_group%grp_index(ig )
487 in = hecmesh%node_group%grp_item(ik)
489 cdiff(1:ndof) = hecmesh%node(ndof*(in-1)+1:ndof*in) &
490 + fstrsolid%unode(ndof*(in-1)+1:ndof*in) - ccoord(1:ndof)
493 rhs = fstrdynamic%DISP(ndof*in-(ndof-idof),3) + c1*vnode(idof)
494 hecmat%B(ndof*in-(ndof-idof)) = rhs* fstrdynamic%VEC1(ndof*in-(ndof-idof))
499 if( n_rot > 0 )
call fstr_rotinfo_finalize(rinfo)
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, 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)