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