13 subroutine dynamic_mat_ass_bc(cstep, hecMESH, hecMAT, fstrSOLID ,fstrDYNAMIC, fstrPARAM, hecLagMAT, hecEBC, &
22 integer,
intent(in) :: cstep
23 type(hecmwst_matrix) :: hecMAT
24 type(hecmwst_local_mesh) :: hecMESH
28 type(hecmwst_matrix_lagrange) :: hecLagMAT
29 type(hecmwst_ebc) :: hecEBC
30 real(kind=kreal) :: t_curr
31 integer,
optional :: iter
32 type(hecmwst_matrix),
optional :: conMAT
34 integer(kind=kint) :: ig0, ig, ityp, NDOF, iS0, iE0, ik, in, idofS, idofE, idof
36 integer(kind=kint) :: flag_u, grpid
37 real(kind=kreal) :: rhs, f_t, f_t1
40 integer(kind=kint) :: n_rot, rid, n_nodes
41 type(trotinfo) :: rinfo
42 real(kind=kreal) :: theta, normal(3), direc(3), ccoord(3), cdiff(3), cdiff0(3)
43 real(kind=kreal) :: cdisp(3), cddisp(3)
44 real(kind=kreal) :: rotation_factor
47 n_rot = fstrsolid%BOUNDARY_ngrp_rot
48 if( n_rot > 0 )
call fstr_rotinfo_init(n_rot, rinfo)
54 if( fstrdynamic%idx_eqa == 1 )
then
56 do ig0 = 1, fstrsolid%BOUNDARY_ngrp_tot
57 ig = fstrsolid%BOUNDARY_ngrp_ID(ig0)
58 grpid = fstrsolid%BOUNDARY_ngrp_GRPID(ig0)
60 rhs = fstrsolid%BOUNDARY_ngrp_val(ig0)
62 if(
present(iter) )
then
67 call fstr_get_amplitude_dyn(hecmesh, fstrsolid, fstrdynamic, ig0, t_curr-fstrdynamic%t_delta, f_t1, flag_u)
76 ityp = fstrsolid%BOUNDARY_ngrp_type(ig0)
78 idofe = ityp - idofs*10
80 is0 = hecmesh%node_group%grp_index(ig-1) + 1
81 ie0 = hecmesh%node_group%grp_index(ig )
83 if( fstrsolid%BOUNDARY_ngrp_rotID(ig0) > 0 )
then
84 rid = fstrsolid%BOUNDARY_ngrp_rotID(ig0)
85 if( .not. rinfo%conds(rid)%active )
then
86 rinfo%conds(rid)%active = .true.
87 rinfo%conds(rid)%center_ngrp_id = fstrsolid%BOUNDARY_ngrp_centerID(ig0)
88 rinfo%conds(rid)%torque_ngrp_id = ig
92 rinfo%conds(rid)%vec(idof-ndof) = rhs
94 rinfo%conds(rid)%vec(idof) = rhs
101 in = hecmesh%node_group%grp_item(ik)
103 do idof = idofs, idofe
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)
120 if( .not. rinfo%conds(rid)%active ) cycle
125 if(
present(iter) )
then
127 rotation_factor = 0.d0
129 rotation_factor = 1.0d0
132 rotation_factor = 1.0d0
135 if( rotation_factor > 0.d0 )
then
136 ig = rinfo%conds(rid)%center_ngrp_id
138 ccoord(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, hecmesh%node)
139 cdisp(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, fstrsolid%unode)
140 cddisp(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, hecebc%val)
142 ccoord(1:ndof) = ccoord(1:ndof) + cdisp(1:ndof)
145 ig = rinfo%conds(rid)%torque_ngrp_id
146 is0 = hecmesh%node_group%grp_index(ig-1) + 1
147 ie0 = hecmesh%node_group%grp_index(ig )
149 in = hecmesh%node_group%grp_item(ik)
150 if( rotation_factor > 0.d0 )
then
151 cdiff0(1:ndof) = hecmesh%node(ndof*(in-1)+1:ndof*in)+fstrsolid%unode(ndof*(in-1)+1:ndof*in)-ccoord(1:ndof)
152 cdiff(1:ndof) = cdiff0(1:ndof)
156 rhs = cdiff(idof)-cdiff0(idof)+cddisp(idof)
160 if(
present(conmat))
then
161 call hecmw_mat_ass_bc_contactlag(conmat,heclagmat,in,idof,rhs)
163 call hecmw_mat_ass_bc_contactlag(hecmat,heclagmat,in,idof,rhs)
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)
185 ityp = fstrsolid%BOUNDARY_ngrp_type(ig0)
187 is0 = hecmesh%node_group%grp_index(ig-1) + 1
188 ie0 = hecmesh%node_group%grp_index(ig )
190 idofe = ityp - idofs*10
193 in = hecmesh%node_group%grp_item(ik)
195 do idof = idofs, idofe
196 hecmat%B (ndof*in-(ndof-idof)) = rhs
197 fstrdynamic%VEC1(ndof*in-(ndof-idof)) = 1.0d0
206 if( n_rot > 0 )
call fstr_rotinfo_finalize(rinfo)
219 type(hecmwst_matrix) :: hecmat
220 type(hecmwst_local_mesh) :: hecMESH
223 real(kind=kreal) :: t_curr
225 integer(kind=kint) :: NDOF, ig0, ig, ityp, iS0, iE0, ik, in, idofS, idofE, idof
226 integer(kind=kint) :: flag_u, grpid
227 real(kind=kreal) :: rhs, f_t
232 do ig0 = 1, fstrsolid%BOUNDARY_ngrp_tot
233 ig = fstrsolid%BOUNDARY_ngrp_ID(ig0)
234 rhs = fstrsolid%BOUNDARY_ngrp_val(ig0)
235 grpid = fstrsolid%BOUNDARY_ngrp_GRPID(ig0)
240 ityp = fstrsolid%BOUNDARY_ngrp_type(ig0)
242 is0 = hecmesh%node_group%grp_index(ig-1) + 1
243 ie0 = hecmesh%node_group%grp_index(ig )
245 idofe = ityp - idofs*10
248 in = hecmesh%node_group%grp_item(ik)
250 do idof = idofs, idofe
251 fstrdynamic%DISP(ndof*in-(ndof-idof),1) = rhs
267 type(hecmwst_matrix) :: hecmat
268 type(hecmwst_local_mesh) :: hecMESH
271 real(kind=kreal) :: t_curr
272 integer,
optional :: iter
274 integer(kind=kint) :: ig0, ig, ityp, NDOF, iS0, iE0, ik, in, idofS, idofE, idof
276 integer(kind=kint) :: flag_u
277 real(kind=kreal) :: rhs, f_t, f_t1
280 integer(kind=kint) :: n_rot, rid, n_nodes
281 type(trotinfo) :: rinfo
282 real(kind=kreal) :: theta, normal(3), direc(3), ccoord(3), cdiff(3), cdiff0(3)
283 real(kind=kreal) :: cdisp(3), cddisp(3)
286 n_rot = fstrsolid%BOUNDARY_ngrp_rot
287 if( n_rot > 0 )
call fstr_rotinfo_init(n_rot, rinfo)
293 do ig0 = 1, fstrsolid%BOUNDARY_ngrp_tot
294 ig = fstrsolid%BOUNDARY_ngrp_ID(ig0)
295 rhs = fstrsolid%BOUNDARY_ngrp_val(ig0)
299 ityp = fstrsolid%BOUNDARY_ngrp_type(ig0)
301 is0 = hecmesh%node_group%grp_index(ig-1) + 1
302 ie0 = hecmesh%node_group%grp_index(ig )
304 idofe = ityp - idofs*10
306 if( fstrsolid%BOUNDARY_ngrp_rotID(ig0) > 0 )
then
307 rid = fstrsolid%BOUNDARY_ngrp_rotID(ig0)
308 if( .not. rinfo%conds(rid)%active )
then
309 rinfo%conds(rid)%active = .true.
310 rinfo%conds(rid)%center_ngrp_id = fstrsolid%BOUNDARY_ngrp_centerID(ig0)
311 rinfo%conds(rid)%torque_ngrp_id = ig
315 rinfo%conds(rid)%vec(idof-ndof) = rhs
317 rinfo%conds(rid)%vec(idof) = rhs
324 in = hecmesh%node_group%grp_item(ik)
326 do idof = idofs, idofe
327 hecmat%B(ndof*in-(ndof-idof)) = rhs*fstrdynamic%VEC1(ndof*in-(ndof-idof))
339 if( .not. rinfo%conds(rid)%active ) cycle
344 ig = rinfo%conds(rid)%center_ngrp_id
346 ccoord(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, hecmesh%node)
347 cdisp(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, fstrsolid%unode)
350 ig = rinfo%conds(rid)%torque_ngrp_id
351 is0 = hecmesh%node_group%grp_index(ig-1) + 1
352 ie0 = hecmesh%node_group%grp_index(ig )
354 in = hecmesh%node_group%grp_item(ik)
355 cdiff0(1:ndof) = hecmesh%node(ndof*(in-1)+1:ndof*in) - ccoord(1:ndof)
356 cdiff(1:ndof) = cdiff0(1:ndof)
359 rhs = cdiff(idof) - cdiff0(idof) + cdisp(idof)
360 hecmat%B(ndof*in-(ndof-idof)) = rhs*fstrdynamic%VEC1(ndof*in-(ndof-idof))
365 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 displacement boundary condition in dynamic analysis.
subroutine dynamic_mat_ass_bc(cstep, hecMESH, hecMAT, fstrSOLID, fstrDYNAMIC, fstrPARAM, hecLagMAT, hecEBC, t_curr, iter, conMAT)
This subroutine setup disp bundary condition.
subroutine dynamic_explicit_ass_bc(hecMESH, hecMAT, fstrSOLID, fstrDYNAMIC, t_curr, iter)
This subroutine setup disp boundary condition.
subroutine dynamic_bc_init(hecMESH, hecMAT, fstrSOLID, fstrDYNAMIC, t_curr)
This subroutine setup initial condition of displacement.
This module defines common data and basic structures for analysis.
integer(kind=kint), parameter kcaslagrange
contact analysis algorithm
integer(kind=kint), parameter kststatic
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 rotate_3dvector_by_rodrigues_formula(r, v)
Data for DYNAMIC ANSLYSIS (fstrDYNAMIC)
FSTR INNER CONTROL PARAMETERS (fstrPARAM)