13 subroutine fstr_addbc(cstep,hecMESH,hecMAT,fstrSOLID,fstrPARAM,hecLagMAT,iter,hecEBC,conMAT,RHSvector)
21 integer,
intent(in) :: cstep
22 type(hecmwst_local_mesh) :: hecMESH
23 type(hecmwst_matrix) :: hecMAT
26 type(hecmwst_matrix_lagrange) :: hecLagMAT
27 integer(kind=kint) :: iter
28 type(hecmwst_ebc) :: hecEBC
29 type(hecmwst_matrix),
optional :: conMAT
30 real(kind=kreal),
optional :: rhsvector(:)
32 integer(kind=kint) :: ig0, ig, ityp, idofS, idofE, idof, iS0, iE0, ik, in
33 real(kind=kreal) :: rhs0, rhs, factor, factor0
34 integer(kind=kint) :: ndof, grpid, istot
37 integer(kind=kint) :: n_rot, rid, jj_n_amp
38 type(trotinfo) :: rinfo
39 real(kind=kreal) :: ccoord(3), cdiff(3), cdiff0(3)
40 real(kind=kreal) :: cdisp(3), cddisp(3)
45 n_rot = fstrsolid%BOUNDARY_ngrp_rot
46 if( n_rot > 0 )
call fstr_rotinfo_init(n_rot, rinfo)
49 do ig0 = 1, fstrsolid%BOUNDARY_ngrp_tot
50 grpid = fstrsolid%BOUNDARY_ngrp_GRPID(ig0)
54 jj_n_amp = fstrsolid%BOUNDARY_ngrp_amp(ig0)
55 if( jj_n_amp <= 0 )
then
56 factor0 = fstrsolid%FACTOR(1)
57 factor = fstrsolid%FACTOR(2)
64 factor = factor - factor0
65 if(fstrsolid%step_ctrl(cstep)%amp_default_type==stepampstep)
then
67 if(factor0 < 1.d-10) factor = 1.d0
72 ig = fstrsolid%BOUNDARY_ngrp_ID(ig0)
73 rhs0 = fstrsolid%BOUNDARY_ngrp_val(ig0)
75 ityp = fstrsolid%BOUNDARY_ngrp_type(ig0)
77 idofe = ityp - idofs*10
79 istot = fstrsolid%BOUNDARY_ngrp_istot(ig0)
81 is0 = hecmesh%node_group%grp_index(ig-1) + 1
82 ie0 = hecmesh%node_group%grp_index(ig )
84 if( fstrsolid%BOUNDARY_ngrp_rotID(ig0) > 0 )
then
85 rid = fstrsolid%BOUNDARY_ngrp_rotID(ig0)
86 if( .not. rinfo%conds(rid)%active )
then
87 rinfo%conds(rid)%active = .true.
88 rinfo%conds(rid)%center_ngrp_id = fstrsolid%BOUNDARY_ngrp_centerID(ig0)
89 rinfo%conds(rid)%torque_ngrp_id = ig
95 write(*,*)
'Error: rotational boundary cannot be specified with total value'
96 call hecmw_abort( hecmw_comm_get_comm() )
100 rinfo%conds(rid)%vec(idof-ndof) = rhs
102 rinfo%conds(rid)%vec(idof) = rhs
110 in = hecmesh%node_group%grp_item(ik)
112 do idof = idofs, idofe
113 if( istot == 0 )
then
116 rhs = (rhs0 - fstrsolid%unode_bak(ndof*(in-1)+idof))*factor
119 if(
present(rhsvector))
then
120 rhsvector(ndof*(in-1)+idof) = rhs
126 if(
present(conmat))
then
127 call hecmw_mat_ass_bc_contactlag(conmat,heclagmat,in,idof,rhs)
129 call hecmw_mat_ass_bc_contactlag(hecmat,heclagmat,in,idof,rhs)
140 if( .not. rinfo%conds(rid)%active ) cycle
145 if( factor > 0.d0 )
then
146 ig = rinfo%conds(rid)%center_ngrp_id
148 ccoord(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, hecmesh%node)
149 cdisp(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, fstrsolid%unode)
150 cddisp(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, hecebc%val)
152 ccoord(1:ndof) = ccoord(1:ndof) + cdisp(1:ndof)
155 ig = rinfo%conds(rid)%torque_ngrp_id
156 is0 = hecmesh%node_group%grp_index(ig-1) + 1
157 ie0 = hecmesh%node_group%grp_index(ig )
159 in = hecmesh%node_group%grp_item(ik)
160 if( factor > 0.d0 )
then
161 cdiff0(1:ndof) = hecmesh%node(ndof*(in-1)+1:ndof*in)+fstrsolid%unode(ndof*(in-1)+1:ndof*in)-ccoord(1:ndof)
162 cdiff(1:ndof) = cdiff0(1:ndof)
166 rhs = cdiff(idof)-cdiff0(idof)+cddisp(idof)
168 if(
present(rhsvector))
then
169 rhsvector(ndof*(in-1)+idof) = rhs
175 if(
present(conmat))
then
176 call hecmw_mat_ass_bc_contactlag(conmat,heclagmat,in,idof,rhs)
178 call hecmw_mat_ass_bc_contactlag(hecmat,heclagmat,in,idof,rhs)
184 if( n_rot > 0 )
call fstr_rotinfo_finalize(rinfo)
192 do ig0=1,fstrsolid%n_fix_mpc
193 if( fstrsolid%mpc_const(ig0) == 0.d0 ) cycle
195 rhs = fstrsolid%mpc_const(ig0)*factor
196 hecmesh%mpc%mpc_const(ig0) = rhs
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 provides a function to deal with prescribed displacement.
subroutine fstr_addbc(cstep, hecMESH, hecMAT, fstrSOLID, fstrPARAM, hecLagMAT, iter, hecEBC, conMAT, RHSvector)
Add Essential Boundary Conditions.
This module provides functions to deal with time and increment of stress analysis.
real(kind=kreal) function fstr_get_timeinc()
real(kind=kreal) function fstr_get_time()
This module defines common data and basic structures for analysis.
subroutine fstr_get_amplitude(hecMESH, fstrSOLID, cstep, jj_n_amp, time, value)
Evaluate the amplitude-scaled target value a(t) for static 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)