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