13 subroutine dynamic_mat_ass_bc(hecMESH, hecMAT, fstrSOLID ,fstrDYNAMIC, fstrPARAM, hecLagMAT, iter, conMAT)
20 type(hecmwst_matrix) :: hecmat
21 type(hecmwst_local_mesh) :: hecMESH
25 type(hecmwst_matrix_lagrange) :: hecLagMAT
26 integer,
optional :: iter
27 type(hecmwst_matrix),
optional :: conMAT
29 integer(kind=kint) :: ig0, ig, ityp, NDOF, iS0, iE0, ik, in, idofS, idofE, idof
31 integer(kind=kint) :: flag_u
32 real(kind=kreal) :: rhs, f_t, f_t1
35 integer(kind=kint) :: n_rot, rid, n_nodes
36 type(trotinfo) :: rinfo
37 real(kind=kreal) :: theta, normal(3), direc(3), ccoord(3), cdiff(3), cdiff0(3)
38 real(kind=kreal) :: cdisp(3), cddisp(3)
41 n_rot = fstrsolid%BOUNDARY_ngrp_rot
42 if( n_rot > 0 )
call fstr_rotinfo_init(n_rot, rinfo)
43 fstrsolid%REACTION = 0.d0
49 if( fstrdynamic%idx_eqa == 1 )
then
51 do ig0 = 1, fstrsolid%BOUNDARY_ngrp_tot
52 ig = fstrsolid%BOUNDARY_ngrp_ID(ig0)
53 rhs = fstrsolid%BOUNDARY_ngrp_val(ig0)
55 if(
present(iter) )
then
59 fstrdynamic%i_step = fstrdynamic%i_step-1
60 fstrdynamic%t_curr = fstrdynamic%t_curr - fstrdynamic%t_delta
61 call table_dyn(hecmesh, fstrsolid, fstrdynamic, ig0, f_t1, flag_u)
62 fstrdynamic%i_step = fstrdynamic%i_step+1
63 fstrdynamic%t_curr = fstrdynamic%t_curr + fstrdynamic%t_delta
64 call table_dyn(hecmesh, fstrsolid, fstrdynamic, ig0, f_t, flag_u)
65 rhs = rhs * (f_t-f_t1)
68 call table_dyn(hecmesh, fstrsolid, fstrdynamic, ig0, f_t, flag_u)
72 ityp = fstrsolid%BOUNDARY_ngrp_type(ig0)
74 idofe = ityp - idofs*10
76 is0 = hecmesh%node_group%grp_index(ig-1) + 1
77 ie0 = hecmesh%node_group%grp_index(ig )
79 if( fstrsolid%BOUNDARY_ngrp_rotID(ig0) > 0 )
then
80 rid = fstrsolid%BOUNDARY_ngrp_rotID(ig0)
81 if( .not. rinfo%conds(rid)%active )
then
82 rinfo%conds(rid)%active = .true.
83 rinfo%conds(rid)%center_ngrp_id = fstrsolid%BOUNDARY_ngrp_centerID(ig0)
84 rinfo%conds(rid)%torque_ngrp_id = ig
88 rinfo%conds(rid)%vec(idof-ndof) = rhs
90 rinfo%conds(rid)%vec(idof) = rhs
97 in = hecmesh%node_group%grp_item(ik)
99 do idof = idofs, idofe
100 if(
present(conmat))
then
101 call hecmw_mat_ass_bc(hecmat, in, idof, rhs, conmat)
103 call hecmw_mat_ass_bc(hecmat, in, idof, rhs)
106 .and. fstrparam%nlgeom .and. fstrdynamic%idx_resp == 1 )
then
107 if(
present(conmat))
then
108 call hecmw_mat_ass_bc_contactlag(conmat,heclagmat,in,idof,rhs)
110 call hecmw_mat_ass_bc_contactlag(hecmat,heclagmat,in,idof,rhs)
115 fstrsolid%REACTION(ndof*(in-1)+idof) = fstrsolid%QFORCE(ndof*(in-1)+idof)
123 if( .not. rinfo%conds(rid)%active ) cycle
128 if( f_t > 0.d0 )
then
129 ig = rinfo%conds(rid)%center_ngrp_id
131 ccoord(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, hecmesh%node)
132 cdisp(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, fstrsolid%unode)
133 cddisp(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, hecmat%B)
135 ccoord(1:ndof) = ccoord(1:ndof) + cdisp(1:ndof)
138 ig = rinfo%conds(rid)%torque_ngrp_id
139 is0 = hecmesh%node_group%grp_index(ig-1) + 1
140 ie0 = hecmesh%node_group%grp_index(ig )
142 in = hecmesh%node_group%grp_item(ik)
143 if( f_t > 0.d0 )
then
144 cdiff0(1:ndof) = hecmesh%node(ndof*(in-1)+1:ndof*in)+fstrsolid%unode(ndof*(in-1)+1:ndof*in)-ccoord(1:ndof)
145 cdiff(1:ndof) = cdiff0(1:ndof)
149 rhs = cdiff(idof)-cdiff0(idof)+cddisp(idof)
150 if(
present(conmat))
then
151 call hecmw_mat_ass_bc(hecmat, in, idof, rhs, conmat)
153 call hecmw_mat_ass_bc(hecmat, in, idof, rhs)
157 if(
present(conmat))
then
158 call hecmw_mat_ass_bc_contactlag(conmat,heclagmat,in,idof,rhs)
160 call hecmw_mat_ass_bc_contactlag(hecmat,heclagmat,in,idof,rhs)
165 fstrsolid%REACTION(ndof*(in-1)+idof) = fstrsolid%QFORCE(ndof*(in-1)+idof)
176 else if( fstrdynamic%idx_eqa == 11 )
then
179 do ig0 = 1, fstrsolid%BOUNDARY_ngrp_tot
180 ig = fstrsolid%BOUNDARY_ngrp_ID(ig0)
181 rhs = fstrsolid%BOUNDARY_ngrp_val(ig0)
183 call table_dyn(hecmesh, fstrsolid, fstrdynamic, ig0, f_t, flag_u)
186 ityp = fstrsolid%BOUNDARY_ngrp_type(ig0)
188 is0 = hecmesh%node_group%grp_index(ig-1) + 1
189 ie0 = hecmesh%node_group%grp_index(ig )
191 idofe = ityp - idofs*10
194 in = hecmesh%node_group%grp_item(ik)
196 do idof = idofs, idofe
197 hecmat%B (ndof*in-(ndof-idof)) = rhs
198 fstrdynamic%VEC1(ndof*in-(ndof-idof)) = 1.0d0
201 fstrsolid%REACTION(ndof*(in-1)+idof) = fstrsolid%QFORCE(ndof*(in-1)+idof)
210 if( n_rot > 0 )
call fstr_rotinfo_finalize(rinfo)
223 type(hecmwst_matrix) :: hecmat
224 type(hecmwst_local_mesh) :: hecMESH
228 integer(kind=kint) :: NDOF, ig0, ig, ityp, iS0, iE0, ik, in, idofS, idofE, idof
229 integer(kind=kint) :: flag_u
230 real(kind=kreal) :: rhs, f_t
235 do ig0 = 1, fstrsolid%BOUNDARY_ngrp_tot
236 ig = fstrsolid%BOUNDARY_ngrp_ID(ig0)
237 rhs = fstrsolid%BOUNDARY_ngrp_val(ig0)
240 call table_dyn(hecmesh, fstrsolid, fstrdynamic, ig0, f_t, flag_u)
243 ityp = fstrsolid%BOUNDARY_ngrp_type(ig0)
245 is0 = hecmesh%node_group%grp_index(ig-1) + 1
246 ie0 = hecmesh%node_group%grp_index(ig )
248 idofe = ityp - idofs*10
251 in = hecmesh%node_group%grp_item(ik)
253 do idof = idofs, idofe
254 fstrdynamic%DISP(ndof*in-(ndof-idof),1) = rhs
270 type(hecmwst_matrix) :: hecmat
271 type(hecmwst_local_mesh) :: hecMESH
274 integer,
optional :: iter
276 integer(kind=kint) :: ig0, ig, ityp, NDOF, iS0, iE0, ik, in, idofS, idofE, idof
278 integer(kind=kint) :: flag_u
279 real(kind=kreal) :: rhs, f_t, f_t1
282 integer(kind=kint) :: n_rot, rid, n_nodes
283 type(trotinfo) :: rinfo
284 real(kind=kreal) :: theta, normal(3), direc(3), ccoord(3), cdiff(3), cdiff0(3)
285 real(kind=kreal) :: cdisp(3), cddisp(3)
288 n_rot = fstrsolid%BOUNDARY_ngrp_rot
289 if( n_rot > 0 )
call fstr_rotinfo_init(n_rot, rinfo)
290 fstrsolid%REACTION = 0.d0
296 do ig0 = 1, fstrsolid%BOUNDARY_ngrp_tot
297 ig = fstrsolid%BOUNDARY_ngrp_ID(ig0)
298 rhs = fstrsolid%BOUNDARY_ngrp_val(ig0)
300 call table_dyn(hecmesh, fstrsolid, fstrdynamic, ig0, f_t, flag_u)
303 ityp = fstrsolid%BOUNDARY_ngrp_type(ig0)
305 is0 = hecmesh%node_group%grp_index(ig-1) + 1
306 ie0 = hecmesh%node_group%grp_index(ig )
308 idofe = ityp - idofs*10
311 in = hecmesh%node_group%grp_item(ik)
313 do idof = idofs, idofe
314 hecmat%B(ndof*in-(ndof-idof)) = rhs*fstrdynamic%VEC1(ndof*in-(ndof-idof))
318 fstrsolid%REACTION(ndof*(in-1)+idof) = fstrsolid%QFORCE(ndof*(in-1)+idof)
323 if( n_rot > 0 )
call fstr_rotinfo_finalize(rinfo)