FrontISTR  5.7.0
Large-scale structural analysis program with finit element method
dynamic_output.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 !-------------------------------------------------------------------------------
7  implicit none
8 contains
9 
11  !----------------------------------------------------------------------*
12  subroutine fstr_dynamic_output( hecMESH, fstrSOLID, fstrDYNAMIC, fstrPARAM )
13  !----------------------------------------------------------------------*
14  use m_fstr
16  use m_make_result
18  type(hecmwst_local_mesh), intent(in) :: hecmesh
19  type(fstr_solid), intent(inout) :: fstrSOLID
20  type(fstr_dynamic), intent(in) :: fstrDYNAMIC
21  type(fstr_param), intent(in) :: fstrPARAM
22 
23  type(hecmwst_result_data) :: fstrRESULT
24  integer(kind=kint) :: i, j, ndof, maxstep, interval, fnum, is, iE, gid, istep
25 
26  ndof = hecmesh%n_dof
27 
28  !C-- SET DISPLACEMENT etc.
29  istep = fstrdynamic%i_step
30 
31  if( fstrsolid%TEMP_ngrp_tot>0 .or. fstrsolid%TEMP_irres>0 ) then
32  if( ndof==3 ) then
33  allocate( fstrsolid%tnstrain(hecmesh%n_node*6) )
34  allocate( fstrsolid%testrain(hecmesh%n_elem*6) )
35  else if( ndof==2 ) then
36  allocate( fstrsolid%tnstrain(hecmesh%n_node*3) )
37  allocate( fstrsolid%testrain(hecmesh%n_elem*3) )
38  else if( ndof== 4) then
39  write(*,*)'Error: This routine is not implemented'
40  stop
41  endif
42  endif
43 
44  if( ndof==3 .or. ndof == 4 ) then
45  call fstr_nodalstress3d( hecmesh, fstrsolid )
46  else if( ndof==2 ) then
47  call fstr_nodalstress2d( hecmesh, fstrsolid )
48  else if( ndof==6 ) then
49  call fstr_nodalstress6d( hecmesh, fstrsolid )
50  endif
51 
52  if( associated( fstrsolid%contacts ) ) &
53  & call setup_contact_output_variables( hecmesh, fstrsolid, -1 )
54 
55  maxstep = fstrdynamic%n_step
56 
57  if( (mod(istep,fstrsolid%output_ctrl(1)%frequency)==0 .or. istep==maxstep) ) then
58  fnum = fstrsolid%output_ctrl(1)%filenum
59  call fstr_dynamic_post( fnum, hecmesh, fstrsolid, fstrdynamic )
60  endif
61 
62  if( fstrsolid%output_ctrl(2)%outinfo%grp_id>0 .and. &
63  (mod(istep,fstrsolid%output_ctrl(2)%frequency)==0 .or. istep==maxstep) ) then
64  is = fstrsolid%output_ctrl(2)%outinfo%grp_id
65  fnum = fstrsolid%output_ctrl(2)%filenum
66  do i = hecmesh%node_group%grp_index(is-1)+1, hecmesh%node_group%grp_index(is)
67  ie = hecmesh%node_group%grp_item(i)
68  gid = hecmesh%global_node_ID(ie)
69  write(fnum,'(2i10,1p6e15.7)') istep,gid,(fstrsolid%unode(ndof*(ie-1)+j),j=1,ndof)
70  enddo
71  endif
72 
73  if( iresult==1 .and. &
74  (mod(istep,fstrsolid%output_ctrl(3)%frequency)==0 .or. istep==maxstep) ) then
75  if( associated( fstrsolid%contacts ) ) &
76  & call setup_contact_output_variables( hecmesh, fstrsolid, 3 )
77  call fstr_write_result( hecmesh, fstrsolid, fstrparam, istep, fstrdynamic%t_curr, 0, fstrdynamic )
78  endif
79 
80  if( ivisual==1 .and. &
81  (mod(istep,fstrsolid%output_ctrl(4)%frequency)==0 .or. istep==maxstep) ) then
82 
83  if( associated( fstrsolid%contacts ) ) &
84  & call setup_contact_output_variables( hecmesh, fstrsolid, 4 )
85  call fstr_make_result( hecmesh, fstrsolid, fstrresult, istep, fstrdynamic%t_curr, fstrdynamic )
86  call fstr2hecmw_mesh_conv( hecmesh )
87  call hecmw_visualize_init
88  call hecmw_visualize( hecmesh, fstrresult, istep )
89  call hecmw_visualize_finalize
90  call hecmw2fstr_mesh_conv( hecmesh )
91  call hecmw_result_free( fstrresult )
92  endif
93 
94  end subroutine fstr_dynamic_output
95 
97  !----------------------------------------------------------------------*
98  subroutine fstr_dynamic_post( fnum, hecMESH, fstrSOLID, fstrDYNAMIC )
99  !----------------------------------------------------------------------*
100  use m_fstr
101  integer, intent(in) :: fnum
102  type(hecmwst_local_mesh), intent(in) :: hecMESH
103  type(fstr_solid), intent(in) :: fstrSOLID
104  type(fstr_dynamic), intent(in) :: fstrDYNAMIC
105 
106  real(kind=kreal) :: umax(6), umin(6), vmax(6), vmin(6), amax(6), amin(6)
107  real(kind=kreal) :: emax(14), emin(14), smax(14), smin(14)
108  real(kind=kreal) :: mmax(1), mmin(1), emmax(1), emmin(1)
109  real(kind=kreal) :: eemax(14), eemin(14), esmax(14), esmin(14)
110 
111  real(kind=kreal) :: gumax(6), gumin(6), gvmax(6), gvmin(6), gamax(6), gamin(6)
112  real(kind=kreal) :: gemax(14), gemin(14), gsmax(14), gsmin(14)
113  real(kind=kreal) :: gmmax(1), gmmin(1), gemmax(1), gemmin(1)
114  real(kind=kreal) :: geemax(14), geemin(14), gesmax(14), gesmin(14)
115 
116  integer(kind=kint) :: IUmax(6), IUmin(6), IVmax(6), IVmin(6), IAmax(6), IAmin(6)
117  integer(kind=kint) :: IEmax(14), IEmin(14), ISmax(14), ISmin(14)
118  integer(kind=kint) :: IMmax(1), IMmin(1), IEMmax(1), IEMmin(1)
119  integer(kind=kint) :: IEEmax(14), IEEmin(14), IESmax(14), IESmin(14)
120  integer(kind=kint) :: i, j, k, ndof, mdof, ID_area, idx
121  integer(kind=kint) :: label(6)
122 
123  if( fstrdynamic%i_step==0 ) return
124  if( fstrdynamic%idx_eqa==1 .and. fstrdynamic%i_step>0 ) then
125  idx = 2
126  else
127  idx = 1
128  endif
129  ndof = hecmesh%n_dof
130 
131  write( fnum, '(''#### Result step='',I6)') fstrdynamic%i_step
132  select case (ndof)
133  case (2)
134  mdof = 3
135  label(1)=11;label(2)=22
136  label(3)=12
137  case (3,4,6)
138  mdof = 6
139  label(1)=11;label(2)=22;label(3)=33;
140  label(4)=12;label(5)=23;label(6)=31;
141  end select
142 
143  j = hecmesh%global_node_ID(1)
144  do k = 1, ndof
145  umax(k) = fstrdynamic%DISP(k,idx); umin(k) = fstrdynamic%DISP(k,idx)
146  vmax(k) = fstrdynamic%VEL(k,idx); vmin(k) = fstrdynamic%VEL(k,idx)
147  amax(k) = fstrdynamic%ACC(k,idx); amin(k) = fstrdynamic%ACC(k,idx)
148  iumax(k)= j; iumin(k)= j; ivmax(k)= j; ivmin(k)= j; iamax(k)= j; iamin(k)= j
149  enddo
150  do k = 1, mdof
151  emax(k) = fstrsolid%STRAIN(k); emin(k) = fstrsolid%STRAIN(k)
152  smax(k) = fstrsolid%STRESS(k); smin(k) = fstrsolid%STRESS(k)
153  eemax(k) = fstrsolid%ESTRAIN(k); eemin(k) = fstrsolid%ESTRAIN(k)
154  esmax(k) = fstrsolid%ESTRESS(k); esmin(k) = fstrsolid%ESTRESS(k)
155  iemax(k)= j; iemin(k)= j; ismax(k)= j; ismin(k)= j
156  ieemax(k)= j; ieemin(k)= j; iesmax(k)= j; iesmin(k)= j
157  enddo
158  mmax(1) = fstrsolid%MISES(1); mmin(1) = fstrsolid%MISES(1)
159  emmax(1) = fstrsolid%EMISES(1); emmin(1) = fstrsolid%EMISES(1)
160  immax(1)= j; immin(1)= j; iemmax(1)= j; iemmin(1)= j
161 
162  !C*** Show Displacement / Velosity / Acc
163  do i = 1, hecmesh%nn_internal
164  if(fstrsolid%is_rot(i)==1)cycle
165  j = hecmesh%global_node_ID(i)
166  do k = 1, ndof
167  if ( fstrdynamic%DISP(ndof*(i-1)+k,idx) > umax(k) ) then
168  umax(k) = fstrdynamic%DISP(ndof*(i-1)+k,idx)
169  iumax(k)= j
170  else if( fstrdynamic%DISP(ndof*(i-1)+k,idx) < umin(k) ) then
171  umin(k) = fstrdynamic%DISP(ndof*(i-1)+k,idx)
172  iumin(k)= j
173  endif
174  if ( fstrdynamic%VEL(ndof*(i-1)+k,idx) > vmax(k) ) then
175  vmax(k) = fstrdynamic%VEL(ndof*(i-1)+k,idx)
176  ivmax(k)= j
177  else if( fstrdynamic%VEL(ndof*(i-1)+k,idx) < vmin(k) ) then
178  vmin(k) = fstrdynamic%VEL(ndof*(i-1)+k,idx)
179  ivmin(k)= j
180  endif
181  if ( fstrdynamic%ACC(ndof*(i-1)+k,idx) > amax(k) ) then
182  amax(k) = fstrdynamic%ACC(ndof*(i-1)+k,idx)
183  iamax(k)= j
184  else if( fstrdynamic%ACC(ndof*(i-1)+k,idx) < amin(k) ) then
185  amin(k) = fstrdynamic%ACC(ndof*(i-1)+k,idx)
186  iamin(k)= j
187  endif
188  enddo
189  enddo
190  !C*** Nodal Strain / Stress / MISES
191  !C @node
192  do i = 1, hecmesh%nn_internal
193  if(fstrsolid%is_rot(i)==1)cycle
194  j = hecmesh%global_node_ID(i)
195  do k = 1, mdof
196  if ( fstrsolid%STRAIN(mdof*(i-1)+k) > emax(k) ) then
197  emax(k) = fstrsolid%STRAIN(mdof*(i-1)+k)
198  iemax(k)= j
199  else if( fstrsolid%STRAIN(mdof*(i-1)+k) < emin(k) ) then
200  emin(k) = fstrsolid%STRAIN(mdof*(i-1)+k)
201  iemin(k)= j
202  endif
203  if ( fstrsolid%STRESS(mdof*(i-1)+k) > smax(k) ) then
204  smax(k) = fstrsolid%STRESS(mdof*(i-1)+k)
205  ismax(k)= j
206  else if( fstrsolid%STRESS(mdof*(i-1)+k) < smin(k) ) then
207  smin(k) = fstrsolid%STRESS(mdof*(i-1)+k)
208  ismin(k)= j
209  endif
210  enddo
211  if ( fstrsolid%MISES(i) > mmax(1) ) then
212  mmax(1) = fstrsolid%MISES(i)
213  immax(1)= j
214  else if( fstrsolid%MISES(i) < mmin(1) ) then
215  mmin(1) = fstrsolid%MISES(i)
216  immin(1)= j
217  endif
218  enddo
219  !C*** Elemental Strain / STRESS
220  do i = 1, hecmesh%n_elem
221  id_area = hecmesh%elem_ID(i*2)
222  if( id_area==hecmesh%my_rank ) then
223  j = hecmesh%global_elem_ID(i)
224  do k = 1, mdof
225  if( fstrsolid%ESTRAIN(mdof*(i-1)+k) > eemax(k) ) then
226  eemax(k) = fstrsolid%ESTRAIN(mdof*(i-1)+k)
227  ieemax(k)= j
228  else if( fstrsolid%ESTRAIN(mdof*(i-1)+k) < eemin(k) ) then
229  eemin(k) = fstrsolid%ESTRAIN(mdof*(i-1)+k)
230  ieemin(k)= j
231  endif
232  if( fstrsolid%ESTRESS(mdof*(i-1)+k) > esmax(k) ) then
233  esmax(k) = fstrsolid%ESTRESS(mdof*(i-1)+k)
234  iesmax(k)= j
235  else if( fstrsolid%ESTRESS(mdof*(i-1)+k) < esmin(k) ) then
236  esmin(k) = fstrsolid%ESTRESS(mdof*(i-1)+k)
237  iesmin(k)= j
238  endif
239  enddo
240  if( fstrsolid%EMISES(i) > emmax(1) ) then
241  emmax(1) = fstrsolid%EMISES(i)
242  iemmax(1)= j
243  else if( fstrsolid%EMISES(i) < emmin(1) ) then
244  emmin(1) = fstrsolid%EMISES(i)
245  iemmin(1)= j
246  endif
247  endif
248  enddo
249 
250 
251  write(ilog,*) '##### Local Summary @Node :Max/IdMax/Min/IdMin####'
252  do i = 1, ndof; write(ilog,1029) ' //U',i, ' ',umax(i),iumax(i),umin(i),iumin(i); end do
253  if (ndof == 4) write(ilog,1009) ' //P ' , umax(4),iumax(4),umin(4),iumin(4)
254  do i = 1, ndof; write(ilog,1029) ' //V',i, ' ',vmax(i),ivmax(i),vmin(i),ivmin(i); end do
255  do i = 1, ndof; write(ilog,1029) ' //A',i, ' ',amax(i),iamax(i),amin(i),iamin(i); end do
256  do i = 1, mdof; write(ilog,1029) ' //E',label(i),' ',emax(i),iemax(i),emin(i),iemin(i); end do
257  do i = 1, mdof; write(ilog,1029) ' //S',label(i),' ',smax(i),ismax(i),smin(i),ismin(i); end do
258  write(ilog,1009) '//SMS ' ,mmax(1),immax(1),mmin(1),immin(1)
259  write(ilog,*) '##### Local Summary @Element :Max/IdMax/Min/IdMin####'
260  do i = 1, mdof; write(ilog,1029) ' //E',label(i),' ',eemax(i),ieemax(i),eemin(i),ieemin(i); end do
261  do i = 1, mdof; write(ilog,1029) ' //S',label(i),' ',esmax(i),iesmax(i),esmin(i),iesmin(i); end do
262  write(ilog,1009) '//SMS ' ,emmax(1),iemmax(1),emmin(1),iemmin(1)
263 
264  !C*** Show Summary
265  gumax = umax; gumin = umin; gvmax = vmax; gvmin = vmin; gamax = amax; gamin = amin;
266  gemax = emax; gemin = emin; geemax = eemax; geemin = eemin;
267  gsmax = smax; gsmin = smin; gesmax = esmax; gesmin = esmin;
268  gmmax = mmax; gmmin = mmin; gemmax = emmax; gemmin = emmin;
269 
270  call hecmw_allreduce_r(hecmesh,gumax,ndof,hecmw_max)
271  call hecmw_allreduce_r(hecmesh,gumin,ndof,hecmw_min)
272  call hecmw_allreduce_r(hecmesh,gvmax,ndof,hecmw_max)
273  call hecmw_allreduce_r(hecmesh,gvmin,ndof,hecmw_min)
274  call hecmw_allreduce_r(hecmesh,gamax,ndof,hecmw_max)
275  call hecmw_allreduce_r(hecmesh,gamin,ndof,hecmw_min)
276  call hecmw_allreduce_r(hecmesh,gemax,mdof,hecmw_max)
277  call hecmw_allreduce_r(hecmesh,gemin,mdof,hecmw_min)
278  call hecmw_allreduce_r(hecmesh,gsmax,mdof,hecmw_max)
279  call hecmw_allreduce_r(hecmesh,gsmin,mdof,hecmw_min)
280  call hecmw_allreduce_r(hecmesh,gmmax,1,hecmw_max)
281  call hecmw_allreduce_r(hecmesh,gmmin,1,hecmw_min)
282  call hecmw_allreduce_r(hecmesh,geemax,mdof,hecmw_max)
283  call hecmw_allreduce_r(hecmesh,geemin,mdof,hecmw_min)
284  call hecmw_allreduce_r(hecmesh,gesmax,mdof,hecmw_max)
285  call hecmw_allreduce_r(hecmesh,gesmin,mdof,hecmw_min)
286  call hecmw_allreduce_r(hecmesh,gemmax,1,hecmw_max)
287  call hecmw_allreduce_r(hecmesh,gemmin,1,hecmw_min)
288 
289  do i=1,ndof
290  if(gumax(i) > umax(i)) iumax(i) = 0
291  if(gvmax(i) > vmax(i)) ivmax(i) = 0
292  if(gamax(i) > amax(i)) iamax(i) = 0
293  if(gumin(i) < umin(i)) iumin(i) = 0
294  if(gvmin(i) < vmin(i)) ivmin(i) = 0
295  if(gamin(i) < amin(i)) iamin(i) = 0
296  enddo
297  do i=1,mdof
298  if(gemax(i) > emax(i)) iemax(i) = 0
299  if(gsmax(i) > smax(i)) ismax(i) = 0
300  if(geemax(i) > eemax(i)) ieemax(i) = 0
301  if(gesmax(i) > esmax(i)) iesmax(i) = 0
302  if(gemin(i) < emin(i)) iemin(i) = 0
303  if(gsmin(i) < smin(i)) ismin(i) = 0
304  if(geemin(i) < eemin(i)) ieemin(i) = 0
305  if(gesmin(i) < esmin(i)) iesmin(i) = 0
306  enddo
307  do i=1,1
308  if(gmmax(i) > mmax(i)) immax(i) = 0
309  if(gemmax(i) > emmax(i)) iemmax(i) = 0
310  if(gmmin(i) < mmin(i)) immin(i) = 0
311  if(gemmin(i) < emmin(i)) iemmin(i) = 0
312  enddo
313 
314  call hecmw_allreduce_i(hecmesh,iumax,ndof,hecmw_max)
315  call hecmw_allreduce_i(hecmesh,iumin,ndof,hecmw_max)
316  call hecmw_allreduce_i(hecmesh,ivmax,ndof,hecmw_max)
317  call hecmw_allreduce_i(hecmesh,ivmin,ndof,hecmw_max)
318  call hecmw_allreduce_i(hecmesh,iamax,ndof,hecmw_max)
319  call hecmw_allreduce_i(hecmesh,iamin,ndof,hecmw_max)
320  call hecmw_allreduce_i(hecmesh,iemax,mdof,hecmw_max)
321  call hecmw_allreduce_i(hecmesh,iemin,mdof,hecmw_max)
322  call hecmw_allreduce_i(hecmesh,ismax,mdof,hecmw_max)
323  call hecmw_allreduce_i(hecmesh,ismin,mdof,hecmw_max)
324  call hecmw_allreduce_i(hecmesh,immax,1,hecmw_max)
325  call hecmw_allreduce_i(hecmesh,immin,1,hecmw_max)
326  call hecmw_allreduce_i(hecmesh,ieemax,mdof,hecmw_max)
327  call hecmw_allreduce_i(hecmesh,ieemin,mdof,hecmw_max)
328  call hecmw_allreduce_i(hecmesh,iesmax,mdof,hecmw_max)
329  call hecmw_allreduce_i(hecmesh,iesmin,mdof,hecmw_max)
330  call hecmw_allreduce_i(hecmesh,iemmax,1,hecmw_max)
331  call hecmw_allreduce_i(hecmesh,iemmin,1,hecmw_max)
332 
333  if( hecmesh%my_rank==0 ) then
334  write(ilog,*) '##### Global Summary @Node :Max/IdMax/Min/IdMin####'
335  do i = 1, ndof; write(ilog,1029) ' //U',i, ' ',gumax(i),iumax(i),gumin(i),iumin(i); end do
336  if (ndof == 4) write(ilog,1009) ' //P ' ,gumax(4),iumax(4),gumin(4),iumin(4)
337  do i = 1, ndof; write(ilog,1029) ' //V',i, ' ',gvmax(i),ivmax(i),gvmin(i),ivmin(i); end do
338  do i = 1, ndof; write(ilog,1029) ' //A',i, ' ',gamax(i),iamax(i),gamin(i),iamin(i); end do
339  do i = 1, mdof; write(ilog,1029) ' //E',label(i),' ',gemax(i),iemax(i),gemin(i),iemin(i); end do
340  do i = 1, mdof; write(ilog,1029) ' //S',label(i),' ',gsmax(i),ismax(i),gsmin(i),ismin(i); end do
341  write(ilog,1009) '//SMS ' ,gmmax(1),immax(1),gmmin(1),immin(1)
342  write(ilog,*) '##### Global Summary @Element :Max/IdMax/Min/IdMin####'
343  do i = 1, mdof; write(ilog,1029) ' //E',label(i),' ',geemax(i),ieemax(i),geemin(i),ieemin(i); end do
344  do i = 1, mdof; write(ilog,1029) ' //S',label(i),' ',gesmax(i),iesmax(i),gesmin(i),iesmin(i); end do
345  write(ilog,1009) '//SMS ' ,gemmax(1),iemmax(1),gemmin(1),iemmin(1)
346  endif
347 
348  1009 format(a7,1pe12.4,i10,1pe12.4,i10)
349  1029 format(a,i0,a,1pe12.4,i10,1pe12.4,i10)
350  end subroutine fstr_dynamic_post
351 
352  !C================================================================C
353  !C-- subroutine dynamic_output_monit
354  !C================================================================C
355  subroutine dynamic_output_monit(hecMESH, fstrPARAM, fstrDYNAMIC, fstrEIG, fstrSOLID)
356  use m_fstr
357  type(hecmwst_local_mesh) :: hecMESH
358  type(fstr_param) :: fstrPARAM
359  type(fstr_dynamic) :: fstrDYNAMIC
360  type(fstr_eigen) :: fstrEIG
361  type(fstr_solid) :: fstrSOLID
362 
363  integer(kind=kint) :: idx, ii, jj, ierr, ncmp
364  integer(kind=kint) :: num_monit, ig, is, iE, ik, iunitS, iunit
365  logical :: yes
366 
367  if( mod(fstrdynamic%i_step,fstrdynamic%nout_monit)/=0 ) return
368 
369  if( fstrdynamic%idx_eqa==1 .and. fstrdynamic%i_step>0 ) then
370  idx = 2
371  else
372  idx = 1
373  endif
374 
375  num_monit = 0
376  ig = fstrdynamic%ngrp_monit
377  is = hecmesh%node_group%grp_index(ig-1)+1
378  ie = hecmesh%node_group%grp_index(ig)
379  do ik=is,ie
380  ii = hecmesh%node_group%grp_item(ik)
381  if (ii > hecmesh%nn_internal) cycle
382  num_monit = num_monit+1
383  jj = hecmesh%global_node_id(ii)
384  iunits = 10*(num_monit-1)
385 
386  !C-- displacement
387  if( fstrdynamic%iout_list(1)==1 ) then
388  iunit = iunits + fstrdynamic%dynamic_IW4
389  write( iunit, '(i10,1pe13.4e3,i10,1p6e13.4e3)' ) &
390  fstrdynamic%i_step, fstrdynamic%t_curr, jj, &
391  fstrdynamic%DISP( hecmesh%n_dof*(ii-1)+1 : hecmesh%n_dof*ii , idx )
392  end if
393  !C-- velocity
394  if( fstrdynamic%iout_list(2)==1 ) then
395  iunit = iunits + fstrdynamic%dynamic_IW5
396  write( iunit, '(i10,1pe13.4e3,i10,1p6e13.4e3)' ) &
397  fstrdynamic%i_step, fstrdynamic%t_curr, jj, &
398  fstrdynamic%VEL( hecmesh%n_dof*(ii-1)+1 : hecmesh%n_dof*ii , idx )
399  end if
400  !C-- acceleration
401  if( fstrdynamic%iout_list(3)==1 ) then
402  iunit = iunits + fstrdynamic%dynamic_IW6
403  write( iunit, '(i10,1pe13.4e3,i10,1p6e13.4e3)' ) &
404  fstrdynamic%i_step, fstrdynamic%t_curr, jj, &
405  fstrdynamic%ACC( hecmesh%n_dof*(ii-1)+1 : hecmesh%n_dof*ii , idx )
406  end if
407  !C-- nodal force
408  if( fstrdynamic%iout_list(4)==1 ) then
409  iunit = iunits + fstrdynamic%dynamic_IW7
410  write( iunit, '(i10,1pe13.4e3,i10,1p6e13.4e3)' ) &
411  fstrdynamic%i_step, fstrdynamic%t_curr, jj, &
412  fstrsolid%QFORCE( hecmesh%n_dof*(ii-1)+1 : hecmesh%n_dof*ii )
413  end if
414  !C-- strain
415  if( fstrdynamic%iout_list(5) > 0 ) then
416  if (hecmesh%n_dof == 2 .or. hecmesh%n_dof == 3 .or. hecmesh%n_dof == 4) then
417  ncmp = 6
418  else
419  ncmp = 12
420  endif
421  iunit = iunits + fstrdynamic%dynamic_IW8
422  write( iunit, '(i10,1pe13.4e3,i10,1p6e13.4e3)') &
423  fstrdynamic%i_step, fstrdynamic%t_curr, jj, &
424  fstrsolid%STRAIN( ncmp*(ii-1)+1 : ncmp*ii )
425  end if
426  !C-- stress
427  if( fstrdynamic%iout_list(6) > 0 ) then
428  if (hecmesh%n_dof == 2 .or. hecmesh%n_dof == 3 .or. hecmesh%n_dof == 4) then
429  ncmp = 6
430  else
431  ncmp = 12
432  endif
433  iunit = iunits + fstrdynamic%dynamic_IW9
434  write( iunit, '(i10,1pe13.4e3,i10,1p7e13.4e3)') &
435  fstrdynamic%i_step, fstrdynamic%t_curr, jj, &
436  fstrsolid%STRESS( ncmp*(ii-1)+1 : ncmp*ii )
437  end if
438  enddo
439 
440  if( hecmesh%my_rank==0 ) then
441  if( any(fstrdynamic%iout_list(1:3)==1) ) then
442  inquire( file='dyna_energy.txt', opened=yes )
443  if( .not. yes ) then
444  open( fstrdynamic%dynamic_IW10, file='dyna_energy.txt', status='replace', iostat=ierr )
445  if( ierr/=0 ) then
446  write(*,*) 'stop due to file opening error <dyna_enrgy.txt>'
447  call hecmw_abort( hecmw_comm_get_comm() )
448  endif
449  write( fstrdynamic%dynamic_IW10, * ) &
450  ' time step', ' time ', ' kinetic energy', ' strain energy', ' total energy'
451  endif
452  if(fstrdynamic%i_step==0) then
453  fstrdynamic%kineticEnergy = 0.0d0
454  do ii = 1, hecmesh%n_node*hecmesh%n_dof
455  fstrdynamic%kineticEnergy = fstrdynamic%kineticEnergy &
456  + 0.5d0 * fstreig%mass(ii) * fstrdynamic%VEL(ii,idx) * fstrdynamic%VEL(ii,idx)
457  enddo
458  endif
459  fstrdynamic%totalEnergy = fstrdynamic%kineticEnergy + fstrdynamic%strainEnergy
460  write( fstrdynamic%dynamic_IW10, '(i10,1pe13.4e3,1p3e16.4e3)' ) &
461  fstrdynamic%i_step, fstrdynamic%t_curr, &
462  fstrdynamic%kineticEnergy, fstrdynamic%strainEnergy, fstrdynamic%totalEnergy
463  endif
464  if( fstrdynamic%i_step==fstrdynamic%n_step ) close(fstrdynamic%dynamic_IW10)
465  endif
466  end subroutine dynamic_output_monit
467 
468  !C================================================================C
469  !C-- subroutine matvec
470  !C================================================================C
471  subroutine matvec(y,x,hecMAT,ndof,D,AU,AL)
472  use m_fstr
473  type(hecmwst_matrix) :: hecMAT
474 
475  integer(kind=kint) :: ndof, i, is, ie, j, icol, ki, kj, ix, iy, ip, nn
476  real(kind=kreal) :: d(ndof*ndof*hecmat%NP)
477  real(kind=kreal) :: au(ndof*ndof*hecmat%NPU)
478  real(kind=kreal) :: al(ndof*ndof*hecmat%NPL)
479  real(kind=kreal) :: x(ndof*hecmat%NP)
480  real(kind=kreal) :: y(ndof*hecmat%NP)
481 
482  nn=ndof*ndof
483 
484  y=0.0d0
485 
486  do i=1,hecmat%NP
487  is=hecmat%indexU(i-1)+1
488  ie=hecmat%indexU(i)
489  do j=is,ie
490  icol=hecmat%itemU(j)
491  do ki=1,ndof
492  iy=ndof*(i-1)+ki
493  do kj=1,ndof
494  ix=ndof*(icol-1)+kj
495  ip=nn*(j-1)+ndof*(ki-1)+kj
496  y(iy)=y(iy)+au(ip)*x(ix)
497  enddo
498  enddo
499  enddo
500  enddo
501 
502  do i=1,hecmat%NP
503  is=hecmat%indexL(i-1)+1
504  ie=hecmat%indexL(i)
505  do j=is,ie
506  icol=hecmat%itemL(j)
507  do ki=1,ndof
508  iy=ndof*(i-1)+ki
509  do kj=1,ndof
510  ix=ndof*(icol-1)+kj
511  ip=nn*(j-1)+ndof*(ki-1)+kj
512  y(iy)=y(iy)+al(ip)*x(ix)
513  enddo
514  enddo
515  enddo
516  enddo
517 
518  do i=1,hecmat%NP
519  do ki=1,ndof
520  iy=ndof*(i-1)+ki
521  do kj=1,ndof
522  ix=ndof*(i-1)+kj
523  ip=nn*(i-1)+ndof*(ki-1)+kj
524  y(iy)=y(iy)+d(ip)*x(ix)
525  enddo
526  enddo
527  enddo
528  end subroutine matvec
529 
530 end module m_dynamic_output
m_make_result::setup_contact_output_variables
subroutine, public setup_contact_output_variables(hecMESH, fstrSOLID, phase)
Definition: make_result.f90:1612
m_make_result::fstr_write_result
subroutine, public fstr_write_result(hecMESH, fstrSOLID, fstrPARAM, istep, time, flag, fstrDYNAMIC)
OUTPUT result file for static and dynamic analysis.
Definition: make_result.f90:22
m_fstr_nodalstress::fstr_nodalstress6d
subroutine fstr_nodalstress6d(hecMESH, fstrSOLID)
Calculate NODAL STRESS of shell elements.
Definition: fstr_NodalStress.f90:952
m_dynamic_output
This module provides functions to output result.
Definition: dynamic_output.f90:6
m_dynamic_output::fstr_dynamic_output
subroutine fstr_dynamic_output(hecMESH, fstrSOLID, fstrDYNAMIC, fstrPARAM)
Output result.
Definition: dynamic_output.f90:13
m_fstr::fstr_eigen
Package of data used by Lanczos eigenvalue solver.
Definition: m_fstr.f90:593
m_dynamic_output::fstr_dynamic_post
subroutine fstr_dynamic_post(fnum, hecMESH, fstrSOLID, fstrDYNAMIC)
Summarizer of output data which prints out max and min output values.
Definition: dynamic_output.f90:99
m_fstr_nodalstress::fstr_nodalstress2d
subroutine fstr_nodalstress2d(hecMESH, fstrSOLID)
Calculate NODAL STRESS of plane elements.
Definition: fstr_NodalStress.f90:706
m_make_result
This module provide a function to prepare output of static analysis.
Definition: make_result.f90:6
m_fstr::fstr_solid
Definition: m_fstr.f90:238
m_fstr::fstr_dynamic
Data for DYNAMIC ANSLYSIS (fstrDYNAMIC)
Definition: m_fstr.f90:504
m_fstr::fstr_param
FSTR INNER CONTROL PARAMETERS (fstrPARAM)
Definition: m_fstr.f90:154
m_hecmw2fstr_mesh_conv::fstr2hecmw_mesh_conv
subroutine fstr2hecmw_mesh_conv(hecMESH)
Definition: hecmw2fstr_mesh_conv.f90:27
m_dynamic_output::dynamic_output_monit
subroutine dynamic_output_monit(hecMESH, fstrPARAM, fstrDYNAMIC, fstrEIG, fstrSOLID)
Definition: dynamic_output.f90:356
m_make_result::fstr_make_result
subroutine, public fstr_make_result(hecMESH, fstrSOLID, fstrRESULT, istep, time, fstrDYNAMIC)
MAKE RESULT for static and dynamic analysis (WITHOUT ELEMENTAL RESULTS) -----------------------------...
Definition: make_result.f90:608
m_fstr
This module defines common data and basic structures for analysis.
Definition: m_fstr.f90:15
m_hecmw2fstr_mesh_conv::hecmw2fstr_mesh_conv
subroutine hecmw2fstr_mesh_conv(hecMESH)
Definition: hecmw2fstr_mesh_conv.f90:15
m_fstr::ivisual
integer(kind=kint), pointer ivisual
Definition: m_fstr.f90:123
m_fstr::iresult
integer(kind=kint), pointer iresult
Definition: m_fstr.f90:122
m_hecmw2fstr_mesh_conv
HECMW to FSTR Mesh Data Converter. Converting Connectivity of Element Type 232, 342 and 352.
Definition: hecmw2fstr_mesh_conv.f90:8
m_fstr::ilog
integer(kind=kint), parameter ilog
FILE HANDLER.
Definition: m_fstr.f90:107
m_fstr_nodalstress
This module provides functions to calculation nodal stress.
Definition: fstr_NodalStress.f90:6
m_fstr_nodalstress::fstr_nodalstress3d
subroutine fstr_nodalstress3d(hecMESH, fstrSOLID)
Calculate NODAL STRESS of solid elements.
Definition: fstr_NodalStress.f90:16
m_dynamic_output::matvec
subroutine matvec(y, x, hecMAT, ndof, D, AU, AL)
Definition: dynamic_output.f90:472