7 use hecmw,
only : kint, kreal, hecmw_abort, hecmw_comm_get_comm
21 integer(kind=kint),
parameter :: MAX_TYING_TERMS = 64
23 integer(kind=kint),
parameter :: SHELL_XI = 1_kint
24 integer(kind=kint),
parameter :: SHELL_ETA = 2_kint
25 integer(kind=kint),
parameter :: SHELL_ZETA = 3_kint
67 pure function outer_product3(a, b)
result(ab)
69 real(kind = kreal),
intent(in) :: a(3), b(3)
70 real(kind = kreal) :: ab(3, 3)
79 end function outer_product3
83 pure function shellmitc_symmetriccomponents(matrix)
result(components)
84 real(kind=kreal),
intent(in) :: matrix(3, 3)
85 real(kind=kreal) :: components(5)
87 components = (/ matrix(1, 1), matrix(2, 2), matrix(1, 2)+matrix(2, 1), matrix(2, 3)+matrix(3, 2), &
88 matrix(3, 1)+matrix(1, 3) /)
89 end function shellmitc_symmetriccomponents
93 pure real(kind=kreal) function shellmitc_covariantjacobian(covariant_basis)
94 real(kind=kreal),
intent(in) :: covariant_basis(3, 3)
96 shellmitc_covariantjacobian = covariant_basis(1, shell_xi) &
97 *(covariant_basis(2, shell_eta)*covariant_basis(3, shell_zeta) &
98 -covariant_basis(3, shell_eta)*covariant_basis(2, shell_zeta)) +covariant_basis(2, shell_xi) &
99 *(covariant_basis(3, shell_eta)*covariant_basis(1, shell_zeta) &
100 -covariant_basis(1, shell_eta)*covariant_basis(3, shell_zeta)) +covariant_basis(3, shell_xi) &
101 *(covariant_basis(1, shell_eta)*covariant_basis(2, shell_zeta) &
102 -covariant_basis(2, shell_eta)*covariant_basis(1, shell_zeta))
103 end function shellmitc_covariantjacobian
105 pure real(kind=kreal) function shellmitc_tyingzeta(etype, zeta)
106 integer(kind=kint),
intent(in) :: etype
107 real(kind=kreal),
intent(in) :: zeta
109 shellmitc_tyingzeta = 0.0d0
111 end function shellmitc_tyingzeta
116 subroutine shellmitc_resolveformulation(etype, nn, ndof, gauss, has_nodal_state, &
117 has_element_state, require_layer_state, kinematics, ndof_shell, finite_rotation, &
118 use_director_tangent, use_green_lagrange, add_geometric_stiffness, update_state)
123 integer(kind=kint),
intent(in) :: etype, nn, ndof
124 type(tGaussStatus),
intent(in) :: gauss
125 logical,
intent(in) :: has_nodal_state, has_element_state, require_layer_state
126 integer(kind=kint),
intent(out) :: kinematics, ndof_shell
127 logical,
intent(out) :: finite_rotation, use_director_tangent, use_green_lagrange
128 logical,
intent(out) :: add_geometric_stiffness, update_state
129 logical :: plane_stress_j2
131 kinematics = gauss%pMaterial%nlgeom_flag
133 ndof_shell = min(ndof, 6_kint)
136 plane_stress_j2 = fstr_uses_plane_stress_j2_shell(etype, nn, gauss%pMaterial)
137 use_director_tangent = finite_rotation
138 use_green_lagrange = kinematics ==
totallag .and. finite_rotation
140 update_state = (finite_rotation .or. plane_stress_j2) .and. has_element_state
143 if( .not. finite_rotation )
call shellmitc_abortnonlinearunsupported(etype)
144 if( require_layer_state .and. .not. update_state )
then
145 call shellmitc_abortnonlinearunsupported(etype)
148 if(
iselastoplastic(gauss%pMaterial%mtype) .and. .not.plane_stress_j2 )
then
149 call shellmitc_abortelastoplasticunsupported(etype)
151 end subroutine shellmitc_resolveformulation
156 use_director_tangent, need_second_tangent, ecoord, nodal_state, ndtriad, ndreftriad, &
157 ndcurtriad, evaluation_coords, v1, v2, v3, director, reference_director, director_tangent, director_second_tangent)
161 integer(kind=kint),
intent(in) :: etype, nn, kinematics
162 real(kind=kreal),
intent(in) :: thick, ecoord(3, nn), nodal_state(6, nn)
163 logical,
intent(in) :: finite_rotation, use_director_tangent, need_second_tangent
164 real(kind=kreal),
intent(in),
optional :: ndtriad(9, nn), ndreftriad(9, nn), ndcurtriad(9, nn)
165 real(kind=kreal),
intent(out) :: evaluation_coords(3, nn)
166 real(kind=kreal),
intent(out) :: v1(3, nn), v2(3, nn), v3(3, nn)
167 real(kind=kreal),
intent(out) :: director(3, nn), reference_director(3, nn)
168 real(kind=kreal),
intent(out) :: director_tangent(3, 3, nn)
169 real(kind=kreal),
intent(out) :: director_second_tangent(3, 3, 3, nn)
171 evaluation_coords = ecoord
172 if( kinematics ==
updatelag ) evaluation_coords = evaluation_coords+nodal_state(1:3, :)
173 call shellmitc_setupnodaldirectors(etype, nn, thick, kinematics, evaluation_coords, &
174 nodal_state, finite_rotation, use_director_tangent, need_second_tangent, ndtriad, &
175 ndreftriad, ndcurtriad, v1, v2, v3, director, reference_director, director_tangent, director_second_tangent)
183 integer(kind=kint),
intent(in) :: nn
184 real(kind=kreal),
intent(in) :: coords(3, nn), director(3, nn)
185 real(kind=kreal),
intent(in) :: zeta, shapefunc(nn), shapederiv(nn, 2)
186 real(kind=kreal),
intent(out) :: covariant_basis(3, 3)
188 covariant_basis(:, shell_xi:shell_eta) = matmul(coords+zeta*director, shapederiv)
189 covariant_basis(:, shell_zeta) = matmul(director, shapefunc)
195 subroutine shellmitc_directorcontributions(nn, director, zeta, shapefunc, shapederiv, director_contribution)
198 integer(kind=kint),
intent(in) :: nn
199 real(kind=kreal),
intent(in) :: director(3, nn)
200 real(kind=kreal),
intent(in) :: zeta, shapefunc(nn), shapederiv(nn, 2)
201 real(kind=kreal),
intent(out) :: director_contribution(3, nn, 3)
206 director_contribution(:, node, shell_xi) = zeta*shapederiv(node, shell_xi)*director(:, node)
207 director_contribution(:, node, shell_eta) = zeta*shapederiv(node, shell_eta)*director(:, node)
208 director_contribution(:, node, shell_zeta) = shapefunc(node)*director(:, node)
210 end subroutine shellmitc_directorcontributions
211 pure subroutine shellmitc_basisfromcovariant(covariant_basis, local_basis, reciprocal_basis, det)
212 real(kind=kreal),
intent(in) :: covariant_basis(3, 3)
213 real(kind=kreal),
intent(out) :: local_basis(3, 3), reciprocal_basis(3, 3)
214 real(kind=kreal),
intent(out) :: det
216 real(kind=kreal) :: det_inv, basis_norm
218 det = shellmitc_covariantjacobian(covariant_basis)
221 reciprocal_basis(1, shell_xi) = det_inv *(covariant_basis(2, shell_eta)*covariant_basis(3, shell_zeta) &
222 -covariant_basis(3, shell_eta)*covariant_basis(2, shell_zeta))
223 reciprocal_basis(2, shell_xi) = det_inv *(covariant_basis(3, shell_eta)*covariant_basis(1, shell_zeta) &
224 -covariant_basis(1, shell_eta)*covariant_basis(3, shell_zeta))
225 reciprocal_basis(3, shell_xi) = det_inv *(covariant_basis(1, shell_eta)*covariant_basis(2, shell_zeta) &
226 -covariant_basis(2, shell_eta)*covariant_basis(1, shell_zeta))
227 reciprocal_basis(1, shell_eta) = det_inv *(covariant_basis(2, shell_zeta)*covariant_basis(3, shell_xi) &
228 -covariant_basis(3, shell_zeta)*covariant_basis(2, shell_xi))
229 reciprocal_basis(2, shell_eta) = det_inv *(covariant_basis(3, shell_zeta)*covariant_basis(1, shell_xi) &
230 -covariant_basis(1, shell_zeta)*covariant_basis(3, shell_xi))
231 reciprocal_basis(3, shell_eta) = det_inv *(covariant_basis(1, shell_zeta)*covariant_basis(2, shell_xi) &
232 -covariant_basis(2, shell_zeta)*covariant_basis(1, shell_xi))
233 reciprocal_basis(1, shell_zeta) = det_inv *(covariant_basis(2, shell_xi)*covariant_basis(3, shell_eta) &
234 -covariant_basis(3, shell_xi)*covariant_basis(2, shell_eta))
235 reciprocal_basis(2, shell_zeta) = det_inv *(covariant_basis(3, shell_xi)*covariant_basis(1, shell_eta) &
236 -covariant_basis(1, shell_xi)*covariant_basis(3, shell_eta))
237 reciprocal_basis(3, shell_zeta) = det_inv *(covariant_basis(1, shell_xi)*covariant_basis(2, shell_eta) &
238 -covariant_basis(2, shell_xi)*covariant_basis(1, shell_eta))
240 basis_norm = dsqrt(dot_product(covariant_basis(:, shell_zeta), covariant_basis(:, shell_zeta)))
241 local_basis(:, shell_zeta) = covariant_basis(:, shell_zeta)/basis_norm
242 local_basis(1, shell_xi) = covariant_basis(2, shell_eta)*local_basis(3, shell_zeta) &
243 -covariant_basis(3, shell_eta)*local_basis(2, shell_zeta)
244 local_basis(2, shell_xi) = covariant_basis(3, shell_eta)*local_basis(1, shell_zeta) &
245 -covariant_basis(1, shell_eta)*local_basis(3, shell_zeta)
246 local_basis(3, shell_xi) = covariant_basis(1, shell_eta)*local_basis(2, shell_zeta) &
247 -covariant_basis(2, shell_eta)*local_basis(1, shell_zeta)
248 basis_norm = dsqrt(dot_product(local_basis(:, shell_xi), local_basis(:, shell_xi)))
249 local_basis(:, shell_xi) = local_basis(:, shell_xi)/basis_norm
250 local_basis(1, shell_eta) = local_basis(2, shell_zeta)*local_basis(3, shell_xi) &
251 -local_basis(3, shell_zeta)*local_basis(2, shell_xi)
252 local_basis(2, shell_eta) = local_basis(3, shell_zeta)*local_basis(1, shell_xi) &
253 -local_basis(1, shell_zeta)*local_basis(3, shell_xi)
254 local_basis(3, shell_eta) = local_basis(1, shell_zeta)*local_basis(2, shell_xi) &
255 -local_basis(2, shell_zeta)*local_basis(1, shell_xi)
256 basis_norm = dsqrt(dot_product(local_basis(:, shell_eta), local_basis(:, shell_eta)))
257 local_basis(:, shell_eta) = local_basis(:, shell_eta)/basis_norm
258 end subroutine shellmitc_basisfromcovariant
264 subroutine shellmitc_preparepointkinematics(etype, nn, use_green_lagrange, reference_coords, &
265 evaluation_coords, translation, director, reference_director, zeta, shapefunc, &
266 shapederiv, covariant_basis, tangent_basis, reciprocal_basis, local_basis, &
267 material_reciprocal_basis, material_local_basis, integration_jacobian, director_contribution)
270 integer(kind=kint),
intent(in) :: etype, nn
271 logical,
intent(in) :: use_green_lagrange
272 real(kind=kreal),
intent(in) :: reference_coords(3, nn), evaluation_coords(3, nn)
273 real(kind=kreal),
intent(in) :: translation(3, nn), director(3, nn)
274 real(kind=kreal),
intent(in) :: reference_director(3, nn)
275 real(kind=kreal),
intent(in) :: zeta, shapefunc(nn), shapederiv(nn, 2)
276 real(kind=kreal),
intent(out) :: covariant_basis(3, 3), tangent_basis(3, 2)
277 real(kind=kreal),
intent(out) :: reciprocal_basis(3, 3), local_basis(3, 3)
278 real(kind=kreal),
intent(out) :: material_reciprocal_basis(3, 3)
279 real(kind=kreal),
intent(out) :: material_local_basis(3, 3)
280 real(kind=kreal),
intent(out) :: integration_jacobian
281 real(kind=kreal),
intent(out) :: director_contribution(3, nn, 3)
283 real(kind=kreal) :: reference_basis(3, 3), translation_gradient(3, 2)
284 real(kind=kreal) :: current_jacobian, material_jacobian
286 call shellmitc_directorcontributions(nn, director, zeta, shapefunc, shapederiv, director_contribution)
288 if( abs(shellmitc_covariantjacobian(covariant_basis)) <= tiny(1.0d0) ) &
289 stop
"Invalid shell Jacobian"
290 if( use_green_lagrange )
then
291 translation_gradient = matmul(translation, shapederiv)
292 covariant_basis(:, shell_xi:shell_eta) = covariant_basis(:, shell_xi:shell_eta)+translation_gradient
294 call shellmitc_basisfromcovariant(covariant_basis, local_basis, reciprocal_basis, current_jacobian)
296 tangent_basis = covariant_basis(:, shell_xi:shell_eta)
297 material_local_basis = local_basis
298 material_reciprocal_basis = reciprocal_basis
299 integration_jacobian = current_jacobian
301 if( .not. use_green_lagrange )
return
303 call shellmitc_covariantbasis(nn, reference_coords, reference_director, zeta, shapefunc, shapederiv, reference_basis)
304 call shellmitc_basisfromcovariant(reference_basis, material_local_basis, material_reciprocal_basis, material_jacobian)
305 integration_jacobian = shellmitc_covariantjacobian(reference_basis)
309 tangent_basis = tangent_basis + translation_gradient
311 covariant_basis(:, shell_xi:shell_eta) = covariant_basis(:, shell_xi:shell_eta) + translation_gradient
312 tangent_basis = covariant_basis(:, shell_xi:shell_eta)
314 end subroutine shellmitc_preparepointkinematics
318 subroutine shellmitc_evaluatepointstrain(nn, zeta, shapefunc, shapederiv, translation, &
319 director_increment, covariant_basis, use_green_lagrange, strain, reference_basis, &
320 current_basis, reference_jacobian, current_jacobian)
323 integer(kind=kint),
intent(in) :: nn
324 real(kind=kreal),
intent(in) :: zeta, shapefunc(nn), shapederiv(nn, 2)
325 real(kind=kreal),
intent(in) :: translation(3, nn), director_increment(3, nn)
326 real(kind=kreal),
intent(in) :: covariant_basis(3, 3)
327 logical,
intent(in) :: use_green_lagrange
328 real(kind=kreal),
intent(out) :: strain(5)
329 real(kind=kreal),
intent(out) :: reference_basis(3, 3), current_basis(3, 3)
330 real(kind=kreal),
intent(out) :: reference_jacobian, current_jacobian
332 real(kind=kreal) :: displacement_gradient(3, 3), translation_gradient(3, 2)
334 displacement_gradient(:, shell_xi:shell_eta) = matmul(translation+zeta*director_increment, shapederiv)
335 displacement_gradient(:, shell_zeta) = matmul(director_increment, shapefunc)
337 reference_basis = covariant_basis
338 current_basis = covariant_basis
340 if( use_green_lagrange )
then
341 translation_gradient = matmul(translation, shapederiv)
342 current_basis(:, shell_xi:shell_eta) = covariant_basis(:, shell_xi:shell_eta)+translation_gradient
343 reference_basis = current_basis-displacement_gradient
345 strain = 0.5d0*shellmitc_symmetriccomponents( matmul(transpose(current_basis), current_basis) &
346 -matmul(transpose(reference_basis), reference_basis))
348 strain = shellmitc_symmetriccomponents( matmul(transpose(covariant_basis), displacement_gradient))
351 reference_jacobian = shellmitc_covariantjacobian(reference_basis)
352 current_jacobian = shellmitc_covariantjacobian(current_basis)
354 end subroutine shellmitc_evaluatepointstrain
358 real(kind=kreal)
function shellplanestresstracecoeff( gauss, n_layer )
364 integer(kind=kint),
intent(in) :: n_layer
366 real(kind=kreal) :: nu, outa(2)
370 shellplanestresstracecoeff = 1.0d0
371 if( .not.
associated( gauss%pMaterial ) )
return
373 stop
"MITC shell UL orthotropic trace correction is not supported"
375 nu = gauss%pMaterial%variables(
m_poisson)
376 call fetch_tabledata(
mc_isoelastic, gauss%pMaterial%dict, outa, ierr)
377 if(
associated( gauss%pMaterial%shell_var ) )
then
378 if( n_layer >= 1 .and. n_layer <=
size( gauss%pMaterial%shell_var ) )
then
379 if( gauss%pMaterial%shell_var(n_layer)%ortho == 0 )
then
381 nu = gauss%pMaterial%shell_var(n_layer)%pp
386 stop
"MITC shell UL orthotropic trace correction is not supported"
388 else if( .not. ierr )
then
391 else if( .not. ierr )
then
395 if( abs(1.0d0-nu) > 1.0d-12 )
then
396 shellplanestresstracecoeff = (1.0d0-2.0d0*nu)/(1.0d0-nu)
399 end function shellplanestresstracecoeff
407 integer(kind=kint),
intent(in) :: etype, nn
408 real(kind=kreal),
intent(in) :: thick, elem(3, nn)
409 real(kind=kreal),
intent(out) :: v1(3, nn), v2(3, nn), v3(3, nn), director(3, nn)
412 real(kind=kreal) :: naturalcoord(2), nncoord(nn, 2), shapederiv(nn, 2)
413 real(kind=kreal) :: g1(3), g2(3), e0(3), normv
418 e0 = matmul(elem, shapederiv(:, 1))
421 naturalcoord = nncoord(nb, :)
423 g1 = matmul(elem, shapederiv(:, 1))
424 g2 = matmul(elem, shapederiv(:, 2))
427 normv = dsqrt(dot_product(v3(:, nb), v3(:, nb)))
428 v3(:, nb) = v3(:, nb)/normv
431 normv = dsqrt(dot_product(v2(:, nb), v2(:, nb)))
432 if (normv > 1.0d-15)
then
433 v2(:, nb) = v2(:, nb)/normv
435 normv = dsqrt(dot_product(v1(:, nb), v1(:, nb)))
436 v1(:, nb) = v1(:, nb)/normv
438 v1(:, nb) = (/ 0.0d0, 0.0d0, -1.0d0 /)
439 v2(:, nb) = (/ 0.0d0, 1.0d0, 0.0d0 /)
443 normv = dsqrt(dot_product(v3(:, nb), v3(:, nb)))
444 v3(:, nb) = v3(:, nb)/normv
445 director(:, nb) = 0.5d0*thick*v3(:, nb)
451 subroutine shellmitc_buildinterpolationmatrix(nn, ndof, zeta, shapefunc, director, N)
454 integer(kind=kint),
intent(in) :: nn, ndof
455 real(kind=kreal),
intent(in) :: zeta, shapefunc(nn), director(3, nn)
456 real(kind=kreal),
intent(out) :: n(3, ndof*nn)
459 real(kind=kreal) :: urot(3)
464 n(1, jsize+1) = shapefunc(nb)
465 n(2, jsize+2) = shapefunc(nb)
466 n(3, jsize+3) = shapefunc(nb)
468 urot = zeta*shapefunc(nb)*director(:, nb)
473 end subroutine shellmitc_buildinterpolationmatrix
480 subroutine shellmitc_setupnodaldirectors(etype, nn, thick, flag, elem, shell_disp, &
481 finite_rotation_director, use_director_tangent, need_second_tangent, ndtriad, ndreftriad, ndcurtriad, &
482 v1, v2, v3, a_over_2_v3, a_over_2_v3_ref, a_over_2_v3_deriv, a_over_2_v3_second)
486 integer,
intent(in) :: flag
487 integer(kind=kint),
intent(in) :: etype, nn
488 real(kind=kreal),
intent(in) :: thick, elem(3, nn), shell_disp(6, nn)
489 logical,
intent(in) :: finite_rotation_director, use_director_tangent, need_second_tangent
490 real(kind=kreal),
intent(in),
optional :: ndtriad(9, nn), ndreftriad(9, nn), ndcurtriad(9, nn)
491 real(kind=kreal),
intent(out) :: v1(3, nn), v2(3, nn), v3(3, nn)
492 real(kind=kreal),
intent(out) :: a_over_2_v3(3, nn), a_over_2_v3_ref(3, nn)
493 real(kind=kreal),
intent(out) :: a_over_2_v3_deriv(3, 3, nn), a_over_2_v3_second(3, 3, 3, nn)
496 real(kind=kreal) :: director_ref(3), rotmat(3, 3)
497 real(kind=kreal) :: nddirector(3, nn), ndrefdirector(3, nn), ndcurdirector(3, nn)
498 logical :: has_nddirector, has_ndrefdirector, has_ndcurdirector
500 has_nddirector =
present(ndtriad)
501 has_ndrefdirector =
present(ndreftriad)
502 has_ndcurdirector =
present(ndcurtriad)
503 if (has_nddirector) nddirector(1:3, 1:nn) = 0.5d0*thick*ndtriad(7:9, 1:nn)
504 if (has_ndrefdirector) ndrefdirector(1:3, 1:nn) = 0.5d0*thick*ndreftriad(7:9, 1:nn)
505 if (has_ndcurdirector) ndcurdirector(1:3, 1:nn) = 0.5d0*thick*ndcurtriad(7:9, 1:nn)
507 a_over_2_v3_deriv = 0.0d0
508 a_over_2_v3_second = 0.0d0
512 a_over_2_v3_ref(:, nb) = a_over_2_v3(:, nb)
513 if (finite_rotation_director .and. flag ==
updatelag .and. has_ndcurdirector)
then
514 a_over_2_v3_ref(:, nb) = ndcurdirector(:, nb)
515 else if (finite_rotation_director .and. has_ndrefdirector)
then
516 a_over_2_v3_ref(:, nb) = ndrefdirector(:, nb)
519 director_ref = a_over_2_v3_ref(:, nb)
520 if (finite_rotation_director)
then
521 if (has_nddirector)
then
522 a_over_2_v3(:, nb) = nddirector(:, nb)
525 a_over_2_v3(:, nb) = matmul(rotmat, director_ref)
527 if (use_director_tangent)
then
530 if( need_second_tangent )
then
531 call shelldirectorincrementalsecondderiv(a_over_2_v3(:, nb), a_over_2_v3_second(:, :, :, nb))
536 if (.not. use_director_tangent)
then
540 end subroutine shellmitc_setupnodaldirectors
546 zeta_tying, elem, shell_disp, director, director_tangent, use_green_lagrange, &
547 use_director_tangent, point_B, point_basis_variation, director_second_tangent, point_director_second_variation)
550 integer(kind=kint),
intent(in) :: etype, nn, ndof, tying_set, tying_point
551 real(kind=kreal),
intent(in) :: zeta_tying
552 real(kind=kreal),
intent(in) :: elem(3, nn), shell_disp(6, nn), director(3, nn)
553 real(kind=kreal),
intent(in) :: director_tangent(3, 3, nn)
554 logical,
intent(in) :: use_green_lagrange, use_director_tangent
555 real(kind=kreal),
intent(out) :: point_b(5, ndof*nn)
556 real(kind=kreal),
intent(out) :: point_basis_variation(3, ndof*nn, 3)
557 real(kind=kreal),
intent(in),
optional :: director_second_tangent(3, 3, 3, nn)
558 real(kind=kreal),
intent(out),
optional :: point_director_second_variation(5, 3, 3, nn)
560 real(kind=kreal) :: naturalcoord(2), shapefunc(nn), shapederiv(nn, 2)
561 real(kind=kreal) :: director_contribution(3, nn, 3)
562 real(kind=kreal) :: kinematic_basis(3, 3), membrane_basis(3, 2)
563 real(kind=kreal) :: translation_gradient(3, 2)
565 call gettyingpoint(etype, tying_set, tying_point, naturalcoord)
569 call shellmitc_directorcontributions(nn, director, zeta_tying, shapefunc, shapederiv, director_contribution)
571 if( abs(shellmitc_covariantjacobian(kinematic_basis)) <= tiny(1.0d0) ) &
572 stop
"Invalid shell Jacobian"
574 membrane_basis = kinematic_basis(:, shell_xi:shell_eta)
575 if( use_green_lagrange )
then
576 translation_gradient = matmul(shell_disp(1:3, :), shapederiv)
578 membrane_basis = membrane_basis+translation_gradient
580 kinematic_basis(:, shell_xi:shell_eta) = kinematic_basis(:, shell_xi:shell_eta)+translation_gradient
581 membrane_basis = kinematic_basis(:, shell_xi:shell_eta)
585 call shellmitc_buildfirststrainvariation(nn, ndof, zeta_tying, shapefunc, shapederiv, &
586 kinematic_basis, membrane_basis, director_contribution, director_tangent, &
587 use_director_tangent, point_b, point_basis_variation)
589 if( use_director_tangent .and.
present(director_second_tangent) .and.
present(point_director_second_variation) )
then
590 call shellmitc_builddirectorsecondvariation(nn, zeta_tying, shapefunc, shapederiv, &
591 kinematic_basis, director_second_tangent, point_director_second_variation)
597 subroutine shellmitc_evaluatetyingbatzeta(etype, nn, ndof, zeta_tying, elem, shell_disp, &
598 director, director_tangent, use_green_lagrange, use_director_tangent, tying_B)
601 integer(kind=kint),
intent(in) :: etype, nn, ndof
602 real(kind=kreal),
intent(in) :: zeta_tying
603 real(kind=kreal),
intent(in) :: elem(3, nn), shell_disp(6, nn), director(3, nn)
604 real(kind=kreal),
intent(in) :: director_tangent(3, 3, nn)
605 logical,
intent(in) :: use_green_lagrange, use_director_tangent
606 real(kind=kreal),
intent(out) :: tying_b(5, ndof*nn, 6, 3)
608 integer :: tying_set, tying_point
609 real(kind=kreal) :: point_b(5, ndof*nn)
610 real(kind=kreal) :: point_basis_variation(3, ndof*nn, 3)
616 zeta_tying, elem, shell_disp, director, director_tangent, use_green_lagrange, &
617 use_director_tangent, point_b, point_basis_variation)
618 tying_b(:, :, tying_point, tying_set) = point_b
621 end subroutine shellmitc_evaluatetyingbatzeta
625 subroutine shellmitc_evaluatetyingstiffnessdataatzeta(etype, nn, ndof, zeta_tying, &
626 elem, shell_disp, director, director_tangent, director_second_tangent, &
627 use_green_lagrange, use_director_tangent, tying_B, tying_basis_variation, tying_director_second_variation)
630 integer(kind=kint),
intent(in) :: etype, nn, ndof
631 real(kind=kreal),
intent(in) :: zeta_tying
632 real(kind=kreal),
intent(in) :: elem(3, nn), shell_disp(6, nn), director(3, nn)
633 real(kind=kreal),
intent(in) :: director_tangent(3, 3, nn)
634 real(kind=kreal),
intent(in) :: director_second_tangent(3, 3, 3, nn)
635 logical,
intent(in) :: use_green_lagrange, use_director_tangent
636 real(kind=kreal),
intent(out) :: tying_b(5, ndof*nn, 6, 3)
637 real(kind=kreal),
intent(out) :: tying_basis_variation(3, ndof*nn, 3, 6, 3)
638 real(kind=kreal),
intent(out) :: tying_director_second_variation(5, 3, 3, nn, 6, 3)
640 integer :: tying_set, tying_point
641 real(kind=kreal) :: point_b(5, ndof*nn)
642 real(kind=kreal) :: point_basis_variation(3, ndof*nn, 3)
643 real(kind=kreal) :: point_director_second_variation(5, 3, 3, nn)
646 tying_basis_variation = 0.0d0
647 tying_director_second_variation = 0.0d0
651 if( use_director_tangent )
then
653 zeta_tying, elem, shell_disp, director, director_tangent, use_green_lagrange, &
654 use_director_tangent, point_b, point_basis_variation, director_second_tangent, point_director_second_variation)
655 tying_director_second_variation(:, :, :, :, tying_point, tying_set) = point_director_second_variation
658 zeta_tying, elem, shell_disp, director, director_tangent, use_green_lagrange, &
659 use_director_tangent, point_b, point_basis_variation)
661 tying_b(:, :, tying_point, tying_set) = point_b
662 tying_basis_variation(:, :, :, tying_point, tying_set) = point_basis_variation
665 end subroutine shellmitc_evaluatetyingstiffnessdataatzeta
669 subroutine shellmitc_buildfirststrainvariation(nn, ndof, zeta, shapefunc, shapederiv, &
670 kinematic_basis, membrane_basis, director_contribution, director_tangent, &
671 use_director_tangent, strain_variation, basis_variation)
674 integer(kind=kint),
intent(in) :: nn, ndof
675 real(kind=kreal),
intent(in) :: zeta, shapefunc(nn), shapederiv(nn, 2)
676 real(kind=kreal),
intent(in) :: kinematic_basis(3, 3), membrane_basis(3, 2)
677 real(kind=kreal),
intent(in) :: director_contribution(3, nn, 3)
678 real(kind=kreal),
intent(in) :: director_tangent(3, 3, nn)
679 logical,
intent(in) :: use_director_tangent
680 real(kind=kreal),
intent(out) :: strain_variation(5, ndof*nn)
681 real(kind=kreal),
intent(out) :: basis_variation(3, ndof*nn, 3)
683 integer :: node, component, dof_index, rotation_start
685 basis_variation = 0.0d0
687 do component = 1, min(3, ndof)
688 dof_index = ndof*(node-1)+component
689 basis_variation(component, dof_index, shell_xi:shell_eta) = shapederiv(node, :)
693 rotation_start = ndof*(node-1)+4
694 if( use_director_tangent )
then
695 basis_variation(:, rotation_start:rotation_start+2, shell_xi) = &
696 shapederiv(node, shell_xi)*zeta*director_tangent(:, :, node)
697 basis_variation(:, rotation_start:rotation_start+2, shell_eta) = &
698 shapederiv(node, shell_eta)*zeta*director_tangent(:, :, node)
699 basis_variation(:, rotation_start:rotation_start+2, shell_zeta) = shapefunc(node)*director_tangent(:, :, node)
702 basis_variation(:, rotation_start:rotation_start+2, shell_xi) = &
704 basis_variation(:, rotation_start:rotation_start+2, shell_eta) = &
706 basis_variation(:, rotation_start:rotation_start+2, shell_zeta) = &
711 do dof_index = 1, ndof*nn
712 strain_variation(:, dof_index) = shellmitc_symmetriccomponents( &
713 matmul(transpose(basis_variation(:, dof_index, :)), kinematic_basis))
719 do component = 1, min(3, ndof)
720 dof_index = ndof*(node-1)+component
721 strain_variation(1, dof_index) = shapederiv(node, shell_xi)*membrane_basis(component, shell_xi)
722 strain_variation(2, dof_index) = shapederiv(node, shell_eta)*membrane_basis(component, shell_eta)
723 strain_variation(3, dof_index) = shapederiv(node, shell_xi)*membrane_basis(component, shell_eta) &
724 +shapederiv(node, shell_eta)*membrane_basis(component, shell_xi)
727 end subroutine shellmitc_buildfirststrainvariation
731 subroutine shellmitc_builddirectorsecondvariation(nn, zeta, shapefunc, shapederiv, &
732 kinematic_basis, director_second_tangent, director_second_variation)
735 integer(kind=kint),
intent(in) :: nn
736 real(kind=kreal),
intent(in) :: zeta, shapefunc(nn), shapederiv(nn, 2)
737 real(kind=kreal),
intent(in) :: kinematic_basis(3, 3)
738 real(kind=kreal),
intent(in) :: director_second_tangent(3, 3, 3, nn)
739 real(kind=kreal),
intent(out) :: director_second_variation(5, 3, 3, nn)
741 integer :: node, m, n
742 real(kind=kreal) :: second_basis(3, 3)
744 director_second_variation = 0.0d0
748 second_basis(:, shell_xi) = zeta*shapederiv(node, shell_xi) *director_second_tangent(:, m, n, node)
749 second_basis(:, shell_eta) = zeta*shapederiv(node, shell_eta) *director_second_tangent(:, m, n, node)
750 second_basis(:, shell_zeta) = shapefunc(node) *director_second_tangent(:, m, n, node)
751 director_second_variation(:, m, n, node) = shellmitc_symmetriccomponents( &
752 matmul(transpose(second_basis), kinematic_basis))
756 end subroutine shellmitc_builddirectorsecondvariation
761 subroutine shellmitc_evaluatetyingoperator(etype, xi, eta, nterms, target_component, &
762 source_component, tying_point, tying_group, coefficient, replaced_component)
765 integer(kind=kint),
intent(in) :: etype
766 real(kind=kreal),
intent(in) :: xi, eta
767 integer,
intent(out) :: nterms
768 integer,
intent(out) :: target_component(max_tying_terms), source_component(MAX_TYING_TERMS)
769 integer,
intent(out) :: tying_point(MAX_TYING_TERMS), tying_group(MAX_TYING_TERMS)
770 real(kind=kreal),
intent(out) :: coefficient(max_tying_terms)
771 logical,
intent(out) :: replaced_component(5)
774 real(kind=kreal) :: xxi, eeta, h
780 target_component(1:4) = (/ 4, 4, 5, 5 /)
781 source_component(1:4) = (/ 4, 4, 5, 5 /)
782 tying_point(1:4) = (/ 4, 2, 1, 3 /)
783 tying_group(1:4) = (/ 1, 1, 1, 1 /)
784 coefficient(1:4) = (/ 0.5d0*( 1.0d0-xi ), 0.5d0*( 1.0d0+xi ), 0.5d0*( 1.0d0-eta ), 0.5d0*( 1.0d0+eta ) /)
787 xxi = xi /dsqrt( 1.0d0/3.0d0 )
788 eeta = eta/dsqrt( 3.0d0/5.0d0 )
793 target_component(nterms+1:nterms+2) = (/ 1, 5 /)
794 source_component(nterms+1:nterms+2) = (/ 1, 5 /)
795 tying_point(nterms+1:nterms+2) = ip
796 tying_group(nterms+1:nterms+2) = 1
797 coefficient(nterms+1:nterms+2) = h
801 xxi = xi /dsqrt( 3.0d0/5.0d0 )
802 eeta = eta/dsqrt( 1.0d0/3.0d0 )
807 target_component(nterms+1:nterms+2) = (/ 2, 4 /)
808 source_component(nterms+1:nterms+2) = (/ 2, 4 /)
809 tying_point(nterms+1:nterms+2) = ip
810 tying_group(nterms+1:nterms+2) = 2
811 coefficient(nterms+1:nterms+2) = h
815 xxi = xi /dsqrt( 1.0d0/3.0d0 )
816 eeta = eta/dsqrt( 1.0d0/3.0d0 )
820 target_component(nterms) = 3
821 source_component(nterms) = 3
822 tying_point(nterms) = ip
823 tying_group(nterms) = 3
824 coefficient(nterms) = h
829 target_component(1:8) = (/ 4, 4, 4, 4, 5, 5, 5, 5 /)
830 source_component(1:8) = (/ 4, 5, 4, 5, 4, 5, 4, 5 /)
831 tying_point(1:8) = (/ 2, 1, 3, 3, 2, 1, 3, 3 /)
832 tying_group(1:8) = (/ 1, 1, 1, 1, 1, 1, 1, 1 /)
833 coefficient(1:8) = (/ 1.0d0-xi, xi, xi, -xi, eta, 1.0d0-eta, -eta, eta /)
836 replaced_component(:) = .false.
838 replaced_component(target_component(k)) = .true.
841 end subroutine shellmitc_evaluatetyingoperator
845 subroutine shellmitc_applyassumedstrain(etype, nn, ndof, xi_lx, eta_lx, tying_B, B, &
846 tying_director_second_variation, B2rot)
849 integer(kind=kint),
intent(in) :: etype, nn, ndof
850 real(kind=kreal),
intent(in) :: xi_lx, eta_lx
851 real(kind=kreal),
intent(in) :: tying_b(5, ndof*nn, 6, 3)
852 real(kind=kreal),
intent(inout) :: b(5, ndof*nn)
853 real(kind=kreal),
intent(in),
optional :: tying_director_second_variation(5, 3, 3, nn, 6, 3)
854 real(kind=kreal),
intent(inout),
optional :: b2rot(:, :, :, :)
856 integer :: k, c, jsize, m, n, nb, nterms
857 integer :: target_component(MAX_TYING_TERMS), source_component(MAX_TYING_TERMS)
858 integer :: tying_point(MAX_TYING_TERMS), tying_group(MAX_TYING_TERMS)
859 real(kind=kreal) :: coefficient(max_tying_terms)
860 logical :: replaced_component(5)
862 call shellmitc_evaluatetyingoperator(etype, xi_lx, eta_lx, nterms, target_component, &
863 source_component, tying_point, tying_group, coefficient, replaced_component)
864 if( nterms == 0 )
return
867 if( replaced_component(c) ) b(c, 1:ndof*nn) = 0.0d0
870 do jsize = 1, ndof*nn
871 b(target_component(k), jsize) = b(target_component(k), jsize) &
872 +coefficient(k)*tying_b(source_component(k), jsize, tying_point(k), tying_group(k))
876 if(
present(tying_director_second_variation) .and.
present(b2rot) )
then
878 if( replaced_component(c) ) b2rot(c, :, :, :) = 0.0d0
884 b2rot(target_component(k), m, n, nb) = b2rot(target_component(k), m, n, nb) &
885 +coefficient(k)*tying_director_second_variation(source_component(k), m, n, nb, &
886 tying_point(k), tying_group(k))
893 end subroutine shellmitc_applyassumedstrain
897 pure real(kind=kreal) function shellmitc_strainsecondvariationpair(component, basis_variation_i, basis_variation_j)
900 integer,
intent(in) :: component
901 real(kind=kreal),
intent(in) :: basis_variation_i(3, 3), basis_variation_j(3, 3)
903 select case( component )
905 shellmitc_strainsecondvariationpair = dot_product( basis_variation_i(:, shell_xi), basis_variation_j(:, shell_xi))
907 shellmitc_strainsecondvariationpair = dot_product( basis_variation_i(:, shell_eta), basis_variation_j(:, shell_eta))
909 shellmitc_strainsecondvariationpair = dot_product( &
910 basis_variation_i(:, shell_xi), basis_variation_j(:, shell_eta)) &
911 +dot_product(basis_variation_i(:, shell_eta), basis_variation_j(:, shell_xi))
913 shellmitc_strainsecondvariationpair = dot_product( &
914 basis_variation_i(:, shell_eta), basis_variation_j(:, shell_zeta)) &
915 +dot_product(basis_variation_i(:, shell_zeta), basis_variation_j(:, shell_eta))
917 shellmitc_strainsecondvariationpair = dot_product( &
918 basis_variation_i(:, shell_zeta), basis_variation_j(:, shell_xi)) &
919 +dot_product(basis_variation_i(:, shell_xi), basis_variation_j(:, shell_zeta))
921 shellmitc_strainsecondvariationpair = 0.0d0
924 end function shellmitc_strainsecondvariationpair
928 subroutine shellmitc_addgeometricstiffness(etype, nn, ndof, kinematics, &
929 use_director_tangent, use_green_lagrange, add_geometric_stiffness, &
930 xi, eta, integration_weight, layer_weight, stress, B, basis_variation, &
931 tying_basis_variation, reciprocal_basis, material_local_basis, material_reciprocal_basis, B2rot, director, stiff)
935 integer(kind=kint),
intent(in) :: etype, nn, ndof, kinematics
936 logical,
intent(in) :: use_director_tangent, use_green_lagrange
937 logical,
intent(in) :: add_geometric_stiffness
938 real(kind=kreal),
intent(in) :: xi, eta, integration_weight, layer_weight
939 real(kind=kreal),
intent(in) :: stress(5), b(5, ndof*nn)
940 real(kind=kreal),
intent(in) :: basis_variation(3, ndof*nn, 3)
941 real(kind=kreal),
intent(in) :: tying_basis_variation(3, ndof*nn, 3, 6, 3)
942 real(kind=kreal),
intent(in) :: reciprocal_basis(3, 3)
943 real(kind=kreal),
intent(in) :: material_local_basis(3, 3)
944 real(kind=kreal),
intent(in) :: material_reciprocal_basis(3, 3)
945 real(kind=kreal),
intent(in) :: b2rot(5, 3, 3, nn)
946 real(kind=kreal),
intent(in) :: director(3, nn)
947 real(kind=kreal),
intent(inout) :: stiff(ndof*nn, ndof*nn)
949 integer :: isize, jsize, k, c, ip, it, nterms
950 integer :: target_component(MAX_TYING_TERMS), source_component(MAX_TYING_TERMS)
951 integer :: tying_point(MAX_TYING_TERMS), tying_group(MAX_TYING_TERMS)
952 real(kind=kreal) :: coefficient(max_tying_terms)
953 logical :: replaced_component(5)
954 real(kind=kreal) :: qf_stress_integrand(ndof*nn), vol_deriv(ndof*nn)
955 real(kind=kreal) :: geo_term, local_stress(3, 3), s_global(3, 3)
956 real(kind=kreal) :: basis_gradient(3, 3, ndof*nn)
957 real(kind=kreal) :: stress_basis_gradient(3, 3, ndof*nn)
960 do jsize = 1, ndof*nn
961 vol_deriv(jsize) = sum(reciprocal_basis*basis_variation(:, jsize, :))
962 qf_stress_integrand(jsize) = dot_product(stress, b(:, jsize))
966 if( add_geometric_stiffness )
then
967 if( use_green_lagrange .or. kinematics ==
updatelag )
then
968 call shellmitc_evaluatetyingoperator(etype, xi, eta, nterms, target_component, &
969 source_component, tying_point, tying_group, coefficient, replaced_component)
970 do jsize = 1, ndof*nn
971 do isize = 1, ndof*nn
974 if( replaced_component(c) ) cycle
975 geo_term = geo_term+stress(c)*shellmitc_strainsecondvariationpair(c, &
976 basis_variation(:, isize, :), basis_variation(:, jsize, :))
981 geo_term = geo_term+stress(target_component(k))*coefficient(k) &
982 *shellmitc_strainsecondvariationpair(source_component(k), tying_basis_variation(:, isize, :, ip, it), &
983 tying_basis_variation(:, jsize, :, ip, it))
985 stiff(isize, jsize) = stiff(isize, jsize) +integration_weight*layer_weight*geo_term
989 local_stress = reshape((/ stress(1), stress(3), stress(5), &
990 stress(3), stress(2), stress(4), stress(5), stress(4), 0.0d0 /), (/ 3, 3 /))
991 s_global = matmul(material_local_basis, matmul(local_stress, transpose(material_local_basis)))
993 do jsize = 1, ndof*nn
994 basis_gradient(:, :, jsize) = matmul(basis_variation(:, jsize, :), transpose(material_reciprocal_basis))
995 stress_basis_gradient(:, :, jsize) = matmul(basis_gradient(:, :, jsize), s_global)
997 do jsize = 1, ndof*nn
998 do isize = 1, ndof*nn
999 stiff(isize, jsize) = stiff(isize, jsize) +integration_weight*layer_weight*sum( &
1000 basis_gradient(:, :, isize)*stress_basis_gradient(:, :, jsize))
1005 do jsize = 1, ndof*nn
1006 do isize = 1, ndof*nn
1007 stiff(isize, jsize) = stiff(isize, jsize) &
1008 +integration_weight*layer_weight*qf_stress_integrand(isize)*vol_deriv(jsize)
1012 if( use_director_tangent .and. (use_green_lagrange .or. kinematics ==
updatelag) )
then
1013 call shellmitc_adddirectorstressstiffness(nn, ndof, integration_weight, layer_weight, &
1014 stress, b2rot, director, stiff)
1018 end subroutine shellmitc_addgeometricstiffness
1023 director_second_tangent, reciprocal_basis, local_basis, use_director_tangent, drilling_second_variation)
1026 integer(kind=kint),
intent(in) :: nn
1027 real(kind=kreal),
intent(in) :: zeta, shapefunc(nn), shapederiv(nn, 2)
1028 real(kind=kreal),
intent(in) :: director_second_tangent(3, 3, 3, nn)
1029 real(kind=kreal),
intent(in) :: reciprocal_basis(3, 3), local_basis(3, 3)
1030 logical,
intent(in) :: use_director_tangent
1031 real(kind=kreal),
intent(out) :: drilling_second_variation(3, 3, nn)
1033 integer :: node, m, n
1034 real(kind=kreal) :: second_basis(3, 3), skew_gradient(3, 3)
1036 drilling_second_variation = 0.0d0
1037 if( .not. use_director_tangent )
return
1041 second_basis(:, shell_xi) = shapederiv(node, shell_xi)*zeta*director_second_tangent(:, m, n, node)
1042 second_basis(:, shell_eta) = shapederiv(node, shell_eta)*zeta*director_second_tangent(:, m, n, node)
1043 second_basis(:, shell_zeta) = shapefunc(node)*director_second_tangent(:, m, n, node)
1044 skew_gradient = matmul(reciprocal_basis, transpose(second_basis))
1045 skew_gradient = skew_gradient-transpose(skew_gradient)
1046 drilling_second_variation(m, n, node) = dot_product( local_basis(:, shell_xi), &
1047 matmul(skew_gradient, local_basis(:, shell_eta)))
1056 subroutine shellmitc_builddrillingvector(nn, ndof, finite_rotation_director, shapefunc, &
1057 point_triad, reciprocal_basis, basis_variation, displacement, director, nddrill, Cv, Cv_disp)
1060 integer(kind=kint),
intent(in) :: nn, ndof
1061 logical,
intent(in) :: finite_rotation_director
1062 real(kind=kreal),
intent(in) :: shapefunc(nn), point_triad(3, 3)
1063 real(kind=kreal),
intent(in) :: reciprocal_basis(3, 3)
1064 real(kind=kreal),
intent(in) :: basis_variation(3, ndof*nn, 3)
1065 real(kind=kreal),
intent(in) :: displacement(ndof*nn), director(3, nn)
1066 real(kind=kreal),
intent(in),
optional :: nddrill(nn)
1067 real(kind=kreal),
intent(out) :: cv(ndof*nn), cv_disp
1069 integer :: j, nb, jrot
1070 real(kind=kreal) :: cv_w(ndof*nn), cv_theta(ndof*nn)
1071 real(kind=kreal) :: cmat(3, 3), drill_axis(3), axis_norm
1074 cmat = matmul(reciprocal_basis, transpose(basis_variation(:, j, :)))
1075 cmat = cmat-transpose(cmat)
1076 cv_w(j) = dot_product(point_triad(:, shell_xi), matmul(cmat, point_triad(:, shell_eta)))
1080 if( ndof >= 6 )
then
1082 jrot = ndof*(nb-1)+4
1083 drill_axis = point_triad(:, shell_zeta)
1084 if( finite_rotation_director .and.
present(nddrill) )
then
1085 drill_axis = director(:, nb)
1086 axis_norm = sqrt(dot_product(drill_axis, drill_axis))
1087 if( axis_norm > 0.0d0 )
then
1088 drill_axis = drill_axis/axis_norm
1090 drill_axis = point_triad(:, shell_zeta)
1093 cv_theta(jrot:jrot+2) = shapefunc(nb)*drill_axis
1097 cv = cv_theta-0.5d0*cv_w
1098 cv_disp = dot_product(cv, displacement)
1099 if( finite_rotation_director .and.
present(nddrill) )
then
1100 cv_disp = -0.5d0*dot_product(cv_w, displacement)+dot_product(shapefunc, nddrill)
1102 end subroutine shellmitc_builddrillingvector
1106 subroutine shellmitc_adddrillingstiffness(nn, ndof, finite_rotation_director, &
1107 use_director_tangent, shapefunc, Cv, Cv_disp, Cv_w_second, displacement, &
1108 director, director_deriv, alpha, integration_weight, layer_weight, nddrill, stiff)
1111 integer(kind=kint),
intent(in) :: nn, ndof
1112 logical,
intent(in) :: finite_rotation_director, use_director_tangent
1113 real(kind=kreal),
intent(in) :: shapefunc(nn), cv(ndof*nn), cv_disp
1114 real(kind=kreal),
intent(in) :: cv_w_second(3, 3, nn), displacement(ndof*nn)
1115 real(kind=kreal),
intent(in) :: director(3, nn), director_deriv(3, 3, nn)
1116 real(kind=kreal),
intent(in) :: alpha, integration_weight, layer_weight
1117 real(kind=kreal),
intent(in),
optional :: nddrill(nn)
1118 real(kind=kreal),
intent(inout) :: stiff(ndof*nn, ndof*nn)
1120 integer :: isize, jsize, nb, m, n
1121 real(kind=kreal) :: scale, cv_deriv, cv_deriv_disp
1122 real(kind=kreal) :: drill_axis(3), drill_coeff, axis_norm
1124 scale = integration_weight*layer_weight*alpha
1125 do jsize = 1, ndof*nn
1126 do isize = 1, ndof*nn
1127 stiff(isize, jsize) = stiff(isize, jsize)+scale*cv(isize)*cv(jsize)
1130 if( .not. use_director_tangent )
return
1134 jsize = ndof*(nb-1)+3+n
1135 cv_deriv_disp = 0.0d0
1137 isize = ndof*(nb-1)+3+m
1138 cv_deriv = -0.5d0*cv_w_second(m, n, nb)
1140 cv_deriv_disp = cv_deriv_disp+cv_deriv*displacement(isize)
1141 if( finite_rotation_director .and.
present(nddrill) )
then
1142 drill_axis = director(:, nb)
1143 axis_norm = sqrt(dot_product(drill_axis, drill_axis))
1144 if( axis_norm > 0.0d0 )
then
1145 drill_axis = drill_axis/axis_norm
1146 drill_coeff = dot_product(drill_axis, director_deriv(:, n, nb))
1147 cv_deriv = cv_deriv+shapefunc(nb) *(director_deriv(m, n, nb)-drill_axis(m)*drill_coeff)/axis_norm
1150 stiff(isize, jsize) = stiff(isize, jsize)+scale*cv_deriv*cv_disp
1152 stiff(:, jsize) = stiff(:, jsize)+scale*cv*cv_deriv_disp
1155 end subroutine shellmitc_adddrillingstiffness
1159 subroutine shellmitc_adddirectorstressstiffness(nn, ndof, w_w_w_det, layer_weight, Sv_force, B2rot, a_over_2_v3, stiff)
1162 integer(kind=kint),
intent(in) :: nn, ndof
1163 real(kind=kreal),
intent(in) :: w_w_w_det, layer_weight, sv_force(5)
1164 real(kind=kreal),
intent(in) :: b2rot(5, 3, 3, nn), a_over_2_v3(3, nn)
1165 real(kind=kreal),
intent(inout) :: stiff(ndof*nn, ndof*nn)
1167 integer :: i, j, m, n, nb, isize, jsize
1168 real(kind=kreal) :: drill_axis(3), rot_projector(3, 3), hrot(3, 3)
1169 real(kind=kreal) :: hess_coeff, drill_coeff, axis_norm
1172 drill_axis(1:3) = a_over_2_v3(1:3, nb)
1173 axis_norm = sqrt(sum(drill_axis(1:3)*drill_axis(1:3)))
1174 if( axis_norm > 0.0d0 )
then
1175 drill_axis(1:3) = drill_axis(1:3)/axis_norm
1177 drill_axis(1:3) = (/ 0.0d0, 0.0d0, 1.0d0 /)
1179 rot_projector(:, :) = 0.0d0
1181 rot_projector(i, i) = 1.0d0
1185 rot_projector(i, j) = rot_projector(i, j)-drill_axis(i)*drill_axis(j)
1190 hrot(m, n) = dot_product(sv_force(1:5), b2rot(1:5, m, n, nb))
1194 jsize = ndof*(nb-1)+3+n
1196 isize = ndof*(nb-1)+3+m
1200 hess_coeff = hess_coeff +rot_projector(i, m)*hrot(i, j)*rot_projector(j, n)
1205 drill_coeff = drill_coeff+drill_axis(i)*hrot(i, n)
1209 drill_coeff = drill_coeff +rot_projector(i, n)*hrot(i, j)*drill_axis(j)
1212 stiff(isize, jsize) = stiff(isize, jsize) +w_w_w_det*layer_weight *(hess_coeff+drill_axis(m)*drill_coeff)
1217 end subroutine shellmitc_adddirectorstressstiffness
1221 subroutine shellmixeddofmap(mixflag, nn, ndof, sstable, is_mixed)
1224 integer(kind=kint),
intent(in) :: mixflag, nn, ndof
1225 integer,
intent(out) :: sstable(ndof*nn)
1226 logical,
intent(out) :: is_mixed
1231 if( mixflag == 1 .and. ndof*nn == 24 )
then
1232 sstable = (/ 1, 2, 3, 7, 8, 9, 13, 14, 15, 19, 20, 21, 4, 5, 6, 10, 11, 12, 16, 17, 18, 22, 23, 24 /)
1233 else if( mixflag == 2 .and. ndof*nn == 18 )
then
1234 sstable = (/ 1, 2, 3, 7, 8, 9, 13, 14, 15, 4, 5, 6, 10, 11, 12, 16, 17, 18 /)
1237 sstable = [(i, i=1, ndof*nn)]
1239 end subroutine shellmixeddofmap
1243 subroutine shellapplymixeddofordering(mixflag, nn, ndof, stiff, qf)
1246 integer(kind=kint),
intent(in) :: mixflag, nn, ndof
1247 real(kind=kreal),
intent(inout),
optional :: stiff(ndof*nn, ndof*nn), qf(ndof*nn)
1249 integer :: i, j, sstable(ndof*nn)
1250 real(kind=kreal) :: stiff_work(ndof*nn, ndof*nn), qf_work(ndof*nn)
1253 call shellmixeddofmap(mixflag, nn, ndof, sstable, is_mixed)
1254 if( .not. is_mixed )
return
1256 if(
present(stiff) )
then
1260 stiff(i, j) = stiff_work(sstable(i), sstable(j))
1264 if(
present(qf) )
then
1267 qf(i) = qf_work(sstable(i))
1270 end subroutine shellapplymixeddofordering
1274 subroutine shellmitc_evaluatetyingstrains(etype, nn, zeta, elem, edisp, director, &
1275 director_increment, use_green_lagrange, tying_strain)
1278 integer(kind=kint),
intent(in) :: etype, nn
1279 real(kind=kreal),
intent(in) :: zeta
1280 real(kind=kreal),
intent(in) :: elem(3, nn), edisp(6, nn)
1281 real(kind=kreal),
intent(in) :: director(3, nn), director_increment(3, nn)
1282 logical,
intent(in) :: use_green_lagrange
1283 real(kind=kreal),
intent(out) :: tying_strain(5, 6, 3)
1285 integer :: tying_set, tying_point
1286 real(kind=kreal) :: tying_zeta, naturalcoord(2)
1287 real(kind=kreal) :: shapefunc(nn), shapederiv(nn, 2)
1288 real(kind=kreal) :: covariant_basis(3, 3), reference_basis(3, 3), current_basis(3, 3)
1289 real(kind=kreal) :: reference_jacobian, current_jacobian, point_strain(5)
1291 tying_strain = 0.0d0
1292 tying_zeta = shellmitc_tyingzeta(etype, zeta)
1296 call gettyingpoint(etype, tying_set, tying_point, naturalcoord)
1300 if( abs(shellmitc_covariantjacobian(covariant_basis)) <= tiny(1.0d0) ) &
1301 stop
"Invalid shell Jacobian"
1302 call shellmitc_evaluatepointstrain(nn, tying_zeta, shapefunc, shapederiv, &
1303 edisp(1:3, :), director_increment, covariant_basis, use_green_lagrange, &
1304 point_strain, reference_basis, current_basis, reference_jacobian, current_jacobian)
1305 tying_strain(:, tying_point, tying_set) = point_strain
1309 end subroutine shellmitc_evaluatetyingstrains
1316 subroutine shellmitc_setupstresskinematics(nn, ecoord, kinematics, finite_rotation, edisp, &
1317 nddirector, ndrefdirector, nddirector_deriv, ndbase_disp, elem, director, director_increment)
1321 integer(kind=kint),
intent(in) :: nn, kinematics
1322 logical,
intent(in) :: finite_rotation
1323 real(kind=kreal),
intent(in) :: ecoord(3, nn), edisp(6, nn)
1324 real(kind=kreal),
intent(in) :: nddirector(3, nn), ndrefdirector(3, nn)
1325 real(kind=kreal),
intent(in) :: nddirector_deriv(3, 3, nn)
1326 real(kind=kreal),
intent(in),
optional :: ndbase_disp(6, nn)
1327 real(kind=kreal),
intent(out) :: elem(3, nn)
1328 real(kind=kreal),
intent(out) :: director(3, nn), director_increment(3, nn)
1333 if( kinematics ==
updatelag .and.
present(ndbase_disp) )
then
1334 elem = elem+ndbase_disp(1:3, :)
1336 if( kinematics ==
updatelag ) elem = elem+0.5d0*edisp(1:3, :)
1339 director(:, na) = nddirector(:, na)
1340 director_increment(:, na) = director(:, na)-ndrefdirector(:, na)
1341 if( .not. finite_rotation )
then
1342 director_increment(:, na) = matmul(nddirector_deriv(:, :, na), edisp(4:6, na))
1344 director(:, na) = ndrefdirector(:, na)+0.5d0*director_increment(:, na)
1347 end subroutine shellmitc_setupstresskinematics
1352 director, director_increment, use_green_lagrange, tying_strain, dstrain, &
1353 strain_tensor, covariant_basis, reciprocal_basis, material_local_basis, &
1354 material_reciprocal_basis, reference_basis, current_basis, reference_jacobian, current_jacobian)
1357 integer(kind=kint),
intent(in) :: etype, nn
1358 real(kind=kreal),
intent(in) :: naturalcoord(2), zeta
1359 real(kind=kreal),
intent(in) :: elem(3, nn), edisp(6, nn)
1360 real(kind=kreal),
intent(in) :: director(3, nn), director_increment(3, nn)
1361 logical,
intent(in) :: use_green_lagrange
1362 real(kind=kreal),
intent(in) :: tying_strain(5, 6, 3)
1363 real(kind=kreal),
intent(out) :: dstrain(6), strain_tensor(3, 3)
1364 real(kind=kreal),
intent(out) :: covariant_basis(3, 3), reciprocal_basis(3, 3)
1365 real(kind=kreal),
intent(out) :: material_local_basis(3, 3)
1366 real(kind=kreal),
intent(out) :: material_reciprocal_basis(3, 3)
1367 real(kind=kreal),
intent(out) :: reference_basis(3, 3), current_basis(3, 3)
1368 real(kind=kreal),
intent(out) :: reference_jacobian, current_jacobian
1370 integer :: k, c, nterms
1371 integer :: target_component(MAX_TYING_TERMS), source_component(MAX_TYING_TERMS)
1372 integer :: tying_point(MAX_TYING_TERMS), tying_group(MAX_TYING_TERMS)
1373 real(kind=kreal) :: coefficient(max_tying_terms)
1374 logical :: replaced_component(5)
1375 real(kind=kreal) :: shapefunc(nn), shapederiv(nn, 2), strain(5)
1376 real(kind=kreal) :: local_basis(3, 3), jacobian, material_jacobian
1381 if( abs(shellmitc_covariantjacobian(covariant_basis)) <= tiny(1.0d0) ) &
1382 stop
"Invalid shell Jacobian"
1383 call shellmitc_basisfromcovariant(covariant_basis, local_basis, reciprocal_basis, jacobian)
1384 call shellmitc_evaluatepointstrain(nn, zeta, shapefunc, shapederiv, edisp(1:3, :), &
1385 director_increment, covariant_basis, use_green_lagrange, strain, reference_basis, &
1386 current_basis, reference_jacobian, current_jacobian)
1387 call shellmitc_evaluatetyingoperator(etype, naturalcoord(1), naturalcoord(2), nterms, &
1388 target_component, source_component, tying_point, tying_group, coefficient, replaced_component)
1390 if( replaced_component(c) ) strain(c) = 0.0d0
1393 strain(target_component(k)) = strain(target_component(k)) &
1394 +coefficient(k)*tying_strain(source_component(k), tying_point(k), tying_group(k))
1397 strain_tensor = 0.0d0
1398 strain_tensor(1, 1) = strain(1)
1399 strain_tensor(2, 2) = strain(2)
1400 strain_tensor(1, 2) = 0.5d0*strain(3)
1401 strain_tensor(2, 1) = strain_tensor(1, 2)
1402 strain_tensor(2, 3) = 0.5d0*strain(4)
1403 strain_tensor(3, 2) = strain_tensor(2, 3)
1404 strain_tensor(3, 1) = 0.5d0*strain(5)
1405 strain_tensor(1, 3) = strain_tensor(3, 1)
1407 material_local_basis = local_basis
1408 material_reciprocal_basis = reciprocal_basis
1409 if( use_green_lagrange )
then
1410 call shellmitc_basisfromcovariant(reference_basis, material_local_basis, material_reciprocal_basis, material_jacobian)
1413 dstrain = (/ strain(1), strain(2), 0.0d0, strain(3), strain(4), strain(5) /)
1418 subroutine shellmitc_materialtransform(local_basis, reciprocal_basis, transform, transform_inverse)
1419 real(kind=kreal),
intent(in) :: local_basis(3,3), reciprocal_basis(3,3)
1420 real(kind=kreal),
intent(out) :: transform(3,3), transform_inverse(3,3)
1423 transform = matmul(transpose(local_basis), reciprocal_basis)
1425 transform(3,1:2) = 0.0d0
1426 transform_inverse = transform
1428 end subroutine shellmitc_materialtransform
1430 pure subroutine shellmitc_strainvectortotensor(strain, tensor)
1431 real(kind=kreal),
intent(in) :: strain(6)
1432 real(kind=kreal),
intent(out) :: tensor(3,3)
1435 tensor(1,1) = strain(1)
1436 tensor(2,2) = strain(2)
1437 tensor(3,3) = strain(3)
1438 tensor(1,2) = 0.5d0*strain(4)
1439 tensor(2,1) = tensor(1,2)
1440 tensor(2,3) = 0.5d0*strain(5)
1441 tensor(3,2) = tensor(2,3)
1442 tensor(3,1) = 0.5d0*strain(6)
1443 tensor(1,3) = tensor(3,1)
1444 end subroutine shellmitc_strainvectortotensor
1446 pure subroutine shellmitc_tensortostrainvector(tensor, strain)
1447 real(kind=kreal),
intent(in) :: tensor(3,3)
1448 real(kind=kreal),
intent(out) :: strain(6)
1450 strain(1:3) = (/ tensor(1,1), tensor(2,2), tensor(3,3) /)
1451 strain(4:6) = 2.0d0*(/ tensor(1,2), tensor(2,3), tensor(3,1) /)
1452 end subroutine shellmitc_tensortostrainvector
1454 subroutine shellmitc_shellstraintolocal(strain, transform, local_strain)
1455 real(kind=kreal),
intent(in) :: strain(6), transform(3,3)
1456 real(kind=kreal),
intent(out) :: local_strain(6)
1457 real(kind=kreal) :: tensor(3,3), local_tensor(3,3)
1459 call shellmitc_strainvectortotensor(strain, tensor)
1460 local_tensor = matmul(transform, matmul(tensor, transpose(transform)))
1461 call shellmitc_tensortostrainvector(local_tensor, local_strain)
1462 end subroutine shellmitc_shellstraintolocal
1464 subroutine shellmitc_localstraintoshell(local_strain, transform_inverse, strain)
1465 real(kind=kreal),
intent(in) :: local_strain(6), transform_inverse(3,3)
1466 real(kind=kreal),
intent(out) :: strain(6)
1467 real(kind=kreal) :: tensor(3,3), local_tensor(3,3)
1469 call shellmitc_strainvectortotensor(local_strain, local_tensor)
1470 tensor = matmul(transform_inverse, matmul(local_tensor, transpose(transform_inverse)))
1471 call shellmitc_tensortostrainvector(tensor, strain)
1472 end subroutine shellmitc_localstraintoshell
1474 subroutine shellmitc_shellstresstolocal(stress, transform_inverse, local_stress)
1475 real(kind=kreal),
intent(in) :: stress(6), transform_inverse(3,3)
1476 real(kind=kreal),
intent(out) :: local_stress(6)
1477 real(kind=kreal) :: tensor(3,3), local_tensor(3,3)
1480 local_tensor = matmul(transpose(transform_inverse), matmul(tensor, transform_inverse))
1481 call shelltensortostressvector(local_tensor, local_stress)
1482 end subroutine shellmitc_shellstresstolocal
1484 subroutine shellmitc_localstresstoshell(local_stress, transform, stress)
1485 real(kind=kreal),
intent(in) :: local_stress(6), transform(3,3)
1486 real(kind=kreal),
intent(out) :: stress(6)
1487 real(kind=kreal) :: tensor(3,3), local_tensor(3,3)
1490 tensor = matmul(transpose(transform), matmul(local_tensor, transform))
1491 call shelltensortostressvector(tensor, stress)
1492 end subroutine shellmitc_localstresstoshell
1494 subroutine shellmitc_localtangenttoshell(local_tangent, transform, tangent)
1495 real(kind=kreal),
intent(in) :: local_tangent(5,5), transform(3,3)
1496 real(kind=kreal),
intent(out) :: tangent(5,5)
1498 integer,
parameter :: shell_component(5) = (/ 1, 2, 4, 5, 6 /)
1499 real(kind=kreal) :: shell_strain(6), local_strain(6)
1500 real(kind=kreal) :: local_stress(6), shell_stress(6)
1504 shell_strain = 0.0d0
1505 shell_strain(shell_component(j)) = 1.0d0
1506 call shellmitc_shellstraintolocal(shell_strain, transform, local_strain)
1507 local_stress = 0.0d0
1508 local_stress(shell_component) = matmul(local_tangent, local_strain(shell_component))
1509 call shellmitc_localstresstoshell(local_stress, transform, shell_stress)
1510 tangent(:,j) = shell_stress(shell_component)
1512 end subroutine shellmitc_localtangenttoshell
1514 subroutine shellmitc_getdrillingalpha(gauss, n_layer, material_local_basis, &
1515 material_reciprocal_basis, alpha)
1522 integer,
intent(in) :: n_layer
1523 real(kind=kreal),
intent(in) :: material_local_basis(3,3), material_reciprocal_basis(3,3)
1524 real(kind=kreal),
intent(out) :: alpha
1526 real(kind=kreal) :: elastic_tensor(3,3,3,3)
1529 material_local_basis(:, shell_eta), material_local_basis(:, shell_zeta), &
1530 material_reciprocal_basis(:, shell_xi), material_reciprocal_basis(:, shell_eta), &
1531 material_reciprocal_basis(:, shell_zeta), alpha, n_layer)
1532 end subroutine shellmitc_getdrillingalpha
1535 material_reciprocal_basis, tangent, alpha, cdsys)
1542 integer(kind=kint),
intent(in) :: etype, nn
1544 integer,
intent(in) :: n_layer
1545 real(kind=kreal),
intent(in) :: material_local_basis(3,3), material_reciprocal_basis(3,3)
1546 real(kind=kreal),
intent(out) :: tangent(5,5), alpha
1547 real(kind=kreal),
intent(in),
optional :: cdsys(3, 3)
1549 integer(kind=kint) :: ierr
1550 real(kind=kreal) :: local_stress(6), local_tangent(5,5)
1551 real(kind=kreal) :: transform(3,3), transform_inverse(3,3)
1553 if(
iselastic(gauss%pMaterial%mtype) )
then
1555 material_local_basis(:, shell_eta), material_local_basis(:, shell_zeta), &
1556 material_reciprocal_basis(:, shell_xi), material_reciprocal_basis(:, shell_eta), &
1557 material_reciprocal_basis(:, shell_zeta), alpha, n_layer, cdsys)
1561 if( .not.fstr_uses_plane_stress_j2_shell(etype, nn, gauss%pMaterial) )
then
1562 call shellmitc_abortelastoplasticunsupported(etype)
1564 if( .not.
associated(gauss%fstatus) .or. .not.
associated(gauss%istatus) ) &
1566 call shellmitc_getdrillingalpha(gauss, n_layer, material_local_basis, material_reciprocal_basis, alpha)
1567 call shellmitc_materialtransform(material_local_basis, material_reciprocal_basis, &
1568 transform, transform_inverse)
1569 call shellmitc_shellstresstolocal(gauss%stress, transform_inverse, local_stress)
1571 gauss%plstrain, local_tangent, ierr)
1572 if( ierr /= 0 )
call shellmitc_abortmaterialerror(etype, ierr)
1573 call shellmitc_localtangenttoshell(local_tangent, transform, tangent)
1580 material_local_basis, material_reciprocal_basis, stress, alpha, cdsys)
1586 integer(kind=kint),
intent(in) :: etype, nn, flag
1587 integer,
intent(in) :: n_layer
1588 logical,
intent(in) :: update_state
1590 real(kind=kreal),
intent(in) :: dstrain(6)
1591 real(kind=kreal),
intent(in) :: material_local_basis(3, 3)
1592 real(kind=kreal),
intent(in) :: material_reciprocal_basis(3, 3)
1593 real(kind=kreal),
intent(out) :: stress(6), alpha
1594 real(kind=kreal),
intent(in),
optional :: cdsys(3, 3)
1596 real(kind=kreal) :: d(5, 5), strain(5), stress_shell(5)
1597 real(kind=kreal) :: dstress(6), dstress_trace(6), trace_coeff
1599 if( .not.
associated(gauss%fstatus) .or. .not.
associated(gauss%istatus) )
then
1604 real(kind=kreal) :: fstatus_out(2)
1605 real(kind=kreal) :: shell_strain_increment(6), local_strain_increment(6), local_stress_bak(6)
1606 real(kind=kreal) :: local_stress(6), local_strain_increment_out(6), local_tangent(5,5)
1607 real(kind=kreal) :: shell_strain_increment_out(6), plpotential, energy_increment
1608 real(kind=kreal) :: transform(3,3), transform_inverse(3,3)
1609 integer(kind=kint) :: ierr
1612 shell_strain_increment = dstrain-gauss%strain_bak(1:6)
1613 call shellmitc_materialtransform(material_local_basis, material_reciprocal_basis, &
1614 transform, transform_inverse)
1615 call shellmitc_shellstraintolocal(shell_strain_increment, transform, local_strain_increment)
1616 call shellmitc_shellstresstolocal(gauss%stress_bak, transform_inverse, local_stress_bak)
1618 gauss%plstrain, gauss%fstatus, local_stress, local_strain_increment_out, local_tangent, istat, &
1619 fstatus_out, plpotential, energy_increment, ierr)
1620 if( ierr /= 0 )
call shellmitc_abortmaterialerror(etype, ierr)
1621 call shellmitc_localstresstoshell(local_stress, transform, dstress)
1622 call shellmitc_getdrillingalpha(gauss, n_layer, material_local_basis, &
1623 material_reciprocal_basis, alpha)
1625 if( .not. update_state )
return
1627 call shellmitc_localstraintoshell(local_strain_increment_out, transform_inverse, &
1628 shell_strain_increment_out)
1629 gauss%strain(1:6) = gauss%strain_bak(1:6)+shell_strain_increment_out
1630 gauss%stress(1:6) = dstress
1631 gauss%istatus(1) = istat
1632 gauss%fstatus = fstatus_out
1633 gauss%plpotential = plpotential
1634 gauss%strain_energy = gauss%strain_energy_bak+energy_increment
1635 stress = gauss%stress(1:6)
1640 strain = (/ dstrain(1), dstrain(2), dstrain(4), dstrain(5), dstrain(6) /)
1642 material_reciprocal_basis, d, alpha, cdsys)
1643 stress_shell = matmul(d, strain)
1644 dstress = (/ stress_shell(1), stress_shell(2), 0.0d0, stress_shell(3), stress_shell(4), stress_shell(5) /)
1646 if( .not. update_state )
return
1648 if( flag == updatelag )
then
1649 trace_coeff = shellplanestresstracecoeff(gauss, n_layer)
1650 call shellobjectivetracestressincrement(gauss%stress_bak(1:6), dstrain, dstress_trace, trace_coeff)
1651 gauss%strain(1:6) = gauss%strain_bak(1:6)+dstrain
1652 gauss%stress(1:6) = gauss%stress_bak(1:6)+dstress_trace+dstress
1653 gauss%strain_energy = gauss%strain_energy_bak+dot_product(gauss%stress(1:6), dstrain)
1654 gauss%strain_energy = gauss%strain_energy-0.5d0*dot_product(dstress, dstrain)
1656 gauss%strain(1:6) = dstrain
1657 gauss%stress(1:6) = dstress
1658 gauss%strain_energy = 0.5d0*dot_product(gauss%stress(1:6), gauss%strain(1:6))
1660 stress = gauss%stress(1:6)
1666 reciprocal_basis, reference_basis, current_basis, det_ref, det_cur, strain_out, stress_out)
1671 logical,
intent(in) :: use_gl_strain
1672 real(kind=kreal),
intent(in) :: s(3, 3), e(3, 3)
1673 real(kind=kreal),
intent(in) :: covariant_basis(3, 3), reciprocal_basis(3, 3)
1674 real(kind=kreal),
intent(in) :: reference_basis(3, 3), current_basis(3, 3)
1675 real(kind=kreal),
intent(in) :: det_ref, det_cur
1676 real(kind=kreal),
intent(out) :: strain_out(6), stress_out(6)
1679 real(kind=kreal) :: output_basis(3, 3), output_reciprocal_basis(3, 3)
1680 real(kind=kreal) :: reference_reciprocal_basis(3, 3), reference_local_basis(3, 3)
1681 real(kind=kreal) :: stress_tensor(3, 3), strain_tensor(3, 3)
1682 real(kind=kreal) :: stretch_b(3, 3), tensor(6), eigval(3), princ(3, 3)
1683 real(kind=kreal) :: logstrain(3, 3), cg_metric(3, 3)
1684 real(kind=kreal) :: det, jac, eig_norm
1686 output_basis = covariant_basis
1687 output_reciprocal_basis = reciprocal_basis
1689 if( use_gl_strain )
then
1690 output_basis = reference_basis
1691 call shellmitc_basisfromcovariant(reference_basis, reference_local_basis, reference_reciprocal_basis, det)
1692 output_reciprocal_basis = reference_reciprocal_basis
1695 stress_tensor = matmul(output_basis, matmul(s, transpose(output_basis)))
1696 strain_tensor = matmul(output_reciprocal_basis, matmul(e, transpose(output_reciprocal_basis)))
1697 call shelltensortostressvector(stress_tensor, stress_out)
1698 strain_out(1:3) = (/ strain_tensor(1, 1), strain_tensor(2, 2), strain_tensor(3, 3) /)
1702 if( use_gl_strain )
then
1703 strain_out(4:6) = (/ strain_tensor(1, 2), strain_tensor(2, 3), strain_tensor(3, 1) /)
1705 strain_out(4:6) = 2.0d0*(/ strain_tensor(1, 2), strain_tensor(2, 3), strain_tensor(3, 1) /)
1710 jac = det_cur/det_ref
1711 if( abs(jac) <= tiny(1.0d0) ) stop
"Fail to convert shell stress: detF=0"
1713 stress_tensor = matmul(current_basis, matmul(s, transpose(current_basis)))/jac
1714 cg_metric = matmul(transpose(reference_reciprocal_basis), reference_reciprocal_basis)
1715 stretch_b = matmul(current_basis, matmul(cg_metric, transpose(current_basis)))
1717 call shelltensortostressvector(stretch_b, tensor)
1720 if( eigval(i) <= 0.0d0 ) stop
"Fail to calc shell log strain: stretch<0"
1721 eigval(i) = 0.5d0*dlog(eigval(i))
1722 eig_norm = dsqrt(dot_product(princ(:, i), princ(:, i)))
1723 if( eig_norm <= 0.0d0 ) stop
"Fail to calc shell log strain: direction vector=0"
1724 princ(:, i) = princ(:, i)/eig_norm
1729 logstrain = logstrain+eigval(i)*outer_product3(princ(:, i), princ(:, i))
1732 call shelltensortostressvector(stress_tensor, stress_out)
1733 strain_out(1:3) = (/ logstrain(1, 1), logstrain(2, 2), logstrain(3, 3) /)
1734 strain_out(4:6) = 2.0d0*(/ logstrain(1, 2), logstrain(2, 3), logstrain(3, 1) /)
1739 real(kind=kreal),
intent(in) :: stress(6)
1740 real(kind=kreal),
intent(out) :: tensor(3, 3)
1743 tensor(1, 1) = stress(1)
1744 tensor(2, 2) = stress(2)
1745 tensor(3, 3) = stress(3)
1746 tensor(1, 2) = stress(4)
1747 tensor(2, 1) = stress(4)
1748 tensor(2, 3) = stress(5)
1749 tensor(3, 2) = stress(5)
1750 tensor(3, 1) = stress(6)
1751 tensor(1, 3) = stress(6)
1754 pure subroutine shelltensortostressvector(tensor, stress)
1755 real(kind=kreal),
intent(in) :: tensor(3, 3)
1756 real(kind=kreal),
intent(out) :: stress(6)
1758 stress(1) = tensor(1, 1)
1759 stress(2) = tensor(2, 2)
1760 stress(3) = tensor(3, 3)
1761 stress(4) = tensor(1, 2)
1762 stress(5) = tensor(2, 3)
1763 stress(6) = tensor(3, 1)
1764 end subroutine shelltensortostressvector
1766 pure subroutine shellobjectivetracestressincrement(stress_old, dstrain, dstress_trace, trace_coeff)
1767 real(kind=kreal),
intent(in) :: stress_old(6), dstrain(6)
1768 real(kind=kreal),
intent(out) :: dstress_trace(6)
1769 real(kind=kreal),
intent(in),
optional :: trace_coeff
1771 real(kind=kreal) :: stress_tensor(3, 3), dstress_tensor(3, 3)
1772 real(kind=kreal) :: trd, coeff
1776 if (
present(trace_coeff)) coeff = trace_coeff
1777 trd = coeff*(dstrain(1)+dstrain(2))+dstrain(3)
1778 dstress_tensor = -stress_tensor*trd
1779 call shelltensortostressvector(dstress_tensor, dstress_trace)
1780 end subroutine shellobjectivetracestressincrement
1782 pure subroutine shelladdulobjectivetracetangent(stress_old, ncol, B, DB, trace_coeff)
1783 integer(kind=kint),
intent(in) :: ncol
1784 real(kind=kreal),
intent(in) :: stress_old(6), b(5, ncol)
1785 real(kind=kreal),
intent(inout) :: db(5, ncol)
1786 real(kind=kreal),
intent(in),
optional :: trace_coeff
1788 integer(kind=kint) :: j
1789 real(kind=kreal) :: dstrain_col(6), dstress_trace(6)
1793 dstrain_col(1:2) = b(1:2, j)
1794 call shellobjectivetracestressincrement(stress_old, dstrain_col, dstress_trace, trace_coeff)
1795 db(1, j) = db(1, j)+dstress_trace(1)
1796 db(2, j) = db(2, j)+dstress_trace(2)
1797 db(3, j) = db(3, j)+dstress_trace(4)
1798 db(4, j) = db(4, j)+dstress_trace(5)
1799 db(5, j) = db(5, j)+dstress_trace(6)
1801 end subroutine shelladdulobjectivetracetangent
1803 pure subroutine shelldirectorincrementalsecondderiv(director_current, director_second)
1804 real(kind=kreal),
intent(in) :: director_current(3)
1805 real(kind=kreal),
intent(out) :: director_second(3, 3, 3)
1808 real(kind=kreal) :: basis_m(3), basis_n(3)
1809 real(kind=kreal) :: cross_n(3), cross_mn(3), cross_m(3), cross_nm(3)
1814 cross_n = matmul(shellskewmatrix(basis_n), director_current)
1818 cross_m = matmul(shellskewmatrix(basis_m), director_current)
1819 cross_mn = matmul(shellskewmatrix(basis_m), cross_n)
1820 cross_nm = matmul(shellskewmatrix(basis_n), cross_m)
1821 director_second(:, m, n) = 0.5d0*(cross_mn+cross_nm)
1824 end subroutine shelldirectorincrementalsecondderiv
1827 subroutine shellmitc_abortnonlinearunsupported(etype)
1828 integer(kind=kint),
intent(in) :: etype
1831 write(*,*)
'###ERROR### : Element type not supported for nonlinear static analysis'
1832 write(*,*)
' ic_type = ', etype
1834 call hecmw_abort(hecmw_comm_get_comm())
1835 end subroutine shellmitc_abortnonlinearunsupported
1837 subroutine shellmitc_abortelastoplasticunsupported(etype)
1838 integer(kind=kint),
intent(in) :: etype
1841 write(*,*)
'###ERROR### : Elastoplastic shell support is limited to MITC4 J2 small deformation'
1842 write(*,*)
' with perfect plasticity'
1843 write(*,*)
' ic_type = ', etype
1845 call hecmw_abort(hecmw_comm_get_comm())
1846 end subroutine shellmitc_abortelastoplasticunsupported
1848 subroutine shellmitc_abortmaterialerror(etype, ierr)
1850 integer(kind=kint),
intent(in) :: etype, ierr
1854 write(*,*)
' ic_type = ', etype,
', material error = ', ierr
1856 call hecmw_abort(hecmw_comm_get_comm())
1857 end subroutine shellmitc_abortmaterialerror
1863 finite_rotation, use_director_tangent, use_green_lagrange, &
1864 add_geometric_stiffness, ecoord, elem, shell_disp, gausses, element, &
1865 v1, v2, v3, director, reference_director, director_tangent, &
1866 director_second_tangent, nodal_kinematic_dofs, nddrill, stiff_work, cdsys)
1872 integer(kind=kint),
intent(in) :: etype, nn, ndof, ilayer, kinematics
1873 logical,
intent(in) :: finite_rotation, use_director_tangent
1874 logical,
intent(in) :: use_green_lagrange, add_geometric_stiffness
1875 real(kind=kreal),
intent(in) :: ecoord(3, nn), elem(3, nn), shell_disp(6, nn)
1877 type(
telement),
intent(in),
optional :: element
1878 real(kind=kreal),
intent(in) :: v1(3, nn), v2(3, nn), v3(3, nn)
1879 real(kind=kreal),
intent(in) :: director(3, nn), reference_director(3, nn)
1880 real(kind=kreal),
intent(in) :: director_tangent(3, 3, nn)
1881 real(kind=kreal),
intent(in) :: director_second_tangent(3, 3, 3, nn)
1882 real(kind=kreal),
intent(in) :: nodal_kinematic_dofs(ndof*nn)
1883 real(kind=kreal),
intent(in),
optional :: nddrill(nn)
1884 real(kind=kreal),
intent(inout) :: stiff_work(ndof*nn, ndof*nn)
1885 real(kind=kreal),
intent(in),
optional :: cdsys(3, 3)
1887 integer :: lx, ly, ny, isize, jsize, ishell
1888 integer(kind=kint) :: ierr
1889 real(kind=kreal) :: zeta_ly, tying_zeta, xi_lx, eta_lx
1890 real(kind=kreal) :: surface_weight, thickness_weight, integration_jacobian
1891 real(kind=kreal) :: integration_weight, layer_weight
1892 real(kind=kreal) :: naturalcoord(2), shapefunc(nn), shapederiv(nn, 2)
1893 real(kind=kreal) :: d(5, 5), b(5, ndof*nn), db(5, ndof*nn)
1894 real(kind=kreal) :: basis_variation(3, ndof*nn, 3)
1895 real(kind=kreal) :: stress_vec(5), stress_old_vec(6), alpha, trace_coeff
1896 real(kind=kreal) :: point_triad(3, 3), covariant_basis(3, 3)
1897 real(kind=kreal) :: tangent_basis(3, 2), reciprocal_basis(3, 3), local_basis(3, 3)
1898 real(kind=kreal) :: material_reciprocal_basis(3, 3), material_local_basis(3, 3)
1899 real(kind=kreal) :: director_contribution(3, nn, 3)
1900 real(kind=kreal) :: director_second_variation(5, 3, 3, nn)
1901 real(kind=kreal) :: tying_b(5, ndof*nn, 6, 3)
1902 real(kind=kreal) :: tying_basis_variation(3, ndof*nn, 3, 6, 3)
1903 real(kind=kreal) :: tying_director_second_variation(5, 3, 3, nn, 6, 3)
1904 real(kind=kreal) :: cv(ndof*nn), cv_disp, cv_w_second(3, 3, nn)
1906 ny = numofshellthicknessquadpoints(etype)
1907 layer_weight = gausses(1)%pMaterial%shell_var(ilayer)%weight
1909 director_second_variation = 0.0d0
1913 if( etype /= fe_mitc9_shell )
then
1914 tying_zeta = shellmitc_tyingzeta(etype, 0.0d0)
1915 call shellmitc_evaluatetyingstiffnessdataatzeta(etype, nn, ndof, tying_zeta, &
1916 elem, shell_disp, director, director_tangent, director_second_tangent, &
1917 use_green_lagrange, use_director_tangent, tying_b, tying_basis_variation, tying_director_second_variation)
1922 if( ierr /= 0 ) cycle
1925 if( etype == fe_mitc9_shell )
then
1926 tying_zeta = shellmitc_tyingzeta(etype, zeta_ly)
1927 call shellmitc_evaluatetyingstiffnessdataatzeta(etype, nn, ndof, tying_zeta, &
1928 elem, shell_disp, director, director_tangent, director_second_tangent, &
1929 use_green_lagrange, use_director_tangent, tying_b, tying_basis_variation, tying_director_second_variation)
1932 do lx = 1, numofquadpoints(etype)
1933 call getquadpoint(etype, lx, naturalcoord)
1934 xi_lx = naturalcoord(shell_xi)
1935 eta_lx = naturalcoord(shell_eta)
1936 surface_weight = getweight(etype, lx)
1937 call getshapefunc(etype, naturalcoord, shapefunc)
1938 call getshapederiv(etype, naturalcoord, shapederiv)
1940 point_triad(:, shell_xi) = matmul(v1, shapefunc)
1941 point_triad(:, shell_eta) = matmul(v2, shapefunc)
1942 point_triad(:, shell_zeta) = matmul(v3, shapefunc)
1944 call shellmitc_preparepointkinematics(etype, nn, use_green_lagrange, ecoord, elem, &
1945 shell_disp(1:3, :), director, reference_director, zeta_ly, shapefunc, shapederiv, &
1946 covariant_basis, tangent_basis, reciprocal_basis, local_basis, &
1947 material_reciprocal_basis, material_local_basis, integration_jacobian, director_contribution)
1949 if(
present(element) .and. (add_geometric_stiffness .or. &
1956 if( ishell > 0 )
then
1958 material_local_basis, material_reciprocal_basis, d, alpha, cdsys)
1961 material_reciprocal_basis, d, alpha, cdsys)
1964 call shellmitc_buildfirststrainvariation(nn, ndof, zeta_ly, shapefunc, shapederiv, &
1965 covariant_basis, tangent_basis, director_contribution, director_tangent, use_director_tangent, b, basis_variation)
1966 if( use_director_tangent )
then
1967 call shellmitc_builddirectorsecondvariation(nn, zeta_ly, shapefunc, shapederiv, &
1968 covariant_basis, director_second_tangent, director_second_variation)
1971 if( use_director_tangent )
then
1972 call shellmitc_applyassumedstrain(etype, nn, ndof, xi_lx, eta_lx, tying_b, b, &
1973 tying_director_second_variation, director_second_variation)
1975 call shellmitc_applyassumedstrain(etype, nn, ndof, xi_lx, eta_lx, tying_b, b)
1978 integration_weight = surface_weight*thickness_weight*integration_jacobian
1980 if( add_geometric_stiffness )
then
1981 if( ishell > 0 )
then
1982 stress_vec = (/ element%shell_layer_gausses(ishell)%stress(1), element%shell_layer_gausses(ishell)%stress(2), &
1983 element%shell_layer_gausses(ishell)%stress(4), element%shell_layer_gausses(ishell)%stress(5), &
1984 element%shell_layer_gausses(ishell)%stress(6) /)
1986 stress_vec = (/ gausses(lx)%stress(1), gausses(lx)%stress(2), &
1987 gausses(lx)%stress(4), gausses(lx)%stress(5), gausses(lx)%stress(6) /)
1992 if( kinematics ==
updatelag .and. fstr_is_finite_rotation_shell_element(etype, nn) )
then
1993 if( ishell > 0 )
then
1994 stress_old_vec = element%shell_layer_gausses(ishell)%stress_bak(1:6)
1995 trace_coeff = shellplanestresstracecoeff(element%shell_layer_gausses(ishell), ilayer)
1997 stress_old_vec = gausses(lx)%stress_bak(1:6)
1998 trace_coeff = shellplanestresstracecoeff(gausses(lx), ilayer)
2000 call shelladdulobjectivetracetangent(stress_old_vec, ndof*nn, b, db, trace_coeff=trace_coeff)
2003 do jsize = 1, ndof*nn
2004 do isize = 1, ndof*nn
2005 stiff_work(isize, jsize) = stiff_work(isize, jsize) &
2006 +integration_weight*layer_weight*dot_product(b(:, isize), db(:, jsize))
2010 call shellmitc_addgeometricstiffness(etype, nn, ndof, kinematics, &
2011 use_director_tangent, use_green_lagrange, add_geometric_stiffness, &
2012 xi_lx, eta_lx, integration_weight, layer_weight, stress_vec, b, &
2013 basis_variation, tying_basis_variation, reciprocal_basis, material_local_basis, &
2014 material_reciprocal_basis, director_second_variation, director, stiff_work)
2017 director_second_tangent, material_reciprocal_basis, point_triad, use_director_tangent, cv_w_second)
2018 call shellmitc_builddrillingvector(nn, ndof, finite_rotation, shapefunc, &
2019 point_triad, material_reciprocal_basis, basis_variation, nodal_kinematic_dofs, director, nddrill, cv, cv_disp)
2020 call shellmitc_adddrillingstiffness(nn, ndof, finite_rotation, &
2021 use_director_tangent, shapefunc, cv, cv_disp, cv_w_second, nodal_kinematic_dofs, &
2022 director, director_tangent, alpha, integration_weight, layer_weight, nddrill, stiff_work)
2031 finite_rotation, use_director_tangent, use_green_lagrange, update_state, &
2032 ecoord, evaluation_coords, total_nodal_state, strain_nodal_state, gausses, element, &
2033 v1, v2, v3, director, reference_director, director_tangent, stress_elem, &
2034 stress_director, stress_director_increment, nodal_kinematic_dofs, nddrill, qf_work, cdsys)
2039 integer(kind=kint),
intent(in) :: etype, nn, ndof, ilayer, kinematics
2040 logical,
intent(in) :: finite_rotation, use_director_tangent
2041 logical,
intent(in) :: use_green_lagrange, update_state
2042 real(kind=kreal),
intent(in) :: ecoord(3, nn), evaluation_coords(3, nn)
2043 real(kind=kreal),
intent(in) :: total_nodal_state(6, nn), strain_nodal_state(6, nn)
2045 type(
telement),
intent(inout),
optional :: element
2046 real(kind=kreal),
intent(in) :: v1(3, nn), v2(3, nn), v3(3, nn)
2047 real(kind=kreal),
intent(in) :: director(3, nn), reference_director(3, nn)
2048 real(kind=kreal),
intent(in) :: director_tangent(3, 3, nn)
2049 real(kind=kreal),
intent(in) :: stress_elem(3, nn), stress_director(3, nn)
2050 real(kind=kreal),
intent(in) :: stress_director_increment(3, nn)
2051 real(kind=kreal),
intent(in) :: nodal_kinematic_dofs(ndof*nn)
2052 real(kind=kreal),
intent(in),
optional :: nddrill(nn)
2053 real(kind=kreal),
intent(inout) :: qf_work(ndof*nn)
2054 real(kind=kreal),
intent(in),
optional :: cdsys(3, 3)
2056 integer :: lx, ly, ny, ishell
2057 integer(kind=kint) :: ierr
2058 logical :: store_state
2061 real(kind=kreal) :: zeta_ly, tying_zeta, xi, eta
2062 real(kind=kreal) :: surface_weight, thickness_weight, integration_jacobian
2063 real(kind=kreal) :: integration_weight, layer_weight
2064 real(kind=kreal) :: naturalcoord(2), shapefunc(nn), shapederiv(nn, 2)
2065 real(kind=kreal) :: b(5, ndof*nn), strain_vec(5), stress_vec(5), alpha
2066 real(kind=kreal) :: basis_variation(3, ndof*nn, 3), point_triad(3, 3)
2067 real(kind=kreal) :: covariant_basis(3, 3), tangent_basis(3, 2)
2068 real(kind=kreal) :: reciprocal_basis(3, 3), local_basis(3, 3)
2069 real(kind=kreal) :: material_reciprocal_basis(3, 3), material_local_basis(3, 3)
2070 real(kind=kreal) :: director_contribution(3, nn, 3)
2071 real(kind=kreal) :: tying_b(5, ndof*nn, 6, 3), tying_strain(5, 6, 3)
2072 real(kind=kreal) :: dstrain(6), stress(6), strain_out(6), stress_out(6)
2073 real(kind=kreal) :: strain_tensor(3, 3), stress_tensor(3, 3)
2074 real(kind=kreal) :: stress_covariant_basis(3, 3), stress_reciprocal_basis(3, 3)
2075 real(kind=kreal) :: stress_material_local_basis(3, 3)
2076 real(kind=kreal) :: stress_material_reciprocal_basis(3, 3)
2077 real(kind=kreal) :: reference_basis(3, 3), current_basis(3, 3)
2078 real(kind=kreal) :: reference_jacobian, current_jacobian
2079 real(kind=kreal) :: cv(ndof*nn), cv_disp
2081 ny = numofshellthicknessquadpoints(etype)
2082 layer_weight = gausses(1)%pMaterial%shell_var(ilayer)%weight
2084 if( etype /= fe_mitc9_shell )
then
2085 tying_zeta = shellmitc_tyingzeta(etype, 0.0d0)
2086 call shellmitc_evaluatetyingbatzeta(etype, nn, ndof, tying_zeta, evaluation_coords, &
2087 total_nodal_state, director, director_tangent, use_green_lagrange, use_director_tangent, tying_b)
2092 if( ierr /= 0 ) cycle
2094 if( etype == fe_mitc9_shell )
then
2095 tying_zeta = shellmitc_tyingzeta(etype, zeta_ly)
2096 call shellmitc_evaluatetyingbatzeta(etype, nn, ndof, tying_zeta, evaluation_coords, &
2097 total_nodal_state, director, director_tangent, use_green_lagrange, use_director_tangent, tying_b)
2100 if( update_state )
then
2101 call shellmitc_evaluatetyingstrains(etype, nn, zeta_ly, stress_elem, &
2102 strain_nodal_state, stress_director, stress_director_increment, use_green_lagrange, tying_strain)
2105 do lx = 1, numofquadpoints(etype)
2106 call getquadpoint(etype, lx, naturalcoord)
2107 xi = naturalcoord(shell_xi)
2108 eta = naturalcoord(shell_eta)
2109 surface_weight = getweight(etype, lx)
2110 call getshapefunc(etype, naturalcoord, shapefunc)
2111 call getshapederiv(etype, naturalcoord, shapederiv)
2114 store_state = .false.
2115 if( update_state .and.
present(element) )
then
2117 store_state = ishell > 0
2119 if( update_state .and. .not. store_state )
then
2120 stop
"Missing shell layer Gauss state"
2122 if( store_state )
then
2123 gauss => element%shell_layer_gausses(ishell)
2125 gauss_work = gausses(lx)
2129 if( update_state )
then
2131 strain_nodal_state, stress_director, stress_director_increment, &
2132 use_green_lagrange, tying_strain, dstrain, strain_tensor, stress_covariant_basis, stress_reciprocal_basis, &
2133 stress_material_local_basis, stress_material_reciprocal_basis, &
2134 reference_basis, current_basis, reference_jacobian, current_jacobian)
2137 point_triad(:, shell_xi) = matmul(v1, shapefunc)
2138 point_triad(:, shell_eta) = matmul(v2, shapefunc)
2139 point_triad(:, shell_zeta) = matmul(v3, shapefunc)
2140 call shellmitc_preparepointkinematics(etype, nn, use_green_lagrange, ecoord, &
2141 evaluation_coords, total_nodal_state(1:3, :), director, reference_director, &
2142 zeta_ly, shapefunc, shapederiv, covariant_basis, tangent_basis, reciprocal_basis, &
2143 local_basis, material_reciprocal_basis, material_local_basis, integration_jacobian, director_contribution)
2145 call shellmitc_buildfirststrainvariation(nn, ndof, zeta_ly, shapefunc, shapederiv, &
2146 covariant_basis, tangent_basis, director_contribution, director_tangent, use_director_tangent, b, basis_variation)
2147 call shellmitc_applyassumedstrain(etype, nn, ndof, xi, eta, tying_b, b)
2149 if( .not. update_state )
then
2150 strain_vec = matmul(b, nodal_kinematic_dofs)
2151 dstrain = (/ strain_vec(1), strain_vec(2), 0.0d0, strain_vec(3), strain_vec(4), strain_vec(5) /)
2152 stress_material_local_basis = material_local_basis
2153 stress_material_reciprocal_basis = material_reciprocal_basis
2157 stress_material_local_basis, stress_material_reciprocal_basis, stress, alpha, cdsys)
2159 if( store_state )
then
2161 gauss%strain_out(1:6) = gauss%strain(1:6)
2162 gauss%stress_out(1:6) = gauss%stress(1:6)
2166 call shellmitc_strainvectortotensor(gauss%strain(1:6), strain_tensor)
2169 stress_covariant_basis, stress_reciprocal_basis, reference_basis, &
2170 current_basis, reference_jacobian, current_jacobian, strain_out, stress_out)
2171 gauss%strain_out(1:6) = strain_out
2172 gauss%stress_out(1:6) = stress_out
2176 stress_vec = (/ stress(1), stress(2), stress(4), stress(5), stress(6) /)
2177 integration_weight = surface_weight*thickness_weight*integration_jacobian
2178 qf_work = qf_work+integration_weight*layer_weight*matmul(stress_vec, b)
2180 call shellmitc_builddrillingvector(nn, ndof, finite_rotation, shapefunc, &
2181 point_triad, material_reciprocal_basis, basis_variation, nodal_kinematic_dofs, director, nddrill, cv, cv_disp)
2182 qf_work = qf_work+integration_weight*layer_weight*alpha*cv*cv_disp
2183 if( store_state )
then
2186 if( ilayer == 1 .and. ly == 1 ) element%gausses(lx)%strain_energy = 0.0d0
2187 element%gausses(lx)%strain_energy = element%gausses(lx)%strain_energy &
2188 +integration_weight*layer_weight*(gauss%strain_energy+0.5d0*alpha*cv_disp**2)
2207 integer(kind=kint),
intent(in),
optional :: cdsys_ID
2208 real(kind=kreal),
intent(inout),
optional :: coords(3, 3)
2209 real(kind=kreal),
allocatable,
intent(out) :: coordsys(:, :)
2213 if( .not.
present(cdsys_id) .or. .not.
present(coords) )
return
2214 if( cdsys_id <= 0 )
return
2215 allocate(coordsys(3, 3))
2217 if( serr == -1 ) stop
"Fail to setup local coordinate"
2223 nddisp, element, ndtriad, ndreftriad, ndcurtriad, nddrill, cdsys_ID, coords)
2228 integer(kind=kint),
intent(in) :: etype, nn, mixflag, ndof
2229 real(kind=kreal),
intent(in) :: ecoord(3, nn), thick
2231 real(kind=kreal),
intent(out) :: stiff(:, :)
2232 real(kind=kreal),
intent(in),
optional :: nddisp(ndof, nn)
2233 type(
telement),
intent(in),
optional :: element
2236 real(kind=kreal),
intent(in),
optional :: ndtriad(9, nn)
2237 real(kind=kreal),
intent(in),
optional :: ndreftriad(9, nn), ndcurtriad(9, nn)
2238 real(kind=kreal),
intent(in),
optional :: nddrill(nn)
2239 integer(kind=kint),
intent(in),
optional :: cdsys_id
2240 real(kind=kreal),
intent(inout),
optional :: coords(3, 3)
2242 integer :: ndof_shell, nb, ilayer, nlayer
2243 integer(kind=kint) :: kinematics
2244 logical :: finite_rotation, use_director_tangent, use_green_lagrange
2245 logical :: add_geometric_stiffness, update_state
2246 real(kind=kreal),
allocatable :: coordsys(:, :)
2247 real(kind=kreal) :: elem(3, nn), shell_disp(6, nn)
2248 real(kind=kreal) :: v1(3, nn), v2(3, nn), v3(3, nn)
2249 real(kind=kreal) :: director(3, nn), reference_director(3, nn)
2250 real(kind=kreal) :: director_tangent(3, 3, nn)
2251 real(kind=kreal) :: director_second_tangent(3, 3, 3, nn)
2252 real(kind=kreal) :: nodal_kinematic_dofs(ndof*nn)
2253 real(kind=kreal) :: stiff_work(ndof*nn, ndof*nn)
2256 director_second_tangent = 0.0d0
2257 ndof_shell = min(ndof, 6)
2258 if(
present(nddisp) ) shell_disp(1:ndof_shell, :) = nddisp(1:ndof_shell, :)
2261 call shellmitc_resolveformulation(etype, nn, ndof, gausses(1),
present(nddisp), &
2262 present(element), .true., kinematics, ndof_shell, finite_rotation, &
2263 use_director_tangent, use_green_lagrange, add_geometric_stiffness, update_state)
2266 use_director_tangent, use_director_tangent, ecoord, shell_disp, ndtriad, ndreftriad, &
2267 ndcurtriad, elem, v1, v2, v3, director, reference_director, director_tangent, director_second_tangent)
2271 nodal_kinematic_dofs = 0.0d0
2273 nodal_kinematic_dofs(ndof*(nb-1)+1:ndof*(nb-1)+ndof_shell) = shell_disp(1:ndof_shell, nb)
2276 nlayer = gausses(1)%pMaterial%totallyr
2277 do ilayer = 1, nlayer
2279 finite_rotation, use_director_tangent, use_green_lagrange, &
2280 add_geometric_stiffness, ecoord, elem, shell_disp, gausses, element, &
2281 v1, v2, v3, director, reference_director, director_tangent, &
2282 director_second_tangent, nodal_kinematic_dofs, nddrill, stiff_work, coordsys)
2285 stiff(1:nn*ndof, 1:nn*ndof) = stiff_work
2286 call shellapplymixeddofordering(mixflag, nn, ndof, stiff=stiff)
2289 subroutine stf_shell_mitc33(etype, nn, ndof, ecoord, u, u_prev, gausses, stiff, thick, mixflag, &
2290 element, ndtriad, ndreftriad, ndcurtriad, nddrill, cdsys_ID, coords)
2294 integer(kind=kint),
intent(in) :: etype, nn, ndof, mixflag
2295 real(kind=kreal),
intent(in) :: ecoord(3, nn), u(3, nn*2), u_prev(3, nn*2), thick
2297 real(kind=kreal),
intent(out) :: stiff(:, :)
2298 type(
telement),
intent(in) :: element
2299 real(kind=kreal),
intent(in) :: ndtriad(9, nn), ndreftriad(9, nn), ndcurtriad(9, nn), nddrill(nn)
2300 integer(kind=kint),
intent(in),
optional :: cdsys_id
2301 real(kind=kreal),
intent(inout),
optional :: coords(3, 3)
2303 integer :: i, sstable(ndof*nn)
2304 real(kind=kreal) :: mixed_disp(ndof*nn), mixed_prev(ndof*nn)
2305 real(kind=kreal) :: natural_disp(ndof*nn), natural_prev(ndof*nn)
2306 real(kind=kreal) :: shell_disp(ndof, nn), shell_prev(ndof, nn), rotation(3)
2310 mixed_disp(3*(i-1)+1:3*i) = u(1:3, i)
2311 mixed_prev(3*(i-1)+1:3*i) = u_prev(1:3, i)
2313 call shellmixeddofmap(mixflag, nn, ndof, sstable, is_mixed)
2314 natural_disp = mixed_disp
2315 natural_prev = mixed_prev
2318 natural_disp(sstable(i)) = mixed_disp(i)
2319 natural_prev(sstable(i)) = mixed_prev(i)
2323 shell_disp(:, i) = natural_disp(ndof*(i-1)+1:ndof*i)
2324 shell_prev(:, i) = natural_prev(ndof*(i-1)+1:ndof*i)
2325 call shellcomposerotationvector(shell_prev(4:6, i), &
2326 shell_disp(4:6, i)-shell_prev(4:6, i), rotation)
2327 shell_disp(4:6, i) = rotation
2330 call stf_shell_mitc(etype, nn, ndof, ecoord, gausses, stiff, thick, mixflag, &
2331 nddisp=shell_disp, element=element, ndtriad=ndtriad, ndreftriad=ndreftriad, &
2332 ndcurtriad=ndcurtriad, nddrill=nddrill, cdsys_id=cdsys_id, coords=coords)
2338 strain, stress, thick, zeta, n_layer, surface_gauss_points, &
2339 local_strain, local_stress, local_stress_override, ndtriad, ndreftriad, ndbase_disp, surface_gauss_index, &
2345 integer(kind=kint),
intent(in) :: etype, nn, ndof
2346 integer,
intent(in) :: n_layer
2347 real(kind=kreal),
intent(in) :: ecoord(3, nn), edisp(6, nn), thick, zeta
2349 real(kind=kreal),
intent(out) :: strain(:, :), stress(:, :)
2350 logical,
intent(in),
optional :: surface_gauss_points
2352 integer(kind=kint),
intent(in),
optional :: surface_gauss_index
2353 real(kind=kreal),
intent(out),
optional :: local_strain(:, :), local_stress(:, :)
2354 real(kind=kreal),
intent(in),
optional :: local_stress_override(:, :)
2357 real(kind=kreal),
intent(in),
optional :: ndtriad(9, nn), ndreftriad(9, nn)
2358 real(kind=kreal),
intent(in),
optional :: ndbase_disp(6, nn)
2359 integer(kind=kint),
intent(in),
optional :: cdsys_id
2360 real(kind=kreal),
intent(inout),
optional :: coords(3, 3)
2362 integer :: lx, ip, npoints
2363 integer(kind=kint) :: ierr_quad, kinematics, ndof_shell
2364 logical :: finite_rotation, use_director_tangent, use_green_lagrange
2365 logical :: add_geometric_stiffness, update_state, use_surface_gauss, use_override
2367 real(kind=kreal),
allocatable :: coordsys(:, :)
2368 real(kind=kreal) :: elem(3, nn), naturalcoord(2), nncoord(nn, 2), zeta_ly
2369 real(kind=kreal) :: director(3, nn), director_increment(3, nn)
2370 real(kind=kreal) :: v1(3, nn), v2(3, nn), v3(3, nn)
2371 real(kind=kreal) :: a_over_2_v3(3, nn), a_over_2_v3_ref(3, nn)
2372 real(kind=kreal) :: a_over_2_v3_deriv(3, 3, nn), a_over_2_v3_second(3, 3, 3, nn)
2373 real(kind=kreal) :: tying_strain(5, 6, 3)
2374 real(kind=kreal) :: point_strain(6), point_stress(6), alpha
2375 real(kind=kreal) :: strain_tensor(3, 3), stress_tensor(3, 3)
2376 real(kind=kreal) :: covariant_basis(3, 3), reciprocal_basis(3, 3)
2377 real(kind=kreal) :: material_local_basis(3, 3), material_reciprocal_basis(3, 3)
2378 real(kind=kreal) :: reference_basis(3, 3), current_basis(3, 3)
2379 real(kind=kreal) :: reference_jacobian, current_jacobian
2383 use_surface_gauss = .false.
2384 if(
present(surface_gauss_points) ) use_surface_gauss = surface_gauss_points
2385 if(
present(surface_gauss_index) )
then
2386 if( surface_gauss_index<1 .or. surface_gauss_index>numofquadpoints(etype) ) &
2387 stop
"Invalid shell surface Gauss point"
2388 use_surface_gauss = .true.
2392 call shellmitc_resolveformulation(etype, nn, ndof, gausses(1), .true., .false., &
2393 .false., kinematics, ndof_shell, finite_rotation, use_director_tangent, &
2394 use_green_lagrange, add_geometric_stiffness, update_state)
2395 call getnodalnaturalcoord(etype, nncoord)
2397 if( kinematics ==
updatelag .and.
present(ndbase_disp) ) elem = elem+ndbase_disp(1:3, :)
2398 if( kinematics ==
updatelag ) elem = elem+0.5d0*edisp(1:3, :)
2399 call shellmitc_setupnodaldirectors(etype, nn, thick, kinematics, elem, edisp, &
2400 finite_rotation, use_director_tangent, .false., ndtriad, ndreftriad, &
2401 v1=v1, v2=v2, v3=v3, a_over_2_v3=a_over_2_v3, a_over_2_v3_ref=a_over_2_v3_ref, &
2402 a_over_2_v3_deriv=a_over_2_v3_deriv, a_over_2_v3_second=a_over_2_v3_second)
2404 call shellmitc_setupstresskinematics(nn, ecoord, kinematics, finite_rotation, edisp, &
2405 a_over_2_v3, a_over_2_v3_ref, a_over_2_v3_deriv, ndbase_disp, elem, director, director_increment)
2407 call shellmitc_evaluatetyingstrains(etype, nn, zeta, elem, edisp, director, &
2408 director_increment, use_green_lagrange, tying_strain)
2410 if( ierr_quad /= 0 ) stop
"Invalid shell layer zeta"
2413 if( use_surface_gauss ) npoints = numofquadpoints(etype)
2414 if(
present(surface_gauss_index) ) npoints = 1
2417 if(
present(surface_gauss_index) ) ip = surface_gauss_index
2418 if( use_surface_gauss )
then
2419 call getquadpoint(etype, ip, naturalcoord)
2421 naturalcoord = nncoord(lx, :)
2425 director, director_increment, use_green_lagrange, tying_strain, point_strain, &
2426 strain_tensor, covariant_basis, reciprocal_basis, material_local_basis, &
2427 material_reciprocal_basis, reference_basis, current_basis, reference_jacobian, current_jacobian)
2429 use_override = .false.
2430 if(
present(local_stress_override) )
then
2431 use_override = ip <=
size(local_stress_override, 1) .and.
size(local_stress_override, 2) >= 6
2433 if( use_override )
then
2434 point_stress = (/ local_stress_override(ip, 1), local_stress_override(ip, 2), 0.0d0, local_stress_override(ip, 4), &
2435 local_stress_override(ip, 5), local_stress_override(ip, 6) /)
2437 gauss_work = gausses(ip)
2439 point_strain, material_local_basis, material_reciprocal_basis, point_stress, alpha, coordsys)
2444 covariant_basis, reciprocal_basis, reference_basis, current_basis, &
2445 reference_jacobian, current_jacobian, strain(lx, 1:6), stress(lx, 1:6))
2446 if(
present(local_strain) ) local_strain(lx, 1:6) = point_strain
2447 if(
present(local_stress) ) local_stress(lx, 1:6) = point_stress
2454 subroutine dl_shell(etype, nn, ndof, xx, yy, zz, rho, thick, ltype, params, vect, nsize, gausses)
2458 integer(kind=kint),
intent(in) :: etype, nn, ndof
2459 real(kind=kreal),
intent(in) :: xx(*), yy(*), zz(*), rho, thick, params(*)
2460 integer,
intent(in) :: ltype
2461 real(kind=kreal),
intent(out) :: vect(*)
2462 integer(kind=kint),
intent(out) :: nsize
2465 integer :: ny, lx, ly, nb, ilayer, nlayer, jsize
2466 integer(kind=kint) :: ierr_quad
2467 real(kind=kreal) :: elem(3, nn)
2468 real(kind=kreal) :: v1(3, nn), v2(3, nn), v3(3, nn), director(3, nn)
2469 real(kind=kreal) :: naturalcoord(2), shapefunc(nn), shapederiv(nn, 2)
2470 real(kind=kreal) :: covariant_basis(3, 3), normal_jac(3), n(3, ndof*nn)
2471 real(kind=kreal) :: body_force(3), position(3), origin(3), axis(3), radial(3)
2472 real(kind=kreal) :: val, zeta, surface_weight, thickness_weight, integration_weight, projection
2473 real(kind=kreal) :: layer_weight
2476 vect(1:nsize) = 0.0d0
2477 elem(1, :) = xx(1:nn)
2478 elem(2, :) = yy(1:nn)
2479 elem(3, :) = zz(1:nn)
2481 origin = params(2:4)
2483 ny = numofshellthicknessquadpoints(etype)
2485 if (ltype >= 10)
then
2486 do lx = 1, numofquadpoints(etype)
2487 call getquadpoint(etype, lx, naturalcoord)
2488 surface_weight = getweight(etype, lx)
2489 call getshapefunc(etype, naturalcoord, shapefunc)
2490 call getshapederiv(etype, naturalcoord, shapederiv)
2491 covariant_basis(:, shell_xi:shell_eta) = matmul(elem, shapederiv)
2492 call cross_product(covariant_basis(:, shell_xi), covariant_basis(:, shell_eta), normal_jac)
2495 vect(jsize+1:jsize+3) = vect(jsize+1:jsize+3) + surface_weight*shapefunc(nb)*normal_jac*val
2500 nlayer = gausses(1)%pMaterial%totallyr
2501 do ilayer = 1, nlayer
2502 layer_weight = gausses(1)%pMaterial%shell_var(ilayer)%weight
2505 if (ierr_quad /= 0) cycle
2506 do lx = 1, numofquadpoints(etype)
2507 call getquadpoint(etype, lx, naturalcoord)
2508 surface_weight = getweight(etype, lx)
2509 call getshapefunc(etype, naturalcoord, shapefunc)
2510 call getshapederiv(etype, naturalcoord, shapederiv)
2512 integration_weight = surface_weight*thickness_weight *shellmitc_covariantjacobian(covariant_basis)*layer_weight
2513 call shellmitc_buildinterpolationmatrix(nn, ndof, zeta, shapefunc, director, n)
2524 body_force = rho*val*origin
2526 position = matmul(elem, shapefunc)
2527 projection = dot_product(position-origin, axis)/dot_product(axis, axis)
2528 radial = position-(origin+projection*axis)
2529 body_force = rho*val*val*radial
2531 vect(1:nsize) = vect(1:nsize)+integration_weight*matmul(body_force, n)
2540 subroutine dl_shell_33(ic_type, nn, ndof, xx, yy, zz, rho, thick, ltype, params, vect, nsize, gausses)
2544 integer(kind=kint),
intent(in) :: ic_type, nn, ndof
2545 real(kind=kreal),
intent(in) :: xx(*), yy(*), zz(*), rho, thick, params(*)
2546 integer,
intent(in) :: ltype
2547 real(kind=kreal),
intent(out) :: vect(*)
2548 integer(kind=kint),
intent(out) :: nsize
2551 select case (ic_type)
2553 call dl_shell(fe_mitc3_shell, 3_kint, 6_kint, xx, yy, zz, rho, thick, ltype, params, vect, nsize, gausses)
2554 call shellapplymixeddofordering(2_kint, 3_kint, 6_kint, qf=vect(1:18))
2556 call dl_shell(fe_mitc4_shell, 4_kint, 6_kint, xx, yy, zz, rho, thick, ltype, params, vect, nsize, gausses)
2557 call shellapplymixeddofordering(1_kint, 4_kint, 6_kint, qf=vect(1:24))
2560 vect(1:nsize) = 0.0d0
2565 subroutine update_shell_mitc(etype, nn, ndof, ecoord, u, du, gausses, qf, thick, mixflag, &
2566 nddisp, element, ndtriad, ndreftriad, ndcurtriad, nddrill, cdsys_ID, coords)
2572 integer(kind=kint),
intent(in) :: etype, nn, ndof, mixflag
2573 real(kind=kreal),
intent(in) :: ecoord(3, nn), u(:, :), du(:, :), thick
2575 real(kind=kreal),
intent(out) :: qf(:)
2576 real(kind=kreal),
intent(in),
optional :: nddisp(ndof, nn)
2577 type(
telement),
intent(inout),
optional :: element
2580 real(kind=kreal),
intent(in),
optional :: ndtriad(9, nn), ndreftriad(9, nn)
2581 real(kind=kreal),
intent(in),
optional :: ndcurtriad(9, nn), nddrill(nn)
2582 integer(kind=kint),
intent(in),
optional :: cdsys_id
2583 real(kind=kreal),
intent(inout),
optional :: coords(3, 3)
2585 integer :: ndof_shell, nb, ilayer, nlayer
2586 integer(kind=kint) :: kinematics
2587 logical :: finite_rotation, use_director_tangent, use_green_lagrange
2588 logical :: add_geometric_stiffness, update_state
2589 real(kind=kreal),
allocatable :: coordsys(:, :)
2590 real(kind=kreal) :: total_nodal_state(6, nn), strain_nodal_state(6, nn)
2591 real(kind=kreal) :: step_base_nodal_state(6, nn)
2592 real(kind=kreal) :: nodal_kinematic_dofs(ndof*nn), qf_work(ndof*nn)
2593 real(kind=kreal) :: evaluation_coords(3, nn), stress_elem(3, nn)
2594 real(kind=kreal) :: v1(3, nn), v2(3, nn), v3(3, nn)
2595 real(kind=kreal) :: director(3, nn), reference_director(3, nn)
2596 real(kind=kreal) :: director_tangent(3, 3, nn)
2597 real(kind=kreal) :: director_second_tangent(3, 3, 3, nn)
2598 real(kind=kreal) :: stress_director(3, nn), stress_director_increment(3, nn)
2602 call shellmitc_resolveformulation(etype, nn, ndof, gausses(1), .true.,
present(element), &
2603 .true., kinematics, ndof_shell, finite_rotation, use_director_tangent, &
2604 use_green_lagrange, add_geometric_stiffness, update_state)
2606 total_nodal_state = 0.0d0
2607 strain_nodal_state = 0.0d0
2608 step_base_nodal_state = 0.0d0
2610 total_nodal_state(1:ndof_shell, nb) = u(1:ndof_shell, nb)+du(1:ndof_shell, nb)
2611 strain_nodal_state(1:ndof_shell, nb) = total_nodal_state(1:ndof_shell, nb)
2612 step_base_nodal_state(1:ndof_shell, nb) = u(1:ndof_shell, nb)
2613 if( finite_rotation )
then
2614 call shellcomposerotationvector(u(4:6, nb), du(4:6, nb), total_nodal_state(4:6, nb))
2615 strain_nodal_state(4:6, nb) = total_nodal_state(4:6, nb)
2618 if(
present(nddisp) ) total_nodal_state(1:ndof_shell, :) = nddisp(1:ndof_shell, :)
2619 if( kinematics ==
updatelag .and. update_state )
then
2620 strain_nodal_state = du(1:6, 1:nn)
2623 nodal_kinematic_dofs = 0.0d0
2625 nodal_kinematic_dofs(ndof*(nb-1)+1:ndof*(nb-1)+ndof_shell) = total_nodal_state(1:ndof_shell, nb)
2628 director_second_tangent = 0.0d0
2630 stress_director = 0.0d0
2631 stress_director_increment = 0.0d0
2634 use_director_tangent, .false., ecoord, total_nodal_state, ndtriad, ndreftriad, &
2635 ndcurtriad, evaluation_coords, v1, v2, v3, director, reference_director, director_tangent, director_second_tangent)
2637 if( update_state )
then
2638 call shellmitc_setupstresskinematics(nn, ecoord, kinematics, finite_rotation, &
2639 strain_nodal_state, director, reference_director, director_tangent, &
2640 step_base_nodal_state, stress_elem, stress_director, stress_director_increment)
2643 nlayer = gausses(1)%pMaterial%totallyr
2644 do ilayer = 1, nlayer
2646 finite_rotation, use_director_tangent, use_green_lagrange, update_state, &
2647 ecoord, evaluation_coords, total_nodal_state, strain_nodal_state, gausses, element, &
2648 v1, v2, v3, director, reference_director, director_tangent, stress_elem, &
2649 stress_director, stress_director_increment, nodal_kinematic_dofs, nddrill, qf_work, coordsys)
2652 qf(1:ndof*nn) = qf_work
2653 call shellapplymixeddofordering(mixflag, nn, ndof, qf=qf(1:ndof*nn))
2657 subroutine update_shell_mitc33(etype, nn, ndof, ecoord, u, du, gausses, qf, thick, mixflag, &
2658 nddisp, element, ndtriad, ndreftriad, ndcurtriad, nddrill, cdsys_ID, coords)
2663 integer(kind=kint),
intent(in) :: etype, nn, ndof, mixflag
2664 real(kind=kreal),
intent(in) :: ecoord(3, nn), u(3, nn*2), du(3, nn*2), thick
2666 real(kind=kreal),
intent(out) :: qf(:)
2667 real(kind=kreal),
intent(in),
optional :: nddisp(3, nn)
2668 type(
telement),
intent(inout),
optional :: element
2669 real(kind=kreal),
intent(in),
optional :: ndtriad(9, nn), ndreftriad(9, nn), ndcurtriad(9, nn), nddrill(nn)
2670 integer(kind=kint),
intent(in),
optional :: cdsys_id
2671 real(kind=kreal),
intent(inout),
optional :: coords(3, 3)
2673 integer :: i, sstable(ndof*nn)
2674 real(kind=kreal) :: mixed_u(ndof*nn), mixed_du(ndof*nn)
2675 real(kind=kreal) :: natural_u(ndof*nn), natural_du(ndof*nn)
2676 real(kind=kreal) :: shell_u(6, nn), shell_du(6, nn), shell_nddisp(6, nn)
2680 mixed_u(3*(i-1)+1:3*i) = u(1:3, i)
2681 mixed_du(3*(i-1)+1:3*i) = du(1:3, i)
2684 call shellmixeddofmap(mixflag, nn, ndof, sstable, is_mixed)
2686 natural_du = mixed_du
2689 natural_u(sstable(i)) = mixed_u(i)
2690 natural_du(sstable(i)) = mixed_du(i)
2695 shell_u(:, i) = natural_u(ndof*(i-1)+1:ndof*i)
2696 shell_du(:, i) = natural_du(ndof*(i-1)+1:ndof*i)
2698 if(
present(element) )
then
2699 if(
present(nddisp) )
then
2700 shell_nddisp = shell_u+shell_du
2701 shell_nddisp(1:3, :) = nddisp
2702 call update_shell_mitc(etype, nn, ndof, ecoord, shell_u, shell_du, gausses, qf, thick, mixflag, &
2703 nddisp=shell_nddisp, element=element, ndtriad=ndtriad, ndreftriad=ndreftriad, &
2704 ndcurtriad=ndcurtriad, nddrill=nddrill, cdsys_id=cdsys_id, coords=coords)
2706 call update_shell_mitc(etype, nn, ndof, ecoord, shell_u, shell_du, gausses, qf, thick, mixflag, &
2707 element=element, ndtriad=ndtriad, ndreftriad=ndreftriad, &
2708 ndcurtriad=ndcurtriad, nddrill=nddrill, cdsys_id=cdsys_id, coords=coords)
2711 if(
present(nddisp) )
then
2712 shell_nddisp = shell_u+shell_du
2713 shell_nddisp(1:3, :) = nddisp
2714 call update_shell_mitc(etype, nn, ndof, ecoord, shell_u, shell_du, gausses, qf, thick, mixflag, &
2715 nddisp=shell_nddisp, cdsys_id=cdsys_id, coords=coords)
2717 call update_shell_mitc(etype, nn, ndof, ecoord, shell_u, shell_du, gausses, qf, thick, mixflag, &
2718 cdsys_id=cdsys_id, coords=coords)
2726 subroutine mass_shell(etype, nn, elem, rho, thick, gausses, mass, lumped)
2730 integer(kind=kint),
intent(in) :: etype, nn
2731 real(kind=kreal),
intent(in) :: elem(3, nn), rho, thick
2733 real(kind=kreal),
intent(out) :: mass(:, :), lumped(:)
2735 integer(kind=kint),
parameter :: ndof = 6_kint
2736 integer :: ny, nsize, lx, ly, nb, i, ilayer, nlayer, idof
2737 integer(kind=kint) :: ierr_quad
2738 real(kind=kreal) :: v1(3, nn), v2(3, nn), v3(3, nn), director(3, nn)
2739 real(kind=kreal) :: naturalcoord(2), shapefunc(nn), shapederiv(nn, 2)
2740 real(kind=kreal) :: covariant_basis(3, 3), n(3, ndof*nn)
2741 real(kind=kreal) :: zeta, surface_weight, thickness_weight, integration_weight, layer_weight
2742 real(kind=kreal) :: totalmass, totdiag
2745 mass(1:nsize, 1:nsize) = 0.0d0
2746 lumped(1:nsize) = 0.0d0
2748 ny = numofshellthicknessquadpoints(etype)
2751 nlayer = gausses(1)%pMaterial%totallyr
2752 do ilayer = 1, nlayer
2753 layer_weight = gausses(1)%pMaterial%shell_var(ilayer)%weight
2756 if (ierr_quad /= 0) cycle
2757 do lx = 1, numofquadpoints(etype)
2758 call getquadpoint(etype, lx, naturalcoord)
2759 surface_weight = getweight(etype, lx)
2760 call getshapefunc(etype, naturalcoord, shapefunc)
2761 call getshapederiv(etype, naturalcoord, shapederiv)
2763 integration_weight = surface_weight*thickness_weight *shellmitc_covariantjacobian(covariant_basis)*layer_weight
2764 call shellmitc_buildinterpolationmatrix(nn, ndof, zeta, shapefunc, director, n)
2765 mass(1:nsize, 1:nsize) = mass(1:nsize, 1:nsize) + rho*integration_weight*matmul(transpose(n), n)
2766 totalmass = totalmass+rho*integration_weight
2771 totalmass = 3.0d0*totalmass
2775 idof = ndof*(nb-1)+i
2776 totdiag = totdiag+mass(idof, idof)
2781 idof = ndof*(nb-1)+i
2782 lumped(idof) = mass(idof, idof)*totalmass/totdiag
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 getshapederiv(fetype, localcoord, shapederiv)
Calculate derivatives of shape function in natural coordinate system.
integer, parameter fe_mitc4_shell
integer, parameter fe_mitc9_shell
integer, parameter fe_mitc3_shell
subroutine getnodalnaturalcoord(fetype, nncoord)
This modules defines common structures for fem analysis.
type(tlocalcoordsys), dimension(:), pointer, save g_localcoordsys
subroutine set_localcoordsys(coords, coordsys, outsys, ierr)
setup of coordinate system
This module provides functions for elastic material.
subroutine linearelastic_shell(matl, sectType, c, e1_hat, e2_hat, e3_hat, cg1, cg2, cg3, alpha, n_layer, cdsys)
This module provide functions for elastoplastic calculation.
subroutine, public planestressj2tangent(matl, stress, istat, fstatus, plstrain, tangent, ierr)
Condense the in-plane J2 tangent and retain the elastic transverse-shear stiffness.
integer, parameter, public j2_bad_state
character(len=128) function, public planestressj2errormessage(ierr)
subroutine, public update_planestressj2(matl, strain_increment, stress_bak, plstrain, fstatus, stress, strain_increment_out, tangent, istat, fstatus_out, plpotential, energy_increment, ierr)
Return the plane-stress response of the existing three-dimensional J2 perfect-plastic material update...
Shared finite-rotation nodal kinematics and rotation algebra.
logical function, public fstr_is_finite_rotation_shell_element(etype, nn)
pure subroutine, public shellrotationvectortomatrix(theta, rotmat)
pure real(kind=kreal) function, dimension(3, 3), public shellskewmatrix(vector)
pure subroutine, public shellcomposerotationvector(theta_old, theta_inc, theta_new)
This module defines common data and basic structures for analysis.
integer(kind=kint), parameter kopss_solution
OUTPUT STRESS/STRAIN TYPE.
integer(kind=kint) opsstype
This module manages calculation relates with materials.
subroutine matlmatrix_shell(gauss, sectType, D, e1_hat, e2_hat, e3_hat, cg1, cg2, cg3, alpha, n_layer, cdsys)
subroutine shellmitc_getmaterialtangent(etype, nn, gauss, n_layer, material_local_basis, material_reciprocal_basis, tangent, alpha, cdsys)
subroutine shellmitc_preparenodalkinematics(etype, nn, thick, kinematics, finite_rotation, use_director_tangent, need_second_tangent, ecoord, nodal_state, ndtriad, ndreftriad, ndcurtriad, evaluation_coords, v1, v2, v3, director, reference_director, director_tangent, director_second_tangent)
Prepare the evaluation coordinates and nodal directors shared by STF/UPDATE.
subroutine shellmitc_updatestress(etype, nn, flag, update_state, gauss, n_layer, dstrain, material_local_basis, material_reciprocal_basis, stress, alpha, cdsys)
Calculate shell stress and optionally update the integration-point state. The constitutive matrix is ...
subroutine, public stf_shell_mitc(etype, nn, ndof, ecoord, gausses, stiff, thick, mixflag, nddisp, element, ndtriad, ndreftriad, ndcurtriad, nddrill, cdsys_ID, coords)
Calculate the tangent stiffness matrix of a MITC shell element.
subroutine, public update_shell_mitc33(etype, nn, ndof, ecoord, u, du, gausses, qf, thick, mixflag, nddisp, element, ndtriad, ndreftriad, ndcurtriad, nddrill, cdsys_ID, coords)
Shell adapter for the split translational/rotational node layout.
subroutine shellmitc_setuporientation(cdsys_ID, coords, coordsys)
Build the material coordinate system of a shell section (ORIENTATION), as the solid elements do....
subroutine shellmitc_builddrillingsecondvariation(nn, zeta, shapefunc, shapederiv, director_second_tangent, reciprocal_basis, local_basis, use_director_tangent, drilling_second_variation)
Build the director second variation used by the drilling term.
subroutine, public mass_shell(etype, nn, elem, rho, thick, gausses, mass, lumped)
Calculate the consistent and lumped mass matrices of a MITC shell.
subroutine shellmitc_integrateinternalforcelayer(etype, nn, ndof, ilayer, kinematics, finite_rotation, use_director_tangent, use_green_lagrange, update_state, ecoord, evaluation_coords, total_nodal_state, strain_nodal_state, gausses, element, v1, v2, v3, director, reference_director, director_tangent, stress_elem, stress_director, stress_director_increment, nodal_kinematic_dofs, nddrill, qf_work, cdsys)
Integrate one physical shell layer for stress update and internal force. Only one zeta's tying B matr...
subroutine shellmitc_evaluatetyingpointvariation(etype, nn, ndof, tying_set, tying_point, zeta_tying, elem, shell_disp, director, director_tangent, use_green_lagrange, use_director_tangent, point_B, point_basis_variation, director_second_tangent, point_director_second_variation)
Evaluate one MITC tying point. First and second variations are returned separately so UPDATE can reta...
subroutine shellmitc_covariantbasis(nn, coords, director, zeta, shapefunc, shapederiv, covariant_basis)
Evaluate shell covariant basis vectors at one point.
subroutine shellmitc_setupreferencedirectors(etype, nn, thick, elem, v1, v2, v3, director)
Construct the reference nodal triads and half-thickness directors.
subroutine, public elementstress_shell_mitc(etype, nn, ndof, ecoord, gausses, edisp, strain, stress, thick, zeta, n_layer, surface_gauss_points, local_strain, local_stress, local_stress_override, ndtriad, ndreftriad, ndbase_disp, surface_gauss_index, cdsys_ID, coords)
Evaluate MITC shell stress and strain for result output.
subroutine shellmitc_evaluateassumedstrain(etype, nn, naturalcoord, zeta, elem, edisp, director, director_increment, use_green_lagrange, tying_strain, dstrain, strain_tensor, covariant_basis, reciprocal_basis, material_local_basis, material_reciprocal_basis, reference_basis, current_basis, reference_jacobian, current_jacobian)
Evaluate the MITC assumed strain and stress-evaluation bases at one point.
subroutine, public dl_shell_33(ic_type, nn, ndof, xx, yy, zz, rho, thick, ltype, params, vect, nsize, gausses)
Adapt the natural shell load ordering to shell-solid mixed elements.
pure subroutine shellstressvectortotensor(stress, tensor)
subroutine shellmitc_integratestiffnesslayer(etype, nn, ndof, ilayer, kinematics, finite_rotation, use_director_tangent, use_green_lagrange, add_geometric_stiffness, ecoord, elem, shell_disp, gausses, element, v1, v2, v3, director, reference_director, director_tangent, director_second_tangent, nodal_kinematic_dofs, nddrill, stiff_work, cdsys)
Integrate one physical shell layer for the material and geometric stiffness. Tying data are local to ...
subroutine, public stf_shell_mitc33(etype, nn, ndof, ecoord, u, u_prev, gausses, stiff, thick, mixflag, element, ndtriad, ndreftriad, ndcurtriad, nddrill, cdsys_ID, coords)
subroutine shellmitc_transformoutput(use_gl_strain, S, E, covariant_basis, reciprocal_basis, reference_basis, current_basis, det_ref, det_cur, strain_out, stress_out)
Transform shell-local stress and strain to the requested output measure.
subroutine, public dl_shell(etype, nn, ndof, xx, yy, zz, rho, thick, ltype, params, vect, nsize, gausses)
Calculate the distributed load vector of a MITC shell element.
subroutine, public update_shell_mitc(etype, nn, ndof, ecoord, u, du, gausses, qf, thick, mixflag, nddisp, element, ndtriad, ndreftriad, ndcurtriad, nddrill, cdsys_ID, coords)
Update shell stress and assemble the equivalent nodal force.
This module provides aux functions.
subroutine cross_product(v1, v2, vn)
subroutine get_principal(tensor, eigval, princmatrix)
subroutine calinverse(NN, A)
calculate inverse of matrix a
MITC assumed-strain tying-point rules.
integer function, public numoftyingpoints(etype, iset)
Number of tying points in one tying set.
real(kind=kreal), dimension(6, 2), parameter, public mitc9_eta_sign
subroutine, public gettyingpoint(etype, iset, ip, pos)
Natural coordinate of one MITC tying point.
real(kind=kreal), dimension(6, 2), parameter, public mitc9_xi_sign
Sign patterns used by the MITC9 interpolation polynomials.
integer function, public numoftyingsets(etype)
Number of tying-point sets used by an MITC shell element.
This module summarizes all information of material properties.
integer function getelastictype(mtype)
Get elastic type.
integer(kind=kint), parameter shell
integer(kind=kint), parameter totallag
integer(kind=kint), parameter m_poisson
integer(kind=kint), parameter infinitesimal
character(len=dict_key_length) mc_isoelastic
logical function iselastic(mtype)
If it is an elastic material?
integer(kind=kint), parameter updatelag
logical function iselastoplastic(mtype)
If it is an elastoplastic material?
This modules defines a structure to record history dependent parameter in static analysis.
subroutine fstr_shell_layer_zeta(gauss, ilayer, zeta, zeta_layer, ierr)
Map layer-local zeta to the whole shell thickness coordinate.
subroutine fstr_shell_layer_quadrature_gauss(etype, gauss, ilayer, ithick, zeta_layer, weight, ierr)
Layer-local shell thickness coordinate and quadrature weight from material status.
integer(kind=kint) function fstr_shell_layer_gauss_index(element, ig, ilayer, ithick)
Convert surface Gauss/layer/thickness indices to shell_layer_gausses index.
logical function fstr_uses_plane_stress_j2_shell(etype, nn, material)
Return whether the element and material are supported by the plane-stress J2 shell path.
All data should be recorded in every elements.
All data should be recorded in every quadrature points.