13 subroutine dynamic_mat_ass_bc(cstep, hecMESH, hecMAT, fstrSOLID ,fstrDYNAMIC, fstrPARAM, hecLagMAT, t_curr, iter, conMAT)
20 integer,
intent(in) :: cstep
21 type(hecmwst_matrix) :: hecMAT
22 type(hecmwst_local_mesh) :: hecMESH
26 type(hecmwst_matrix_lagrange) :: hecLagMAT
27 real(kind=kreal) :: t_curr
28 integer,
optional :: iter
29 type(hecmwst_matrix),
optional :: conMAT
31 integer(kind=kint) :: ig0, ig, ityp, NDOF, iS0, iE0, ik, in, idofS, idofE, idof
33 integer(kind=kint) :: flag_u, grpid
34 real(kind=kreal) :: rhs, f_t, f_t1
37 integer(kind=kint) :: n_rot, rid, n_nodes
38 type(trotinfo) :: rinfo
39 real(kind=kreal) :: theta, normal(3), direc(3), ccoord(3), cdiff(3), cdiff0(3)
40 real(kind=kreal) :: cdisp(3), cddisp(3)
41 real(kind=kreal) :: rotation_factor
44 n_rot = fstrsolid%BOUNDARY_ngrp_rot
45 if( n_rot > 0 )
call fstr_rotinfo_init(n_rot, rinfo)
51 if( fstrdynamic%idx_eqa == 1 )
then
53 do ig0 = 1, fstrsolid%BOUNDARY_ngrp_tot
54 ig = fstrsolid%BOUNDARY_ngrp_ID(ig0)
55 grpid = fstrsolid%BOUNDARY_ngrp_GRPID(ig0)
57 rhs = fstrsolid%BOUNDARY_ngrp_val(ig0)
59 if(
present(iter) )
then
63 call table_dyn(hecmesh, fstrsolid, fstrdynamic, ig0, t_curr-fstrdynamic%t_delta, f_t1, flag_u)
64 call table_dyn(hecmesh, fstrsolid, fstrdynamic, ig0, t_curr, f_t, flag_u)
65 rhs = rhs * (f_t-f_t1)
68 call table_dyn(hecmesh, fstrsolid, fstrdynamic, ig0, t_curr, 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)
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, hecmat%B)
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)
157 if(
present(conmat))
then
158 call hecmw_mat_ass_bc(hecmat, in, idof, rhs, conmat)
160 call hecmw_mat_ass_bc(hecmat, in, idof, rhs)
164 if(
present(conmat))
then
165 call hecmw_mat_ass_bc_contactlag(conmat,heclagmat,in,idof,rhs)
167 call hecmw_mat_ass_bc_contactlag(hecmat,heclagmat,in,idof,rhs)
180 else if( fstrdynamic%idx_eqa == 11 )
then
183 do ig0 = 1, fstrsolid%BOUNDARY_ngrp_tot
184 ig = fstrsolid%BOUNDARY_ngrp_ID(ig0)
185 rhs = fstrsolid%BOUNDARY_ngrp_val(ig0)
187 call table_dyn(hecmesh, fstrsolid, fstrdynamic, ig0, t_curr, f_t, flag_u)
190 ityp = fstrsolid%BOUNDARY_ngrp_type(ig0)
192 is0 = hecmesh%node_group%grp_index(ig-1) + 1
193 ie0 = hecmesh%node_group%grp_index(ig )
195 idofe = ityp - idofs*10
198 in = hecmesh%node_group%grp_item(ik)
200 do idof = idofs, idofe
201 hecmat%B (ndof*in-(ndof-idof)) = rhs
202 fstrdynamic%VEC1(ndof*in-(ndof-idof)) = 1.0d0
211 if( n_rot > 0 )
call fstr_rotinfo_finalize(rinfo)
224 type(hecmwst_matrix) :: hecmat
225 type(hecmwst_local_mesh) :: hecMESH
228 real(kind=kreal) :: t_curr
230 integer(kind=kint) :: NDOF, ig0, ig, ityp, iS0, iE0, ik, in, idofS, idofE, idof
231 integer(kind=kint) :: flag_u, grpid
232 real(kind=kreal) :: rhs, f_t
237 do ig0 = 1, fstrsolid%BOUNDARY_ngrp_tot
238 ig = fstrsolid%BOUNDARY_ngrp_ID(ig0)
239 rhs = fstrsolid%BOUNDARY_ngrp_val(ig0)
240 grpid = fstrsolid%BOUNDARY_ngrp_GRPID(ig0)
243 call table_dyn(hecmesh, fstrsolid, fstrdynamic, ig0, t_curr, f_t, flag_u)
246 ityp = fstrsolid%BOUNDARY_ngrp_type(ig0)
248 is0 = hecmesh%node_group%grp_index(ig-1) + 1
249 ie0 = hecmesh%node_group%grp_index(ig )
251 idofe = ityp - idofs*10
254 in = hecmesh%node_group%grp_item(ik)
256 do idof = idofs, idofe
257 fstrdynamic%DISP(ndof*in-(ndof-idof),1) = rhs
273 type(hecmwst_matrix) :: hecmat
274 type(hecmwst_local_mesh) :: hecMESH
277 real(kind=kreal) :: t_curr
278 integer,
optional :: iter
280 integer(kind=kint) :: ig0, ig, ityp, NDOF, iS0, iE0, ik, in, idofS, idofE, idof
282 integer(kind=kint) :: flag_u
283 real(kind=kreal) :: rhs, f_t, f_t1
286 integer(kind=kint) :: n_rot, rid, n_nodes
287 type(trotinfo) :: rinfo
288 real(kind=kreal) :: theta, normal(3), direc(3), ccoord(3), cdiff(3), cdiff0(3)
289 real(kind=kreal) :: cdisp(3), cddisp(3)
292 n_rot = fstrsolid%BOUNDARY_ngrp_rot
293 if( n_rot > 0 )
call fstr_rotinfo_init(n_rot, rinfo)
299 do ig0 = 1, fstrsolid%BOUNDARY_ngrp_tot
300 ig = fstrsolid%BOUNDARY_ngrp_ID(ig0)
301 rhs = fstrsolid%BOUNDARY_ngrp_val(ig0)
303 call table_dyn(hecmesh, fstrsolid, fstrdynamic, ig0, t_curr, f_t, flag_u)
306 ityp = fstrsolid%BOUNDARY_ngrp_type(ig0)
308 is0 = hecmesh%node_group%grp_index(ig-1) + 1
309 ie0 = hecmesh%node_group%grp_index(ig )
311 idofe = ityp - idofs*10
314 in = hecmesh%node_group%grp_item(ik)
316 do idof = idofs, idofe
317 hecmat%B(ndof*in-(ndof-idof)) = rhs*fstrdynamic%VEC1(ndof*in-(ndof-idof))
323 if( n_rot > 0 )
call fstr_rotinfo_finalize(rinfo)
This module contains functions to set displacement boundary condition in dynamic analysis.
subroutine dynamic_mat_ass_bc(cstep, hecMESH, hecMAT, fstrSOLID, fstrDYNAMIC, fstrPARAM, hecLagMAT, 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)
Table of lading step in dynamic analysis.
subroutine table_dyn(hecMESH, fstrSOLID, fstrDYNAMIC, ig0, t_curr, 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)