FrontISTR  5.9.0
Large-scale structural analysis program with finit element method
dynamic_mat_ass_bc_ac.f90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
2 ! Copyright (c) 2019 FrontISTR Commons
3 ! This software is released under the MIT License, see LICENSE.txt
4 !-------------------------------------------------------------------------------
6 
8 contains
9 
10  !C***
12  !C***
13 
14  subroutine dynamic_mat_ass_bc_ac(cstep, hecMESH, hecMAT, fstrSOLID ,fstrDYNAMIC, fstrPARAM, hecLagMAT, t_curr, iter, conMAT)
15  use m_fstr
16  use m_table_dyn
17  use mcontact
18 
19  implicit none
20  integer(kind=kint) :: cstep
21  type(hecmwst_matrix) :: hecMAT
22  type(hecmwst_local_mesh) :: hecMESH
23  type(fstr_solid) :: fstrSOLID
24  type(fstr_dynamic) :: fstrDYNAMIC
25  type(fstr_param) :: fstrPARAM
26  type(hecmwst_matrix_lagrange) :: hecLagMAT
27  real(kind=kreal) :: t_curr
28  integer, optional :: iter
29  type(hecmwst_matrix), optional :: conMAT
30 
31  integer(kind=kint) :: ig0, ig, ityp, NDOF, iS0, iE0, ik, in, idofS, idofE, idof
32  integer(kind=kint) :: flag_u, grpid
33  real(kind=kreal) :: b2, b3, b4, c1
34  real(kind=kreal) :: rhs, rhs0, f_t
35 
36  if( fstrsolid%ACCELERATION_type == kbcinitial )return
37 
38  flag_u = 3
39 
40  b2 = fstrdynamic%t_delta
41  b3 = fstrdynamic%t_delta**2*(0.5d0-fstrdynamic%beta)
42  b4 = fstrdynamic%t_delta**2*fstrdynamic%beta
43  c1 = fstrdynamic%t_delta**2
44 
45  ndof = hecmat%NDOF
46 
47  !C=============================C
48  !C-- implicit dynamic analysis
49  !C=============================C
50  if( fstrdynamic%idx_eqa == 1 ) then
51 
52  do ig0 = 1, fstrsolid%ACCELERATION_ngrp_tot
53  ig = fstrsolid%ACCELERATION_ngrp_ID(ig0)
54  grpid = fstrsolid%ACCELERATION_ngrp_GRPID(ig0)
55  if( .not. fstr_isboundaryactive( fstrsolid, grpid, cstep ) ) cycle
56  rhs = fstrsolid%ACCELERATION_ngrp_val(ig0)
57 
58  call fstr_get_amplitude_dyn(hecmesh, fstrsolid, fstrdynamic, ig0, t_curr, rhs, flag_u)
59  rhs0 = rhs
60 
61  ityp = fstrsolid%ACCELERATION_ngrp_type(ig0)
62 
63  idofs = ityp/10
64  idofe = ityp - idofs*10
65 
66  is0 = hecmesh%node_group%grp_index(ig-1) + 1
67  ie0 = hecmesh%node_group%grp_index(ig )
68 
69  do ik = is0, ie0
70  in = hecmesh%node_group%grp_item(ik)
71  do idof = idofs, idofe
72 
73  if( present(iter) ) then ! increment
74  if( iter>1 ) then
75  rhs = 0.d0
76  else
77  rhs = &
78  + b2*fstrdynamic%VEL (ndof*in-(ndof-idof),1) &
79  + b3*fstrdynamic%ACC (ndof*in-(ndof-idof),1) &
80  + b4*rhs0
81  endif
82  else
83  rhs = fstrdynamic%DISP(ndof*in-(ndof-idof),1) &
84  + b2*fstrdynamic%VEL (ndof*in-(ndof-idof),1) &
85  + b3*fstrdynamic%ACC (ndof*in-(ndof-idof),1) &
86  + b4*rhs0
87  endif
88  if(present(conmat)) then
89  call hecmw_mat_ass_bc(hecmat, in, idof, rhs, conmat)
90  else
91  call hecmw_mat_ass_bc(hecmat, in, idof, rhs)
92  endif
93  if( fstr_is_contact_active() .and. fstrparam%contact_algo == kcaslagrange &
94  .and. fstrparam%nlgeom .and. fstrdynamic%idx_resp == 1 ) then
95  if(present(conmat)) then
96  call hecmw_mat_ass_bc_contactlag(conmat,heclagmat,in,idof,rhs)
97  else
98  call hecmw_mat_ass_bc_contactlag(hecmat,heclagmat,in,idof,rhs)
99  endif
100  endif
101  enddo
102  enddo
103 
104  enddo
105  !C
106  !C-- end of implicit dynamic analysis
107  !C
108 
109  !C=============================C
110  !C-- explicit dynamic analysis
111  !C=============================C
112  else if( fstrdynamic%idx_eqa == 11 ) then
113  !C
114  do ig0 = 1, fstrsolid%ACCELERATION_ngrp_tot
115  ig = fstrsolid%ACCELERATION_ngrp_ID(ig0)
116  rhs = fstrsolid%ACCELERATION_ngrp_val(ig0)
117 
118  call fstr_get_amplitude_dyn(hecmesh, fstrsolid, fstrdynamic, ig0, t_curr, rhs, flag_u)
119  rhs0 = rhs
120 
121  ityp = fstrsolid%ACCELERATION_ngrp_type(ig0)
122 
123  is0 = hecmesh%node_group%grp_index(ig-1) + 1
124  ie0 = hecmesh%node_group%grp_index(ig )
125  idofs = ityp/10
126  idofe = ityp - idofs*10
127 
128  do ik = is0, ie0
129  in = hecmesh%node_group%grp_item(ik)
130 
131  do idof = idofs, idofe
132  rhs = 2.0*fstrdynamic%DISP(ndof*in-(ndof-idof),1) &
133  - fstrdynamic%DISP(ndof*in-(ndof-idof),3) &
134  + c1*rhs0
135  hecmat%B (ndof*in-(ndof-idof)) = rhs
136  fstrdynamic%VEC1(ndof*in-(ndof-idof)) = 1.0d0
137  end do
138  enddo
139  enddo
140  !C
141  !C-- end of explicit dynamic analysis
142  !C
143  end if
144  !
145  return
146  end subroutine dynamic_mat_ass_bc_ac
147 
148 
149  !C***
151  !C***
152  subroutine dynamic_bc_init_ac(hecMESH, hecMAT, fstrSOLID ,fstrDYNAMIC, t_curr)
153  use m_fstr
154  use m_table_dyn
155 
156  implicit none
157  type(hecmwst_matrix) :: hecmat
158  type(hecmwst_local_mesh) :: hecMESH
159  type(fstr_solid) :: fstrSOLID
160  type(fstr_dynamic) :: fstrDYNAMIC
161  real(kind=kreal) :: t_curr
162 
163  integer(kind=kint) :: NDOF, ig0, ig, ityp, iS0, iE0, ik, in, idofS, idofE, idof
164  !!!
165  integer(kind=kint) :: flag_u, grpid
166  real(kind=kreal) :: rhs, f_t
167 
168  if( fstrsolid%ACCELERATION_type == kbctransit )return
169 
170  !!!
171  flag_u = 3
172  !!!
173 
174  ndof = hecmat%NDOF
175  do ig0 = 1, fstrsolid%ACCELERATION_ngrp_tot
176  ig = fstrsolid%ACCELERATION_ngrp_ID(ig0)
177  grpid = fstrsolid%ACCELERATION_ngrp_GRPID(ig0)
178  if( .not. fstr_isboundaryactive( fstrsolid, grpid, 1 ) ) cycle
179  rhs = fstrsolid%ACCELERATION_ngrp_val(ig0)
180 
181  !!!!!! time history
182  call fstr_get_amplitude_dyn(hecmesh, fstrsolid, fstrdynamic, ig0, t_curr, rhs, flag_u)
183  !!!!!!
184  ityp = fstrsolid%ACCELERATION_ngrp_type(ig0)
185 
186  is0 = hecmesh%node_group%grp_index(ig-1) + 1
187  ie0 = hecmesh%node_group%grp_index(ig )
188  idofs = ityp/10
189  idofe = ityp - idofs*10
190 
191  do ik = is0, ie0
192  in = hecmesh%node_group%grp_item(ik)
193  !C
194  do idof = idofs, idofe
195  fstrdynamic%ACC (ndof*in-(ndof-idof),1) = rhs
196  end do
197  enddo
198  !*End ig0 (main) loop
199  enddo
200 
201  return
202  end subroutine dynamic_bc_init_ac
203 
204  subroutine dynamic_explicit_ass_ac(hecMESH, hecMAT, fstrSOLID ,fstrDYNAMIC, t_curr, iter)
205  use m_fstr
206  use m_table_dyn
207  use mcontact
208  type(hecmwst_matrix) :: hecmat
209  type(hecmwst_local_mesh) :: hecMESH
210  type(fstr_solid) :: fstrSOLID
211  type(fstr_dynamic) :: fstrDYNAMIC
212  real(kind=kreal) :: t_curr
213  integer, optional :: iter
214 
215  integer(kind=kint) :: ig0, ig, ityp, NDOF, iS0, iE0, ik, in, idofS, idofE, idof
216  integer(kind=kint) :: flag_u
217  real(kind=kreal) :: b2, b3, b4, c1
218  real(kind=kreal) :: rhs, rhs0, f_t
219 
220  if( fstrsolid%ACCELERATION_type == kbcinitial )return
221 
222  flag_u = 3
223 
224  b2 = fstrdynamic%t_delta
225  b3 = fstrdynamic%t_delta**2*(0.5d0-fstrdynamic%beta)
226  b4 = fstrdynamic%t_delta**2*fstrdynamic%beta
227  c1 = fstrdynamic%t_delta**2
228 
229  ndof = hecmat%NDOF
230 
231  do ig0 = 1, fstrsolid%ACCELERATION_ngrp_tot
232  ig = fstrsolid%ACCELERATION_ngrp_ID(ig0)
233  rhs = fstrsolid%ACCELERATION_ngrp_val(ig0)
234 
235  call fstr_get_amplitude_dyn(hecmesh, fstrsolid, fstrdynamic, ig0, t_curr, rhs, flag_u)
236  rhs0 = rhs
237 
238  ityp = fstrsolid%ACCELERATION_ngrp_type(ig0)
239 
240  is0 = hecmesh%node_group%grp_index(ig-1) + 1
241  ie0 = hecmesh%node_group%grp_index(ig )
242  idofs = ityp/10
243  idofe = ityp - idofs*10
244 
245  do ik = is0, ie0
246  in = hecmesh%node_group%grp_item(ik)
247 
248  do idof = idofs, idofe
249  rhs = 2.0*fstrdynamic%DISP(ndof*in-(ndof-idof),1) &
250  - fstrdynamic%DISP(ndof*in-(ndof-idof),3) &
251  + c1*rhs0
252  hecmat%B(ndof*in-(ndof-idof)) = rhs* fstrdynamic%VEC1(ndof*in-(ndof-idof))
253  ! fstrDYNAMIC%VEC1(NDOF*in-(NDOF-idof)) = 1.0d0
254  end do
255  enddo
256  enddo
257  end subroutine dynamic_explicit_ass_ac
258 
259 end module m_dynamic_mat_ass_bc_ac
This module contains functions to set acceleration boundary condition in dynamic analysis.
subroutine dynamic_bc_init_ac(hecMESH, hecMAT, fstrSOLID, fstrDYNAMIC, t_curr)
This function sets initial condition of acceleration.
subroutine dynamic_explicit_ass_ac(hecMESH, hecMAT, fstrSOLID, fstrDYNAMIC, t_curr, iter)
subroutine dynamic_mat_ass_bc_ac(cstep, hecMESH, hecMAT, fstrSOLID, fstrDYNAMIC, fstrPARAM, hecLagMAT, t_curr, iter, conMAT)
This subrouitne set acceleration boundary condition in dynamic analysis.
This module defines common data and basic structures for analysis.
Definition: m_fstr.F90:15
integer(kind=kint), parameter kcaslagrange
contact analysis algorithm
Definition: m_fstr.F90:61
integer(kind=kint), parameter kbcinitial
Definition: m_fstr.F90:68
integer(kind=kint), parameter kbctransit
Definition: m_fstr.F90:69
logical function fstr_isboundaryactive(fstrSOLID, nbc, cstep)
Definition: m_fstr.F90:1061
Amplitude evaluation for loading conditions in dynamic analysis.
Definition: table_dyn.f90:6
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.
Definition: table_dyn.f90:28
Top-level contact analysis module (System level)
logical function fstr_is_contact_active()
Data for DYNAMIC ANSLYSIS (fstrDYNAMIC)
Definition: m_fstr.F90:535
FSTR INNER CONTROL PARAMETERS (fstrPARAM)
Definition: m_fstr.F90:157