13 subroutine fstr_addbc(cstep,hecMESH,hecMAT,fstrSOLID,fstrPARAM,fstrMAT,iter,conMAT)
21 integer,
intent(in) :: cstep
22 type(hecmwst_local_mesh) :: hecMESH
23 type(hecmwst_matrix) :: hecMAT
27 integer(kind=kint) :: iter
28 type(hecmwst_matrix),
optional :: conMAT
30 integer(kind=kint) :: ig0, ig, ityp, idofS, idofE, idof, iS0, iE0, ik, in
31 real(kind=kreal) :: rhs, factor
32 integer(kind=kint) :: ndof, grpid
35 integer(kind=kint) :: n_rot, rid
36 type(trotinfo) :: rinfo
37 real(kind=kreal) :: ccoord(3), cdiff(3), cdiff0(3)
38 real(kind=kreal) :: cdisp(3), cddisp(3)
42 factor = fstrsolid%FACTOR(2)-fstrsolid%FACTOR(1)
44 if( cstep<=fstrsolid%nstep_tot .and. fstrsolid%step_ctrl(cstep)%solution==stepvisco )
then
46 if( fstrsolid%FACTOR(1) < 1.d-10 ) factor = 1.d0
48 if( iter>1 ) factor=0.d0
50 n_rot = fstrsolid%BOUNDARY_ngrp_rot
51 if( n_rot > 0 )
call fstr_rotinfo_init(n_rot, rinfo)
54 do ig0 = 1, fstrsolid%BOUNDARY_ngrp_tot
55 grpid = fstrsolid%BOUNDARY_ngrp_GRPID(ig0)
57 ig = fstrsolid%BOUNDARY_ngrp_ID(ig0)
58 rhs = fstrsolid%BOUNDARY_ngrp_val(ig0)
62 ityp = fstrsolid%BOUNDARY_ngrp_type(ig0)
64 idofe = ityp - idofs*10
66 is0 = hecmesh%node_group%grp_index(ig-1) + 1
67 ie0 = hecmesh%node_group%grp_index(ig )
69 if( fstrsolid%BOUNDARY_ngrp_rotID(ig0) > 0 )
then
70 rid = fstrsolid%BOUNDARY_ngrp_rotID(ig0)
71 if( .not. rinfo%conds(rid)%active )
then
72 rinfo%conds(rid)%active = .true.
73 rinfo%conds(rid)%center_ngrp_id = fstrsolid%BOUNDARY_ngrp_centerID(ig0)
74 rinfo%conds(rid)%torque_ngrp_id = ig
78 rinfo%conds(rid)%vec(idof-ndof) = rhs
80 rinfo%conds(rid)%vec(idof) = rhs
88 in = hecmesh%node_group%grp_item(ik)
90 do idof = idofs, idofe
91 if(
present(conmat))
then
92 call hecmw_mat_ass_bc(hecmat, in, idof, rhs, conmat)
94 call hecmw_mat_ass_bc(hecmat, in, idof, rhs)
98 if(
present(conmat))
then
111 if( .not. rinfo%conds(rid)%active ) cycle
116 if( factor > 0.d0 )
then
117 ig = rinfo%conds(rid)%center_ngrp_id
119 ccoord(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, hecmesh%node)
120 cdisp(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, fstrsolid%unode)
121 cddisp(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, hecmat%B)
123 ccoord(1:ndof) = ccoord(1:ndof) + cdisp(1:ndof)
126 ig = rinfo%conds(rid)%torque_ngrp_id
127 is0 = hecmesh%node_group%grp_index(ig-1) + 1
128 ie0 = hecmesh%node_group%grp_index(ig )
130 in = hecmesh%node_group%grp_item(ik)
131 if( factor > 0.d0 )
then
132 cdiff0(1:ndof) = hecmesh%node(ndof*(in-1)+1:ndof*in)+fstrsolid%unode(ndof*(in-1)+1:ndof*in)-ccoord(1:ndof)
133 cdiff(1:ndof) = cdiff0(1:ndof)
137 rhs = cdiff(idof)-cdiff0(idof)+cddisp(idof)
138 if(
present(conmat))
then
139 call hecmw_mat_ass_bc(hecmat, in, idof, rhs, conmat)
141 call hecmw_mat_ass_bc(hecmat, in, idof, rhs)
145 if(
present(conmat))
then
154 if( n_rot > 0 )
call fstr_rotinfo_finalize(rinfo)
162 do ig0=1,fstrsolid%n_fix_mpc
163 if( fstrsolid%mpc_const(ig0) == 0.d0 ) cycle
165 rhs = fstrsolid%mpc_const(ig0)*factor
166 hecmesh%mpc%mpc_const(ig0) = rhs
This module provides a function to deal with prescribed displacement.
subroutine fstr_addbc(cstep, hecMESH, hecMAT, fstrSOLID, fstrPARAM, fstrMAT, iter, conMAT)
Add Essential Boundary Conditions.
This module defined coomon 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)
This module provide common functions of 3D truss elements.
subroutine truss_diag_modify(hecMAT, hecMESH)
This module provides aux functions.
subroutine rotate_3dvector_by_rodrigues_formula(r, v)
FSTR INNER CONTROL PARAMETERS (fstrPARAM)