11 private :: nodalstress_inv3, nodalstress_inv2, inverse_func, corner_extrapolation
15 integer(kind=kint),
parameter,
private :: hex20_fi_points(8) = (/ 1, 3, 7, 9, 19, 21, 25, 27 /)
16 integer(kind=kint),
parameter,
private :: hex20_ri_points(8) = (/ 1, 2, 3, 4, 5, 6, 7, 8 /)
18 integer(kind=kint),
parameter,
private :: quad8_fi_points(4) = (/ 1, 3, 7, 9 /)
19 integer(kind=kint),
parameter,
private :: quad8_ri_points(4) = (/ 1, 2, 3, 4 /)
23 subroutine corner_extrapolation( etype, corner_type, nstate, points, inv_func )
24 integer(kind=kint),
intent(in) :: etype, corner_type, nstate, points(:)
25 real(kind=kreal),
intent(out) :: inv_func(:,:)
26 real(kind=kreal) :: func(
size(points),
size(points))
27 type(tSolidQuad) :: quad
28 integer(kind=kint) :: i
31 do i = 1,
size(points)
32 call getshapefunc( corner_type, quad%points(:,points(i)), func(i,:) )
34 call inverse_func(
size(points), func, inv_func )
35 end subroutine corner_extrapolation
41 type(hecmwst_local_mesh),
intent(in) :: hecMESH
43 integer(kind=kint),
intent(in) :: icel, k
44 real(kind=kreal),
intent(out) :: strain(6), stress(6)
45 integer(kind=kint) :: etype, nn, j, inode, isect, ihead, nlayer, nthick, ig, ilayer, ithick, cdsys_ID
46 real(kind=kreal) :: ecoord(3,9), edisp(6,9), point_strain(1,6), point_stress(1,6), thick, zeta, coords(3,3)
51 if(
associated(fstrsolid%elements(icel)%shell_layer_gausses) )
then
52 strain = fstrsolid%elements(icel)%shell_layer_gausses(k)%strain_out
53 stress = fstrsolid%elements(icel)%shell_layer_gausses(k)%stress_out
56 etype = hecmesh%elem_type(icel)
57 nn = hecmesh%elem_node_index(icel)-hecmesh%elem_node_index(icel-1)
58 nlayer = fstrsolid%elements(icel)%gausses(1)%pMaterial%totallyr
60 ig = (k-1)/(nlayer*nthick)+1
61 ilayer = mod((k-1)/nthick, nlayer)+1
62 ithick = mod(k-1, nthick)+1
65 inode = hecmesh%elem_node_item(hecmesh%elem_node_index(icel-1)+j)
66 ecoord(:,j) = hecmesh%node(3*inode-2:3*inode)
67 edisp(:,j) = fstrsolid%unode(6*inode-5:6*inode)
69 isect = hecmesh%section_ID(icel)
70 ihead = hecmesh%section%sect_R_index(isect-1)
71 thick = hecmesh%section%sect_R_item(ihead+1)
72 cdsys_id = hecmesh%section%sect_orien_ID(isect)
74 if( cdsys_id > 0 )
call get_coordsys(cdsys_id, hecmesh, fstrsolid, coords, icel)
75 call elementstress_shell_mitc(etype, nn, 6, ecoord(:,1:nn), fstrsolid%elements(icel)%gausses, &
76 edisp(:,1:nn), point_strain, point_stress, thick, zeta, ilayer, surface_gauss_index=ig, cdsys_id=cdsys_id, coords=coords)
77 strain = point_strain(1,:)
78 stress = point_stress(1,:)
87 type(hecmwst_local_mesh) :: hecmesh
89 real(kind=kreal),
pointer :: tnstrain(:), testrain(:), yield_ratio(:)
90 integer(kind=kint),
pointer :: is_rot(:)
92 integer(kind=kint) :: itype, icel, ic, is, iE, jS, i, j, ic_type, nn, ni, ID_area, nbase
93 integer(kind=kint) :: nodlocal(20), ntemp
94 integer(kind=kint),
allocatable :: nnumber(:)
95 real(kind=kreal) :: estrain(6), estress(6), naturalcoord(3)
96 real(kind=kreal) :: enqm(12)
97 real(kind=kreal) :: ndstrain(20,6), ndstress(20,6), tdstrain(20,6)
98 real(kind=kreal) :: ecoord(3, 20), edisp(60), tt(20), t0(20)
99 real(kind=kreal) :: beam_disp(6,2)
100 real(kind=kreal) :: triad_cur(9,4), triad_ref(9,4)
101 real(kind=kreal),
allocatable :: func(:,:), inv_func(:,:)
102 real(kind=kreal) :: inv_func_ri(8,8)
105 integer(kind=kint) :: isect, ihead, ntot_lyr, nlyr, flag33, truss, cdsys_ID
106 real(kind=kreal) :: mid_strain(9,6), mid_stress(9,6)
107 real(kind=kreal) :: thick, coords(3,3)
110 allocate( nnumber(hecmesh%n_node) )
111 if( .not.
associated(fstrsolid%is_rot) )
allocate( fstrsolid%is_rot(hecmesh%n_node) )
118 tnstrain => fstrsolid%tnstrain
119 testrain => fstrsolid%testrain
120 is_rot => fstrsolid%is_rot
121 yield_ratio => fstrsolid%yield_ratio
123 if(
associated(tnstrain) ) tnstrain = 0.0d0
126 ntot_lyr = fstrsolid%max_lyr
127 flag33 = fstrsolid%is_33shell
128 truss = fstrsolid%is_33beam
133 do itype = 1, hecmesh%n_elem_type
134 is = hecmesh%elem_type_index(itype-1) + 1
135 ie = hecmesh%elem_type_index(itype )
136 ic_type = hecmesh%elem_type_item(itype)
137 if( ic_type == fe_tet10nc ) ic_type = fe_tet10n
138 if( .not. (hecmw_is_etype_solid(ic_type) .or. ic_type == 781 &
139 & .or. ic_type == 761 .or. ic_type == fe_beam341 ) ) cycle
141 nn = hecmw_get_max_node( ic_type )
142 ni = numofquadpoints( ic_type )
143 allocate( func(ni,nn), inv_func(nn,ni) )
145 if( ic_type == fe_tet10n )
then
146 ic = hecmw_get_max_node( fe_tet4n )
148 call getquadpoint( ic_type, i, naturalcoord )
149 call getshapefunc( fe_tet4n, naturalcoord, func(i,1:ic) )
151 call inverse_func( ic, func, inv_func )
152 else if( ic_type == fe_hex8n )
then
154 call getquadpoint( ic_type, i, naturalcoord )
155 call getshapefunc( ic_type, naturalcoord, func(i,1:nn) )
157 call inverse_func( ni, func, inv_func )
158 else if( ic_type == fe_prism15n )
then
161 if( i==1 .or. i==2 .or. i==3 .or. i==7 .or. i==8 .or. i==9 )
then
163 call getquadpoint( ic_type, i, naturalcoord )
164 call getshapefunc( fe_prism6n, naturalcoord, func(ic,1:6) )
167 call inverse_func( ic, func, inv_func )
169 else if( ic_type == fe_hex20n )
then
170 call corner_extrapolation( ic_type, fe_hex8n, 27, hex20_fi_points, inv_func )
171 call corner_extrapolation( ic_type, fe_hex8n, 8, hex20_ri_points, inv_func_ri )
176 js = hecmesh%elem_node_index(icel-1)
177 id_area = hecmesh%elem_ID(icel*2)
178 isect= hecmesh%section_ID(icel)
179 ihead = hecmesh%section%sect_R_index(isect-1)
180 thick = hecmesh%section%sect_R_item(ihead+1)
181 cdsys_id = hecmesh%section%sect_orien_ID(isect)
183 if( cdsys_id > 0 )
call get_coordsys(cdsys_id, hecmesh, fstrsolid, coords, icel)
193 if( ic_type == 641 )
then
195 nodlocal(j) = hecmesh%elem_node_item(js+j)
196 ecoord(1:3,j) = hecmesh%node(3*nodlocal(j)-2:3*nodlocal(j))
197 edisp(3*j-2:3*j) = fstrsolid%unode(3*nodlocal(j)-2:3*nodlocal(j))
199 beam_disp(1:3,1:2) = reshape(edisp(1:6), (/ 3, 2 /))
200 beam_disp(4:6,1:2) = reshape(edisp(7:12), (/ 3, 2 /))
202 if(
associated( fstrsolid%temperature ) )
then
205 nodlocal(j) = hecmesh%elem_node_item(js+j)
206 t0(j) = fstrsolid%last_temp( nodlocal(j) )
207 tt(j) = fstrsolid%temperature( nodlocal(j) )
210 call nodalstress_beam( 2, ecoord(1:3,1:2), fstrsolid%elements(icel)%gausses, &
211 hecmesh%section%sect_R_item(ihead+1:), beam_disp, &
212 ndstrain(1:2,1:6), ndstress(1:2,1:6), fstrsolid%sections(isect)%elemopt611 )
213 call elementalstress_beam( fstrsolid%elements(icel)%gausses, estrain, estress, enqm )
214 fstrsolid%ENQM(icel*12-11:icel*12) = enqm(1:12)
217 elseif( ic_type == 781)
then
221 nodlocal(j ) = hecmesh%elem_node_item(js+j )
222 nodlocal(j+4) = hecmesh%elem_node_item(js+j+4)
223 is_rot(nodlocal(j+4)) = 1
224 ecoord(1:3,j ) = hecmesh%node(3*nodlocal(j )-2:3*nodlocal(j ))
225 ecoord(1:3,j+4) = hecmesh%node(3*nodlocal(j+4)-2:3*nodlocal(j+4))
226 edisp(6*j-5:6*j-3) = fstrsolid%unode(3*nodlocal(j )-2:3*nodlocal(j ))
227 edisp(6*j-2:6*j ) = fstrsolid%unode(3*nodlocal(j+4)-2:3*nodlocal(j+4))
228 nbase = 9*(nodlocal(j+4)-1)
229 if(
associated(fstrsolid%shell_triad) ) triad_cur(1:9,j) = fstrsolid%shell_triad(nbase+1:nbase+9)
230 if(
associated(fstrsolid%shell_ref_triad) ) triad_ref(1:9,j) = fstrsolid%shell_ref_triad(nbase+1:nbase+9)
232 ntot_lyr = fstrsolid%elements(icel)%gausses(1)%pMaterial%totallyr
236 if(
associated(fstrsolid%shell_triad) )
then
237 call elementstress_shell_mitc( 741, 4, 6, ecoord, fstrsolid%elements(icel)%gausses, edisp, &
238 ndstrain(1:4,1:6), ndstress(1:4,1:6), thick, 1.0d0, nlyr, &
239 ndtriad=triad_cur, ndreftriad=triad_ref, cdsys_id=cdsys_id, coords=coords)
241 call elementstress_shell_mitc( 741, 4, 6, ecoord, fstrsolid%elements(icel)%gausses, edisp, &
242 ndstrain(1:4,1:6), ndstress(1:4,1:6), thick, 1.0d0, nlyr, cdsys_id=cdsys_id, coords=coords)
245 call fstr_add_shell_mid(fstrsolid%elements(icel),nlyr,4,ndstrain,ndstress,mid_strain,mid_stress)
247 if(
associated(fstrsolid%shell_triad) )
then
248 call elementstress_shell_mitc( 741, 4, 6, ecoord, fstrsolid%elements(icel)%gausses, edisp, &
249 ndstrain(1:4,1:6), ndstress(1:4,1:6), thick,-1.0d0, nlyr, &
250 ndtriad=triad_cur, ndreftriad=triad_ref, cdsys_id=cdsys_id, coords=coords)
252 call elementstress_shell_mitc( 741, 4, 6, ecoord, fstrsolid%elements(icel)%gausses, edisp, &
253 ndstrain(1:4,1:6), ndstress(1:4,1:6), thick,-1.0d0, nlyr, cdsys_id=cdsys_id, coords=coords)
256 call fstr_add_shell_mid(fstrsolid%elements(icel),nlyr,4,ndstrain,ndstress,mid_strain,mid_stress)
258 ndstrain(1:4,1:6) = mid_strain(1:4,1:6)
259 ndstress(1:4,1:6) = mid_stress(1:4,1:6)
262 elseif( ic_type == 761)
then
266 nodlocal(j ) = hecmesh%elem_node_item(js+j )
267 nodlocal(j+3) = hecmesh%elem_node_item(js+j+3)
268 is_rot(nodlocal(j+3)) = 1
269 ecoord(1:3,j ) = hecmesh%node(3*nodlocal(j )-2:3*nodlocal(j ))
270 ecoord(1:3,j+3) = hecmesh%node(3*nodlocal(j+3)-2:3*nodlocal(j+3))
271 edisp(6*j-5:6*j-3) = fstrsolid%unode(3*nodlocal(j )-2:3*nodlocal(j ))
272 edisp(6*j-2:6*j ) = fstrsolid%unode(3*nodlocal(j+3)-2:3*nodlocal(j+3))
273 nbase = 9*(nodlocal(j+3)-1)
274 if(
associated(fstrsolid%shell_triad) ) triad_cur(1:9,j) = fstrsolid%shell_triad(nbase+1:nbase+9)
275 if(
associated(fstrsolid%shell_ref_triad) ) triad_ref(1:9,j) = fstrsolid%shell_ref_triad(nbase+1:nbase+9)
277 ntot_lyr = fstrsolid%elements(icel)%gausses(1)%pMaterial%totallyr
281 if(
associated(fstrsolid%shell_triad) )
then
282 call elementstress_shell_mitc( 731, 3, 6, ecoord, fstrsolid%elements(icel)%gausses, edisp, &
283 ndstrain(1:3,1:6), ndstress(1:3,1:6), thick, 1.0d0, nlyr, &
284 ndtriad=triad_cur(1:9,1:3), ndreftriad=triad_ref(1:9,1:3), cdsys_id=cdsys_id, coords=coords)
286 call elementstress_shell_mitc( 731, 3, 6, ecoord, fstrsolid%elements(icel)%gausses, edisp, &
287 ndstrain(1:3,1:6), ndstress(1:3,1:6), thick, 1.0d0, nlyr, cdsys_id=cdsys_id, coords=coords)
290 call fstr_add_shell_mid(fstrsolid%elements(icel),nlyr,3,ndstrain,ndstress,mid_strain,mid_stress)
292 if(
associated(fstrsolid%shell_triad) )
then
293 call elementstress_shell_mitc( 731, 3, 6, ecoord, fstrsolid%elements(icel)%gausses, edisp, &
294 ndstrain(1:3,1:6), ndstress(1:3,1:6), thick,-1.0d0, nlyr, &
295 ndtriad=triad_cur(1:9,1:3), ndreftriad=triad_ref(1:9,1:3), cdsys_id=cdsys_id, coords=coords)
297 call elementstress_shell_mitc( 731, 3, 6, ecoord, fstrsolid%elements(icel)%gausses, edisp, &
298 ndstrain(1:3,1:6), ndstress(1:3,1:6), thick,-1.0d0, nlyr, cdsys_id=cdsys_id, coords=coords)
301 call fstr_add_shell_mid(fstrsolid%elements(icel),nlyr,3,ndstrain,ndstress,mid_strain,mid_stress)
303 ndstrain(1:3,1:6) = mid_strain(1:3,1:6)
304 ndstress(1:3,1:6) = mid_stress(1:3,1:6)
307 else if( ic_type == 301 )
then
308 call nodalstress_c1( nn, fstrsolid%elements(icel)%gausses, &
309 ndstrain(1:nn,1:6), ndstress(1:nn,1:6) )
310 call elementstress_c1( fstrsolid%elements(icel)%gausses, estrain, estress )
312 else if( ic_type == fe_hex20n )
then
314 call nodalstress_inv3( ic_type, ni, fstrsolid%elements(icel)%gausses, &
315 inv_func_ri, ndstrain(1:nn,1:6), ndstress(1:nn,1:6), &
316 tdstrain(1:nn,1:6), hex20_ri_points )
318 call nodalstress_inv3( ic_type, ni, fstrsolid%elements(icel)%gausses, &
319 inv_func, ndstrain(1:nn,1:6), ndstress(1:nn,1:6), &
320 tdstrain(1:nn,1:6), hex20_fi_points )
322 call elementstress_c3( fstrsolid%elements(icel)%gausses, estrain, estress )
324 else if( ic_type == fe_tet10n .or. ic_type == fe_prism15n .or. &
326 call nodalstress_inv3( ic_type, ni, fstrsolid%elements(icel)%gausses, &
327 inv_func, ndstrain(1:nn,1:6), ndstress(1:nn,1:6), &
329 call elementstress_c3( fstrsolid%elements(icel)%gausses, estrain, estress )
331 else if ( ic_type == 881 .or. ic_type == 891 )
then
334 if( ic_type == 341 .and. fstrsolid%sections(isect)%elemopt341 ==
kel341sesns ) cycle
336 call nodalstress_c3( nn, fstrsolid%elements(icel)%gausses, &
337 ndstrain(1:nn,1:6), ndstress(1:nn,1:6) )
340 call elementstress_c3( fstrsolid%elements(icel)%gausses, estrain, estress )
346 ic = hecmesh%elem_node_item(js+j)
347 fstrsolid%STRAIN(6*(ic-1)+1:6*(ic-1)+6) = fstrsolid%STRAIN(6*(ic-1)+1:6*(ic-1)+6) + ndstrain(j,1:6)
348 fstrsolid%STRESS(6*(ic-1)+1:6*(ic-1)+6) = fstrsolid%STRESS(6*(ic-1)+1:6*(ic-1)+6) + ndstress(j,1:6)
349 if(
associated(tnstrain) )
then
350 tnstrain(6*(ic-1)+1:6*(ic-1)+6) = tnstrain(6*(ic-1)+1:6*(ic-1)+6) + tdstrain(j,1:6)
352 nnumber(ic) = nnumber(ic) + 1
355 fstrsolid%ESTRAIN(6*(icel-1)+1:6*(icel-1)+6) = fstrsolid%ESTRAIN(6*(icel-1)+1:6*(icel-1)+6) + estrain(1:6)
356 fstrsolid%ESTRESS(6*(icel-1)+1:6*(icel-1)+6) = fstrsolid%ESTRESS(6*(icel-1)+1:6*(icel-1)+6) + estress(1:6)
360 deallocate( func, inv_func )
364 do i = 1, hecmesh%n_node
365 if( nnumber(i) == 0 ) cycle
366 fstrsolid%STRAIN(6*(i-1)+1:6*(i-1)+6) = fstrsolid%STRAIN(6*(i-1)+1:6*(i-1)+6) / nnumber(i)
367 fstrsolid%STRESS(6*(i-1)+1:6*(i-1)+6) = fstrsolid%STRESS(6*(i-1)+1:6*(i-1)+6) / nnumber(i)
368 if(
associated(tnstrain) )
then
369 tnstrain(6*(i-1)+1:6*(i-1)+6) = tnstrain(6*(i-1)+1:6*(i-1)+6) / nnumber(i)
374 & hecmesh, fstrsolid, nnumber, fstrsolid%STRAIN, fstrsolid%STRESS, fstrsolid%ESTRAIN, fstrsolid%ESTRESS )
377 call hecmw_update_r( hecmesh, fstrsolid%STRESS, hecmesh%n_node, 6 )
378 call hecmw_update_r( hecmesh, fstrsolid%STRAIN, hecmesh%n_node, 6 )
379 if(
associated(tnstrain) )
call hecmw_update_r( hecmesh, tnstrain, hecmesh%n_node, 6 )
381 if( flag33 == 1 )
then
382 do nlyr = 1, ntot_lyr
383 do i = 1, hecmesh%n_node
384 if( nnumber(i) == 0 ) cycle
385 fstrsolid%SHELL%LAYER(nlyr)%PLUS%STRAIN(6*(i-1)+1:6*(i-1)+6) = &
386 & fstrsolid%SHELL%LAYER(nlyr)%PLUS%STRAIN(6*(i-1)+1:6*(i-1)+6) / nnumber(i)
387 fstrsolid%SHELL%LAYER(nlyr)%PLUS%STRESS(6*(i-1)+1:6*(i-1)+6) = &
388 & fstrsolid%SHELL%LAYER(nlyr)%PLUS%STRESS(6*(i-1)+1:6*(i-1)+6) / nnumber(i)
389 fstrsolid%SHELL%LAYER(nlyr)%MINUS%STRAIN(6*(i-1)+1:6*(i-1)+6) = &
390 & fstrsolid%SHELL%LAYER(nlyr)%MINUS%STRAIN(6*(i-1)+1:6*(i-1)+6) / nnumber(i)
391 fstrsolid%SHELL%LAYER(nlyr)%MINUS%STRESS(6*(i-1)+1:6*(i-1)+6) = &
392 & fstrsolid%SHELL%LAYER(nlyr)%MINUS%STRESS(6*(i-1)+1:6*(i-1)+6) / nnumber(i)
393 fstrsolid%SHELL%LAYER(nlyr)%PLUS%MISES(i) = &
394 &
get_mises(fstrsolid%SHELL%LAYER(nlyr)%PLUS%STRESS(6*(i-1)+1:6*(i-1)+6))
395 fstrsolid%SHELL%LAYER(nlyr)%MINUS%MISES(i) = &
396 &
get_mises(fstrsolid%SHELL%LAYER(nlyr)%MINUS%STRESS(6*(i-1)+1:6*(i-1)+6))
402 do i = 1, hecmesh%n_node
403 fstrsolid%MISES(i) =
get_mises(fstrsolid%STRESS(6*(i-1)+1:6*(i-1)+6))
405 do i = 1, hecmesh%n_elem
406 fstrsolid%EMISES(i) =
get_mises(fstrsolid%ESTRESS(6*(i-1)+1:6*(i-1)+6))
410 do i = 1, hecmesh%n_elem
414 if( flag33 == 1 )
then
415 if( fstrsolid%output_ctrl(3)%outinfo%on(27) .or. fstrsolid%output_ctrl(4)%outinfo%on(27) )
then
416 do nlyr = 1, ntot_lyr
417 call make_principal(fstrsolid, hecmesh, fstrsolid%SHELL%LAYER(nlyr)%PLUS)
418 call make_principal(fstrsolid, hecmesh, fstrsolid%SHELL%LAYER(nlyr)%MINUS)
426 deallocate( nnumber )
431 integer(kind=kint),
allocatable,
intent(in) :: irow(:)
432 integer(kind=kint),
allocatable,
intent(in) :: asect(:)
433 integer(kind=kint),
intent(in) :: nid
434 integer(kind=kint),
intent(in) :: sid
436 integer(kind=kint) :: i
439 do i=irow(nid-1)+1,irow(nid)
440 if( asect(i) == sid )
then
449 Nodal_STRAIN, Nodal_STRESS, Elemental_STRAIN, Elemental_STRESS )
450 type(hecmwst_local_mesh),
intent(in) :: hecMESH
452 integer(kind=kint),
allocatable,
intent(inout) :: nnumber(:)
453 real(kind=kreal),
pointer,
intent(inout) :: nodal_strain(:)
454 real(kind=kreal),
pointer,
intent(inout) :: nodal_stress(:)
455 real(kind=kreal),
pointer,
intent(inout) :: elemental_strain(:)
456 real(kind=kreal),
pointer,
intent(inout) :: elemental_stress(:)
458 integer(kind=kint) :: itype, iS, iE, jS, ic_type, icel, i, j, isect
459 integer(kind=kint) :: nsize, nid(2), idx(2), nd
460 integer(kind=kint) :: nnode, nlen
461 type(hecmwst_varray_int),
allocatable :: nodal_sections(:)
462 real(kind=kreal) :: tmpval(6), nsecdup
463 integer(kind=kint),
allocatable :: irow(:), asect(:)
464 real(kind=kreal),
allocatable :: stress_hyd(:), strain_hyd(:)
465 real(kind=kreal),
allocatable :: stress_dev(:)
466 real(kind=kreal),
allocatable :: plstrain_dev(:)
467 real(kind=kreal) :: stress_hyd_ndave(6), strain_hyd_ndave(6)
468 real(kind=kreal) :: stress_dev_ndave(6)
469 real(kind=kreal),
allocatable :: n_dup_dev(:), n_dup_hyd(:)
470 real(kind=kreal) :: edstrain(6), edstress(6)
471 real(kind=kreal) :: edplstrain
473 nnode = hecmesh%n_node
474 nsize =
size(nodal_strain)
477 call hecmw_varray_int_initialize_all( nodal_sections, nnode, 2 )
478 do itype = 1, hecmesh%n_elem_type
479 ic_type = hecmesh%elem_type_item(itype)
480 if( ic_type /= 341 ) cycle
482 is = hecmesh%elem_type_index(itype-1) + 1
483 ie = hecmesh%elem_type_index(itype )
486 isect= hecmesh%section_ID(icel)
487 if( fstrsolid%sections(isect)%elemopt341 /=
kel341sesns ) cycle
488 js = hecmesh%elem_node_index(icel-1)
490 nd = hecmesh%elem_node_item(js+i)
491 call hecmw_varray_int_add_if_not_exits( nodal_sections(nd), isect )
497 allocate(irow(0:nnode))
500 irow(i) = irow(i-1)+hecmw_varray_int_get_nitem(nodal_sections(i))
504 allocate(asect(nlen))
506 if( irow(i-1) == irow(i) ) cycle
507 call hecmw_varray_int_get_item_all( nodal_sections(i), asect(irow(i-1)+1:irow(i)) )
511 allocate(stress_hyd(6*nlen), strain_hyd(6*nlen))
512 allocate(stress_dev(6*nlen))
513 allocate(plstrain_dev(nlen))
514 allocate(n_dup_dev(nlen),n_dup_hyd(nlen))
519 plstrain_dev(:) = 0.d0
522 do itype = 1, hecmesh%n_elem_type
523 ic_type = hecmesh%elem_type_item(itype)
524 if( ic_type /= 881 .and. ic_type /= 891 ) cycle
526 is = hecmesh%elem_type_index(itype-1) + 1
527 ie = hecmesh%elem_type_index(itype )
530 js = hecmesh%elem_node_index(icel-1)
531 isect= hecmesh%section_ID(icel)
532 if( ic_type == 881 )
then
533 nid(1) = hecmesh%elem_node_item(js+1)
537 strain_hyd(6*idx(1)-5:6*idx(1)) = fstrsolid%elements(icel)%gausses(1)%strain_out(1:6)
539 stress_hyd(6*idx(1)-5:6*idx(1)) = fstrsolid%elements(icel)%gausses(1)%stress_out(1:6)
541 n_dup_hyd(idx(1)) = n_dup_hyd(idx(1)) + 1.d0
542 else if( ic_type == 891 )
then
543 nid(1:2) = hecmesh%elem_node_item(js+1:js+2)
548 tmpval(1:6) = fstrsolid%elements(icel)%gausses(1)%stress_out(1:6)
549 stress_dev(6*idx(1)-5:6*idx(1)) = stress_dev(6*idx(1)-5:6*idx(1)) + tmpval(1:6)
550 stress_dev(6*idx(2)-5:6*idx(2)) = stress_dev(6*idx(2)-5:6*idx(2)) + tmpval(1:6)
552 plstrain_dev(idx(1)) = plstrain_dev(idx(1)) + fstrsolid%elements(icel)%gausses(1)%plstrain
553 plstrain_dev(idx(2)) = plstrain_dev(idx(2)) + fstrsolid%elements(icel)%gausses(1)%plstrain
555 n_dup_dev(idx(1)) = n_dup_dev(idx(1)) + 1.d0
556 n_dup_dev(idx(2)) = n_dup_dev(idx(2)) + 1.d0
562 if( irow(i-1) == irow(i) ) cycle
563 do j=irow(i-1)+1,irow(i)
564 if( n_dup_dev(j) < 1.0d-8 ) cycle
565 stress_dev(6*j-5:6*j) = stress_dev(6*j-5:6*j)/n_dup_dev(j)
566 plstrain_dev(j) = plstrain_dev(j)/n_dup_dev(j)
572 if( irow(i-1) == irow(i) ) cycle
573 strain_hyd_ndave(:) = 0.d0
574 stress_hyd_ndave(:) = 0.d0
575 stress_dev_ndave(:) = 0.d0
576 do j=irow(i-1)+1,irow(i)
577 strain_hyd_ndave(1:6) = strain_hyd_ndave(1:6) + strain_hyd(6*j-5:6*j)
578 stress_hyd_ndave(1:6) = stress_hyd_ndave(1:6) + stress_hyd(6*j-5:6*j)
579 stress_dev_ndave(1:6) = stress_dev_ndave(1:6) + stress_dev(6*j-5:6*j)
581 nsecdup = dble(irow(i)-irow(i-1))
582 strain_hyd_ndave(1:6) = strain_hyd_ndave(1:6)/nsecdup
583 stress_hyd_ndave(1:6) = stress_hyd_ndave(1:6)/nsecdup
584 stress_dev_ndave(1:6) = stress_dev_ndave(1:6)/nsecdup
586 if( nnumber(i) == 0 )
then
587 nodal_strain(6*i-5:6*i) = strain_hyd_ndave(1:6)
588 nodal_stress(6*i-5:6*i) = stress_hyd_ndave(1:6)+stress_dev_ndave(1:6)
590 nodal_strain(6*i-5:6*i) = 0.5d0*(nodal_strain(6*i-5:6*i)+strain_hyd_ndave(1:6))
591 nodal_stress(6*i-5:6*i) = 0.5d0*(nodal_stress(6*i-5:6*i)+stress_hyd_ndave(1:6)+stress_dev_ndave(1:6))
596 do itype = 1, hecmesh%n_elem_type
597 ic_type = hecmesh%elem_type_item(itype)
598 if( ic_type /= 341 ) cycle
600 is = hecmesh%elem_type_index(itype-1) + 1
601 ie = hecmesh%elem_type_index(itype )
604 isect= hecmesh%section_ID(icel)
605 if( fstrsolid%sections(isect)%elemopt341 /=
kel341sesns ) cycle
606 js = hecmesh%elem_node_index(icel-1)
611 nd = hecmesh%elem_node_item(js+i)
612 idx(1) =
search_idx_senes( irow, asect, hecmesh%elem_node_item(js+i), isect )
613 edstrain(1:6) = edstrain(1:6) + strain_hyd(6*idx(1)-5:6*idx(1))
614 edstress(1:6) = edstress(1:6) + stress_hyd(6*idx(1)-5:6*idx(1)) + stress_dev(6*idx(1)-5:6*idx(1))
615 edplstrain = edplstrain + plstrain_dev(idx(1))
617 edstrain(1:6) = 0.25d0*edstrain(1:6)
618 edstress(1:6) = 0.25d0*edstress(1:6)
619 edplstrain = 0.25d0*edplstrain
621 elemental_strain(6*(icel-1)+1:6*(icel-1)+6) = elemental_strain(6*(icel-1)+1:6*(icel-1)+6) + edstrain(1:6)
622 elemental_stress(6*(icel-1)+1:6*(icel-1)+6) = elemental_stress(6*(icel-1)+1:6*(icel-1)+6) + edstress(1:6)
624 fstrsolid%elements(icel)%gausses(1)%strain_out(1:6) = elemental_strain(6*(icel-1)+1:6*(icel-1)+6)
625 fstrsolid%elements(icel)%gausses(1)%stress_out(1:6) = elemental_stress(6*(icel-1)+1:6*(icel-1)+6)
626 fstrsolid%elements(icel)%gausses(1)%plstrain = edplstrain
630 deallocate(stress_hyd, strain_hyd)
631 deallocate(stress_dev, plstrain_dev)
632 deallocate(n_dup_dev, n_dup_hyd)
639 integer(kind=kint) :: nodlocal(20)
640 integer(kind=kint) :: nn, i, j, k, m, nlyr, icel, flag
641 real(kind=kreal) :: strain(nn, 6), stress(nn, 6)
648 layer => fstrsolid%SHELL%LAYER(nlyr)%PLUS
649 elseif(flag == -1)
then
650 layer => fstrsolid%SHELL%LAYER(nlyr)%MINUS
653 layer%STRAIN(6*(i-1)+k) = layer%STRAIN(6*(i-1)+k) + strain(j,k)
654 layer%STRAIN(6*(m-1)+k) = layer%STRAIN(6*(m-1)+k) + strain(j,k)
655 layer%STRESS(6*(i-1)+k) = layer%STRESS(6*(i-1)+k) + stress(j,k)
656 layer%STRESS(6*(m-1)+k) = layer%STRESS(6*(m-1)+k) + stress(j,k)
657 layer%ESTRAIN(6*(icel-1)+k) = layer%ESTRAIN(6*(icel-1)+k) + strain(j,k)/nn
658 layer%ESTRESS(6*(icel-1)+k) = layer%ESTRESS(6*(icel-1)+k) + stress(j,k)/nn
667 type(
telement),
intent(in) :: element
668 integer(kind=kint),
intent(in) :: nlyr, nn
669 real(kind=kreal),
intent(in) :: strain(:,:), stress(:,:)
670 real(kind=kreal),
intent(inout) :: mid_strain(:,:), mid_stress(:,:)
671 real(kind=kreal) :: weight
673 weight = 0.5d0*element%gausses(1)%pMaterial%shell_var(nlyr)%weight
674 mid_strain(1:nn,1:6) = mid_strain(1:nn,1:6) + weight*strain(1:nn,1:6)
675 mid_stress(1:nn,1:6) = mid_stress(1:nn,1:6) + weight*stress(1:nn,1:6)
683 integer(kind=kint) :: j, nlyr, icel, ntot_lyr
684 real(kind=kreal) :: estrain(6), estress(6), weight
687 ntot_lyr = fstrsolid%elements(icel)%gausses(1)%pMaterial%totallyr
691 do nlyr = 1, ntot_lyr
692 layer => fstrsolid%SHELL%LAYER(nlyr)
693 weight = fstrsolid%elements(icel)%gausses(1)%pMaterial%shell_var(nlyr)%weight
695 estrain(j) = estrain(j) &
696 & + weight*(0.5d0*layer%PLUS%ESTRAIN(6*(icel-1)+j) + 0.5d0*layer%MINUS%ESTRAIN(6*(icel-1)+j))
697 estress(j) = estress(j) &
698 & + weight*(0.5d0*layer%PLUS%ESTRESS(6*(icel-1)+j) + 0.5d0*layer%MINUS%ESTRESS(6*(icel-1)+j))
707 type(
telement),
intent(in) :: element
709 integer(kind=kint),
intent(in) :: icel
710 integer(kind=kint) :: ilayer
711 real(kind=kreal) :: estrain(6), estress(6), eplstrain
713 if( .not.
associated(element%shell_layer_gausses) )
return
714 if( element%shell_nlayer <= 0 )
return
716 do ilayer = 1, element%shell_nlayer
718 fstrsolid%SHELL%LAYER(ilayer)%PLUS%ESTRAIN(6*(icel-1)+1:6*(icel-1)+6) = estrain(1:6)
719 fstrsolid%SHELL%LAYER(ilayer)%PLUS%ESTRESS(6*(icel-1)+1:6*(icel-1)+6) = estress(1:6)
720 fstrsolid%SHELL%LAYER(ilayer)%PLUS%EPLSTRAIN(icel) = eplstrain
722 fstrsolid%SHELL%LAYER(ilayer)%MINUS%ESTRAIN(6*(icel-1)+1:6*(icel-1)+6) = estrain(1:6)
723 fstrsolid%SHELL%LAYER(ilayer)%MINUS%ESTRESS(6*(icel-1)+1:6*(icel-1)+6) = estress(1:6)
724 fstrsolid%SHELL%LAYER(ilayer)%MINUS%EPLSTRAIN(icel) = eplstrain
730 type(
telement),
intent(in) :: element
731 integer(kind=kint),
intent(in) :: ilayer, flag
732 real(kind=kreal),
intent(out) :: estrain(6), estress(6), eplstrain
733 integer(kind=kint) :: ig, ithick, ishell, ierr, surface_ithick, npoint
734 real(kind=kreal) :: zeta_layer, weight, surface_zeta
739 if( .not.
associated(element%shell_layer_gausses) )
return
740 if( .not.
associated(element%gausses) )
return
741 if( element%shell_nlayer <= 0 .or. element%shell_nthick <= 0 )
return
745 surface_zeta = -huge(1.0d0)
747 surface_zeta = huge(1.0d0)
750 do ithick = 1, element%shell_nthick
751 call fstr_shell_layer_quadrature(element, ilayer, ithick, zeta_layer, weight, ierr)
752 if( ierr /= 0 ) cycle
754 if( zeta_layer > surface_zeta )
then
755 surface_zeta = zeta_layer
756 surface_ithick = ithick
759 if( zeta_layer < surface_zeta )
then
760 surface_zeta = zeta_layer
761 surface_ithick = ithick
765 if( surface_ithick <= 0 )
return
768 do ig = 1,
size(element%gausses)
769 ishell = fstr_shell_layer_gauss_index(element, ig, ilayer, surface_ithick)
770 if( ishell <= 0 ) cycle
771 estrain(1:6) = estrain(1:6) + element%shell_layer_gausses(ishell)%strain_out(1:6)
772 estress(1:6) = estress(1:6) + element%shell_layer_gausses(ishell)%stress_out(1:6)
773 eplstrain = eplstrain + element%shell_layer_gausses(ishell)%plstrain
776 if( npoint > 0 )
then
777 estrain(1:6) = estrain(1:6) / npoint
778 estress(1:6) = estress(1:6) / npoint
779 eplstrain = eplstrain / npoint
785 type(
telement),
intent(in) :: element
786 real(kind=kreal),
intent(inout) :: estrain(6), estress(6)
787 integer(kind=kint) :: ig, ilayer, ithick, ishell, ierr
788 real(kind=kreal) :: zeta_layer, layer_weight, weight, total_weight
789 real(kind=kreal) :: avg_strain(6), avg_stress(6)
791 if( .not.
associated(element%shell_layer_gausses) )
return
792 if( .not.
associated(element%gausses) )
return
793 if( element%shell_nlayer <= 0 .or. element%shell_nthick <= 0 )
return
794 if(
size(element%gausses) <= 0 )
return
795 if( .not.
associated(element%gausses(1)%pMaterial) )
return
796 if( .not.
associated(element%gausses(1)%pMaterial%shell_var) )
return
797 if( element%shell_nlayer >
size(element%gausses(1)%pMaterial%shell_var) )
return
799 avg_strain(1:6) = 0.0d0
800 avg_stress(1:6) = 0.0d0
804 do ig = 1,
size(element%gausses)
805 do ilayer = 1, element%shell_nlayer
806 layer_weight = element%gausses(1)%pMaterial%shell_var(ilayer)%weight
807 do ithick = 1, element%shell_nthick
808 ishell = fstr_shell_layer_gauss_index(element, ig, ilayer, ithick)
809 if( ishell <= 0 ) cycle
810 call fstr_shell_layer_quadrature(element, ilayer, ithick, zeta_layer, weight, ierr)
811 if( ierr /= 0 ) cycle
812 weight = layer_weight*weight
813 avg_strain(1:6) = avg_strain(1:6) &
814 + element%shell_layer_gausses(ishell)%strain_out(1:6) * weight
815 avg_stress(1:6) = avg_stress(1:6) &
816 + element%shell_layer_gausses(ishell)%stress_out(1:6) * weight
817 total_weight = total_weight + weight
822 if( total_weight > 0.0d0 )
then
823 estrain(1:6) = avg_strain(1:6) / total_weight
824 estress(1:6) = avg_stress(1:6) / total_weight
832 type(
telement),
intent(in) :: element
833 integer(kind=kint),
intent(in) :: nn, icel, nodlocal(:)
835 real(kind=kreal),
intent(out) :: strain(:,:), stress(:,:), estrain(6), estress(6)
836 real(kind=kreal) :: func(nn,nn), inv_func(nn,nn), coord(2), shape(nn)
837 real(kind=kreal) :: gp_strain(nn,6), gp_stress(nn,6), nod_strain(nn,6), nod_stress(nn,6)
838 real(kind=kreal) :: avg_strain(nn,6), avg_stress(nn,6), zeta, weight, total_weight
839 integer(kind=kint) :: ig, ilayer, ithick, ishell, ierr, j, i
847 call inverse_func(nn, func, inv_func)
854 do ilayer = 1, element%shell_nlayer
855 do ithick = 1, element%shell_nthick
856 call fstr_shell_layer_quadrature(element, ilayer, ithick, zeta, weight, ierr)
857 if( ierr /= 0 ) stop
'Invalid shell thickness quadrature'
859 ishell = fstr_shell_layer_gauss_index(element, ig, ilayer, ithick)
860 gp_strain(ig,:) = element%shell_layer_gausses(ishell)%strain_out(1:6)
861 gp_stress(ig,:) = element%shell_layer_gausses(ishell)%stress_out(1:6)
863 avg_strain = avg_strain+weight*gp_strain
864 avg_stress = avg_stress+weight*gp_stress
865 total_weight = total_weight+weight
868 if( ithick /= 1 .and. ithick /= element%shell_nthick ) cycle
869 nod_strain = matmul(inv_func, gp_strain)
870 nod_stress = matmul(inv_func, gp_stress)
871 if( ithick == 1 )
then
872 layer => fstrsolid%SHELL%LAYER(ilayer)%MINUS
874 layer => fstrsolid%SHELL%LAYER(ilayer)%PLUS
878 layer%STRAIN(6*i-5:6*i) = layer%STRAIN(6*i-5:6*i)+nod_strain(j,:)
879 layer%STRESS(6*i-5:6*i) = layer%STRESS(6*i-5:6*i)+nod_stress(j,:)
883 strain = matmul(inv_func, avg_strain)/total_weight
884 stress = matmul(inv_func, avg_stress)/total_weight
890 subroutine nodalstress_inv3( etype, ni, gausses, func, edstrain, edstress, tdstrain, points )
893 integer(kind=kint) :: etype, ni
895 real(kind=kreal) :: func(:, :), edstrain(:, :), edstress(:, :), tdstrain(:, :)
896 integer(kind=kint),
intent(in),
optional :: points(:)
897 integer :: i, j, k, ic
903 if( etype == fe_hex8n )
then
907 edstrain(i,k) = edstrain(i,k) + func(i,j) * gausses(j)%strain_out(k)
908 edstress(i,k) = edstress(i,k) + func(i,j) * gausses(j)%stress_out(k)
913 else if( etype == fe_tet10n )
then
917 edstrain(i,k) = edstrain(i,k) + func(i,j) * gausses(j)%strain_out(k)
918 edstress(i,k) = edstress(i,k) + func(i,j) * gausses(j)%stress_out(k)
923 edstrain(5,1:6) = ( edstrain(1,1:6) + edstrain(2,1:6) ) / 2.0
924 edstress(5,1:6) = ( edstress(1,1:6) + edstress(2,1:6) ) / 2.0
925 tdstrain(5,1:6) = ( tdstrain(1,1:6) + tdstrain(2,1:6) ) / 2.0
926 edstrain(6,1:6) = ( edstrain(2,1:6) + edstrain(3,1:6) ) / 2.0
927 edstress(6,1:6) = ( edstress(2,1:6) + edstress(3,1:6) ) / 2.0
928 tdstrain(6,1:6) = ( tdstrain(2,1:6) + tdstrain(3,1:6) ) / 2.0
929 edstrain(7,1:6) = ( edstrain(3,1:6) + edstrain(1,1:6) ) / 2.0
930 edstress(7,1:6) = ( edstress(3,1:6) + edstress(1,1:6) ) / 2.0
931 tdstrain(7,1:6) = ( tdstrain(3,1:6) + tdstrain(1,1:6) ) / 2.0
932 edstrain(8,1:6) = ( edstrain(1,1:6) + edstrain(4,1:6) ) / 2.0
933 edstress(8,1:6) = ( edstress(1,1:6) + edstress(4,1:6) ) / 2.0
934 tdstrain(8,1:6) = ( tdstrain(1,1:6) + tdstrain(4,1:6) ) / 2.0
935 edstrain(9,1:6) = ( edstrain(2,1:6) + edstrain(4,1:6) ) / 2.0
936 edstress(9,1:6) = ( edstress(2,1:6) + edstress(4,1:6) ) / 2.0
937 tdstrain(9,1:6) = ( tdstrain(2,1:6) + tdstrain(4,1:6) ) / 2.0
938 edstrain(10,1:6) = ( edstrain(3,1:6) + edstrain(4,1:6) ) / 2.0
939 edstress(10,1:6) = ( edstress(3,1:6) + edstress(4,1:6) ) / 2.0
940 tdstrain(10,1:6) = ( tdstrain(3,1:6) + tdstrain(4,1:6) ) / 2.0
941 else if( etype == fe_prism15n )
then
944 do j = 1, numofquadpoints(etype)
945 if( j==1 .or. j==2 .or. j==3 .or. j==7 .or. j==8 .or. j==9 )
then
948 edstrain(i,k) = edstrain(i,k) + func(i,ic) * gausses(j)%strain_out(k)
949 edstress(i,k) = edstress(i,k) + func(i,ic) * gausses(j)%stress_out(k)
955 edstrain(7,1:6) = ( edstrain(1,1:6) + edstrain(2,1:6) ) / 2.0
956 edstress(7,1:6) = ( edstress(1,1:6) + edstress(2,1:6) ) / 2.0
957 tdstrain(7,1:6) = ( tdstrain(1,1:6) + tdstrain(2,1:6) ) / 2.0
958 edstrain(8,1:6) = ( edstrain(2,1:6) + edstrain(3,1:6) ) / 2.0
959 edstress(8,1:6) = ( edstress(2,1:6) + edstress(3,1:6) ) / 2.0
960 tdstrain(8,1:6) = ( tdstrain(2,1:6) + tdstrain(3,1:6) ) / 2.0
961 edstrain(9,1:6) = ( edstrain(3,1:6) + edstrain(1,1:6) ) / 2.0
962 edstress(9,1:6) = ( edstress(3,1:6) + edstress(1,1:6) ) / 2.0
963 tdstrain(9,1:6) = ( tdstrain(3,1:6) + tdstrain(1,1:6) ) / 2.0
964 edstrain(10,1:6) = ( edstrain(4,1:6) + edstrain(5,1:6) ) / 2.0
965 edstress(10,1:6) = ( edstress(4,1:6) + edstress(5,1:6) ) / 2.0
966 tdstrain(10,1:6) = ( tdstrain(4,1:6) + tdstrain(5,1:6) ) / 2.0
967 edstrain(11,1:6) = ( edstrain(5,1:6) + edstrain(6,1:6) ) / 2.0
968 edstress(11,1:6) = ( edstress(5,1:6) + edstress(6,1:6) ) / 2.0
969 tdstrain(11,1:6) = ( tdstrain(5,1:6) + tdstrain(6,1:6) ) / 2.0
970 edstrain(12,1:6) = ( edstrain(6,1:6) + edstrain(4,1:6) ) / 2.0
971 edstress(12,1:6) = ( edstress(6,1:6) + edstress(4,1:6) ) / 2.0
972 tdstrain(12,1:6) = ( tdstrain(6,1:6) + tdstrain(4,1:6) ) / 2.0
973 edstrain(13,1:6) = ( edstrain(1,1:6) + edstrain(4,1:6) ) / 2.0
974 edstress(13,1:6) = ( edstress(1,1:6) + edstress(4,1:6) ) / 2.0
975 tdstrain(13,1:6) = ( tdstrain(1,1:6) + tdstrain(4,1:6) ) / 2.0
976 edstrain(14,1:6) = ( edstrain(2,1:6) + edstrain(5,1:6) ) / 2.0
977 edstress(14,1:6) = ( edstress(2,1:6) + edstress(5,1:6) ) / 2.0
978 tdstrain(14,1:6) = ( tdstrain(2,1:6) + tdstrain(5,1:6) ) / 2.0
979 edstrain(15,1:6) = ( edstrain(3,1:6) + edstrain(6,1:6) ) / 2.0
980 edstress(15,1:6) = ( edstress(3,1:6) + edstress(6,1:6) ) / 2.0
981 tdstrain(15,1:6) = ( tdstrain(3,1:6) + tdstrain(6,1:6) ) / 2.0
982 else if( etype == fe_hex20n )
then
987 edstrain(i,k) = edstrain(i,k) + func(i,ic) * gausses(j)%strain_out(k)
988 edstress(i,k) = edstress(i,k) + func(i,ic) * gausses(j)%stress_out(k)
993 edstrain(9,1:6) = ( edstrain(1,1:6) + edstrain(2,1:6) ) / 2.0
994 edstress(9,1:6) = ( edstress(1,1:6) + edstress(2,1:6) ) / 2.0
995 tdstrain(9,1:6) = ( tdstrain(1,1:6) + tdstrain(2,1:6) ) / 2.0
996 edstrain(10,1:6) = ( edstrain(2,1:6) + edstrain(3,1:6) ) / 2.0
997 edstress(10,1:6) = ( edstress(2,1:6) + edstress(3,1:6) ) / 2.0
998 tdstrain(10,1:6) = ( tdstrain(2,1:6) + tdstrain(3,1:6) ) / 2.0
999 edstrain(11,1:6) = ( edstrain(3,1:6) + edstrain(4,1:6) ) / 2.0
1000 edstress(11,1:6) = ( edstress(3,1:6) + edstress(4,1:6) ) / 2.0
1001 tdstrain(11,1:6) = ( tdstrain(3,1:6) + tdstrain(4,1:6) ) / 2.0
1002 edstrain(12,1:6) = ( edstrain(4,1:6) + edstrain(1,1:6) ) / 2.0
1003 edstress(12,1:6) = ( edstress(4,1:6) + edstress(1,1:6) ) / 2.0
1004 tdstrain(12,1:6) = ( tdstrain(4,1:6) + tdstrain(1,1:6) ) / 2.0
1005 edstrain(13,1:6) = ( edstrain(5,1:6) + edstrain(6,1:6) ) / 2.0
1006 edstress(13,1:6) = ( edstress(5,1:6) + edstress(6,1:6) ) / 2.0
1007 tdstrain(13,1:6) = ( tdstrain(5,1:6) + tdstrain(6,1:6) ) / 2.0
1008 edstrain(14,1:6) = ( edstrain(6,1:6) + edstrain(7,1:6) ) / 2.0
1009 edstress(14,1:6) = ( edstress(6,1:6) + edstress(7,1:6) ) / 2.0
1010 tdstrain(14,1:6) = ( tdstrain(6,1:6) + tdstrain(7,1:6) ) / 2.0
1011 edstrain(15,1:6) = ( edstrain(7,1:6) + edstrain(8,1:6) ) / 2.0
1012 edstress(15,1:6) = ( edstress(7,1:6) + edstress(8,1:6) ) / 2.0
1013 tdstrain(15,1:6) = ( tdstrain(7,1:6) + tdstrain(8,1:6) ) / 2.0
1014 edstrain(16,1:6) = ( edstrain(8,1:6) + edstrain(5,1:6) ) / 2.0
1015 edstress(16,1:6) = ( edstress(8,1:6) + edstress(5,1:6) ) / 2.0
1016 tdstrain(16,1:6) = ( tdstrain(8,1:6) + tdstrain(5,1:6) ) / 2.0
1017 edstrain(17,1:6) = ( edstrain(1,1:6) + edstrain(5,1:6) ) / 2.0
1018 edstress(17,1:6) = ( edstress(1,1:6) + edstress(5,1:6) ) / 2.0
1019 tdstrain(17,1:6) = ( tdstrain(1,1:6) + tdstrain(5,1:6) ) / 2.0
1020 edstrain(18,1:6) = ( edstrain(2,1:6) + edstrain(6,1:6) ) / 2.0
1021 edstress(18,1:6) = ( edstress(2,1:6) + edstress(6,1:6) ) / 2.0
1022 tdstrain(18,1:6) = ( tdstrain(2,1:6) + tdstrain(6,1:6) ) / 2.0
1023 edstrain(19,1:6) = ( edstrain(3,1:6) + edstrain(7,1:6) ) / 2.0
1024 edstress(19,1:6) = ( edstress(3,1:6) + edstress(7,1:6) ) / 2.0
1025 tdstrain(19,1:6) = ( tdstrain(3,1:6) + tdstrain(7,1:6) ) / 2.0
1026 edstrain(20,1:6) = ( edstrain(4,1:6) + edstrain(8,1:6) ) / 2.0
1027 edstress(20,1:6) = ( edstress(4,1:6) + edstress(8,1:6) ) / 2.0
1028 tdstrain(20,1:6) = ( tdstrain(4,1:6) + tdstrain(8,1:6) ) / 2.0
1030 end subroutine nodalstress_inv3
1035 real(kind=kreal) :: s11, s22, s33, s12, s23, s13, ps, smises
1043 ps = ( s11 + s22 + s33 ) / 3.0d0
1044 smises = 0.5d0 * ( (s11-ps)**2 + (s22-ps)**2 + (s33-ps)**2 ) + s12**2 + s23**2 + s13**2
1054 type (hecmwST_local_mesh) :: hecMESH
1055 type (fstr_solid) :: fstrSOLID
1056 real(kind=kreal),
pointer :: tnstrain(:), testrain(:)
1058 integer(kind=kint) :: itype, icel, ic, is, iE, jS, i, j, ic_type, nn, ni, ID_area
1059 real(kind=kreal) :: estrain(4), estress(4), naturalcoord(4)
1060 real(kind=kreal) :: edstrain(8,4), edstress(8,4), tdstrain(8,4)
1061 real(kind=kreal) :: s11, s22, s12, smises
1062 real(kind=kreal),
allocatable :: func(:,:), inv_func(:,:)
1063 real(kind=kreal) :: inv_func_ri(4,4)
1064 integer(kind=kint),
allocatable :: nnumber(:)
1067 tnstrain => fstrsolid%tnstrain
1068 testrain => fstrsolid%testrain
1071 allocate( nnumber(hecmesh%n_node) )
1072 if( .not.
associated(fstrsolid%is_rot) )
allocate( fstrsolid%is_rot(hecmesh%n_node) )
1074 fstrsolid%is_rot = 0
1076 if(
associated(tnstrain) ) tnstrain = 0.0d0
1081 do itype = 1, hecmesh%n_elem_type
1082 is = hecmesh%elem_type_index(itype-1) + 1
1083 ie = hecmesh%elem_type_index(itype )
1084 ic_type = hecmesh%elem_type_item(itype)
1085 if( .not. hecmw_is_etype_surface(ic_type) ) cycle
1087 nn = hecmw_get_max_node( ic_type )
1088 ni = numofquadpoints( ic_type )
1089 allocate( func(ni,nn), inv_func(nn,ni) )
1091 if( ic_type == fe_tri6n )
then
1092 ic = hecmw_get_max_node( fe_tri3n )
1094 call getquadpoint( ic_type, i, naturalcoord )
1095 call getshapefunc( fe_tri3n, naturalcoord, func(i,1:ic) )
1097 call inverse_func( ic, func, inv_func )
1098 else if( ic_type == fe_quad4n )
then
1100 call getquadpoint( ic_type, i, naturalcoord )
1101 call getshapefunc( ic_type, naturalcoord, func(i,1:nn) )
1103 call inverse_func( ni, func, inv_func )
1104 else if( ic_type == fe_quad8n )
then
1105 call corner_extrapolation( ic_type, fe_quad4n, 9, quad8_fi_points, inv_func )
1106 call corner_extrapolation( ic_type, fe_quad4n, 4, quad8_ri_points, inv_func_ri )
1111 js = hecmesh%elem_node_index(icel-1)
1112 id_area = hecmesh%elem_ID(icel*2)
1115 if( ic_type == fe_quad8n )
then
1117 call nodalstress_inv2( ic_type, ni, fstrsolid%elements(icel)%gausses, &
1118 inv_func_ri, edstrain(1:nn,1:4), edstress(1:nn,1:4), &
1119 tdstrain(1:nn,1:4), quad8_ri_points )
1121 call nodalstress_inv2( ic_type, ni, fstrsolid%elements(icel)%gausses, &
1122 inv_func, edstrain(1:nn,1:4), edstress(1:nn,1:4), &
1123 tdstrain(1:nn,1:4), quad8_fi_points )
1125 else if( ic_type == fe_tri6n .or. ( ic_type == fe_quad4n .and. .not. reduced ) )
then
1126 call nodalstress_inv2( ic_type, ni, fstrsolid%elements(icel)%gausses, &
1127 inv_func, edstrain(1:nn,1:4), edstress(1:nn,1:4), &
1128 tdstrain(1:nn,1:4) )
1130 call nodalstress_c2( nn, fstrsolid%elements(icel)%gausses, &
1131 edstrain(1:nn,1:4), edstress(1:nn,1:4) )
1136 ic = hecmesh%elem_node_item(js+j)
1137 fstrsolid%STRAIN(3*ic-2) = fstrsolid%STRAIN(3*ic-2) + edstrain(j,1)
1138 fstrsolid%STRAIN(3*ic-1) = fstrsolid%STRAIN(3*ic-1) + edstrain(j,2)
1139 fstrsolid%STRAIN(3*ic-0) = fstrsolid%STRAIN(3*ic-0) + edstrain(j,3)
1140 fstrsolid%STRESS(3*ic-2) = fstrsolid%STRESS(3*ic-2) + edstress(j,1)
1141 fstrsolid%STRESS(3*ic-1) = fstrsolid%STRESS(3*ic-1) + edstress(j,2)
1142 fstrsolid%STRESS(3*ic-0) = fstrsolid%STRESS(3*ic-0) + edstress(j,3)
1144 if(
associated(tnstrain) )
then
1145 tnstrain(3*ic-2) = tnstrain(3*ic-2) + tdstrain(j,1)
1146 tnstrain(3*ic-1) = tnstrain(3*ic-1) + tdstrain(j,2)
1147 tnstrain(3*ic ) = tnstrain(3*ic ) + tdstrain(j,3)
1149 nnumber(ic) = nnumber(ic) + 1
1153 call elementstress_c2( fstrsolid%elements(icel)%gausses, estrain, estress )
1155 fstrsolid%ESTRAIN(3*icel-2) = estrain(1)
1156 fstrsolid%ESTRAIN(3*icel-1) = estrain(2)
1157 fstrsolid%ESTRAIN(3*icel-0) = estrain(3)
1158 fstrsolid%ESTRESS(3*icel-2) = estress(1)
1159 fstrsolid%ESTRESS(3*icel-1) = estress(2)
1160 fstrsolid%ESTRESS(3*icel-0) = estress(3)
1165 smises = 0.5d0 * ((s11-s22)**2+(s11)**2+(s22)**2) + 3*s12**2
1166 fstrsolid%EMISES(icel) = sqrt( smises )
1169 deallocate( func, inv_func )
1173 do i = 1, hecmesh%n_node
1174 if( nnumber(i) == 0 ) cycle
1175 fstrsolid%STRAIN(3*i-2:3*i-0) = fstrsolid%STRAIN(3*i-2:3*i-0) / nnumber(i)
1176 fstrsolid%STRESS(3*i-2:3*i-0) = fstrsolid%STRESS(3*i-2:3*i-0) / nnumber(i)
1177 if(
associated(tnstrain) ) tnstrain(3*i-2:3*i) = tnstrain(3*i-2:3*i) / nnumber(i)
1180 do i = 1, hecmesh%n_node
1181 s11 = fstrsolid%STRESS(3*i-2)
1182 s22 = fstrsolid%STRESS(3*i-1)
1183 s12 = fstrsolid%STRESS(3*i-0)
1184 smises = 0.5d0 * ((s11-s22)**2+(s11)**2+(s22)**2) + 3*s12**2
1185 fstrsolid%MISES(i) = sqrt( smises )
1188 deallocate( nnumber )
1192 subroutine nodalstress_inv2( etype, ni, gausses, func, edstrain, edstress, tdstrain, points )
1195 integer(kind=kint) :: etype, ni
1197 real(kind=kreal) :: func(:,:), edstrain(:,:), edstress(:,:), tdstrain(:,:)
1198 integer(kind=kint),
intent(in),
optional :: points(:)
1199 integer :: i, j, k, ic
1205 if( etype == fe_quad4n )
then
1209 edstrain(i,k) = edstrain(i,k) + func(i,j) * gausses(j)%strain_out(k)
1210 edstress(i,k) = edstress(i,k) + func(i,j) * gausses(j)%stress_out(k)
1215 else if( etype == fe_tri6n )
then
1219 edstrain(i,k) = edstrain(i,k) + func(i,j) * gausses(j)%strain_out(k)
1220 edstress(i,k) = edstress(i,k) + func(i,j) * gausses(j)%stress_out(k)
1225 edstrain(4,1:4) = ( edstrain(1,1:4) + edstrain(2,1:4) ) / 2.0
1226 edstress(4,1:4) = ( edstress(1,1:4) + edstress(2,1:4) ) / 2.0
1227 tdstrain(4,1:4) = ( tdstrain(1,1:4) + tdstrain(2,1:4) ) / 2.0
1228 edstrain(5,1:4) = ( edstrain(2,1:4) + edstrain(3,1:4) ) / 2.0
1229 edstress(5,1:4) = ( edstress(2,1:4) + edstress(3,1:4) ) / 2.0
1230 tdstrain(5,1:4) = ( tdstrain(2,1:4) + tdstrain(3,1:4) ) / 2.0
1231 edstrain(6,1:4) = ( edstrain(3,1:4) + edstrain(1,1:4) ) / 2.0
1232 edstress(6,1:4) = ( edstress(3,1:4) + edstress(1,1:4) ) / 2.0
1233 tdstrain(6,1:4) = ( tdstrain(3,1:4) + tdstrain(1,1:4) ) / 2.0
1234 else if( etype == fe_quad8n )
then
1239 edstrain(i,k) = edstrain(i,k) + func(i,ic) * gausses(j)%strain_out(k)
1240 edstress(i,k) = edstress(i,k) + func(i,ic) * gausses(j)%stress_out(k)
1245 edstrain(5,1:4) = ( edstrain(1,1:4) + edstrain(2,1:4) ) / 2.0
1246 edstress(5,1:4) = ( edstress(1,1:4) + edstress(2,1:4) ) / 2.0
1247 tdstrain(5,1:4) = ( tdstrain(1,1:4) + tdstrain(2,1:4) ) / 2.0
1248 edstrain(6,1:4) = ( edstrain(2,1:4) + edstrain(3,1:4) ) / 2.0
1249 edstress(6,1:4) = ( edstress(2,1:4) + edstress(3,1:4) ) / 2.0
1250 tdstrain(6,1:4) = ( tdstrain(2,1:4) + tdstrain(3,1:4) ) / 2.0
1251 edstrain(7,1:4) = ( edstrain(3,1:4) + edstrain(4,1:4) ) / 2.0
1252 edstress(7,1:4) = ( edstress(3,1:4) + edstress(4,1:4) ) / 2.0
1253 tdstrain(7,1:4) = ( tdstrain(3,1:4) + tdstrain(4,1:4) ) / 2.0
1254 edstrain(8,1:4) = ( edstrain(4,1:4) + edstrain(1,1:4) ) / 2.0
1255 edstress(8,1:4) = ( edstress(4,1:4) + edstress(1,1:4) ) / 2.0
1256 tdstrain(8,1:4) = ( tdstrain(4,1:4) + tdstrain(1,1:4) ) / 2.0
1258 end subroutine nodalstress_inv2
1261 subroutine inverse_func( n, a, inv_a )
1263 integer(kind=kint) :: n
1264 real(kind=kreal) :: a(:,:), inv_a(:,:)
1265 integer(kind=kint) :: i, j, k
1266 real(kind=kreal) :: buf
1281 a(i,j) = a(i,j) * buf
1282 inv_a(i,j) = inv_a(i,j) *buf
1288 a(j,k) = a(j,k) - a(i,k) * buf
1289 inv_a(j,k) = inv_a(j,k) - inv_a(i,k) * buf
1294 end subroutine inverse_func
1302 type (hecmwST_local_mesh) :: hecMESH
1303 type (fstr_solid) :: fstrSOLID
1305 integer(kind=kint) :: itype, icel, is, iE, jS, i, j, k, ic, ic_type, nn, isect, ihead, ID_area, nbase
1306 integer(kind=kint) :: nodLOCAL(20), ntot_lyr, nlyr, n_totlyr
1307 real(kind=kreal) :: ecoord(3,9), edisp(6,9), estrain(6), estress(6), ndstrain(9,6), ndstress(9,6)
1308 real(kind=kreal) :: enqm(12)
1309 real(kind=kreal) :: triad_cur(9,9), triad_ref(9,9)
1310 real(kind=kreal) :: thick, coords(3,3)
1311 integer(kind=kint) :: cdsys_ID
1312 real(kind=kreal) :: mid_strain(9,6), mid_stress(9,6)
1313 integer(kind=kint),
allocatable :: nnumber(:)
1318 n_totlyr = fstrsolid%max_lyr
1320 allocate( nnumber(hecmesh%n_node) )
1321 if( .not.
associated(fstrsolid%is_rot) )
allocate( fstrsolid%is_rot(hecmesh%n_node) )
1323 fstrsolid%is_rot = 0
1329 do itype = 1, hecmesh%n_elem_type
1330 is = hecmesh%elem_type_index(itype-1) + 1
1331 ie = hecmesh%elem_type_index(itype )
1332 ic_type = hecmesh%elem_type_item(itype)
1333 if( .not. (hecmw_is_etype_shell(ic_type) .or. ic_type == 611) )
then
1337 if( ic_type == 611 ) ntot_lyr = 0
1338 nn = hecmw_get_max_node( ic_type )
1341 js = hecmesh%elem_node_index(icel-1)
1342 id_area = hecmesh%elem_ID(icel*2)
1344 nodlocal(j) = hecmesh%elem_node_item(js+j)
1345 ecoord(1,j) = hecmesh%node(3*nodlocal(j)-2)
1346 ecoord(2,j) = hecmesh%node(3*nodlocal(j)-1)
1347 ecoord(3,j) = hecmesh%node(3*nodlocal(j) )
1348 edisp(1,j) = fstrsolid%unode(6*nodlocal(j)-5)
1349 edisp(2,j) = fstrsolid%unode(6*nodlocal(j)-4)
1350 edisp(3,j) = fstrsolid%unode(6*nodlocal(j)-3)
1351 edisp(4,j) = fstrsolid%unode(6*nodlocal(j)-2)
1352 edisp(5,j) = fstrsolid%unode(6*nodlocal(j)-1)
1353 edisp(6,j) = fstrsolid%unode(6*nodlocal(j) )
1355 isect = hecmesh%section_ID(icel)
1356 ihead = hecmesh%section%sect_R_index(isect-1)
1357 thick = hecmesh%section%sect_R_item(ihead+1)
1358 cdsys_id = hecmesh%section%sect_orien_ID(isect)
1360 if( cdsys_id > 0 )
call get_coordsys(cdsys_id, hecmesh, fstrsolid, coords, icel)
1362 if( ic_type == 611 )
then
1368 call nodalstress_beam( nn, ecoord, fstrsolid%elements(icel)%gausses, &
1369 & hecmesh%section%sect_R_item(ihead+1:), edisp(1:6,1:nn), &
1370 & ndstrain(1:nn,1:6), ndstress(1:nn,1:6), fstrsolid%sections(isect)%elemopt611 )
1371 call elementalstress_beam( fstrsolid%elements(icel)%gausses, estrain, estress, enqm )
1372 fstrsolid%ENQM(icel*12-11:icel*12) = enqm(1:12)
1373 else if( fstr_uses_plane_stress_j2_shell(ic_type, nn, fstrsolid%elements(icel)%gausses(1)%pMaterial) )
then
1374 ntot_lyr = fstrsolid%elements(icel)%shell_nlayer
1376 ndstrain(1:nn,1:6), ndstress(1:nn,1:6), estrain, estress)
1377 else if( ic_type == 731 .or. ic_type == 741 .or. ic_type == 743 )
then
1378 ntot_lyr = fstrsolid%elements(icel)%gausses(1)%pMaterial%totallyr
1380 nbase = 9*(nodlocal(j)-1)
1381 triad_cur(1:9,j) = 0.0d0
1382 triad_ref(1:9,j) = 0.0d0
1383 if(
associated(fstrsolid%shell_triad) ) triad_cur(1:9,j) = fstrsolid%shell_triad(nbase+1:nbase+9)
1384 if(
associated(fstrsolid%shell_ref_triad) ) triad_ref(1:9,j) = fstrsolid%shell_ref_triad(nbase+1:nbase+9)
1389 call elementstress_shell_mitc( ic_type, nn, 6, ecoord, fstrsolid%elements(icel)%gausses, edisp, &
1390 & ndstrain(1:nn,1:6), ndstress(1:nn,1:6), thick, 1.0d0, nlyr, &
1391 & ndtriad=triad_cur(1:9,1:nn), ndreftriad=triad_ref(1:9,1:nn), cdsys_id=cdsys_id, coords=coords)
1394 layer => fstrsolid%SHELL%LAYER(nlyr)%PLUS
1396 layer%STRAIN(6*(i-1)+k) = layer%STRAIN(6*(i-1)+k) + ndstrain(j,k)
1397 layer%STRESS(6*(i-1)+k) = layer%STRESS(6*(i-1)+k) + ndstress(j,k)
1398 layer%ESTRAIN(6*(icel-1)+k) = layer%ESTRAIN(6*(icel-1)+k) + ndstrain(j,k)/nn
1399 layer%ESTRESS(6*(icel-1)+k) = layer%ESTRESS(6*(icel-1)+k) + ndstress(j,k)/nn
1402 call fstr_add_shell_mid(fstrsolid%elements(icel),nlyr,nn,ndstrain,ndstress,mid_strain,mid_stress)
1404 call elementstress_shell_mitc( ic_type, nn, 6, ecoord, fstrsolid%elements(icel)%gausses, edisp, &
1405 & ndstrain(1:nn,1:6), ndstress(1:nn,1:6), thick,-1.0d0, nlyr, &
1406 & ndtriad=triad_cur(1:9,1:nn), ndreftriad=triad_ref(1:9,1:nn), cdsys_id=cdsys_id, coords=coords)
1409 layer => fstrsolid%SHELL%LAYER(nlyr)%MINUS
1411 layer%STRAIN(6*(i-1)+k) = layer%STRAIN(6*(i-1)+k) + ndstrain(j,k)
1412 layer%STRESS(6*(i-1)+k) = layer%STRESS(6*(i-1)+k) + ndstress(j,k)
1413 layer%ESTRAIN(6*(icel-1)+k) = layer%ESTRAIN(6*(icel-1)+k) + ndstrain(j,k)/nn
1414 layer%ESTRESS(6*(icel-1)+k) = layer%ESTRESS(6*(icel-1)+k) + ndstress(j,k)/nn
1417 call fstr_add_shell_mid(fstrsolid%elements(icel),nlyr,nn,ndstrain,ndstress,mid_strain,mid_stress)
1419 ndstrain(1:nn,1:6) = mid_strain(1:nn,1:6)
1420 ndstress(1:nn,1:6) = mid_stress(1:nn,1:6)
1427 ic = hecmesh%elem_node_item(js+j)
1428 fstrsolid%STRAIN(6*(ic-1)+1:6*(ic-1)+6) = fstrsolid%STRAIN(6*(ic-1)+1:6*(ic-1)+6) + ndstrain(j,1:6)
1429 fstrsolid%STRESS(6*(ic-1)+1:6*(ic-1)+6) = fstrsolid%STRESS(6*(ic-1)+1:6*(ic-1)+6) + ndstress(j,1:6)
1433 nnumber(ic) = nnumber(ic) + 1
1436 fstrsolid%ESTRAIN(6*(icel-1)+1:6*(icel-1)+6) = fstrsolid%ESTRAIN(6*(icel-1)+1:6*(icel-1)+6) + estrain(1:6)
1437 fstrsolid%ESTRESS(6*(icel-1)+1:6*(icel-1)+6) = fstrsolid%ESTRESS(6*(icel-1)+1:6*(icel-1)+6) + estress(1:6)
1443 do i = 1, hecmesh%n_node
1444 if( nnumber(i) == 0 ) cycle
1445 fstrsolid%STRAIN(6*(i-1)+1:6*(i-1)+6) = fstrsolid%STRAIN(6*(i-1)+1:6*(i-1)+6) / nnumber(i)
1446 fstrsolid%STRESS(6*(i-1)+1:6*(i-1)+6) = fstrsolid%STRESS(6*(i-1)+1:6*(i-1)+6) / nnumber(i)
1452 do nlyr = 1, ntot_lyr
1453 do i = 1, hecmesh%n_node
1454 if( nnumber(i) == 0 ) cycle
1455 fstrsolid%SHELL%LAYER(nlyr)%PLUS%STRAIN(6*(i-1)+1:6*(i-1)+6) = &
1456 & fstrsolid%SHELL%LAYER(nlyr)%PLUS%STRAIN(6*(i-1)+1:6*(i-1)+6) / nnumber(i)
1457 fstrsolid%SHELL%LAYER(nlyr)%PLUS%STRESS(6*(i-1)+1:6*(i-1)+6) = &
1458 & fstrsolid%SHELL%LAYER(nlyr)%PLUS%STRESS(6*(i-1)+1:6*(i-1)+6) / nnumber(i)
1459 fstrsolid%SHELL%LAYER(nlyr)%PLUS%MISES(i) = &
1460 &
get_mises(fstrsolid%SHELL%LAYER(nlyr)%PLUS%STRESS(6*(i-1)+1:6*(i-1)+6))
1462 fstrsolid%SHELL%LAYER(nlyr)%MINUS%STRAIN(6*(i-1)+1:6*(i-1)+6) = &
1463 & fstrsolid%SHELL%LAYER(nlyr)%MINUS%STRAIN(6*(i-1)+1:6*(i-1)+6) / nnumber(i)
1464 fstrsolid%SHELL%LAYER(nlyr)%MINUS%STRESS(6*(i-1)+1:6*(i-1)+6) = &
1465 & fstrsolid%SHELL%LAYER(nlyr)%MINUS%STRESS(6*(i-1)+1:6*(i-1)+6) / nnumber(i)
1466 fstrsolid%SHELL%LAYER(nlyr)%MINUS%MISES(i) = &
1467 &
get_mises(fstrsolid%SHELL%LAYER(nlyr)%MINUS%STRESS(6*(i-1)+1:6*(i-1)+6))
1472 do i = 1, hecmesh%n_node
1473 fstrsolid%MISES(i) =
get_mises(fstrsolid%STRESS(6*(i-1)+1:6*(i-1)+6))
1475 do i = 1, hecmesh%n_elem
1476 fstrsolid%EMISES(i) =
get_mises(fstrsolid%ESTRESS(6*(i-1)+1:6*(i-1)+6))
1480 do i = 1, hecmesh%n_elem
1484 deallocate( nnumber )
1496 integer(kind=kint) :: i, flag
1497 real(kind=
kreal) :: tmat(3, 3), tvec(3), strain(6)
1500 if( fstrsolid%output_ctrl(3)%outinfo%on(19) .or. fstrsolid%output_ctrl(4)%outinfo%on(19) )
then
1501 if ( .not.
associated(res%PSTRESS) )
then
1502 allocate(res%PSTRESS( 3*hecmesh%n_node ))
1504 flag=ior(flag,b
'00000001')
1506 if( fstrsolid%output_ctrl(3)%outinfo%on(23) .or. fstrsolid%output_ctrl(4)%outinfo%on(23) )
then
1507 if ( .not.
associated(res%PSTRESS_VECT) )
then
1508 allocate(res%PSTRESS_VECT( 3*hecmesh%n_node ,3))
1510 flag=ior(flag,b
'00000010')
1512 if( fstrsolid%output_ctrl(3)%outinfo%on(21) .or. fstrsolid%output_ctrl(4)%outinfo%on(21) )
then
1513 if ( .not.
associated(res%PSTRAIN) )
then
1514 allocate(res%PSTRAIN( 3*hecmesh%n_node ))
1516 flag=ior(flag,b
'00000100')
1518 if( fstrsolid%output_ctrl(3)%outinfo%on(25) .or. fstrsolid%output_ctrl(4)%outinfo%on(25) )
then
1519 if ( .not.
associated(res%PSTRAIN_VECT) )
then
1520 allocate(res%PSTRAIN_VECT( 3*hecmesh%n_node ,3))
1522 flag=ior(flag,b
'00001000')
1524 if( fstrsolid%output_ctrl(3)%outinfo%on(20) .or. fstrsolid%output_ctrl(4)%outinfo%on(20) )
then
1525 if ( .not.
associated(res%EPSTRESS) )
then
1526 allocate(res%EPSTRESS( 3*hecmesh%n_elem ))
1528 flag=ior(flag,b
'00010000')
1530 if( fstrsolid%output_ctrl(3)%outinfo%on(24) .or. fstrsolid%output_ctrl(4)%outinfo%on(24) )
then
1531 if ( .not.
associated(res%EPSTRESS_VECT) )
then
1532 allocate(res%EPSTRESS_VECT( 3*hecmesh%n_elem ,3))
1534 flag=ior(flag,b
'00100000')
1536 if( fstrsolid%output_ctrl(3)%outinfo%on(22) .or. fstrsolid%output_ctrl(4)%outinfo%on(22) )
then
1537 if ( .not.
associated(res%EPSTRAIN) )
then
1538 allocate(res%EPSTRAIN( 3*hecmesh%n_elem ))
1540 flag=ior(flag,b
'01000000')
1542 if( fstrsolid%output_ctrl(3)%outinfo%on(26) .or. fstrsolid%output_ctrl(4)%outinfo%on(26) )
then
1543 if ( .not.
associated(res%EPSTRAIN_VECT) )
then
1544 allocate(res%EPSTRAIN_VECT( 3*hecmesh%n_elem ,3))
1546 flag=ior(flag,b
'10000000')
1549 if (iand(flag,b
'00000011') /= 0)
then
1550 do i = 1, hecmesh%n_node
1551 call get_principal(res%STRESS(6*i-5:6*i), tvec, tmat)
1552 if (iand(flag,b
'00000001') /= 0) res%PSTRESS(3*(i-1)+1:3*(i-1)+3)=tvec
1553 if (iand(flag,b
'00000010') /= 0) res%PSTRESS_VECT(3*(i-1)+1:3*(i-1)+3,1:3)=tmat
1556 if (iand(flag,b
'00001100') /= 0)
then
1557 do i = 1, hecmesh%n_node
1558 strain(1:6) = res%STRAIN(6*i-5:6*i)
1559 strain(4:6) = 0.5d0*strain(4:6)
1560 call get_principal(strain, tvec, tmat)
1561 if (iand(flag,b
'00000100') /= 0) res%PSTRAIN(3*(i-1)+1:3*(i-1)+3)=tvec
1562 if (iand(flag,b
'00001000') /= 0) res%PSTRAIN_VECT(3*(i-1)+1:3*(i-1)+3,1:3)=tmat
1566 if (iand(flag,b
'00110000') /= 0)
then
1567 do i = 1, hecmesh%n_elem
1568 call get_principal( res%ESTRESS(6*i-5:6*i), tvec, tmat)
1569 if (iand(flag,b
'00010000') /= 0) res%EPSTRESS(3*(i-1)+1:3*(i-1)+3)=tvec
1570 if (iand(flag,b
'00100000') /= 0) res%EPSTRESS_VECT(3*(i-1)+1:3*(i-1)+3,1:3)=tmat
1573 if (iand(flag,b
'11000000') /= 0)
then
1574 do i = 1, hecmesh%n_elem
1575 strain(1:6) = res%ESTRAIN(6*i-5:6*i)
1576 strain(4:6) = 0.5d0*strain(4:6)
1577 call get_principal(strain, tvec, tmat)
1578 if (iand(flag,b
'01000000') /= 0) res%EPSTRAIN(3*(i-1)+1:3*(i-1)+3)=tvec
1579 if (iand(flag,b
'10000000') /= 0) res%EPSTRAIN_VECT(3*(i-1)+1:3*(i-1)+3,1:3)=tmat
This module encapsulate the basic functions of all elements provide by this software.
subroutine getshapefunc(fetype, localcoord, func)
Calculate the shape function in natural coordinate system.
subroutine getquadpoint(fetype, np, pos)
Fetch the coordinate of gauss point.
subroutine getshellthicknessquadpoint(etype, np, zeta)
Fetch the through-thickness quadrature coordinate of a shell element.
integer function numofshellthicknessquadpoints(etype)
Obtains the number of through-thickness quadrature points of a shell element.
integer(kind=4), parameter kreal
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 functions to calculation nodal stress.
subroutine get_shell_layer_gauss_average(element, estrain, estress)
subroutine set_shell_layer_surface_results(element, fstrSOLID, icel)
subroutine fstr_stress_add_shelllyr(nn, fstrSOLID, icel, nodLOCAL, nlyr, strain, stress, flag)
subroutine nodalstress_shellj2(element, nn, fstrSOLID, icel, nodLOCAL, strain, stress, estrain, estress)
Recover nodal results from the converged shell material histories.
subroutine fstr_nodalstress3d(hecMESH, fstrSOLID)
Calculate NODAL STRESS of solid elements.
subroutine fstr_nodalstress6d(hecMESH, fstrSOLID)
Calculate NODAL STRESS of shell elements.
real(kind=kreal) function get_mises(s)
subroutine fstr_nodalstress3d_c3d4_sesns(hecMESH, fstrSOLID, nnumber, Nodal_STRAIN, Nodal_STRESS, Elemental_STRAIN, Elemental_STRESS)
subroutine fstr_nodalstress2d(hecMESH, fstrSOLID)
Calculate NODAL STRESS of plane elements.
subroutine fstr_add_shell_mid(element, nlyr, nn, strain, stress, mid_strain, mid_stress)
Adds one layer surface's nodal values of an element, with half the layer's weight,...
subroutine fstr_getavg_shell(fstrSOLID, icel, estrain, estress)
The element's mid-surface values. The nodal ones come from fstr_add_shell_mid: the layers' nodal arra...
subroutine get_shell_layer_surface_average(element, ilayer, flag, estrain, estress, eplstrain)
subroutine fstr_get_shell_gauss_output(hecMESH, fstrSOLID, icel, k, strain, stress)
Read stored shell tensors or evaluate one elastic thickness point without changing history.
subroutine make_principal(fstrSOLID, hecMESH, RES)
integer(kind=kint) function search_idx_senes(irow, asect, nid, sid)
This module defines common data and basic structures for analysis.
integer(kind=kint), parameter kel341sesns
subroutine fstr_get_solid_quad(etype, nstate, quad)
Points and weights of the material states of an element, chosen by their number. The rule changes onl...
logical function fstr_element_is_reduced(element)
Whether the element holds the material states of a reduced rule.
subroutine get_coordsys(cdsys_ID, hecMESH, fstrSOLID, coords, icel)
This subroutine fetch coords defined by local coordinate system.
subroutine fstr_solid_phys_clear(fstrSOLID)
This module manages step information.
This modules just summarizes all modules used in static analysis.
This modules defines a structure to record history dependent parameter in static analysis.
integer(kind=kint) function fstr_shell_output_point_count(element)
Number of shell thickness-point tensors available for result output.
real(kind=kreal) function fstr_element_average_plstrain(element)
Average equivalent plastic strain over the active quadrature history. Average shell history points eq...
Data for STATIC ANSLYSIS (fstrSOLID)
All data should be recorded in every elements.
All data should be recorded in every quadrature points.