10 private :: update_abort
27 subroutine fstr_updatenewton ( hecMESH, hecMAT, fstrSOLID, fstrPARAM, time, tincr,iter, strainEnergy)
33 type (hecmwST_matrix) :: hecMAT
34 type (hecmwST_local_mesh) :: hecMESH
35 type (fstr_solid) :: fstrSOLID
36 type (fstr_param) :: fstrPARAM
37 real(kind=kreal),
intent(in) :: time
38 real(kind=kreal),
intent(in) :: tincr
39 integer,
intent(in) :: iter
41 integer(kind=kint) :: nodLOCAL(fstrSOLID%max_ncon)
42 real(kind=kreal) :: ecoord(3, fstrsolid%max_ncon)
43 real(kind=kreal) :: thick
44 integer(kind=kint) :: ndof, itype, is, iE, ic_type, nn, icel, iiS, i, j, nbase
46 real(kind=kreal) :: total_disp(6, fstrsolid%max_ncon), du(6, fstrsolid%max_ncon), ddu(6, fstrsolid%max_ncon)
47 real(kind=kreal) :: triad_tri(9, fstrsolid%max_ncon)
48 real(kind=kreal) :: triad_cur(9, fstrsolid%max_ncon)
49 real(kind=kreal) :: triad_ref(9, fstrsolid%max_ncon)
50 real(kind=kreal) :: shell_drill(fstrsolid%max_ncon)
51 real(kind=kreal) :: tt(fstrsolid%max_ncon), tt0(fstrsolid%max_ncon), ttn(fstrsolid%max_ncon)
52 real(kind=kreal) :: qf(fstrsolid%max_ncon*6), coords(3, 3)
53 integer :: isect, ihead, cdsys_ID
54 integer :: ndim, initt
56 real(kind=kreal),
optional :: strainenergy
57 real(kind=kreal) :: tmp, lambda(1), ddlambda(1)
58 real(kind=kreal) :: ddaux(3,3)
61 fstrsolid%QFORCE=0.0d0
89 do itype = 1, hecmesh%n_elem_type
90 is = hecmesh%elem_type_index(itype-1)+1
91 ie = hecmesh%elem_type_index(itype )
92 ic_type= hecmesh%elem_type_item(itype)
93 if (hecmw_is_etype_link(ic_type)) cycle
94 if (hecmw_is_etype_patch(ic_type)) cycle
110 iis = hecmesh%elem_node_index(icel-1)
111 nn = hecmesh%elem_node_index(icel)-iis
115 nodlocal(j) = hecmesh%elem_node_item (iis+j)
117 ecoord(i,j) = hecmesh%node(3*nodlocal(j)+i-3)
120 ddu(i,j) = hecmat%X(ndof*nodlocal(j)+i-ndof)
121 du(i,j) = fstrsolid%dunode(ndof*nodlocal(j)+i-ndof)
122 total_disp(i,j) = fstrsolid%unode(ndof*nodlocal(j)+i-ndof)
125 if( fstrsolid%TEMP_ngrp_tot > 0 .or. fstrsolid%TEMP_irres > 0 )
then
126 if( iselastoplastic(fstrsolid%elements(icel)%gausses(1)%pMaterial%mtype) .or. &
127 iscreep(fstrsolid%elements(icel)%gausses(1)%pMaterial%mtype) .or. &
128 fstrsolid%elements(icel)%gausses(1)%pMaterial%nlgeom_flag == updatelag )
then
129 tt0(j)=fstrsolid%last_temp( nodlocal(j) )
132 if( hecmesh%hecmw_flag_initcon == 1 ) tt0(j) = hecmesh%node_init_val_item(nodlocal(j))
133 if( initt>0 ) tt0(j) =
g_initialcnd(initt)%realval(nodlocal(j))
135 ttn(j) = fstrsolid%last_temp( nodlocal(j) )
136 tt(j) = fstrsolid%temperature( nodlocal(j) )
140 isect = hecmesh%section_ID(icel)
141 ihead = hecmesh%section%sect_R_index(isect-1)
142 thick = hecmesh%section%sect_R_item(ihead+1)
143 cdsys_id = hecmesh%section%sect_orien_ID(isect)
144 if( cdsys_id > 0 )
call get_coordsys(cdsys_id, hecmesh, fstrsolid, coords, icel)
146 if (ic_type == 741 .or. ic_type == 743 .or. ic_type == 731)
then
148 nbase = 9*(nodlocal(j)-1)
149 triad_tri(1:9,j) = 0.0d0
150 triad_cur(1:9,j) = 0.0d0
151 triad_ref(1:9,j) = 0.0d0
152 shell_drill(j) = 0.0d0
153 if(
associated(fstrsolid%shell_dtriad) ) triad_tri(1:9,j) = fstrsolid%shell_dtriad(nbase+1:nbase+9)
154 if(
associated(fstrsolid%shell_triad) ) triad_cur(1:9,j) = fstrsolid%shell_triad(nbase+1:nbase+9)
155 if(
associated(fstrsolid%shell_ref_triad) ) triad_ref(1:9,j) = fstrsolid%shell_ref_triad(nbase+1:nbase+9)
156 if(
associated(fstrsolid%shell_ddrill) ) shell_drill(j) = fstrsolid%shell_ddrill(nodlocal(j))
160 if( ic_type == 761 .or. ic_type == 781 )
then
162 nbase = 9*(nodlocal(j+nn/2)-1)
163 triad_tri(1:9,j) = 0.0d0
164 triad_cur(1:9,j) = 0.0d0
165 triad_ref(1:9,j) = 0.0d0
166 shell_drill(j) = 0.0d0
167 if(
associated(fstrsolid%shell_dtriad) ) triad_tri(1:9,j) = fstrsolid%shell_dtriad(nbase+1:nbase+9)
168 if(
associated(fstrsolid%shell_triad) ) triad_cur(1:9,j) = fstrsolid%shell_triad(nbase+1:nbase+9)
169 if(
associated(fstrsolid%shell_ref_triad) ) triad_ref(1:9,j) = fstrsolid%shell_ref_triad(nbase+1:nbase+9)
170 if(
associated(fstrsolid%shell_ddrill) ) shell_drill(j) = fstrsolid%shell_ddrill(nodlocal(j+nn/2))
175 if( ic_type == 241 .or. ic_type == 242 .or. ic_type == 231 .or. ic_type == 232 .or. ic_type == 2322 )
then
176 call update_c2( ic_type,nn,ecoord(1:3,1:nn),fstrsolid%elements(icel)%gausses(:), &
177 thick,fstrsolid%elements(icel)%iset, &
178 total_disp(1:2,1:nn), ddu(1:2,1:nn), qf(1:nn*ndof), &
179 tt(1:nn), tt0(1:nn), ttn(1:nn), fstrparam%ref_temp )
181 else if( ic_type == 301 )
then
182 call update_c1( nn,ecoord(:,1:nn), thick, total_disp(1:3,1:nn), du(1:3,1:nn), &
183 qf(1:nn*ndof), fstrsolid%elements(icel)%gausses(:), fstrparam%ref_temp )
185 else if( ic_type == 361 )
then
186 if( fstrsolid%sections(isect)%elemopt361 ==
kel361fi )
then
187 call update_c3( ic_type, nn, ecoord(:,1:nn), total_disp(1:3,1:nn), du(1:3,1:nn), cdsys_id, coords, &
188 qf(1:nn*ndof), fstrsolid%elements(icel)%gausses(:), time, tincr, &
189 tt(1:nn), tt0(1:nn), ttn(1:nn), fstrparam%ref_temp )
190 else if( fstrsolid%sections(isect)%elemopt361 ==
kel361bbar )
then
191 call update_c3d8bbar( ic_type, nn, ecoord(:,1:nn), total_disp(1:3,1:nn), du(1:3,1:nn), cdsys_id, coords, &
192 qf(1:nn*ndof), fstrsolid%elements(icel)%gausses(:), time, tincr, &
193 tt(1:nn), tt0(1:nn), ttn(1:nn), fstrparam%ref_temp )
194 else if( fstrsolid%sections(isect)%elemopt361 ==
kel361ic )
then
195 call update_c3d8ic( ic_type,nn,ecoord(:,1:nn), total_disp(1:3,1:nn), du(1:3,1:nn), ddu(1:3,1:nn), cdsys_id, coords,&
196 qf(1:nn*ndof), fstrsolid%elements(icel)%gausses(:), iter, time, tincr, &
197 fstrsolid%elements(icel)%aux, ddaux(1:3,1:3), tt(1:nn), tt0(1:nn), ttn(1:nn), fstrparam%ref_temp )
198 fstrsolid%elements(icel)%aux(1:3,1:3) = fstrsolid%elements(icel)%aux(1:3,1:3) + ddaux(1:3,1:3)
199 else if( fstrsolid%sections(isect)%elemopt361 ==
kel361fbar )
then
200 call update_c3d8fbar( ic_type, nn, ecoord(:,1:nn), total_disp(1:3,1:nn), du(1:3,1:nn), cdsys_id, coords, &
201 qf(1:nn*ndof), fstrsolid%elements(icel)%gausses(:), time, tincr, &
202 tt(1:nn), tt0(1:nn), ttn(1:nn), fstrparam%ref_temp )
203 else if( fstrsolid%sections(isect)%elemopt361 ==
kel361up )
then
204 lambda(1) = -0.5d0*fstrsolid%elements(icel)%p(1)
206 ( ic_type, nn, ecoord(:,1:nn), total_disp(1:3,1:nn), du(1:3,1:nn), ddu(1:3,1:nn), &
207 cdsys_id, coords, qf(1:nn*ndof), fstrsolid%elements(icel)%gausses(:), &
208 iter, time, tincr, 1, lambda, ddlambda, tt(1:nn), tt0(1:nn) )
209 lambda(1) = lambda(1) + ddlambda(1)
210 fstrsolid%elements(icel)%p(1) = -2.0d0*lambda(1)
212 else if (ic_type == 341 .or. ic_type == 351 .or. ic_type == 342 .or. ic_type == 352 .or. ic_type == 362 )
then
213 if( ic_type==341 .and. fstrsolid%sections(isect)%elemopt341 ==
kel341sesns ) cycle
214 call update_c3( ic_type, nn, ecoord(:,1:nn), total_disp(1:3,1:nn), du(1:3,1:nn), cdsys_id, coords, &
215 qf(1:nn*ndof), fstrsolid%elements(icel)%gausses(:), time, tincr, &
216 tt(1:nn), tt0(1:nn), ttn(1:nn), fstrparam%ref_temp )
218 else if( ic_type == 511)
then
219 call update_connector( nn,ecoord(:,1:nn), total_disp(1:3,1:nn), du(1:3,1:nn), &
220 qf(1:nn*ndof),fstrsolid%elements(icel)%gausses(:) )
222 else if( ic_type == 611)
then
223 if( fstrparam%nlgeom )
call update_abort( ic_type, 2 )
224 CALL updatest_beam(nn, ecoord, total_disp(1:6,1:nn), du(1:6,1:nn), &
225 hecmesh%section%sect_R_item(ihead+1:), fstrsolid%elements(icel)%gausses(:), qf(1:nn*ndof), &
226 fstrsolid%sections(isect)%elemopt611)
228 else if( ic_type == 641 )
then
229 if( fstrparam%nlgeom )
call update_abort( ic_type, 2 )
230 call updatest_beam_641_from_611(ecoord(1:3,1:4), total_disp(1:ndof,1:4), du(1:ndof,1:4), &
231 fstrsolid%elements(icel)%gausses(:), hecmesh%section%sect_R_item(ihead+1:), &
232 qf(1:nn*ndof), fstrsolid%sections(isect)%elemopt611)
234 else if( ( ic_type == 741 ) .or. ( ic_type == 743 ) .or. ( ic_type == 731 ) )
then
235 call update_shell_mitc(ic_type, nn, ndof, ecoord(1:3,1:nn), total_disp(1:ndof,1:nn), &
236 du(1:ndof,1:nn), fstrsolid%elements(icel)%gausses(:), qf(1:nn*ndof), thick, 0, &
237 element=fstrsolid%elements(icel), ndtriad=triad_tri(1:9,1:nn), &
238 ndreftriad=triad_ref(1:9,1:nn), &
239 ndcurtriad=triad_cur(1:9,1:nn), nddrill=shell_drill(1:nn), &
240 cdsys_id=cdsys_id, coords=coords)
242 else if( ic_type == 761 )
then
243 if( fstrparam%nlgeom )
then
244 call update_shell_mitc33(731, 3, 6, ecoord(1:3, 1:3), total_disp(1:ndof,1:nn), du(1:ndof,1:nn), &
245 fstrsolid%elements(icel)%gausses(:), qf(1:nn*ndof), thick, 2, &
246 element=fstrsolid%elements(icel), ndtriad=triad_tri(1:9,1:3), &
247 ndreftriad=triad_ref(1:9,1:3), ndcurtriad=triad_cur(1:9,1:3), nddrill=shell_drill(1:3), &
248 cdsys_id=cdsys_id, coords=coords)
250 call update_shell_mitc33(731, 3, 6, ecoord(1:3, 1:3), total_disp(1:ndof,1:nn), du(1:ndof,1:nn), &
251 fstrsolid%elements(icel)%gausses(:), qf(1:nn*ndof), thick, 2, &
252 cdsys_id=cdsys_id, coords=coords)
255 else if( ic_type == 781 )
then
256 call update_shell_mitc33(741, 4, 6, ecoord(1:3, 1:4), total_disp(1:ndof,1:nn), du(1:ndof,1:nn), &
257 fstrsolid%elements(icel)%gausses(:), qf(1:nn*ndof), thick, 1, &
258 element=fstrsolid%elements(icel), ndtriad=triad_tri(1:9,1:4), &
259 ndreftriad=triad_ref(1:9,1:4), ndcurtriad=triad_cur(1:9,1:4), nddrill=shell_drill(1:4), &
260 cdsys_id=cdsys_id, coords=coords)
262 else if ( ic_type == 3414 )
then
263 if(fstrsolid%elements(icel)%gausses(1)%pMaterial%mtype /= incomp_newtonian) &
264 &
call update_abort( ic_type, 3, fstrsolid%elements(icel)%gausses(1)%pMaterial%mtype )
266 ( ic_type, nn, ecoord(:,1:nn), total_disp(1:4,1:nn), du(1:4,1:nn), &
267 fstrsolid%elements(icel)%gausses(:) )
270 else if ( ic_type == 881 .or. ic_type == 891 )
then
271 call update_c3_sesns( ic_type, nn, nodlocal, ecoord(:,1:nn), total_disp(1:3,1:nn), du(1:3,1:nn), cdsys_id, coords, &
272 qf(1:nn*ndof), fstrsolid%elements(icel)%gausses(:), time, tincr, tt(1:nn), tt0(1:nn), ttn(1:nn), fstrparam%ref_temp )
276 write(*, *)
'###ERROR### : Element type not supported for nonlinear static analysis'
277 write(*, *)
' ic_type = ', ic_type
279 call hecmw_abort(hecmw_comm_get_comm())
285 call update_dummy( ndof, nn, ecoord(:,1:nn), total_disp(1:3,1:nn), &
286 & du(1:3,1:nn), qf(1:nn*ndof), fstrsolid%elements(icel) )
294 fstrsolid%QFORCE(ndof*(nodlocal(j)-1)+i) = fstrsolid%QFORCE(ndof*(nodlocal(j)-1)+i)+qf(ndof*(j-1)+i)
299 if(
present(strainenergy))
then
300 ndim = getspacedimension( fstrsolid%elements(icel)%etype )
303 tmp = 0.5d0*( fstrsolid%elements(icel)%equiForces(ndim*(j-1)+i)+qf(ndim*(j-1)+i) )*ddu(i,j)
305 strainenergy = strainenergy+tmp
306 fstrsolid%elements(icel)%equiForces(ndim*(j-1)+i) = qf(ndim*(j-1)+i)
319 call hecmw_update_r(hecmesh,fstrsolid%QFORCE,hecmesh%n_node, ndof)
328 type(hecmwst_local_mesh) :: hecmesh
330 real(kind=kreal) :: tincr
331 integer(kind=kint) :: itype, is, iE, ic_type, icel, ngauss, i
332 integer(kind=kint) :: ishell
334 if(
associated( fstrsolid%temperature ) )
then
335 do i = 1, hecmesh%n_node
336 fstrsolid%last_temp(i) = fstrsolid%temperature(i)
340 do itype = 1, hecmesh%n_elem_type
341 is = hecmesh%elem_type_index(itype-1) + 1
342 ie = hecmesh%elem_type_index(itype )
343 ic_type= hecmesh%elem_type_item(itype)
344 if( ic_type == 301 ) ic_type = 111
345 if( hecmw_is_etype_link(ic_type) ) cycle
346 if( hecmw_is_etype_patch(ic_type) ) cycle
348 ngauss = numofquadpoints( ic_type )
352 fstrsolid%elements(icel)%gausses(i)%strain_bak = fstrsolid%elements(icel)%gausses(i)%strain
353 fstrsolid%elements(icel)%gausses(i)%stress_bak = fstrsolid%elements(icel)%gausses(i)%stress
354 fstrsolid%elements(icel)%gausses(i)%strain_energy_bak = fstrsolid%elements(icel)%gausses(i)%strain_energy
357 if(
associated( fstrsolid%elements(icel)%shell_layer_gausses ) )
then
358 do ishell = 1,
size( fstrsolid%elements(icel)%shell_layer_gausses )
359 call matlstateupdate( fstrsolid%elements(icel)%shell_layer_gausses(ishell), tincr )
360 fstrsolid%elements(icel)%shell_layer_gausses(ishell)%strain_bak = &
361 fstrsolid%elements(icel)%shell_layer_gausses(ishell)%strain
362 fstrsolid%elements(icel)%shell_layer_gausses(ishell)%stress_bak = &
363 fstrsolid%elements(icel)%shell_layer_gausses(ishell)%stress
364 fstrsolid%elements(icel)%shell_layer_gausses(ishell)%strain_energy_bak = &
365 fstrsolid%elements(icel)%shell_layer_gausses(ishell)%strain_energy
371 do i = 1, hecmesh%n_node
372 fstrsolid%QFORCE_bak(i) = fstrsolid%QFORCE(i)
377 subroutine update_abort( ic_type, flag, mtype )
378 integer(kind=kint),
intent(in) :: ic_type
379 integer(kind=kint),
intent(in) :: flag
380 integer(kind=kint),
intent(in),
optional :: mtype
384 write(*,*)
'###ERROR### : Element type not supported for static analysis'
385 else if( flag == 2 )
then
386 write(*,*)
'###ERROR### : Element type not supported for nonlinear static analysis'
387 else if( flag == 3 )
then
388 write(*,*)
'###ERROR### : This element is not supported for this material'
390 write(*,*)
' ic_type = ', ic_type
391 if(
present(mtype) )
write(*,*)
' mtype = ', mtype
393 call hecmw_abort(hecmw_comm_get_comm())
This module defined elemact data and function.
subroutine update_dummy(ndof, nn, ecoord, u, du, qf, element)
integer, parameter kelact_inactive
Finite-rotation nodal kinematics for NLGEOM.
subroutine, public fstr_ensure_finite_rotation_state(hecMESH, fstrSOLID, ndof)
Build the per-node reference frames once, by averaging the triads contributed by adjacent local shell...
This module provides function to calculate to do updates.
subroutine fstr_updatestate(hecMESH, fstrSOLID, tincr)
Update elastiplastic status.
subroutine fstr_updatenewton(hecMESH, hecMAT, fstrSOLID, fstrPARAM, time, tincr, iter, strainEnergy)
Update displacement, stress, strain and internal forces.
This module defines common data and basic structures for analysis.
integer(kind=kint), parameter kel361bbar
integer(kind=kint), parameter kel341sesns
integer(kind=kint), parameter kel361up
integer(kind=kint), parameter kel361fi
subroutine get_coordsys(cdsys_ID, hecMESH, fstrSOLID, coords, icel)
This subroutine fetch coords defined by local coordinate system.
integer(kind=kint), parameter kel361ic
integer(kind=kint), parameter kel361fbar
type(tinitialcondition), dimension(:), pointer, save g_initialcnd
This module manages calculation relates with materials.
subroutine matlstateupdate(gauss, tincr)
Commit the material history of a converged increment.
This modules just summarizes all modules used in static analysis.