FrontISTR  5.9.0
Large-scale structural analysis program with finit element method
m_fstr.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 !-------------------------------------------------------------------------------
5 ! If new header is supported, change according to following method. !
6 ! 1) Increase FSTR_CTRL_HEADER_NUMBER !
7 ! 2) Add new header name to fstr_ctrl_header_names !
8 ! 3) Describe new function to get parameters from control file !
9 ! in fstr_ctrl.f90 !
10 ! 4) Describe new subroutine to set values of the parameter !
11 ! in fstr_setup.f90 !
12 ! 5) If initial values are necessary, set the value !
13 ! in subroutine fstr_setup_init in fstr_setup.f90 !
15 module m_fstr
16  use hecmw
17  use m_common_struct
18  use m_step
19  use m_out
20  use m_timepoint
21  use m_elemact
22  use mmechgauss
23  use mcontactdef
24 
25  implicit none
26 
27  public
28 
31  integer(kind=kint), parameter :: kyes = 1
32  integer(kind=kint), parameter :: kno = 0
33  integer(kind=kint), parameter :: kon = 1
34  integer(kind=kint), parameter :: koff = 0
35 
37  integer(kind=kint), parameter :: kstprecheck = 0
38  integer(kind=kint), parameter :: kststatic = 1
39  integer(kind=kint), parameter :: ksteigen = 2
40  integer(kind=kint), parameter :: kstheat = 3
41  integer(kind=kint), parameter :: kstdynamic = 4
42  !integer(kind=kint), parameter :: kstNLSTATIC = 5
43  integer(kind=kint), parameter :: kststaticeigen = 6
44  integer(kind=kint), parameter :: kstnzprof = 7
45 
47  integer(kind=kint), parameter :: ksmcg = 1
48  integer(kind=kint), parameter :: ksmbicgstab = 2
49  integer(kind=kint), parameter :: ksmgmres = 3
50  integer(kind=kint), parameter :: ksmgpbicg = 4
51  integer(kind=kint), parameter :: ksmgmresr = 5
52  integer(kind=kint), parameter :: ksmgmresren = 6
53  integer(kind=kint), parameter :: ksmdirect = 101
54 
56  integer(kind=kint), parameter :: knsmnewton = 1
57  integer(kind=kint), parameter :: knsmquasinewton = 2
58 
60  integer(kind=kint), parameter :: kcaslagrange = 1
61  integer(kind=kint), parameter :: kcaalagrange = 2
62 
64  integer(kind=kint), parameter :: kbcffstr = 0 ! BC described in fstr control file (default)
65  integer(kind=kint), parameter :: kbcfnastran = 1 ! nastran file
66 
67  integer(kind=kint), parameter :: kbcinitial = 1
68  integer(kind=kint), parameter :: kbctransit = 2
69 
71  integer(kind=kint), parameter :: restart_outlast = 1
72  integer(kind=kint), parameter :: restart_outall = 2
73 
75  integer(kind=kint), parameter :: kel341fi = 1
76  integer(kind=kint), parameter :: kel341sesns = 2
77 
78  integer(kind=kint), parameter :: kel361fi = 1
79  integer(kind=kint), parameter :: kel361bbar = 2
80  integer(kind=kint), parameter :: kel361ic = 3
81  integer(kind=kint), parameter :: kel361fbar = 4
82 
83  integer(kind=kint), parameter :: kfloadtype_node = 1
84  integer(kind=kint), parameter :: kfloadtype_surf = 2
85 
86  integer(kind=kint), parameter :: kfloadcase_re = 1
87  integer(kind=kint), parameter :: kfloadcase_im = 2
88 
90  integer(kind=kint), parameter :: kitrcontinue = 0
91  integer(kind=kint), parameter :: kitrconverged = 1
92  integer(kind=kint), parameter :: kitrdiverged = 2
93  integer(kind=kint), parameter :: kitrfloatingerror = 3
94 
95 
97  integer(kind = kint) :: myrank
98  integer(kind = kint) :: nprocs
99 
101  logical :: paracontactflag = .false.
102 
104  character(len=HECMW_FILENAME_LEN) :: cntfilname
105  character(len=HECMW_FILENAME_LEN) :: restartfilname
106 
108  integer(kind=kint), parameter :: ilog = 16 ! log
109  integer(kind=kint), parameter :: ista = 17 ! status
110  integer(kind=kint), parameter :: iutb = 18 ! utable
111  integer(kind=kint), parameter :: imsg = 51 ! message (myrank == 0 only)
112  integer(kind=kint), parameter :: idbg = 52 ! debug
113  integer(kind=kint), parameter :: ifvs = 53 ! visual.ini file
114  integer(kind=kint), parameter :: ineu = 54 ! neutral file (heat)
115  integer(kind=kint), parameter :: iresout = 100 ! ~110, keeping for result output file
116 
118  integer(kind=kint) :: sviarray(100)
119  real(kind=kreal) :: svrarray(100)
120 
122  integer(kind=kint), pointer :: iecho
123  integer(kind=kint), pointer :: iresult
124  integer(kind=kint), pointer :: ivisual
125  integer(kind=kint), pointer :: ineutral ! flag for femap neutral file
126  integer(kind=kint), pointer :: irres ! flag for restart, read
127  integer(kind=kint), pointer :: iwres ! flag for restart, write
128  integer(kind=kint), pointer :: nrres ! position of restart read
129  integer(kind=kint), pointer :: nprint ! interval of write
130 
131  integer(kind=kint), parameter :: kopss_solution = 1
132  integer(kind=kint), parameter :: kopss_material = 2
133  integer(kind=kint) :: opsstype = kopss_solution ! output stress/strain type
134 
135 
137  real(kind=kreal), pointer :: ref_temp
138 
140  real(kind=kreal) :: dt ! /=fstr_param%dtime
141  real(kind=kreal) :: etime ! /=fstr_param%etime
142  integer(kind=kint) :: itmax
143  real(kind=kreal) :: eps ! /=fstr_param%eps
144 
146  character(len=HECMW_FILENAME_LEN) :: cond_name
147  integer :: node_elem
148  integer :: grpid
149  integer, pointer :: intval(:) => null()
150  real(kind=kreal), pointer :: realval(:) => null()
151  end type
152  type( tinitialcondition ), pointer, save :: g_initialcnd(:) => null()
153 
156  integer(kind=kint) :: solution_type
157  integer(kind=kint) :: solver_method
158  integer(kind=kint) :: nlsolver_method
159  logical :: nlgeom
160 
162  integer(kind=kint) :: analysis_n
163  real(kind=kreal), pointer :: dtime(:)
164  real(kind=kreal), pointer :: etime(:)
165  real(kind=kreal), pointer :: dtmin(:)
166  real(kind=kreal), pointer :: delmax(:)
167  integer(kind=kint), pointer:: itmax(:)
168  real(kind=kreal), pointer :: eps(:)
169  real(kind=kreal) :: ref_temp
170  integer(kind=kint) :: timepoint_id
171 
173  integer(kind=kint) :: fg_echo
174  integer(kind=kint) :: fg_result
175  integer(kind=kint) :: fg_visual
176 
178  integer(kind=kint) :: fg_neutral
179  integer(kind=kint) :: fg_irres
180  integer(kind=kint) :: fg_iwres
181  integer(kind=kint) :: nrres
182  integer(kind=kint) :: nprint
183 
185  integer(kind=kint) :: n_node
186  integer(kind=kint) :: nn_internal
187  integer(kind=kint), pointer :: global_local_id(:,:)
188 
190  integer( kind=kint ) :: fg_couple
191  integer( kind=kint ) :: fg_couple_type
192  integer( kind=kint ) :: fg_couple_first
193  integer( kind=kint ) :: fg_couple_window
194 
196  integer( kind=kint ) :: restart_out_type
197  integer( kind=kint ) :: restart_version
198 
200  integer( kind=kint ) :: contact_algo
201  integer( kind=kint ) :: augiter
202  type(tcontactparam), pointer :: contactparam(:)
203  type(tcontactinterference), pointer :: contact_if(:)
204 
206  type(tparamautoinc), pointer :: ainc(:)
207  type(time_points), pointer :: timepoints(:)
208  end type fstr_param
209 
211  type( fstr_param ),target :: fstrpr
212 
215  real(kind=kreal), pointer :: stress(:) => null()
216  real(kind=kreal), pointer :: strain(:) => null()
217  real(kind=kreal), pointer :: mises(:) => null()
218 
219  real(kind=kreal), pointer :: pstress(:) => null()
220  real(kind=kreal), pointer :: pstrain(:) => null()
221  real(kind=kreal), pointer :: pstress_vect(:,:) => null()
222  real(kind=kreal), pointer :: pstrain_vect(:,:) => null()
223 
224  real(kind=kreal), pointer :: estress(:) => null()
225  real(kind=kreal), pointer :: estrain(:) => null()
226  real(kind=kreal), pointer :: emises(:) => null()
227  real(kind=kreal), pointer :: eplstrain(:) => null()
228 
229  real(kind=kreal), pointer :: epstress(:) => null()
230  real(kind=kreal), pointer :: epstrain(:) => null()
231  real(kind=kreal), pointer :: epstress_vect(:,:) => null()
232  real(kind=kreal), pointer :: epstrain_vect(:,:) => null()
233  real(kind=kreal), pointer :: enqm(:) => null()
234 
235 
236  type(fstr_solid_physic_val), pointer :: layer(:) => null()
237  type(fstr_solid_physic_val), pointer :: plus => null()
238  type(fstr_solid_physic_val), pointer :: minus => null()
239  end type fstr_solid_physic_val
240 
242  integer(kind=kint) :: file_type ! kbcfFSTR or kbcfNASTRAN
243  integer(kind=kint) :: statictype ! 1:Total, 2:Updated, 3:Infinitesimal
244  integer(kind=kint) :: nstep_tot
245 
246  type(step_info), pointer :: step_ctrl(:) =>null()
247  type(t_output_ctrl), pointer :: output_ctrl(:)=>null()
248 
250  integer(kind=kint) :: boundary_ngrp_tot
251  integer(kind=kint), pointer :: boundary_ngrp_grpid (:) =>null()
252  integer(kind=kint), pointer :: boundary_ngrp_id (:) =>null()
253  integer(kind=kint), pointer :: boundary_ngrp_type (:) =>null()
254  integer(kind=kint), pointer :: boundary_ngrp_amp (:) =>null()
255  real(kind=kreal), pointer :: boundary_ngrp_val(:) =>null()
256  integer(kind=kint), pointer :: boundary_ngrp_istot (:) =>null()
257  integer(kind=kint) :: boundary_ngrp_rot
258  integer(kind=kint), pointer :: boundary_ngrp_rotid (:) =>null()
259  integer(kind=kint), pointer :: boundary_ngrp_centerid (:) =>null()
260 
262  integer(kind=kint) :: velocity_type
263  integer(kind=kint) :: velocity_ngrp_tot
264  integer(kind=kint), pointer :: velocity_ngrp_grpid (:) =>null()
265  integer(kind=kint), pointer :: velocity_ngrp_id (:) =>null()
266  integer(kind=kint), pointer :: velocity_ngrp_type (:) =>null()
267  integer(kind=kint), pointer :: velocity_ngrp_amp (:) =>null()
268  real(kind=kreal), pointer :: velocity_ngrp_val(:) =>null()
269 
271  integer(kind=kint) :: acceleration_type
272  integer(kind=kint) :: acceleration_ngrp_tot
273  integer(kind=kint), pointer :: acceleration_ngrp_grpid (:) =>null()
274  integer(kind=kint), pointer :: acceleration_ngrp_id (:) =>null()
275  integer(kind=kint), pointer :: acceleration_ngrp_type (:) =>null()
276  integer(kind=kint), pointer :: acceleration_ngrp_amp (:) =>null()
277  real(kind=kreal), pointer :: acceleration_ngrp_val(:) =>null()
278 
280  integer(kind=kint) :: cload_ngrp_tot
281  integer(kind=kint), pointer :: cload_ngrp_grpid (:) =>null()
282  integer(kind=kint), pointer :: cload_ngrp_id (:)
283  integer(kind=kint), pointer :: cload_ngrp_dof (:)
284  integer(kind=kint), pointer :: cload_ngrp_amp (:)
285  real(kind=kreal), pointer :: cload_ngrp_val(:)
286  integer(kind=kint) :: cload_ngrp_rot
287  integer(kind=kint), pointer :: cload_ngrp_rotid (:) =>null()
288  integer(kind=kint), pointer :: cload_ngrp_centerid (:) =>null()
289 
291  integer(kind=kint) :: dload_ngrp_tot
292  integer(kind=kint) :: dload_follow
293  integer(kind=kint), pointer :: dload_ngrp_grpid (:) =>null()
294  integer(kind=kint), pointer :: dload_ngrp_id (:)
295  integer(kind=kint), pointer :: dload_ngrp_lid (:)
296  integer(kind=kint), pointer :: dload_ngrp_amp (:)
297  real(kind=kreal), pointer :: dload_ngrp_params(:,:)
298 
300  integer(kind=kint) :: temp_ngrp_tot
301  integer(kind=kint) :: temp_irres
302  integer(kind=kint) :: temp_tstep
303  integer(kind=kint) :: temp_interval
304  integer(kind=kint) :: temp_rtype ! type of reading result; 1: step-based; 2: time-based
305  real(kind=kreal) :: temp_factor
306  integer(kind=kint), pointer :: temp_ngrp_grpid (:) =>null()
307  integer(kind=kint), pointer :: temp_ngrp_id (:)
308  real(kind=kreal), pointer :: temp_ngrp_val(:)
309 
311  integer(kind=kint) :: spring_ngrp_tot
312  integer(kind=kint), pointer :: spring_ngrp_grpid (:) =>null()
313  integer(kind=kint), pointer :: spring_ngrp_id (:)
314  integer(kind=kint), pointer :: spring_ngrp_dof (:)
315  integer(kind=kint), pointer :: spring_ngrp_amp (:)
316  real(kind=kreal), pointer :: spring_ngrp_val(:)
317 
319  type(telemact) :: elemact
320 
322  integer( kind=kint ) :: couple_ngrp_tot
323  integer( kind=kint ),pointer :: couple_ngrp_id(:)
324 
326  integer(kind=kint) :: maxn_gauss
327 
328  real(kind=kreal), pointer :: stress(:)
329  real(kind=kreal), pointer :: strain(:)
330  real(kind=kreal), pointer :: mises(:)
331 
332  real(kind=kreal), pointer :: pstress(:)
333  real(kind=kreal), pointer :: pstrain(:)
334  real(kind=kreal), pointer :: pstress_vect(:,:)
335  real(kind=kreal), pointer :: pstrain_vect(:,:)
336 
337  real(kind=kreal), pointer :: estress(:)
338  real(kind=kreal), pointer :: estrain(:)
339  real(kind=kreal), pointer :: emises(:)
340  real(kind=kreal), pointer :: eplstrain(:)
341 
342  real(kind=kreal), pointer :: epstress(:)
343  real(kind=kreal), pointer :: epstrain(:)
344  real(kind=kreal), pointer :: epstress_vect(:,:)
345  real(kind=kreal), pointer :: epstrain_vect(:,:)
346 
347  real(kind=kreal), pointer :: tnstrain(:)
348  real(kind=kreal), pointer :: testrain(:)
349 
350  real(kind=kreal), pointer :: yield_ratio(:)
351 
352  real(kind=kreal), pointer :: enqm(:)
353  real(kind=kreal), pointer :: reaction(:)
354 
355  real(kind=kreal), pointer :: cont_nforce(:)
356  real(kind=kreal), pointer :: cont_fric(:)
357  real(kind=kreal), pointer :: cont_relvel(:)
358  real(kind=kreal), pointer :: cont_state(:)
359  integer(kind=kint), pointer :: cont_sgrp_id(:)
360  real(kind=kreal), pointer :: cont_area(:)
361  real(kind=kreal), pointer :: cont_ntrac(:)
362  real(kind=kreal), pointer :: cont_ftrac(:)
363  real(kind=kreal), pointer :: embed_nforce(:)
364 
365  type(fstr_solid_physic_val), pointer :: solid=>null()
366  type(fstr_solid_physic_val), pointer :: shell=>null()
367  type(fstr_solid_physic_val), pointer :: beam =>null()
368 
370  integer(kind=kint) :: restart_nout
373  integer(kind=kint) :: restart_nin
374  type(step_info) :: step_ctrl_restart
375 
376  integer(kind=kint) :: max_lyr
377  integer(kind=kint) :: is_33shell
378  integer(kind=kint) :: is_33beam
379  integer(kind=kint) :: is_heat
380  integer(kind=kint) :: max_ncon_stf
381  integer(kind=kint) :: max_ncon
382  integer(kind=kint), pointer :: is_rot(:) => null()
383  integer(kind=kint) :: elemopt361
384  logical :: is_smoothing_active
385  real(kind=kreal) :: factor(2)
388  integer(kind=kint) :: nrstat_i(10)
389  real(kind=kreal) :: nrstat_r(10)
390  integer(kind=kint) :: autoinc_stat
391  integer(kind=kint) :: cutback_stat
392 
393  real(kind=kreal), pointer :: gl(:)
394  real(kind=kreal), pointer :: gl0(:)
395  real(kind=kreal), pointer :: eforce(:)
396  real(kind=kreal), pointer :: qforce(:)
397  real(kind=kreal), pointer :: qforce_bak(:)
398  real(kind=kreal), pointer :: unode(:) => null()
399  real(kind=kreal), pointer :: unode_bak(:) => null()
400  real(kind=kreal), pointer :: dunode(:) => null()
401  real(kind=kreal), pointer :: ddunode(:) => null()
402  real(kind=kreal), pointer :: temperature(:)=> null()
403  real(kind=kreal), pointer :: temp_bak(:) => null()
404  real(kind=kreal), pointer :: last_temp(:) => null()
405 
406  type( telement ), pointer :: elements(:) =>null()
407  type( tmaterial ),pointer :: materials(:) =>null()
408  integer :: n_contacts
409  type( tcontact ), pointer :: contacts(:) =>null()
410  integer :: n_embeds
411  type( tcontact ), pointer :: embeds(:) =>null()
412  integer :: n_fix_mpc
413  real(kind=kreal), pointer :: mpc_const(:) =>null()
414  type(tsection), pointer :: sections(:) =>null()
415 
416  ! for cutback
417  ! ####################### Notice #######################
418  ! # If you add new variables to store analysis status, #
419  ! # - backup variables with postfix "_bkup" here #
420  ! # - backup process to module m_fstr_Cutback #
421  ! # must be added if necessary. #
422  ! ######################################################
423  real(kind=kreal), pointer :: unode_bkup(:) => null()
424  real(kind=kreal), pointer :: qforce_bkup(:) => null()
425  real(kind=kreal), pointer :: last_temp_bkup(:) => null()
426  type( telement ), pointer :: elements_bkup(:) =>null()
427  type( tcontact ), pointer :: contacts_bkup(:) =>null()
428  type( tcontact ), pointer :: embeds_bkup(:) =>null()
429  end type fstr_solid
430 
434  integer(kind=kint) :: is_steady
435  real(kind=kreal) :: beta
436  logical :: is_iter_max_limit
437 
439  integer(kind=kint) :: steptot
440  integer(kind=kint) :: restart_nout
441  real(kind=kreal), pointer :: step_dltime(:), step_eetime(:)
442  real(kind=kreal), pointer :: step_delmin(:), step_delmax(:)
443  integer(kind=kint) :: timepoint_id
444 
446  integer(kind=kint) :: materialtot
447  integer(kind=kint), pointer :: rhotab(:), cptab(:), condtab(:)
448  real(kind=kreal), pointer :: rho(:,:), rhotemp(:,:)
449  real(kind=kreal), pointer :: cp(:,:), cptemp(:,:)
450  real(kind=kreal), pointer :: cond(:,:),condtemp(:,:)
451 
452  real(kind=kreal), pointer :: rhofunca(:,:), rhofuncb(:,:)
453  real(kind=kreal), pointer :: cpfunca(:,:), cpfuncb(:,:)
454  real(kind=kreal), pointer :: condfunca(:,:),condfuncb(:,:)
455 
457  integer(kind=kint) :: amplitudetot
458  integer(kind=kint), pointer :: ampltab(:)
459  real(kind=kreal), pointer :: ampl(:,:), ampltime(:,:)
460  real(kind=kreal), pointer :: amplfunca(:,:), amplfuncb(:,:)
461 
463  real(kind=kreal), pointer :: temp0(:)
464  real(kind=kreal), pointer :: tempc(:)
465  real(kind=kreal), pointer :: temp(:)
466 
468  integer(kind=kint) :: t_fix_tot
469  integer(kind=kint), pointer :: t_fix_node(:)
470  integer(kind=kint), pointer :: t_fix_ampl(:)
471  real(kind=kreal), pointer :: t_fix_val(:)
472 
474  integer(kind=kint) :: q_nod_tot
475  integer(kind=kint), pointer :: q_nod_node(:)
476  integer(kind=kint), pointer :: q_nod_ampl(:)
477  real(kind=kreal), pointer :: q_nod_val(:)
478 
480  integer(kind=kint) :: q_vol_tot
481  integer(kind=kint), pointer :: q_vol_elem(:)
482  integer(kind=kint), pointer :: q_vol_ampl(:)
483  real(kind=kreal), pointer :: q_vol_val(:)
484 
486  integer(kind=kint) :: q_suf_tot
487  integer(kind=kint), pointer :: q_suf_elem(:)
488  integer(kind=kint), pointer :: q_suf_ampl(:)
489  integer(kind=kint), pointer :: q_suf_surf(:)
490  real(kind=kreal), pointer :: q_suf_val(:)
491 
493  integer(kind=kint) :: r_suf_tot
494  integer(kind=kint), pointer :: r_suf_elem(:)
495  integer(kind=kint), pointer :: r_suf_ampl(:,:)
496  integer(kind=kint), pointer :: r_suf_surf(:)
497  real(kind=kreal), pointer :: r_suf_val(:,:)
498 
500  integer(kind=kint) :: h_suf_tot
501  integer(kind=kint), pointer :: h_suf_elem(:)
502  integer(kind=kint), pointer :: h_suf_ampl(:,:)
503  integer(kind=kint), pointer :: h_suf_surf(:)
504  real(kind=kreal), pointer :: h_suf_val(:,:)
505 
506  integer(kind=kint) :: wl_tot
507  type(tweldline), pointer :: weldline(:) => null()
508 
510  type(telemact) :: elemact
511  end type fstr_heat
512 
516  integer(kind=kint) :: idx_eqa ! implicit or explicit
517  integer(kind=kint) :: idx_resp ! time history or steady-state harmonic response analysis
518 
520  integer(kind=kint) :: n_step ! total step number of analysis
521  real(kind=kreal) :: t_start ! start time of analysis
522  real(kind=kreal) :: t_curr ! current time of analysis
523  real(kind=kreal) :: t_end ! end time of analysis
524  real(kind=kreal) :: t_delta ! time increment
525  integer(kind=kint) :: restart_nout ! output interval of restart file
526  ! (if .gt.0) restart file write
527  ! (if .lt.0) restart file read and write
528  integer(kind=kint) :: restart_nin !input number of restart file
529 
531  real(kind=kreal) :: gamma ! Newmark-beta parameter gamma
532  real(kind=kreal) :: beta ! Newmark-beta parameter beta
533 
535  integer(kind=kint) :: idx_mas ! mass matrix type
536 
538  integer(kind=kint) :: idx_dmp ! damping type
539  real(kind=kreal) :: ray_m ! Rayleigh damping parameter Rm
540  real(kind=kreal) :: ray_k ! Rayleigh damping parameter Rk
541 
543  logical :: varinitialize ! initialization flag
544 
546  integer(kind=kint) :: nout ! output interval of result
547  integer(kind=kint) :: ngrp_monit ! node of monitoring result
548  integer(kind=kint) :: nout_monit ! output interval of result monitoring
549  integer(kind=kint) :: i_step ! step number
550  integer(kind=kint) :: iout_list(6) ! 0:not output 1:output
551  ! iout_list(1): displacement
552  ! iout_list(2): velocity
553  ! iout_list(3): acceleration
554  ! iout_list(4): reaction force
555  ! iout_list(5): strain
556  ! iout_list(6): stress
557 
559  real(kind=kreal), pointer :: disp(:,:)
560  real(kind=kreal), pointer :: vel(:,:)
561  real(kind=kreal), pointer :: acc(:,:)
562 
563  real(kind=kreal) :: kineticenergy
564  real(kind=kreal) :: strainenergy
565  real(kind=kreal) :: totalenergy
566 
568  real(kind=kreal), pointer :: vec1(:)
569  real(kind=kreal), pointer :: vec2(:)
570  real(kind=kreal), pointer :: vec3(:)
571 
572  integer(kind=kint) :: dynamic_iw4 = 204
573  integer(kind=kint) :: dynamic_iw5 = 205
574  integer(kind=kint) :: dynamic_iw6 = 206
575  integer(kind=kint) :: dynamic_iw7 = 207
576  integer(kind=kint) :: dynamic_iw8 = 208
577  integer(kind=kint) :: dynamic_iw9 = 209
578  integer(kind=kint) :: dynamic_iw10 = 210
579  end type fstr_dynamic
580 
582  integer(kind=kint) :: fload_ngrp_tot
583  integer(kind=kint), pointer :: fload_ngrp_grpid(:) => null()
584  integer(kind=kint), pointer :: fload_ngrp_id(:) => null()
585  integer(kind=kint), pointer :: fload_ngrp_type(:) => null()
586  integer(kind=kint), pointer :: fload_ngrp_dof(:) => null()
587  real(kind=kreal), pointer :: fload_ngrp_valre(:) => null()
588  real(kind=kreal), pointer :: fload_ngrp_valim(:) => null()
589  character(len=HECMW_FILENAME_LEN) :: eigenlog_filename
590  integer(kind=kint) :: start_mode
591  integer(kind=kint) :: end_mode
592  end type fstr_freqanalysis
593 
595  integer(kind=kint) :: nummode
596  integer(kind=kint) :: numnodedof
597  real(kind=kreal), pointer :: eigomega(:) => null()
598  real(kind=kreal), pointer :: eigvector(:,:) => null()
599  real(kind=kreal) :: rayalpha, raybeta
600  end type fstr_freqanalysis_data
601 
605  integer(kind=kint) :: nget ! Solved eigen value number (default:5)
606  integer(kind=kint) :: maxiter ! Max. Lcz iterations (default:60)
607  integer(kind=kint) :: iter ! Max. Lcz iterations (default:60)
608  real (kind=kreal) :: sigma ! 0.0
609  real (kind=kreal) :: tolerance ! Lcz tolerance (default:1.0e-8)
610  real (kind=kreal) :: totalmass
611  real (kind=kreal), pointer :: eigval(:)
612  real (kind=kreal), pointer :: eigvec(:,:)
613  real (kind=kreal), pointer :: filter(:)
614  real (kind=kreal), pointer :: mass(:)
615  real (kind=kreal), pointer :: effmass(:)
616  real (kind=kreal), pointer :: partfactor(:)
617  logical :: is_free = .false.
618  end type fstr_eigen
619 
623  integer( kind=kint ) :: dof ! == 3
624  integer( kind=kint ) :: ndof ! total dof (coupled_node_n*dof)
625  integer( kind=kint ) :: coupled_node_n
627  integer, pointer :: coupled_node(:) ! local node id sent from revocap
628  real( kind=8 ),pointer :: trac(:) ! input (x,y,z,x,y,z ... )
629  real( kind=8 ),pointer :: disp(:) ! output (x,y,z,x,y,z ... )
630  real( kind=8 ),pointer :: velo(:) ! output (x,y,z,x,y,z ... )
631  real( kind=8 ),pointer :: accel(:) ! output (x,y,z,x,y,z ... )
633  integer( kind=kint ),pointer :: index(:) ! size:total node num.
635  end type fstr_couple
636 
639  integer(kind=kint) :: egrpid
640  real( kind=kreal ) :: i
641  real( kind=kreal ) :: u
642  real( kind=kreal ) :: coe
643  real( kind=kreal ) :: v
644  integer(kind=kint) :: xyz
645  real(kind=kreal) :: n1, n2
646  real(kind=kreal) :: distol
647  real(kind=kreal) :: tstart
648  end type tweldline
649 
651  type tsection
652  !integer :: mat_ID
653  !integer :: iset
654  !integer :: orien_ID
655  !real(kind=kreal) :: thickness
656  integer :: elemopt341
657  !integer :: elemopt342
658  !integer :: elemopt351
659  !integer :: elemopt352
660  integer :: elemopt361
661  !integer :: elemopt362
662  end type tsection
663 
664 contains
665 
667  subroutine fstr_nullify_fstr_param( P )
668  implicit none
669  type( fstr_param ) :: P
670 
671  nullify( p%dtime )
672  nullify( p%etime )
673  nullify( p%dtmin )
674  nullify( p%delmax )
675  nullify( p%itmax )
676  nullify( p%eps )
677  nullify( p%global_local_ID)
678  nullify( p%timepoints )
679  end subroutine fstr_nullify_fstr_param
680 
681  subroutine fstr_nullify_fstr_solid( S )
682  implicit none
683  type( fstr_solid ) :: S
684 
685  nullify( s%BOUNDARY_ngrp_ID )
686  nullify( s%BOUNDARY_ngrp_type )
687  nullify( s%BOUNDARY_ngrp_amp )
688  nullify( s%BOUNDARY_ngrp_val)
689  nullify( s%BOUNDARY_ngrp_rotID )
690  nullify( s%BOUNDARY_ngrp_centerID )
691  nullify( s%CLOAD_ngrp_ID )
692  nullify( s%CLOAD_ngrp_DOF )
693  nullify( s%CLOAD_ngrp_amp )
694  nullify( s%CLOAD_ngrp_rotID )
695  nullify( s%CLOAD_ngrp_centerID )
696  nullify( s%CLOAD_ngrp_val )
697  nullify( s%DLOAD_ngrp_ID )
698  nullify( s%DLOAD_ngrp_LID )
699  nullify( s%DLOAD_ngrp_amp )
700  nullify( s%DLOAD_ngrp_params )
701  nullify( s%TEMP_ngrp_ID )
702  nullify( s%TEMP_ngrp_val )
703  nullify( s%SPRING_ngrp_ID )
704  nullify( s%SPRING_ngrp_DOF )
705  nullify( s%SPRING_ngrp_amp )
706  nullify( s%SPRING_ngrp_val )
707  nullify( s%STRESS )
708  nullify( s%STRAIN )
709  nullify( s%MISES )
710  nullify( s%PSTRESS )
711  nullify( s%PSTRAIN )
712  nullify( s%PSTRESS_VECT )
713  nullify( s%PSTRAIN_VECT )
714  nullify( s%REACTION )
715  nullify( s%ESTRESS )
716  nullify( s%ESTRAIN )
717  nullify( s%EMISES )
718  nullify( s%EPLSTRAIN )
719  nullify( s%EPSTRESS )
720  nullify( s%EPSTRAIN )
721  nullify( s%EPSTRESS_VECT )
722  nullify( s%EPSTRAIN_VECT )
723  nullify( s%ENQM )
724  nullify( s%GL )
725  nullify( s%GL0 )
726  nullify( s%QFORCE )
727  nullify( s%VELOCITY_ngrp_ID )
728  nullify( s%VELOCITY_ngrp_type )
729  nullify( s%VELOCITY_ngrp_amp )
730  nullify( s%VELOCITY_ngrp_val )
731  nullify( s%ACCELERATION_ngrp_ID )
732  nullify( s%ACCELERATION_ngrp_type )
733  nullify( s%ACCELERATION_ngrp_amp )
734  nullify( s%ACCELERATION_ngrp_val )
735  nullify( s%COUPLE_ngrp_ID )
736  end subroutine fstr_nullify_fstr_solid
737 
738  subroutine fstr_nullify_fstr_heat( H )
739  implicit none
740  type( fstr_heat ) :: H
741 
742  nullify( h%STEP_DLTIME )
743  nullify( h%STEP_EETIME )
744  nullify( h%STEP_DELMIN )
745  nullify( h%STEP_DELMAX )
746  nullify( h%RHO )
747  nullify( h%RHOtemp )
748  nullify( h%CP )
749  nullify( h%CPtemp )
750  nullify( h%COND )
751  nullify( h%CONDtemp )
752  nullify( h%RHOtab )
753  nullify( h%CPtab )
754  nullify( h%CONDtab )
755  nullify( h%RHOfuncA )
756  nullify( h%RHOfuncB )
757  nullify( h%CPfuncA )
758  nullify( h%CPfuncB )
759  nullify( h%CONDfuncA )
760  nullify( h%CONDfuncB )
761  nullify( h%AMPL )
762  nullify( h%AMPLtime )
763  nullify( h%AMPLtab )
764  nullify( h%AMPLfuncA )
765  nullify( h%AMPLfuncB )
766  nullify( h%TEMP0 )
767  nullify( h%TEMPC )
768  nullify( h%TEMP )
769  nullify( h%T_FIX_node )
770  nullify( h%T_FIX_ampl )
771  nullify( h%T_FIX_val )
772  nullify( h%Q_NOD_node )
773  nullify( h%Q_NOD_ampl )
774  nullify( h%Q_NOD_val )
775  nullify( h%Q_VOL_elem )
776  nullify( h%Q_VOL_ampl )
777  nullify( h%Q_VOL_val )
778  nullify( h%Q_SUF_elem )
779  nullify( h%Q_SUF_ampl )
780  nullify( h%Q_SUF_surf )
781  nullify( h%Q_SUF_val )
782  nullify( h%R_SUF_elem )
783  nullify( h%R_SUF_ampl )
784  nullify( h%R_SUF_surf )
785  nullify( h%R_SUF_val )
786  nullify( h%H_SUF_elem )
787  nullify( h%H_SUF_ampl )
788  nullify( h%H_SUF_surf )
789  nullify( h%H_SUF_val )
790  end subroutine fstr_nullify_fstr_heat
791 
792  subroutine fstr_nullify_fstr_dynamic( DY )
793  implicit none
794  type( fstr_dynamic ) :: DY
795 
796  nullify( dy%DISP )
797  nullify( dy%VEL )
798  nullify( dy%ACC )
799  nullify( dy%VEC1 )
800  nullify( dy%VEC2 )
801  nullify( dy%VEC3 )
802  end subroutine fstr_nullify_fstr_dynamic
803 
805  implicit none
806  type( fstr_freqanalysis ), intent(inout) :: f
807 
808  f%FLOAD_ngrp_tot = 0
809  nullify( f%FLOAD_ngrp_GRPID )
810  nullify( f%FLOAD_ngrp_ID )
811  nullify( f%FLOAD_ngrp_TYPE )
812  nullify( f%FLOAD_ngrp_DOF )
813  nullify( f%FLOAD_ngrp_valre )
814  nullify( f%FLOAD_ngrp_valim )
815  end subroutine fstr_nullify_fstr_freqanalysis
816 
817  subroutine fstr_nullify_fstr_eigen( E )
818  implicit none
819  type( fstr_eigen ) :: E
820 
821  nullify( e%mass )
822  end subroutine fstr_nullify_fstr_eigen
823 
824  subroutine fstr_nullify_fstr_couple( C )
825  implicit none
826  type( fstr_couple ) :: C
827 
828  nullify( c%coupled_node )
829  nullify( c%trac )
830  nullify( c%velo )
831  nullify( c%index )
832  end subroutine fstr_nullify_fstr_couple
833 
835  subroutine fstr_mat_init( hecMAT )
836  implicit none
837  type(hecmwst_matrix) :: hecMAT
838 
839  hecmat%Iarray(1) = 100 ! = nier
840  hecmat%Iarray(2) = 1 ! = method
841  hecmat%Iarray(3) = 1 ! = precond
842  hecmat%Iarray(4) = 0 ! = nset
843  hecmat%Iarray(5) = 1 ! = iterpremax
844  hecmat%Iarray(6) = 10 ! = nrest
845  hecmat%Iarray(7) = 0 ! = scaling
846  hecmat%Iarray(21)= kno ! = iterlog
847  hecmat%Iarray(22)= kno ! = timelog
848  hecmat%Iarray(31)= 0 ! = dumptype
849  hecmat%Iarray(32)= 0 ! = dumpexit
850  hecmat%Iarray(33)= 0 ! = usejad
851  hecmat%Iarray(34)= 10 ! = ncolor_in
852  hecmat%Iarray(13)= 0 ! = mpc_method
853  hecmat%Iarray(14)= 0 ! = estcond
854  hecmat%Iarray(35)= 3 ! = maxrecycle_precond
855  hecmat%Iarray(41)= 0 ! = solver_opt1
856  hecmat%Iarray(42)= 0 ! = solver_opt2
857  hecmat%Iarray(43)= 0 ! = solver_opt3
858  hecmat%Iarray(44)= 0 ! = solver_opt4
859  hecmat%Iarray(45)= 0 ! = solver_opt5
860  hecmat%Iarray(46)= 0 ! = solver_opt6
861 
862  hecmat%Rarray(1) = 1.0e-8 ! = resid
863  hecmat%Rarray(2) = 1.0 ! = sigma_diag
864  hecmat%Rarray(3) = 0.0 ! = sigma
865  hecmat%Rarray(4) = 0.1 ! = thresh
866  hecmat%Rarray(5) = 0.1 ! = filter
867  hecmat%Rarray(11)= 1.0e+4 ! = penalty
868 
869  hecmat%Iarray(96) = 0 ! nrecycle_precond
870  hecmat%Iarray(97) = kyes ! flag_numfact
871  hecmat%Iarray(98) = kyes ! flag_symbfact
872  hecmat%Iarray(99) = kyes ! indirect method
873  end subroutine fstr_mat_init
874 
875  subroutine hecmat_init( hecMAT )
876  implicit none
877  type( hecmwst_matrix ) :: hecMAT
878  integer :: ndof, nn, ierror
879  ndof = hecmat%NDOF
880  nn = ndof*ndof
881  allocate (hecmat%AL(nn*hecmat%NPL) ,stat=ierror )
882  if( ierror /= 0 ) then
883  write(*,*) "##ERROR : not enough memory"
884  write(idbg,*) 'stop due to allocation error'
885  call flush(idbg)
886  call hecmw_abort( hecmw_comm_get_comm() )
887  end if
888  allocate (hecmat%AU(nn*hecmat%NPU) ,stat=ierror )
889  if( ierror /= 0 ) then
890  write(*,*) "##ERROR : not enough memory"
891  write(idbg,*) 'stop due to allocation error'
892  call flush(idbg)
893  call hecmw_abort( hecmw_comm_get_comm() )
894  end if
895  allocate (hecmat%B(ndof*hecmat%NP) ,stat=ierror )
896  if( ierror /= 0 ) then
897  write(*,*) "##ERROR : not enough memory"
898  write(idbg,*) 'stop due to allocation error'
899  call flush(idbg)
900  call hecmw_abort( hecmw_comm_get_comm() )
901  end if
902  hecmat%B(:)=0.d0
903  allocate (hecmat%D(nn*hecmat%NP) ,stat=ierror )
904  if( ierror /= 0 ) then
905  write(*,*) "##ERROR : not enough memory"
906  write(idbg,*) 'stop due to allocation error'
907  call flush(idbg)
908  call hecmw_abort( hecmw_comm_get_comm() )
909  end if
910  allocate (hecmat%X(ndof*hecmat%NP) ,stat=ierror )
911  if( ierror /= 0 ) then
912  write(*,*) "##ERROR : not enough memory"
913  write(idbg,*) 'stop due to allocation error'
914  call flush(idbg)
915  call hecmw_abort( hecmw_comm_get_comm() )
916  end if
917  hecmat%D = 0.0d0
918  hecmat%AL = 0.0d0
919  hecmat%AU = 0.0d0
920  hecmat%B = 0.0d0
921  hecmat%X = 0.0d0
922  end subroutine hecmat_init
923 
924  subroutine hecmat_finalize( hecMAT )
925  implicit none
926  type( hecmwst_matrix ) :: hecMAT
927  integer :: ndof, nn, ierror
928  ndof = hecmat%NDOF
929  nn = ndof*ndof
930  if( associated(hecmat%AL) ) then
931  deallocate(hecmat%AL ,stat=ierror)
932  if( ierror /= 0 ) then
933  write(idbg,*) 'stop due to deallocation error'
934  call flush(idbg)
935  call hecmw_abort( hecmw_comm_get_comm())
936  end if
937  endif
938  if( associated(hecmat%AU) ) then
939  deallocate(hecmat%AU ,stat=ierror)
940  if( ierror /= 0 ) then
941  write(idbg,*) 'stop due to deallocation error'
942  call flush(idbg)
943  call hecmw_abort( hecmw_comm_get_comm())
944  end if
945  endif
946  if( associated(hecmat%B) ) then
947  deallocate(hecmat%B ,stat=ierror)
948  if( ierror /= 0 ) then
949  write(idbg,*) 'stop due to deallocation error'
950  call flush(idbg)
951  call hecmw_abort( hecmw_comm_get_comm())
952  end if
953  endif
954  if( associated(hecmat%D) ) then
955  deallocate(hecmat%D ,stat=ierror)
956  if( ierror /= 0 ) then
957  write(idbg,*) 'stop due to deallocation error'
958  call flush(idbg)
959  call hecmw_abort( hecmw_comm_get_comm())
960  end if
961  endif
962  if( associated(hecmat%X) ) then
963  deallocate(hecmat%X ,stat=ierror)
964  if( ierror /= 0 ) then
965  write(idbg,*) 'stop due to deallocation error'
966  call flush(idbg)
967  call hecmw_abort( hecmw_comm_get_comm())
968  end if
969  endif
970  end subroutine hecmat_finalize
971 
973  subroutine fstr_param_init( fstrPARAM, hecMESH )
974  implicit none
975  type(fstr_param) :: fstrPARAM
976  type(hecmwst_local_mesh) :: hecMESH
977  integer(kind=kint) :: i
978  external fstr_sort_index
979 
980  fstrparam%solution_type = kststatic
981  fstrparam%nlgeom = .false.
982  fstrparam%solver_method = ksmcg
983  fstrparam%nlsolver_method = knsmnewton
984 
985  !!STATIC !HEAT
986  fstrparam%analysis_n = 0
987  fstrparam%ref_temp = 0
988 
989  ! output control
990  fstrparam%fg_echo = koff
991  fstrparam%fg_result = koff
992  fstrparam%fg_visual = koff
993 
994  ! for heat ...
995  fstrparam%fg_neutral = koff
996  fstrparam%fg_irres = kno
997  fstrparam%fg_iwres = kno
998  fstrparam%nrres = 1
999  fstrparam%nprint = 1
1000 
1001  ! for couple
1002  fstrparam%fg_couple = 0
1003  fstrparam%fg_couple_type = 0
1004  fstrparam%fg_couple_first= 0
1005  fstrparam%fg_couple_window= 0
1006 
1007  ! for restart control
1008  fstrparam%restart_version = 5
1009 
1010  ! for contact analysis
1011  fstrparam%contact_algo = kcaslagrange ! default: Standard Lagrange
1012  fstrparam%augiter = 2 ! default augmentation iteration for ALagrange
1013 
1014  ! index table for global node ID sorting
1015 
1016  fstrparam%n_node = hecmesh%n_node;
1017  fstrparam%nn_internal = hecmesh%nn_internal;
1018  allocate( fstrparam%global_local_ID(2,hecmesh%nn_internal))
1019  do i = 1, hecmesh%nn_internal
1020  fstrparam%global_local_ID(1,i) = hecmesh%global_node_ID(i)
1021  fstrparam%global_local_ID(2,i) = i
1022  end do
1023  call fstr_sort_index( fstrparam%global_local_ID, hecmesh%nn_internal )
1024  end subroutine fstr_param_init
1025 
1026  logical function fstr_isboundaryactive( fstrSOLID, nbc, cstep )
1027  type(fstr_solid) :: fstrsolid
1028  integer, intent(in) :: nbc
1029  integer, intent(in) :: cstep
1030  fstr_isboundaryactive = .true.
1031  if( .not. associated(fstrsolid%step_ctrl) ) return
1032  if( cstep>fstrsolid%nstep_tot ) return
1033  fstr_isboundaryactive = isboundaryactive( nbc, fstrsolid%step_ctrl(cstep) )
1034  end function
1035 
1036  logical function fstr_isloadactive( fstrSOLID, nbc, cstep )
1037  type(fstr_solid) :: fstrsolid
1038  integer, intent(in) :: nbc
1039  integer, intent(in) :: cstep
1040  fstr_isloadactive = .true.
1041  if( cstep > 0 ) then
1042  if( .not. associated(fstrsolid%step_ctrl) ) return
1043  if( cstep>fstrsolid%nstep_tot ) return
1044  fstr_isloadactive = isloadactive( nbc, fstrsolid%step_ctrl(cstep) )
1045  else
1046  fstr_isloadactive = isloadactive( nbc, fstrsolid%step_ctrl_restart )
1047  endif
1048  end function
1049 
1050  logical function fstr_iscontactactive( fstrSOLID, nbc, cstep )
1051  type(fstr_solid) :: fstrsolid
1052  integer, intent(in) :: nbc
1053  integer, intent(in) :: cstep
1054  fstr_iscontactactive = .true.
1055  if( .not. associated(fstrsolid%step_ctrl) ) return
1056  if( cstep>fstrsolid%nstep_tot ) return
1057  fstr_iscontactactive = iscontactactive( nbc, fstrsolid%step_ctrl(cstep) )
1058  end function
1059 
1060  logical function fstr_isembedactive( fstrSOLID, nbc, cstep )
1061  type(fstr_solid) :: fstrsolid
1062  integer, intent(in) :: nbc
1063  integer, intent(in) :: cstep
1064  fstr_isembedactive = .true.
1065  if( .not. associated(fstrsolid%step_ctrl) ) return
1066  if( cstep>fstrsolid%nstep_tot ) return
1067  fstr_isembedactive = iscontactactive( nbc, fstrsolid%step_ctrl(cstep) )
1068  end function
1069 
1070  logical function fstr_iselemactivationactive( fstrSOLID, nbc, cstep )
1071  type(fstr_solid) :: fstrsolid
1072  integer, intent(in) :: nbc
1073  integer, intent(in) :: cstep
1075  if( .not. associated(fstrsolid%step_ctrl) ) return
1076  if( cstep>fstrsolid%nstep_tot ) return
1077  fstr_iselemactivationactive = iselemactivationactive( nbc, fstrsolid%step_ctrl(cstep) )
1078  end function
1079 
1081  subroutine get_coordsys( cdsys_ID, hecMESH, fstrSOLID, coords )
1082  integer, intent(in) :: cdsys_ID
1083  type(hecmwst_local_mesh) :: hecMESH
1084  type(fstr_solid), intent(inout) :: fstrSOLID
1085  real(kind=kreal), intent(out) :: coords(3,3)
1086  integer :: ik
1087 
1088  coords = 0.d0
1089  if( cdsys_id>0 ) then
1090  if( iscoordneeds(g_localcoordsys(cdsys_id)) ) then
1091  coords=g_localcoordsys(cdsys_id)%CoordSys
1092  else
1093  ik=g_localcoordsys(cdsys_id)%node_ID(1)
1094  coords(1,:)= hecmesh%node(3*ik-2:3*ik)+fstrsolid%unode(3*ik-2:3*ik) &
1095  + fstrsolid%dunode(3*ik-2:3*ik)
1096  ik=g_localcoordsys(cdsys_id)%node_ID(2)
1097  coords(2,:)= hecmesh%node(3*ik-2:3*ik)+fstrsolid%unode(3*ik-2:3*ik) &
1098  + fstrsolid%dunode(3*ik-2:3*ik)
1099  ik=g_localcoordsys(cdsys_id)%node_ID(3)
1100  if(ik>0) coords(3,:)= hecmesh%node(3*ik-2:3*ik)+fstrsolid%unode(3*ik-2:3*ik) &
1101  + fstrsolid%dunode(3*ik-2:3*ik)
1102  endif
1103  endif
1104  end subroutine get_coordsys
1105 
1106  subroutine fstr_set_current_config_to_mesh(hecMESH,fstrSOLID,coord)
1107  implicit none
1108  type(hecmwst_local_mesh), intent(inout) :: hecMESH
1109  type (fstr_solid), intent(in) :: fstrSOLID
1110  real(kind=kreal), intent(out) :: coord(:)
1111  integer(kind=kint) :: i
1112  if(hecmesh%n_dof == 4) return
1113  do i = 1, hecmesh%nn_internal*min(hecmesh%n_dof,3)
1114  coord(i) = hecmesh%node(i)
1115  hecmesh%node(i) = coord(i)+fstrsolid%unode(i)+fstrsolid%dunode(i)
1116  enddo
1117  end subroutine fstr_set_current_config_to_mesh
1118 
1119  subroutine fstr_recover_initial_config_to_mesh(hecMESH,fstrSOLID,coord)
1120  implicit none
1121  type(hecmwst_local_mesh), intent(inout) :: hecMESH
1122  type (fstr_solid), intent(in) :: fstrSOLID
1123  real(kind=kreal), intent(in) :: coord(:)
1124  integer(kind=kint) :: i
1125  if(hecmesh%n_dof == 4) return
1126  do i = 1, hecmesh%nn_internal*min(hecmesh%n_dof,3)
1127  hecmesh%node(i) = coord(i)
1128  enddo
1130 
1131  subroutine fstr_solid_phys_zero(phys)
1132  implicit none
1133  type(fstr_solid_physic_val), pointer :: phys
1134  phys%STRAIN = 0.0d0
1135  phys%STRESS = 0.0d0
1136  phys%MISES = 0.0d0
1137  phys%ESTRAIN = 0.0d0
1138  phys%ESTRESS = 0.0d0
1139  phys%EMISES = 0.0d0
1140  phys%EPLSTRAIN = 0.0d0
1141  phys%ENQM = 0.0d0
1142  end subroutine fstr_solid_phys_zero
1143 
1144  subroutine fstr_solid_phys_clear(fstrSOLID)
1145  implicit none
1146  type (fstr_solid) :: fstrSOLID
1147  integer(kind=kint) :: i
1148 
1149  if (associated(fstrsolid%SOLID)) then
1150  call fstr_solid_phys_zero(fstrsolid%SOLID)
1151  end if
1152  if (associated(fstrsolid%SHELL)) then
1153  call fstr_solid_phys_zero(fstrsolid%SHELL)
1154  do i=1,fstrsolid%max_lyr
1155  call fstr_solid_phys_zero(fstrsolid%SHELL%LAYER(i)%PLUS)
1156  call fstr_solid_phys_zero(fstrsolid%SHELL%LAYER(i)%MINUS)
1157  end do
1158  end if
1159  if (associated(fstrsolid%BEAM)) then
1160  call fstr_solid_phys_zero(fstrsolid%BEAM)
1161  end if
1162  end subroutine fstr_solid_phys_clear
1163 
1164  subroutine table_amp(hecMESH, fstrSOLID, cstep, jj_n_amp, time, f_t)
1165  type ( hecmwST_local_mesh ), intent(in) :: hecMESH
1166  type ( fstr_solid ), intent(in) :: fstrSOLID
1167  integer(kind=kint), intent(in) :: cstep
1168  integer(kind=kint), intent(in) :: jj_n_amp
1169  real(kind=kreal), intent(in) :: time
1170  real(kind=kreal), intent(out) :: f_t
1171 
1172  integer(kind=kint) :: i
1173  integer(kind=kint) :: jj1, jj2
1174  integer(kind=kint) :: s1, s2, flag
1175  real(kind=kreal) :: t_1, t_2, t_t, f_1, f_2, tincre
1176 
1177  s1 = 0; s2 = 0
1178 
1179  if( jj_n_amp <= 0 ) then ! Amplitude not defined
1180  if(myrank == 0) then
1181  write(imsg,*) 'internal error: amplitude table not defined'
1182  endif
1183  call hecmw_abort( hecmw_comm_get_comm() )
1184  endif
1185 
1186  tincre = fstrsolid%step_ctrl( cstep )%initdt
1187  jj1 = hecmesh%amp%amp_index(jj_n_amp - 1)
1188  jj2 = hecmesh%amp%amp_index(jj_n_amp)
1189 
1190  jj1 = jj1 + 2
1191  t_t = time-fstrsolid%step_ctrl(cstep)%starttime
1192 
1193  ! if(jj2 .eq. 0) then
1194  ! f_t = 1.0
1195  if(t_t .gt. hecmesh%amp%amp_table(jj2)) then
1196  f_t = hecmesh%amp%amp_val(jj2)
1197  else if(t_t .le. hecmesh%amp%amp_table(jj2)) then
1198  flag=0
1199  do i = jj1, jj2
1200  if(t_t .le. hecmesh%amp%amp_table(i)) then
1201  s2 = i
1202  s1 = i - 1
1203  flag = 1
1204  endif
1205  if( flag == 1 ) exit
1206  end do
1207 
1208  t_2 = hecmesh%amp%amp_table(s2)
1209  t_1 = hecmesh%amp%amp_table(s1)
1210  f_2 = hecmesh%amp%amp_val(s2)
1211  f_1 = hecmesh%amp%amp_val(s1)
1212  if( t_2-t_1 .lt. 1.0e-20) then
1213  if(myrank == 0) then
1214  write(imsg,*) 'stop due to t_2-t_1 <= 0'
1215  endif
1216  call hecmw_abort( hecmw_comm_get_comm())
1217  endif
1218  f_t = ((t_2*f_1 - t_1*f_2) + (f_2 - f_1)*t_t) / (t_2 - t_1)
1219  endif
1220 
1221  end subroutine table_amp
1222 
1223 end module m_fstr
void fstr_sort_index(int *index_data, int *n)
Definition: hecmw.f90:6
This modules defines common structures for fem analysis.
logical function iscoordneeds(coordsys)
if need to fetch global nodes' coordinate
type(tlocalcoordsys), dimension(:), pointer, save g_localcoordsys
This module defined elemact data and function.
This module defines common data and basic structures for analysis.
Definition: m_fstr.f90:15
integer(kind=kint), parameter kel361bbar
Definition: m_fstr.f90:79
integer(kind=kint), parameter iutb
Definition: m_fstr.f90:110
integer(kind=kint), pointer iresult
Definition: m_fstr.f90:123
subroutine fstr_solid_phys_zero(phys)
Definition: m_fstr.f90:1132
subroutine hecmat_finalize(hecMAT)
Definition: m_fstr.f90:925
subroutine get_coordsys(cdsys_ID, hecMESH, fstrSOLID, coords)
This subroutine fetch coords defined by local coordinate system.
Definition: m_fstr.f90:1082
subroutine fstr_nullify_fstr_couple(C)
Definition: m_fstr.f90:825
integer(kind=kint), parameter restart_outall
Definition: m_fstr.f90:72
integer(kind=kint), parameter ineu
Definition: m_fstr.f90:114
real(kind=kreal) eps
Definition: m_fstr.f90:143
integer(kind=kint) myrank
PARALLEL EXECUTION.
Definition: m_fstr.f90:97
integer(kind=kint), parameter kel341sesns
Definition: m_fstr.f90:76
integer(kind=kint), parameter kbcffstr
boundary condition file type (bcf)
Definition: m_fstr.f90:64
subroutine fstr_recover_initial_config_to_mesh(hecMESH, fstrSOLID, coord)
Definition: m_fstr.f90:1120
subroutine fstr_param_init(fstrPARAM, hecMESH)
Initializer of structure fstr_param.
Definition: m_fstr.f90:974
integer(kind=kint), parameter imsg
Definition: m_fstr.f90:111
integer(kind=kint), parameter kopss_material
Definition: m_fstr.f90:132
integer(kind=kint), parameter kitrfloatingerror
Definition: m_fstr.f90:93
logical function fstr_isembedactive(fstrSOLID, nbc, cstep)
Definition: m_fstr.f90:1061
integer(kind=kint), parameter ksmcg
solver method (sm) !CAUTION : (<=100):indirect, (>100):direct
Definition: m_fstr.f90:47
real(kind=kreal), dimension(100) svrarray
Definition: m_fstr.f90:119
integer(kind=kint), parameter kstdynamic
Definition: m_fstr.f90:41
integer(kind=kint), parameter ksmgmresren
Definition: m_fstr.f90:52
integer(kind=kint), pointer ineutral
Definition: m_fstr.f90:125
subroutine fstr_nullify_fstr_heat(H)
Definition: m_fstr.f90:739
real(kind=kreal) etime
Definition: m_fstr.f90:141
logical function fstr_isloadactive(fstrSOLID, nbc, cstep)
Definition: m_fstr.f90:1037
integer(kind=kint), parameter kel341fi
section control
Definition: m_fstr.f90:75
integer(kind=kint), parameter idbg
Definition: m_fstr.f90:112
integer(kind=kint), parameter kfloadtype_surf
Definition: m_fstr.f90:84
integer(kind=kint), parameter ksmgmres
Definition: m_fstr.f90:49
integer(kind=kint), parameter kopss_solution
Definition: m_fstr.f90:131
integer(kind=kint), parameter kel361fi
Definition: m_fstr.f90:78
integer(kind=kint) opsstype
Definition: m_fstr.f90:133
integer(kind=kint), dimension(100) sviarray
SOLVER CONTROL.
Definition: m_fstr.f90:118
integer(kind=kint), parameter kon
Definition: m_fstr.f90:33
character(len=hecmw_filename_len) restartfilname
Definition: m_fstr.f90:105
integer(kind=kint), parameter kfloadcase_im
Definition: m_fstr.f90:87
subroutine fstr_mat_init(hecMAT)
Initializer of structure hecmwST_matrix.
Definition: m_fstr.f90:836
integer(kind=kint) itmax
Definition: m_fstr.f90:142
subroutine fstr_nullify_fstr_eigen(E)
Definition: m_fstr.f90:818
integer(kind=kint) nprocs
Definition: m_fstr.f90:98
integer(kind=kint), parameter ifvs
Definition: m_fstr.f90:113
logical function fstr_iscontactactive(fstrSOLID, nbc, cstep)
Definition: m_fstr.f90:1051
integer(kind=kint), pointer iwres
Definition: m_fstr.f90:127
logical function fstr_iselemactivationactive(fstrSOLID, nbc, cstep)
Definition: m_fstr.f90:1071
integer(kind=kint), parameter kitrconverged
Definition: m_fstr.f90:91
integer(kind=kint), parameter kyes
CONSTANTS general.
Definition: m_fstr.f90:31
integer(kind=kint), parameter kbcfnastran
Definition: m_fstr.f90:65
integer(kind=kint), parameter kel361ic
Definition: m_fstr.f90:80
integer(kind=kint), parameter kcaslagrange
contact analysis algorithm
Definition: m_fstr.f90:60
integer(kind=kint), parameter ilog
FILE HANDLER.
Definition: m_fstr.f90:108
integer(kind=kint), parameter ksmgpbicg
Definition: m_fstr.f90:50
integer(kind=kint), parameter knsmnewton
nonlinear solver method (nsm)
Definition: m_fstr.f90:56
integer(kind=kint), pointer nprint
Definition: m_fstr.f90:129
real(kind=kreal) dt
ANALYSIS CONTROL for NLGEOM and HEAT.
Definition: m_fstr.f90:140
integer(kind=kint), pointer nrres
Definition: m_fstr.f90:128
integer(kind=kint), parameter kststatic
Definition: m_fstr.f90:38
subroutine fstr_set_current_config_to_mesh(hecMESH, fstrSOLID, coord)
Definition: m_fstr.f90:1107
integer(kind=kint), parameter kbcinitial
Definition: m_fstr.f90:67
integer(kind=kint), parameter kfloadtype_node
Definition: m_fstr.f90:83
integer(kind=kint), parameter kstprecheck
solution type (st)
Definition: m_fstr.f90:37
integer(kind=kint), parameter knsmquasinewton
Definition: m_fstr.f90:57
integer(kind=kint), parameter kcaalagrange
Definition: m_fstr.f90:61
subroutine hecmat_init(hecMAT)
Definition: m_fstr.f90:876
integer(kind=kint), parameter kststaticeigen
Definition: m_fstr.f90:43
integer(kind=kint), parameter kstheat
Definition: m_fstr.f90:40
integer(kind=kint), parameter ista
Definition: m_fstr.f90:109
subroutine fstr_nullify_fstr_freqanalysis(f)
Definition: m_fstr.f90:805
integer(kind=kint), parameter ksmdirect
Definition: m_fstr.f90:53
subroutine table_amp(hecMESH, fstrSOLID, cstep, jj_n_amp, time, f_t)
Definition: m_fstr.f90:1165
integer(kind=kint), parameter koff
Definition: m_fstr.f90:34
real(kind=kreal), pointer ref_temp
REFTEMP.
Definition: m_fstr.f90:137
integer(kind=kint), parameter kstnzprof
Definition: m_fstr.f90:44
integer(kind=kint), parameter kbctransit
Definition: m_fstr.f90:68
subroutine fstr_solid_phys_clear(fstrSOLID)
Definition: m_fstr.f90:1145
integer(kind=kint), pointer irres
Definition: m_fstr.f90:126
integer(kind=kint), parameter ksmbicgstab
Definition: m_fstr.f90:48
character(len=hecmw_filename_len) cntfilname
FILE NAME.
Definition: m_fstr.f90:104
integer(kind=kint), pointer iecho
FLAG for ECHO/RESULT/POST.
Definition: m_fstr.f90:122
type(fstr_param), target fstrpr
GLOBAL VARIABLE INITIALIZED IN FSTR_SETUP.
Definition: m_fstr.f90:211
integer(kind=kint), parameter kel361fbar
Definition: m_fstr.f90:81
logical function fstr_isboundaryactive(fstrSOLID, nbc, cstep)
Definition: m_fstr.f90:1027
subroutine fstr_nullify_fstr_param(P)
NULL POINTER SETTING TO AVOID RUNTIME ERROR.
Definition: m_fstr.f90:668
integer(kind=kint), parameter ksteigen
Definition: m_fstr.f90:39
type(tinitialcondition), dimension(:), pointer, save g_initialcnd
Definition: m_fstr.f90:152
integer(kind=kint), pointer ivisual
Definition: m_fstr.f90:124
integer(kind=kint), parameter kitrcontinue
iteration control
Definition: m_fstr.f90:90
integer(kind=kint), parameter restart_outlast
restart type
Definition: m_fstr.f90:71
integer(kind=kint), parameter iresout
Definition: m_fstr.f90:115
integer(kind=kint), parameter ksmgmresr
Definition: m_fstr.f90:51
subroutine fstr_nullify_fstr_solid(S)
Definition: m_fstr.f90:682
subroutine fstr_nullify_fstr_dynamic(DY)
Definition: m_fstr.f90:793
integer(kind=kint), parameter kno
Definition: m_fstr.f90:32
integer(kind=kint), parameter kitrdiverged
Definition: m_fstr.f90:92
logical paracontactflag
PARALLEL CONTACT FLAG.
Definition: m_fstr.f90:101
integer(kind=kint), parameter kfloadcase_re
Definition: m_fstr.f90:86
This module manages step information.
Definition: m_out.f90:6
This module manages step information.
Definition: m_step.f90:6
logical function iscontactactive(bnd, stepinfo)
Is contact condition in this step active.
Definition: m_step.f90:119
logical function iselemactivationactive(bnd, stepinfo)
Is elemact condition in this step active.
Definition: m_step.f90:128
logical function isboundaryactive(bnd, stepinfo)
Is boundary condition in this step active.
Definition: m_step.f90:101
logical function isloadactive(bnd, stepinfo)
Is external load in this step active.
Definition: m_step.f90:110
This module manages timepoint information.
Definition: m_timepoint.f90:6
This module manages the data structure for contact calculation.
This modules defines a structure to record history dependent parameter in static analysis.
Definition: mechgauss.f90:6
Data for coupling analysis.
Definition: m_fstr.f90:621
Data for DYNAMIC ANSLYSIS (fstrDYNAMIC)
Definition: m_fstr.f90:514
Package of data used by Lanczos eigenvalue solver.
Definition: m_fstr.f90:603
Data for HEAT ANSLYSIS (fstrHEAT)
Definition: m_fstr.f90:432
FSTR INNER CONTROL PARAMETERS (fstrPARAM)
Definition: m_fstr.f90:155
Data for STATIC ANSLYSIS (fstrSOLID)
Definition: m_fstr.f90:214
Data for section control.
Definition: m_fstr.f90:651
-1:not relation, >1:index of coupled_node
Definition: m_fstr.f90:638
output control such as output filename, output frequency etc.
Definition: m_out.f90:29
Step control such as active boundary condition, convergent condition etc.
Definition: m_step.f90:24
Time points storage for output etc.
Definition: m_timepoint.f90:14
Structure to includes all info needed by contact calculation.
All data should be recorded in every elements.
Definition: mechgauss.f90:32