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)
39 real(kind=kreal) :: rotation_factor
42 n_rot = fstrsolid%BOUNDARY_ngrp_rot
43 if( n_rot > 0 )
call fstr_rotinfo_init(n_rot, rinfo)
44 fstrsolid%REACTION = 0.d0
50 if( fstrdynamic%idx_eqa == 1 )
then
52 do ig0 = 1, fstrsolid%BOUNDARY_ngrp_tot
53 ig = fstrsolid%BOUNDARY_ngrp_ID(ig0)
54 rhs = fstrsolid%BOUNDARY_ngrp_val(ig0)
56 if(
present(iter) )
then
60 fstrdynamic%i_step = fstrdynamic%i_step-1
61 fstrdynamic%t_curr = fstrdynamic%t_curr - fstrdynamic%t_delta
62 call table_dyn(hecmesh, fstrsolid, fstrdynamic, ig0, f_t1, flag_u)
63 fstrdynamic%i_step = fstrdynamic%i_step+1
64 fstrdynamic%t_curr = fstrdynamic%t_curr + fstrdynamic%t_delta
65 call table_dyn(hecmesh, fstrsolid, fstrdynamic, ig0, f_t, flag_u)
66 rhs = rhs * (f_t-f_t1)
69 call table_dyn(hecmesh, fstrsolid, fstrdynamic, ig0, f_t, flag_u)
73 ityp = fstrsolid%BOUNDARY_ngrp_type(ig0)
75 idofe = ityp - idofs*10
77 is0 = hecmesh%node_group%grp_index(ig-1) + 1
78 ie0 = hecmesh%node_group%grp_index(ig )
80 if( fstrsolid%BOUNDARY_ngrp_rotID(ig0) > 0 )
then
81 rid = fstrsolid%BOUNDARY_ngrp_rotID(ig0)
82 if( .not. rinfo%conds(rid)%active )
then
83 rinfo%conds(rid)%active = .true.
84 rinfo%conds(rid)%center_ngrp_id = fstrsolid%BOUNDARY_ngrp_centerID(ig0)
85 rinfo%conds(rid)%torque_ngrp_id = ig
89 rinfo%conds(rid)%vec(idof-ndof) = rhs
91 rinfo%conds(rid)%vec(idof) = rhs
98 in = hecmesh%node_group%grp_item(ik)
100 do idof = idofs, idofe
101 if(
present(conmat))
then
102 call hecmw_mat_ass_bc(hecmat, in, idof, rhs, conmat)
104 call hecmw_mat_ass_bc(hecmat, in, idof, rhs)
107 .and. fstrparam%nlgeom .and. fstrdynamic%idx_resp == 1 )
then
108 if(
present(conmat))
then
109 call hecmw_mat_ass_bc_contactlag(conmat,heclagmat,in,idof,rhs)
111 call hecmw_mat_ass_bc_contactlag(hecmat,heclagmat,in,idof,rhs)
116 fstrsolid%REACTION(ndof*(in-1)+idof) = fstrsolid%QFORCE(ndof*(in-1)+idof)
124 if( .not. rinfo%conds(rid)%active ) cycle
129 if(
present(iter) )
then
131 rotation_factor = 0.d0
133 rotation_factor = 1.0d0
136 rotation_factor = 1.0d0
139 if( rotation_factor > 0.d0 )
then
140 ig = rinfo%conds(rid)%center_ngrp_id
142 ccoord(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, hecmesh%node)
143 cdisp(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, fstrsolid%unode)
144 cddisp(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, hecmat%B)
146 ccoord(1:ndof) = ccoord(1:ndof) + cdisp(1:ndof)
149 ig = rinfo%conds(rid)%torque_ngrp_id
150 is0 = hecmesh%node_group%grp_index(ig-1) + 1
151 ie0 = hecmesh%node_group%grp_index(ig )
153 in = hecmesh%node_group%grp_item(ik)
154 if( rotation_factor > 0.d0 )
then
155 cdiff0(1:ndof) = hecmesh%node(ndof*(in-1)+1:ndof*in)+fstrsolid%unode(ndof*(in-1)+1:ndof*in)-ccoord(1:ndof)
156 cdiff(1:ndof) = cdiff0(1:ndof)
160 rhs = cdiff(idof)-cdiff0(idof)+cddisp(idof)
161 if(
present(conmat))
then
162 call hecmw_mat_ass_bc(hecmat, in, idof, rhs, conmat)
164 call hecmw_mat_ass_bc(hecmat, in, idof, rhs)
168 if(
present(conmat))
then
169 call hecmw_mat_ass_bc_contactlag(conmat,heclagmat,in,idof,rhs)
171 call hecmw_mat_ass_bc_contactlag(hecmat,heclagmat,in,idof,rhs)
176 fstrsolid%REACTION(ndof*(in-1)+idof) = fstrsolid%QFORCE(ndof*(in-1)+idof)
187 else if( fstrdynamic%idx_eqa == 11 )
then
190 do ig0 = 1, fstrsolid%BOUNDARY_ngrp_tot
191 ig = fstrsolid%BOUNDARY_ngrp_ID(ig0)
192 rhs = fstrsolid%BOUNDARY_ngrp_val(ig0)
194 call table_dyn(hecmesh, fstrsolid, fstrdynamic, ig0, f_t, flag_u)
197 ityp = fstrsolid%BOUNDARY_ngrp_type(ig0)
199 is0 = hecmesh%node_group%grp_index(ig-1) + 1
200 ie0 = hecmesh%node_group%grp_index(ig )
202 idofe = ityp - idofs*10
205 in = hecmesh%node_group%grp_item(ik)
207 do idof = idofs, idofe
208 hecmat%B (ndof*in-(ndof-idof)) = rhs
209 fstrdynamic%VEC1(ndof*in-(ndof-idof)) = 1.0d0
212 fstrsolid%REACTION(ndof*(in-1)+idof) = fstrsolid%QFORCE(ndof*(in-1)+idof)
221 if( n_rot > 0 )
call fstr_rotinfo_finalize(rinfo)
234 type(hecmwst_matrix) :: hecmat
235 type(hecmwst_local_mesh) :: hecMESH
239 integer(kind=kint) :: NDOF, ig0, ig, ityp, iS0, iE0, ik, in, idofS, idofE, idof
240 integer(kind=kint) :: flag_u
241 real(kind=kreal) :: rhs, f_t
246 do ig0 = 1, fstrsolid%BOUNDARY_ngrp_tot
247 ig = fstrsolid%BOUNDARY_ngrp_ID(ig0)
248 rhs = fstrsolid%BOUNDARY_ngrp_val(ig0)
251 call table_dyn(hecmesh, fstrsolid, fstrdynamic, ig0, f_t, flag_u)
254 ityp = fstrsolid%BOUNDARY_ngrp_type(ig0)
256 is0 = hecmesh%node_group%grp_index(ig-1) + 1
257 ie0 = hecmesh%node_group%grp_index(ig )
259 idofe = ityp - idofs*10
262 in = hecmesh%node_group%grp_item(ik)
264 do idof = idofs, idofe
265 fstrdynamic%DISP(ndof*in-(ndof-idof),1) = rhs
281 type(hecmwst_matrix) :: hecmat
282 type(hecmwst_local_mesh) :: hecMESH
285 integer,
optional :: iter
287 integer(kind=kint) :: ig0, ig, ityp, NDOF, iS0, iE0, ik, in, idofS, idofE, idof
289 integer(kind=kint) :: flag_u
290 real(kind=kreal) :: rhs, f_t, f_t1
293 integer(kind=kint) :: n_rot, rid, n_nodes
294 type(trotinfo) :: rinfo
295 real(kind=kreal) :: theta, normal(3), direc(3), ccoord(3), cdiff(3), cdiff0(3)
296 real(kind=kreal) :: cdisp(3), cddisp(3)
299 n_rot = fstrsolid%BOUNDARY_ngrp_rot
300 if( n_rot > 0 )
call fstr_rotinfo_init(n_rot, rinfo)
301 fstrsolid%REACTION = 0.d0
307 do ig0 = 1, fstrsolid%BOUNDARY_ngrp_tot
308 ig = fstrsolid%BOUNDARY_ngrp_ID(ig0)
309 rhs = fstrsolid%BOUNDARY_ngrp_val(ig0)
311 call table_dyn(hecmesh, fstrsolid, fstrdynamic, ig0, f_t, flag_u)
314 ityp = fstrsolid%BOUNDARY_ngrp_type(ig0)
316 is0 = hecmesh%node_group%grp_index(ig-1) + 1
317 ie0 = hecmesh%node_group%grp_index(ig )
319 idofe = ityp - idofs*10
322 in = hecmesh%node_group%grp_item(ik)
324 do idof = idofs, idofe
325 hecmat%B(ndof*in-(ndof-idof)) = rhs*fstrdynamic%VEC1(ndof*in-(ndof-idof))
329 fstrsolid%REACTION(ndof*(in-1)+idof) = fstrsolid%QFORCE(ndof*(in-1)+idof)
334 if( n_rot > 0 )
call fstr_rotinfo_finalize(rinfo)
This module contains functions to set displacement boundary condition in dynamic analysis.
subroutine dynamic_bc_init(hecMESH, hecMAT, fstrSOLID, fstrDYNAMIC)
This subroutine setup initial condition of displacement.
subroutine dynamic_mat_ass_bc(hecMESH, hecMAT, fstrSOLID, fstrDYNAMIC, fstrPARAM, hecLagMAT, iter, conMAT)
This subroutine setup disp bundary condition.
subroutine dynamic_explicit_ass_bc(hecMESH, hecMAT, fstrSOLID, fstrDYNAMIC, iter)
This subroutine setup disp boundary condition.
This module defines common data and basic structures for analysis.
integer(kind=kint), parameter kcaslagrange
contact analysis algorithm
integer(kind=kint), parameter kststatic
Table of lading step in dynamic analysis.
subroutine table_dyn(hecMESH, fstrSOLID, fstrDYNAMIC, ig0, f_t, flag_u)
This module provides aux functions.
subroutine rotate_3dvector_by_rodrigues_formula(r, v)
Data for DYNAMIC ANSLYSIS (fstrDYNAMIC)
FSTR INNER CONTROL PARAMETERS (fstrPARAM)