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
64 call fstr_get_amplitude_dyn(hecmesh, fstrsolid, fstrdynamic, ig0, t_curr-fstrdynamic%t_delta, f_t1, 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)
121 if( .not. rinfo%conds(rid)%active ) cycle
126 if(
present(iter) )
then
128 rotation_factor = 0.d0
130 rotation_factor = 1.0d0
133 rotation_factor = 1.0d0
136 if( rotation_factor > 0.d0 )
then
137 ig = rinfo%conds(rid)%center_ngrp_id
139 ccoord(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, hecmesh%node)
140 cdisp(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, fstrsolid%unode)
141 cddisp(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, hecmat%B)
143 ccoord(1:ndof) = ccoord(1:ndof) + cdisp(1:ndof)
146 ig = rinfo%conds(rid)%torque_ngrp_id
147 is0 = hecmesh%node_group%grp_index(ig-1) + 1
148 ie0 = hecmesh%node_group%grp_index(ig )
150 in = hecmesh%node_group%grp_item(ik)
151 if( rotation_factor > 0.d0 )
then
152 cdiff0(1:ndof) = hecmesh%node(ndof*(in-1)+1:ndof*in)+fstrsolid%unode(ndof*(in-1)+1:ndof*in)-ccoord(1:ndof)
153 cdiff(1:ndof) = cdiff0(1:ndof)
157 rhs = cdiff(idof)-cdiff0(idof)+cddisp(idof)
158 if(
present(conmat))
then
159 call hecmw_mat_ass_bc(hecmat, in, idof, rhs, conmat)
161 call hecmw_mat_ass_bc(hecmat, in, idof, rhs)
165 if(
present(conmat))
then
166 call hecmw_mat_ass_bc_contactlag(conmat,heclagmat,in,idof,rhs)
168 call hecmw_mat_ass_bc_contactlag(hecmat,heclagmat,in,idof,rhs)
181 else if( fstrdynamic%idx_eqa == 11 )
then
184 do ig0 = 1, fstrsolid%BOUNDARY_ngrp_tot
185 ig = fstrsolid%BOUNDARY_ngrp_ID(ig0)
186 rhs = fstrsolid%BOUNDARY_ngrp_val(ig0)
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)
245 ityp = fstrsolid%BOUNDARY_ngrp_type(ig0)
247 is0 = hecmesh%node_group%grp_index(ig-1) + 1
248 ie0 = hecmesh%node_group%grp_index(ig )
250 idofe = ityp - idofs*10
253 in = hecmesh%node_group%grp_item(ik)
255 do idof = idofs, idofe
256 fstrdynamic%DISP(ndof*in-(ndof-idof),1) = rhs
272 type(hecmwst_matrix) :: hecmat
273 type(hecmwst_local_mesh) :: hecMESH
276 real(kind=kreal) :: t_curr
277 integer,
optional :: iter
279 integer(kind=kint) :: ig0, ig, ityp, NDOF, iS0, iE0, ik, in, idofS, idofE, idof
281 integer(kind=kint) :: flag_u
282 real(kind=kreal) :: rhs, f_t, f_t1
285 integer(kind=kint) :: n_rot, rid, n_nodes
286 type(trotinfo) :: rinfo
287 real(kind=kreal) :: theta, normal(3), direc(3), ccoord(3), cdiff(3), cdiff0(3)
288 real(kind=kreal) :: cdisp(3), cddisp(3)
291 n_rot = fstrsolid%BOUNDARY_ngrp_rot
292 if( n_rot > 0 )
call fstr_rotinfo_init(n_rot, rinfo)
298 do ig0 = 1, fstrsolid%BOUNDARY_ngrp_tot
299 ig = fstrsolid%BOUNDARY_ngrp_ID(ig0)
300 rhs = fstrsolid%BOUNDARY_ngrp_val(ig0)
304 ityp = fstrsolid%BOUNDARY_ngrp_type(ig0)
306 is0 = hecmesh%node_group%grp_index(ig-1) + 1
307 ie0 = hecmesh%node_group%grp_index(ig )
309 idofe = ityp - idofs*10
311 if( fstrsolid%BOUNDARY_ngrp_rotID(ig0) > 0 )
then
312 rid = fstrsolid%BOUNDARY_ngrp_rotID(ig0)
313 if( .not. rinfo%conds(rid)%active )
then
314 rinfo%conds(rid)%active = .true.
315 rinfo%conds(rid)%center_ngrp_id = fstrsolid%BOUNDARY_ngrp_centerID(ig0)
316 rinfo%conds(rid)%torque_ngrp_id = ig
320 rinfo%conds(rid)%vec(idof-ndof) = rhs
322 rinfo%conds(rid)%vec(idof) = rhs
329 in = hecmesh%node_group%grp_item(ik)
331 do idof = idofs, idofe
332 hecmat%B(ndof*in-(ndof-idof)) = rhs*fstrdynamic%VEC1(ndof*in-(ndof-idof))
344 if( .not. rinfo%conds(rid)%active ) cycle
349 ig = rinfo%conds(rid)%center_ngrp_id
351 ccoord(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, hecmesh%node)
352 cdisp(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, fstrsolid%unode)
355 ig = rinfo%conds(rid)%torque_ngrp_id
356 is0 = hecmesh%node_group%grp_index(ig-1) + 1
357 ie0 = hecmesh%node_group%grp_index(ig )
359 in = hecmesh%node_group%grp_item(ik)
360 cdiff0(1:ndof) = hecmesh%node(ndof*(in-1)+1:ndof*in) - ccoord(1:ndof)
361 cdiff(1:ndof) = cdiff0(1:ndof)
364 rhs = cdiff(idof) - cdiff0(idof) + cdisp(idof)
365 hecmat%B(ndof*in-(ndof-idof)) = rhs*fstrdynamic%VEC1(ndof*in-(ndof-idof))
370 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)
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)