29 type (hecmwST_local_mesh) :: hecMESH
30 type (hecmwST_matrix ) :: hecMAT
31 type (fstr_param ) :: fstrPARAM
32 type (fstr_solid ) :: fstrSOLID
33 type (fstrST_matrix_contact_lagrange) :: fstrMAT
34 type (fstr_info_contactChange) :: infoCTChange, infoCTChange_bak
35 type (hecmwST_matrix ),
optional :: conMAT
37 integer(kind=kint) :: ndof, nn
38 integer(kind=kint) :: j, i, tot_step, step_count, tot_step_print, CBbound
39 integer(kind=kint) :: sub_step
40 integer(kind=kint) :: restart_step_num, restart_substep_num
41 real(kind=kreal) :: ctime, dtime, endtime, factor
42 real(kind=kreal) :: time_1, time_2
43 logical :: ctchanged, is_OutPoint
47 hecmat%NDOF = hecmesh%n_dof
52 if( fstrsolid%TEMP_ngrp_tot>0 .and. hecmesh%hecmw_flag_initcon==1 )
then
53 fstrsolid%last_temp = 0.0d0
54 fstrsolid%temperature = 0.0d0
55 do j=1,
size(hecmesh%node_init_val_item)
56 i = hecmesh%node_init_val_index(j)
57 fstrsolid%last_temp(j) = hecmesh%node_init_val_item(i)
58 fstrsolid%temperature(j) = hecmesh%node_init_val_item(i)
61 if( fstrsolid%TEMP_ngrp_tot>0 .and.
associated(
g_initialcnd) )
then
62 fstrsolid%last_temp = 0.0d0
63 fstrsolid%temperature = 0.0d0
66 if( .not.
associated(fstrsolid%temperature) )
then
67 allocate( fstrsolid%temperature( hecmesh%n_node ) )
68 allocate( fstrsolid%temp_bak( hecmesh%n_node ) )
69 allocate( fstrsolid%last_temp( hecmesh%n_node ) )
71 do i= 1, hecmesh%n_node
73 fstrsolid%temperature(i) = fstrsolid%last_temp(i)
79 if(
associated( fstrsolid%contacts ) )
then
80 call initialize_contact_output_vectors(fstrsolid,hecmat)
81 call setup_contact_elesurf_for_area( 1, hecmesh, fstrsolid )
85 restart_substep_num = 1
86 fstrsolid%unode = 0.0d0
88 infoctchange%contactNode_previous = 0
89 infoctchange%contactNode_current = 0
90 if( fstrsolid%restart_nout < 0 )
then
91 call fstr_read_restart(restart_step_num,restart_substep_num,step_count,ctime,dtime,hecmesh,fstrsolid, &
92 fstrparam,infoctchange%contactNode_previous)
96 fstrsolid%restart_nout = - fstrsolid%restart_nout
101 fstrsolid%FACTOR = 0.0d0
105 do tot_step=1, fstrsolid%nstep_tot
106 tot_step_print = tot_step+restart_step_num-1
107 if(hecmesh%my_rank==0)
write(*,*)
''
108 if(hecmesh%my_rank==0)
write(*,
'(a,i5)')
' loading step=',tot_step_print
110 if( fstrsolid%TEMP_ngrp_tot>0 )
then
111 do j=1, hecmesh%n_node
112 fstrsolid%temp_bak(j) = fstrsolid%temperature(j)
115 call fstr_updatestate( hecmesh, fstrsolid, 0.0d0 )
120 sub_step = restart_substep_num
125 & fstrsolid%NRstat_i, fstrsolid%NRstat_r, fstrsolid%AutoINC_stat, fstrsolid%CutBack_stat )
126 if( fstrsolid%TEMP_irres > 0 )
then
127 fstrsolid%FACTOR(1) = 0.d0
128 fstrsolid%FACTOR(2) = 1.d0
130 fstrsolid%TEMP_FACTOR = factor
133 fstrsolid%FACTOR(1) = factor
135 fstrsolid%FACTOR(2) = factor
138 if(hecmesh%my_rank==0)
then
139 write(*,
'(A,I0,2(A,E12.4))')
' sub_step= ',sub_step,
', &
141 write(*,
'(A,2f12.7)')
' loading_factor= ', fstrsolid%FACTOR
142 if( fstrsolid%TEMP_irres > 0 )
write(*,
'(A,2f12.7)')
' readtemp_factor= ', fstrsolid%TEMP_FACTOR
145 time_1 = hecmw_wtime()
148 if( .not.
associated( fstrsolid%contacts ) )
then
149 call fstr_newton( tot_step, hecmesh, hecmat, fstrsolid, fstrparam, &
169 & tot_step_print, sub_step, fstrsolid%NRstat_i, fstrsolid%NRstat_r, &
170 & fstrsolid%AutoINC_stat, fstrsolid%CutBack_stat )
173 if( fstrsolid%CutBack_stat == 0 )
then
178 cbbound = fstrparam%ainc(fstrsolid%step_ctrl(tot_step)%AincParam_id)%CBbound
179 if( fstrsolid%CutBack_stat == cbbound )
then
180 if( hecmesh%my_rank == 0 )
then
181 write(*,*)
'Number of successive cutback reached max number: ',cbbound
184 call hecmw_abort( hecmw_comm_get_comm() )
187 call fstr_set_contact_active( infoctchange%contactNode_current > 0 )
190 if(
associated( fstrsolid%contacts ) .and. fstrparam%contact_algo ==
kcaslagrange )
then
199 if( hecmesh%my_rank == 0 )
write(*,*)
'### State has been restored at time =',
fstr_get_time()
202 if( sub_step == fstrsolid%step_ctrl(tot_step)%num_substep )
then
203 if( hecmesh%my_rank == 0 )
then
204 write(*,
'(a,i5,a,f6.3)')
'### Number of substeps reached max number: at total_step=', &
207 call hecmw_abort( hecmw_comm_get_comm())
211 time_2 = hecmw_wtime()
212 if( hecmesh%my_rank==0)
write(
imsg,
'(a,",",2(I8,","),f10.2)') &
213 &
'step, substep, solve (sec) :', tot_step_print, sub_step, time_2 - time_1
217 if( fstrsolid%CutBack_stat > 0 ) stop
221 step_count = step_count + 1
224 if( fstrsolid%restart_nout > 0 .and. mod(step_count,fstrsolid%restart_nout) == 0 )
then
233 &
fstrpr%solution_type, is_outpoint )
235 time_2 = hecmw_wtime()
236 if( hecmesh%my_rank==0 )
then
237 write(
imsg,
'(A,",",2(I8,","),f10.2)')
'step, substep, solve (sec) :', tot_step_print, sub_step, time_2 - time_1
238 write(
imsg,
'(A,I0,",",1pE15.8)')
'### stepcount (for output), time :', step_count,
fstr_get_time()
244 if( sub_step == fstrsolid%step_ctrl(tot_step)%num_substep )
then
245 if( hecmesh%my_rank == 0 )
then
246 write(*,
'(a,i5,a,f6.3)')
'### Number of substeps reached max number: at total_step=', &
253 sub_step = sub_step + 1
257 if( fstrsolid%restart_nout > 0 )
then
259 & hecmesh,fstrsolid,fstrparam,.true.,infoctchange%contactNode_current)
261 restart_substep_num = 1
262 if( fstrsolid%TEMP_irres > 0 )
exit
270 write(
imsg,
'("### FSTR_SOLVE_NLGEOM FINISHED!")')
271 write(*,
'("### FSTR_SOLVE_NLGEOM FINISHED!")')
281 type ( hecmwST_local_mesh ),
intent(in) :: hecMESH
282 type ( fstr_solid ),
intent(in) :: fstrSOLID
283 integer(kind=kint),
intent(in) :: cstep
284 real(kind=kreal),
intent(in) :: time
285 real(kind=kreal),
intent(out) :: f_t
287 integer(kind=kint) :: i
288 integer(kind=kint) :: jj_n_amp, jj1, jj2
289 integer(kind=kint) :: s1, s2, flag
290 real(kind=kreal) :: t_1, t_2, t_t, f_1, f_2, tincre
293 jj_n_amp = fstrsolid%step_ctrl( cstep )%amp_id
295 if( jj_n_amp <= 0 )
then
296 f_t = (time-fstrsolid%step_ctrl(cstep)%starttime)/fstrsolid%step_ctrl(cstep)%elapsetime
297 if( f_t>1.d0 ) f_t=1.d0
299 tincre = fstrsolid%step_ctrl( cstep )%initdt
300 jj1 = hecmesh%amp%amp_index(jj_n_amp - 1)
301 jj2 = hecmesh%amp%amp_index(jj_n_amp)
304 t_t = time-fstrsolid%step_ctrl(cstep)%starttime
308 if(t_t .gt. hecmesh%amp%amp_table(jj2))
then
309 f_t = hecmesh%amp%amp_val(jj2)
310 else if(t_t .le. hecmesh%amp%amp_table(jj2))
then
313 if(t_t .le. hecmesh%amp%amp_table(i))
then
321 t_2 = hecmesh%amp%amp_table(s2)
322 t_1 = hecmesh%amp%amp_table(s1)
323 f_2 = hecmesh%amp%amp_val(s2)
324 f_1 = hecmesh%amp%amp_val(s1)
325 if( t_2-t_1 .lt. 1.0e-20)
then
327 write(
imsg,*)
'stop due to t_2-t_1 <= 0'
329 call hecmw_abort( hecmw_comm_get_comm())
331 f_t = ((t_2*f_1 - t_1*f_2) + (f_2 - f_1)*t_t) / (t_2 - t_1)
This module provides functions to deal with cutback.
subroutine fstr_cutback_save(fstrSOLID, infoCTChange, infoCTChange_bak)
Save analysis status.
subroutine fstr_cutback_load(fstrSOLID, infoCTChange, infoCTChange_bak)
Load analysis status.
subroutine fstr_cutback_init(hecMESH, fstrSOLID, fstrPARAM)
Initializer of cutback variables.
subroutine fstr_cutback_finalize(fstrSOLID)
Finalizer of cutback variables.
logical function fstr_cutback_active()
This module provides functions on nonlinear analysis.
subroutine fstr_newton_contactalag(cstep, hecMESH, hecMAT, fstrSOLID, fstrPARAM, restart_step_num, restart_substep_num, sub_step, ctime, dtime, infoCTChange)
This subroutine solve nonlinear solid mechanics problems by Newton-Raphson method combined with Neste...
subroutine fstr_newton_contactslag(cstep, hecMESH, hecMAT, fstrSOLID, fstrPARAM, fstrMAT, restart_step_num, restart_substep_num, sub_step, ctime, dtime, infoCTChange, conMAT)
This subroutine solve nonlinear solid mechanics problems by Newton-Raphson method....
subroutine fstr_newton(cstep, hecMESH, hecMAT, fstrSOLID, fstrPARAM, restrt_step_num, sub_step, ctime, dtime)
This subroutine solve nonlinear solid mechanics problems by Newton-Raphson method.
This module provides functions to read in and write out restart fiels.
subroutine fstr_read_restart(cstep, substep, step_count, ctime, dtime, hecMESH, fstrSOLID, fstrPARAM, contactNode)
Read in restart file.
subroutine fstr_write_restart(cstep, cstep_ext, substep, step_count, ctime, dtime, hecMESH, fstrSOLID, fstrPARAM, is_StepFinished, contactNode)
write out restart file
This module provides main suboruitne for nonliear calculation.
subroutine fstr_solve_nlgeom(hecMESH, hecMAT, fstrSOLID, fstrMAT, fstrPARAM, conMAT)
This module provides main suborutine for nonlinear calculation.
subroutine table_nlsta(hecMESH, fstrSOLID, cstep, time, f_t)
This subroutine decide the loading increment considering the amplitude definition.
This module provides functions to deal with time and increment of stress analysis.
real(kind=kreal) function fstr_get_timeinc()
logical function fstr_timeinc_istimepoint(stepinfo, fstrPARAM)
real(kind=kreal) function fstr_get_timeinc_base()
subroutine fstr_set_timeinc_base(dtime_base)
subroutine fstr_timeinc_settimeincrement(stepinfo, fstrPARAM, substep, NRstatI, NRstatR, AutoINC_stat, Cutback_stat)
real(kind=kreal) function fstr_get_time()
subroutine fstr_proceed_time()
subroutine fstr_timeinc_printstatus_final(success_flag)
subroutine fstr_timeinc_printstatus_init
subroutine fstr_set_time(time)
logical function fstr_timeinc_isstepfinished(stepinfo)
subroutine fstr_timeinc_printstatus(stepinfo, fstrPARAM, totstep, substep, NRstatI, NRstatR, AutoINC_stat, Cutback_stat)
This module defined coomon data and basic structures for analysis.
integer(kind=kint) myrank
PARALLEL EXECUTION.
integer(kind=kint), parameter imsg
integer(kind=kint), parameter kcaslagrange
contact analysis algorithm
integer(kind=kint), parameter kcaalagrange
type(fstr_param), target fstrpr
GLOBAL VARIABLE INITIALIZED IN FSTR_SETUP.
type(tinitialcondition), dimension(:), pointer, save g_initialcnd
logical paracontactflag
PARALLEL CONTACT FLAG.
This modules just summarizes all modules used in static analysis.
This module provides functions to output result.
subroutine fstr_static_output(cstep, istep, time, hecMESH, fstrSOLID, fstrPARAM, flag, outflag)
Output result.