21 integer(kind=kint),
parameter :: kLumpedMassFallbackTypes(5) = (/ 301, 611, 641, 761, 781 /)
46 type(hecmwst_local_mesh) :: hecmesh
47 type(hecmwst_matrix) :: hecmat
49 real(kind=kreal),
intent(in) :: time
50 real(kind=kreal),
intent(in) :: tincr
52 real(kind=kreal),
intent(in),
optional :: coef(6)
54 integer(kind=kint) :: ndof, itype, is, ie, ic_type, nn, icel, iis, i, j, in, jn
55 integer(kind=kint) :: nodlocal(fstrsolid%max_ncon)
56 real(kind=kreal) :: stiff_mat(fstrsolid%max_ncon_stf*6, fstrsolid%max_ncon_stf*6)
57 real(kind=kreal) :: mass_mat(fstrsolid%max_ncon_stf*6, fstrsolid%max_ncon_stf*6)
58 real(kind=kreal) :: damp_mat(fstrsolid%max_ncon_stf*6, fstrsolid%max_ncon_stf*6)
59 real(kind=kreal) :: mat(fstrsolid%max_ncon_stf*6, fstrsolid%max_ncon_stf*6), lumped(fstrsolid%max_ncon_stf*6)
60 real(kind=kreal) :: tt(fstrsolid%max_ncon), ecoord(3,fstrsolid%max_ncon)
61 real(kind=kreal) :: u(6,fstrsolid%max_ncon), u_inc(6,fstrsolid%max_ncon)
62 real(kind=kreal) :: du(fstrsolid%max_ncon_stf*6), u_prev(6,fstrsolid%max_ncon)
63 real(kind=kreal) :: triad_tri(9,fstrsolid%max_ncon)
64 real(kind=kreal) :: triad_cur(9,fstrsolid%max_ncon)
65 real(kind=kreal) :: triad_ref(9,fstrsolid%max_ncon)
66 real(kind=kreal) :: shell_drill(fstrsolid%max_ncon)
67 real(kind=kreal) :: veca(fstrsolid%max_ncon_stf*6), vecb(fstrsolid%max_ncon_stf*6)
68 real(kind=kreal) :: acc(fstrsolid%max_ncon_stf*6), vec(fstrsolid%max_ncon_stf*6), df(fstrsolid%max_ncon_stf*6)
69 real(kind=kreal) :: a1, a2, a3, b1, b2, b3, wm, thick
70 type(tmaterial),
pointer :: material
71 logical :: is_dynamic, use_lumped_mass
73 is_dynamic =
present(fstrdynamic) .and.
present(coef)
74 use_lumped_mass = .true.
75 if( is_dynamic ) use_lumped_mass = (fstrdynamic%idx_mas ==
kmasslumped)
76 a1 = 0.0d0; a2 = 0.0d0; a3 = 0.0d0
77 b1 = 0.0d0; b2 = 0.0d0; b3 = 0.0d0
80 call hecmw_mat_clear( hecmat )
82 fstrsolid%DFORCE = 0.0d0
83 a1 = coef(1); a2 = coef(2); a3 = coef(3)
84 b1 = coef(4); b2 = coef(5); b3 = coef(6)
86 if( fstrdynamic%idx_eqa == 2 ) wm = 1.0d0/(1.0d0+fstrdynamic%alpha)
92 do itype = 1, hecmesh%n_elem_type
93 is = hecmesh%elem_type_index(itype-1) + 1
94 ie = hecmesh%elem_type_index(itype )
95 ic_type = hecmesh%elem_type_item(itype)
98 if (hecmw_is_etype_link(ic_type)) cycle
99 if (hecmw_is_etype_patch(ic_type)) cycle
101 nn = hecmw_get_max_node(ic_type)
114 iis = hecmesh%elem_node_index(icel-1)
115 nn = hecmesh%elem_node_index(icel) - iis
118 if( .not. hecmw_has_internal_node( hecmesh, nn, hecmesh%elem_node_item(iis+1:iis+nn) ) ) cycle
122 in = hecmesh%elem_node_item(iis+j)
125 ecoord(i,j) = hecmesh%node(3*(in-1)+i)
128 u_inc(i,j) = fstrsolid%dunode(ndof*(in-1)+i)
129 u_prev(i,j) = fstrsolid%unode(ndof*(in-1)+i)
130 u(i,j) = u_prev(i,j)+u_inc(i,j)
132 if( fstrsolid%TEMP_ngrp_tot > 0 .or. fstrsolid%TEMP_irres > 0 )
then
133 tt(j) = fstrsolid%temperature( nodlocal(j) )
135 if( ic_type == 741 .or. ic_type == 743 .or. ic_type == 731 )
then
136 triad_tri(1:9,j) = 0.0d0
137 triad_cur(1:9,j) = 0.0d0
138 triad_ref(1:9,j) = 0.0d0
139 shell_drill(j) = 0.0d0
140 if(
associated(fstrsolid%shell_dtriad) ) triad_tri(1:9,j) = fstrsolid%shell_dtriad(9*(in-1)+1:9*(in-1)+9)
141 if(
associated(fstrsolid%shell_triad) ) triad_cur(1:9,j) = fstrsolid%shell_triad(9*(in-1)+1:9*(in-1)+9)
142 if(
associated(fstrsolid%shell_ref_triad) ) triad_ref(1:9,j) = fstrsolid%shell_ref_triad(9*(in-1)+1:9*(in-1)+9)
143 if(
associated(fstrsolid%shell_ddrill) ) shell_drill(j) = fstrsolid%shell_ddrill(in)
147 if( ic_type == 761 .or. ic_type == 781 )
then
149 in = nodlocal(j+nn/2)
150 triad_tri(1:9,j) = 0.0d0
151 triad_cur(1:9,j) = 0.0d0
152 triad_ref(1:9,j) = 0.0d0
153 shell_drill(j) = 0.0d0
154 if(
associated(fstrsolid%shell_dtriad) ) triad_tri(1:9,j) = fstrsolid%shell_dtriad(9*(in-1)+1:9*(in-1)+9)
155 if(
associated(fstrsolid%shell_triad) ) triad_cur(1:9,j) = fstrsolid%shell_triad(9*(in-1)+1:9*(in-1)+9)
156 if(
associated(fstrsolid%shell_ref_triad) ) triad_ref(1:9,j) = fstrsolid%shell_ref_triad(9*(in-1)+1:9*(in-1)+9)
157 if(
associated(fstrsolid%shell_ddrill) ) shell_drill(j) = fstrsolid%shell_ddrill(in)
161 if( ic_type == 741 .or. ic_type == 743 .or. ic_type == 731 )
then
162 material => fstrsolid%elements(icel)%gausses(1)%pMaterial
171 call stf_dummy( ndof, nn, ecoord(:,1:nn), &
172 & stiff_mat(1:nn*ndof, 1:nn*ndof), fstrsolid%elements(icel) )
173 call hecmw_mat_ass_elem(hecmat, nn, nodlocal, stiff_mat)
182 call calc_stiff_and_mass_elem( ic_type, nn, ndof, ecoord, u, u_prev, tt, &
183 time, tincr, is_dynamic, fstrsolid, hecmesh, icel, nodlocal, &
184 triad_tri, triad_cur, triad_ref, shell_drill, &
185 stiff_mat, mass_mat, damp_mat, lumped, use_lumped_mass )
188 if( is_dynamic )
then
193 du(ndof*(j-1)+i) = fstrsolid%dunode(ndof*(in-1)+i)
194 vec(ndof*(j-1)+i) = fstrdynamic%VEL(ndof*(in-1)+i,1)
195 acc(ndof*(j-1)+i) = fstrdynamic%ACC(ndof*(in-1)+i,1)
201 veca(i) = -a3*du(i) + a2*vec(i) + a1*acc(i)
202 vecb(i) = -b3*du(i) + b2*vec(i) + b1*acc(i)
206 material => fstrsolid%elements(icel)%gausses(1)%pMaterial
207 call calc_damping_mat_and_force_elem( ic_type, nn, ndof, material, fstrdynamic, &
208 a3, b3, wm, veca, vecb, stiff_mat, mass_mat, damp_mat, mat, df )
210 call hecmw_mat_ass_elem(hecmat, nn, nodlocal, mat)
215 fstrsolid%DFORCE(ndof*(nodlocal(j)-1)+i) = fstrsolid%DFORCE(ndof*(nodlocal(j)-1)+i)+df(ndof*(j-1)+i)
220 call hecmw_mat_ass_elem(hecmat, nn, nodlocal, stiff_mat)
233 hecMESH, fstrSOLID, fstrDYNAMIC, velocity)
result(kinetic_energy)
236 type(hecmwst_local_mesh),
intent(in) :: hecmesh
239 real(kind=kreal),
intent(in) :: velocity(:)
241 integer(kind=kint) :: ndof, itype, is, ie, ic_type, icel, iis, nn
242 integer(kind=kint) :: i, j, row, in, nsize
243 integer(kind=kint) :: nodlocal(fstrsolid%max_ncon)
244 real(kind=kreal) :: ecoord(3,fstrsolid%max_ncon)
245 real(kind=kreal) :: mass_mat(20*6,20*6), lumped(20*6), elem_velocity(20*6)
246 logical :: use_lumped_mass
249 use_lumped_mass = (fstrdynamic%idx_mas ==
kmasslumped)
250 kinetic_energy = 0.0d0
252 do itype = 1, hecmesh%n_elem_type
253 is = hecmesh%elem_type_index(itype-1) + 1
254 ie = hecmesh%elem_type_index(itype)
255 ic_type = hecmesh%elem_type_item(itype)
257 if( hecmw_is_etype_link(ic_type) ) cycle
258 if( hecmw_is_etype_patch(ic_type) ) cycle
259 if( hecmw_is_etype_smoothing(ic_type) ) cycle
267 iis = hecmesh%elem_node_index(icel-1)
268 nn = hecmesh%elem_node_index(icel) - iis
269 if( .not.hecmw_has_internal_node(hecmesh, nn, hecmesh%elem_node_item(iis+1:iis+nn)) ) cycle
273 elem_velocity = 0.0d0
275 in = hecmesh%elem_node_item(iis+j)
277 ecoord(1:3,j) = hecmesh%node(3*(in-1)+1:3*in)
278 elem_velocity(ndof*(j-1)+1:ndof*j) = velocity(ndof*(in-1)+1:ndof*in)
283 call calc_mass_elem(ic_type, nn, ndof, ecoord, fstrsolid, hecmesh, icel, &
284 use_lumped_mass, mass_mat, lumped)
288 if( nodlocal(j) > hecmesh%nn_internal ) cycle
291 kinetic_energy = kinetic_energy + &
292 elem_velocity(row)*dot_product(mass_mat(row,1:nsize), elem_velocity(1:nsize))
300 call hecmw_allreduce_r1(hecmesh, kinetic_energy, hecmw_sum)
301 kinetic_energy = 0.5d0*kinetic_energy
309 type(hecmwst_local_mesh),
intent(in) :: hecmesh
312 real(kind=kreal),
intent(in) :: vec(:)
313 real(kind=kreal),
intent(out) :: mass_vec(:)
315 integer(kind=kint) :: ndof, itype, is, ie, ic_type, icel, iis, nn
316 integer(kind=kint) :: i, j, row, in, nsize
317 integer(kind=kint) :: nodlocal(fstrsolid%max_ncon)
318 real(kind=kreal) :: ecoord(3,fstrsolid%max_ncon)
319 real(kind=kreal) :: mass_mat(20*6,20*6), lumped(20*6), elem_vec(20*6), prod
320 logical :: use_lumped_mass
323 use_lumped_mass = (fstrdynamic%idx_mas ==
kmasslumped)
326 do itype = 1, hecmesh%n_elem_type
327 is = hecmesh%elem_type_index(itype-1) + 1
328 ie = hecmesh%elem_type_index(itype)
329 ic_type = hecmesh%elem_type_item(itype)
331 if( hecmw_is_etype_link(ic_type) ) cycle
332 if( hecmw_is_etype_patch(ic_type) ) cycle
333 if( hecmw_is_etype_smoothing(ic_type) ) cycle
340 iis = hecmesh%elem_node_index(icel-1)
341 nn = hecmesh%elem_node_index(icel) - iis
342 if( .not.hecmw_has_internal_node(hecmesh, nn, hecmesh%elem_node_item(iis+1:iis+nn)) ) cycle
348 in = hecmesh%elem_node_item(iis+j)
350 ecoord(1:3,j) = hecmesh%node(3*(in-1)+1:3*in)
351 elem_vec(ndof*(j-1)+1:ndof*j) = vec(ndof*(in-1)+1:ndof*in)
356 call calc_mass_elem(ic_type, nn, ndof, ecoord, fstrsolid, hecmesh, icel, &
357 use_lumped_mass, mass_mat, lumped)
362 if( in > hecmesh%nn_internal ) cycle
365 prod = dot_product(mass_mat(row,1:nsize), elem_vec(1:nsize))
367 mass_vec(ndof*(in-1)+i) = mass_vec(ndof*(in-1)+i) + prod
379 type(hecmwst_local_mesh),
intent(in) :: hecmesh
382 integer(kind=kint) :: itype, i
383 integer(kind=kint) :: found(size(klumpedmassfallbacktypes))
388 do itype = 1, hecmesh%n_elem_type
390 if( hecmesh%elem_type_index(itype) == hecmesh%elem_type_index(itype-1) ) cycle
391 do i = 1,
size(klumpedmassfallbacktypes)
392 if( hecmesh%elem_type_item(itype) == klumpedmassfallbacktypes(i) ) found(i) = 1
395 call hecmw_allreduce_i(hecmesh, found,
size(found), hecmw_max)
397 if( hecmesh%my_rank /= 0 )
return
398 do i = 1,
size(klumpedmassfallbacktypes)
399 if( found(i) == 0 ) cycle
400 write(
imsg,
'(a,i0,a)')
'INFO: consistent mass is unavailable for element type ', &
401 klumpedmassfallbacktypes(i),
'; lumped mass is used'
414 subroutine calc_stiff_and_mass_elem( ic_type, nn, ndof, ecoord, u, u_prev, tt, &
415 time, tincr, is_dynamic, fstrSOLID, hecMESH, icel, nodLOCAL, &
416 triad_tri, triad_cur, triad_ref, shell_drill, &
417 stiff_mat, mass_mat, damp_mat, lumped, use_lumped_mass )
422 integer(kind=kint),
intent(in) :: ic_type, ndof
423 integer(kind=kint),
intent(inout) :: nn
424 real(kind=kreal),
intent(in) :: ecoord(:,:), u(:,:), u_prev(:,:), tt(:)
425 real(kind=kreal),
intent(in) :: time, tincr
426 logical,
intent(in) :: is_dynamic
428 type(hecmwst_local_mesh),
intent(in) :: hecmesh
429 integer(kind=kint),
intent(in) :: icel
430 integer(kind=kint),
intent(inout) :: nodlocal(:)
431 real(kind=kreal),
intent(in) :: triad_tri(:,:), triad_cur(:,:)
432 real(kind=kreal),
intent(in) :: triad_ref(:,:), shell_drill(:)
433 real(kind=kreal),
intent(inout) :: stiff_mat(:,:), mass_mat(:,:), damp_mat(:,:)
434 real(kind=kreal),
intent(inout) :: lumped(:)
435 logical,
intent(in) :: use_lumped_mass
437 type(tmaterial),
pointer :: material
438 integer(kind=kint) :: isect, ihead, cdsys_id
439 real(kind=kreal) :: coords(3,3), thick
442 isect = hecmesh%section_ID(icel)
443 ihead = hecmesh%section%sect_R_index(isect-1)
444 cdsys_id = hecmesh%section%sect_orien_ID(isect)
446 if( cdsys_id > 0 )
call get_coordsys(cdsys_id, hecmesh, fstrsolid, coords, icel)
448 material => fstrsolid%elements(icel)%gausses(1)%pMaterial
449 thick = hecmesh%section%sect_R_item(ihead+1)
451 if( ic_type==241 .or. ic_type==242 .or. ic_type==231 .or. ic_type==232 .or. ic_type==2322)
then
452 if( material%nlgeom_flag /= infinitesimal )
call createmat_abort( ic_type, 2 )
453 call stf_c2( ic_type, nn, ecoord(1:2,1:nn), fstrsolid%elements(icel)%gausses(:), thick, &
454 stiff_mat(1:nn*ndof,1:nn*ndof), fstrsolid%elements(icel)%iset, u(1:2,1:nn) )
456 elseif( ic_type==301 )
then
457 call stf_c1( nn, ecoord(:,1:nn), thick, fstrsolid%elements(icel)%gausses(:), &
458 stiff_mat(1:nn*ndof,1:nn*ndof), u(1:3,1:nn) )
460 elseif( ic_type==361 )
then
461 if( fstrsolid%sections(isect)%elemopt361 ==
kel361fi )
then
462 call stf_c3( ic_type, nn, ecoord(:,1:nn), fstrsolid%elements(icel)%gausses(:), &
463 stiff_mat(1:nn*ndof,1:nn*ndof), cdsys_id, coords, time, tincr, u(1:3,1:nn), tt(1:nn) )
464 else if( fstrsolid%sections(isect)%elemopt361 ==
kel361bbar )
then
465 call stf_c3d8bbar( ic_type, nn, ecoord(:,1:nn), fstrsolid%elements(icel)%gausses(:), &
466 stiff_mat(1:nn*ndof,1:nn*ndof), cdsys_id, coords, time, tincr, u(1:3,1:nn), tt(1:nn) )
467 else if( fstrsolid%sections(isect)%elemopt361 ==
kel361ic )
then
468 call stf_c3d8ic( ic_type, nn, ecoord(:,1:nn), fstrsolid%elements(icel)%gausses(:), &
469 stiff_mat(1:nn*ndof,1:nn*ndof), cdsys_id, coords, time, tincr, u(1:3,1:nn), &
470 fstrsolid%elements(icel)%aux, tt(1:nn) )
471 else if( fstrsolid%sections(isect)%elemopt361 ==
kel361fbar )
then
472 call stf_c3d8fbar( ic_type, nn, ecoord(:,1:nn), fstrsolid%elements(icel)%gausses(:), &
473 stiff_mat(1:nn*ndof,1:nn*ndof), cdsys_id, coords, time, tincr, u(1:3,1:nn), tt(1:nn) )
474 else if( fstrsolid%sections(isect)%elemopt361 ==
kel361up )
then
475 call stf_c3_up( ic_type, nn, ecoord(:,1:nn), fstrsolid%elements(icel)%gausses(:), &
476 stiff_mat(1:nn*ndof,1:nn*ndof), cdsys_id, coords, time, tincr, &
477 1, u(1:3,1:nn), tt(1:nn) )
480 elseif( ic_type==341 .or. ic_type==351 .or. ic_type==342 .or. ic_type==352 .or. ic_type==362 )
then
483 if( .not. (ic_type==341 .and. fstrsolid%sections(isect)%elemopt341 ==
kel341sesns) )
then
484 call stf_c3( ic_type, nn, ecoord(:,1:nn), fstrsolid%elements(icel)%gausses(:), &
485 stiff_mat(1:nn*ndof,1:nn*ndof), cdsys_id, coords, time, tincr, u(1:3,1:nn), tt(1:nn) )
488 else if( ic_type == 511 )
then
489 call stf_connector( nn, ecoord(:,1:nn), fstrsolid%elements(icel)%gausses(:), &
490 stiff_mat(1:nn*ndof,1:nn*ndof), u(1:3,1:nn))
492 if( is_dynamic )
call dmp_connector( nn, ecoord(:,1:nn), fstrsolid%elements(icel)%gausses(:), &
493 damp_mat(1:nn*ndof,1:nn*ndof), u(1:3,1:nn))
495 else if( ic_type == 611 )
then
496 if( material%nlgeom_flag /= infinitesimal )
call createmat_abort( ic_type, 2 )
497 call stf_beam(nn, ecoord, hecmesh%section%sect_R_item(ihead+1:), &
498 material%variables(m_youngs), material%variables(m_poisson), stiff_mat(1:nn*ndof,1:nn*ndof), &
499 fstrsolid%sections(isect)%elemopt611)
501 else if( ic_type == 641 )
then
502 if( material%nlgeom_flag /= infinitesimal )
call createmat_abort( ic_type, 2 )
503 call stf_beam_641_from_611(ecoord(1:3,1:4), fstrsolid%elements(icel)%gausses(:), &
504 hecmesh%section%sect_R_item(ihead+1:), stiff_mat(1:nn*ndof,1:nn*ndof), &
505 fstrsolid%sections(isect)%elemopt611)
507 else if( ( ic_type == 741 ) .or. ( ic_type == 743 ) .or. ( ic_type == 731 ) )
then
508 call stf_shell_mitc(ic_type, nn, ndof, ecoord(1:3,1:nn), fstrsolid%elements(icel)%gausses(:), &
509 stiff_mat(1:nn*ndof,1:nn*ndof), thick, 0, nddisp=u(1:ndof,1:nn), &
510 element=fstrsolid%elements(icel), ndtriad=triad_tri(1:9,1:nn), &
511 ndreftriad=triad_ref(1:9,1:nn), &
512 ndcurtriad=triad_cur(1:9,1:nn), nddrill=shell_drill(1:nn), cdsys_id=cdsys_id, coords=coords)
514 else if( ic_type == 761 )
then
515 if( material%nlgeom_flag == infinitesimal )
then
516 call stf_shell_mitc(731, 3, 6, ecoord(1:3,1:3), fstrsolid%elements(icel)%gausses(:), &
517 stiff_mat(1:nn*ndof,1:nn*ndof), thick, 2, cdsys_id=cdsys_id, coords=coords)
519 call stf_shell_mitc33(731, 3, 6, ecoord(1:3,1:3), u(1:3,1:6), u_prev(1:3,1:6), &
520 fstrsolid%elements(icel)%gausses(:), stiff_mat(1:nn*ndof,1:nn*ndof), thick, 2, &
521 fstrsolid%elements(icel), triad_tri(1:9,1:3), triad_ref(1:9,1:3), &
522 triad_cur(1:9,1:3), shell_drill(1:3), cdsys_id=cdsys_id, coords=coords)
525 else if( ic_type == 781 )
then
526 call stf_shell_mitc33(741, 4, 6, ecoord(1:3,1:4), u(1:3,1:8), u_prev(1:3,1:8), &
527 fstrsolid%elements(icel)%gausses(:), stiff_mat(1:nn*ndof,1:nn*ndof), thick, 1, &
528 fstrsolid%elements(icel), triad_tri(1:9,1:4), triad_ref(1:9,1:4), &
529 triad_cur(1:9,1:4), shell_drill(1:4), cdsys_id=cdsys_id, coords=coords)
531 elseif( ic_type==3414 )
then
532 if( material%mtype /= incomp_newtonian )
call createmat_abort( ic_type, 3, material%mtype )
533 call stf_c3_vp( ic_type, nn, ecoord(:,1:nn), fstrsolid%elements(icel)%gausses(:), &
534 stiff_mat(1:nn*ndof,1:nn*ndof), tincr, u_prev(1:4,1:nn) )
536 else if( ic_type == 881 .or. ic_type == 891 )
then
537 call stf_c3d4_sesns( ic_type, nn, nodlocal, ecoord(:,1:nn), fstrsolid%elements(icel)%gausses(:), &
538 stiff_mat, cdsys_id, coords, time, tincr, u(1:3,1:nn), tt(1:nn) )
541 call createmat_abort( ic_type, 1 )
544 if( is_dynamic )
call calc_mass_elem( ic_type, nn, ndof, ecoord, fstrsolid, hecmesh, icel, &
545 use_lumped_mass, mass_mat, lumped )
547 end subroutine calc_stiff_and_mass_elem
557 subroutine calc_mass_elem( ic_type, nn, ndof, ecoord, fstrSOLID, hecMESH, icel, &
558 use_lumped_mass, mass_mat, lumped )
564 integer(kind=kint),
intent(in) :: ic_type, nn, ndof, icel
565 real(kind=kreal),
intent(in) :: ecoord(:,:)
567 type(hecmwst_local_mesh),
intent(in) :: hecMESH
568 logical,
intent(in) :: use_lumped_mass
569 real(kind=kreal),
intent(inout) :: mass_mat(:,:), lumped(:)
571 type(tmaterial),
pointer :: material
572 integer(kind=kint) :: i, isect, ihead, sec_opt
573 real(kind=kreal) :: thick, rho, length, surf
575 isect = hecmesh%section_ID(icel)
576 ihead = hecmesh%section%sect_R_index(isect-1)
577 sec_opt = hecmesh%section%sect_opt(isect)
579 material => fstrsolid%elements(icel)%gausses(1)%pMaterial
580 thick = hecmesh%section%sect_R_item(ihead+1)
582 if( ic_type==241 .or. ic_type==242 .or. ic_type==231 .or. ic_type==232 .or. ic_type==2322)
then
583 call mass_c2(ic_type, nn, ecoord(1:2,1:nn), fstrsolid%elements(icel)%gausses, &
584 sec_opt, thick, mass_mat, lumped, is_lumped=use_lumped_mass)
586 elseif( ic_type==361 .or. ic_type==341 .or. ic_type==351 .or. ic_type==342 .or. ic_type==352 &
587 .or. ic_type==362 )
then
588 call mass_c3(ic_type, nn, ecoord(1:3,1:nn), fstrsolid%elements(icel)%gausses, &
589 mass_mat, lumped, is_lumped=use_lumped_mass)
591 else if( ( ic_type == 741 ) .or. ( ic_type == 743 ) .or. ( ic_type == 731 ) )
then
592 rho = material%variables(m_density)
593 call mass_shell(ic_type, nn, ecoord(1:3,1:nn), rho, thick, fstrsolid%elements(icel)%gausses, mass_mat, lumped)
596 elseif( ic_type==301 )
then
597 surf = hecmesh%section%sect_R_item(ihead+1)
599 rho = material%variables(m_density)
602 mass_mat(i,i) = 0.5d0*surf*length*rho
605 else if( ic_type == 611 )
then
606 surf = hecmesh%section%sect_R_item(ihead+4)
608 rho = material%variables(m_density)
609 call mass_beam(surf, length, rho, mass_mat)
611 else if( ic_type == 641 )
then
612 surf = hecmesh%section%sect_R_item(ihead+4)
614 rho = material%variables(m_density)
617 else if( ic_type == 761 )
then
619 rho = material%variables(m_density)
620 call mass_s3(surf, thick, rho, mass_mat)
622 else if( ic_type == 781 )
then
624 rho = material%variables(m_density)
625 call mass_s4(surf, thick, rho, mass_mat)
627 else if( ic_type == 511 .or. ic_type == 3414 .or. ic_type == 881 .or. ic_type == 891 )
then
631 call createmat_abort( ic_type, 4 )
637 integer(kind=kint),
intent(in) :: nsize
638 real(kind=kreal),
intent(in) :: lumped(:)
639 real(kind=kreal),
intent(inout) :: mass(:,:)
640 integer(kind=kint) :: i
644 mass(i,i) = lumped(i)
656 subroutine calc_damping_mat_and_force_elem( ic_type, nn, ndof, material, fstrDYNAMIC, &
657 a3, b3, wm, vecA, vecB, stiff_mat, mass_mat, damp_mat, mat, df )
659 integer(kind=kint),
intent(in) :: ic_type, nn, ndof
660 type(tmaterial),
pointer,
intent(in) :: material
662 real(kind=kreal),
intent(in) :: a3, b3, wm
663 real(kind=kreal),
intent(in) :: veca(:), vecb(:)
664 real(kind=kreal),
intent(in) :: stiff_mat(:,:), mass_mat(:,:), damp_mat(:,:)
665 real(kind=kreal),
intent(out) :: mat(:,:), df(:)
667 integer(kind=kint) :: i, j
668 real(kind=kreal) :: ray_m, ray_k, c1, c2
669 real(kind=kreal) :: vecc(nn*ndof), kb(nn*ndof)
671 if( material%is_elem_Rayleigh_damping )
then
672 ray_m = material%variables(m_damping_rm)
673 ray_k = material%variables(m_damping_rk)
675 ray_m = fstrdynamic%ray_m
676 ray_k = fstrdynamic%ray_k
681 c2 = wm*a3 + ray_m*b3
684 mat(j,i) = c1*stiff_mat(j,i) + c2*mass_mat(j,i)
687 if( ic_type == 511 )
then
690 mat(j,i) = mat(j,i) + b3*damp_mat(j,i)
697 vecc(i) = wm*veca(i) + ray_m*vecb(i)
703 kb(i) = kb(i) + stiff_mat(i,j)*vecb(j)
708 df(1:nn*ndof) = matmul(mass_mat(1:nn*ndof,1:nn*ndof), vecc(1:nn*ndof))
710 df(i) = df(i) + ray_k*kb(i)
712 if( ic_type == 511 )
then
715 df(i) = df(i) + damp_mat(i,j)*vecb(j)
720 end subroutine calc_damping_mat_and_force_elem
722 subroutine createmat_abort( ic_type, flag, mtype )
723 integer(kind=kint),
intent(in) :: ic_type
724 integer(kind=kint),
intent(in) :: flag
725 integer(kind=kint),
intent(in),
optional :: mtype
729 write(*,*)
'###ERROR### : Element type not supported for static analysis'
730 else if( flag == 2 )
then
731 write(*,*)
'###ERROR### : Element type not supported for nonlinear static analysis'
732 else if( flag == 3 )
then
733 write(*,*)
'###ERROR### : This element is not supported for this material'
734 else if( flag == 4 )
then
735 write(*,*)
'###ERROR### : Element type not supported for dynamic analysis'
737 write(*,*)
' ic_type = ', ic_type
738 if(
present(mtype) )
write(*,*)
' mtype = ', mtype
740 call hecmw_abort(hecmw_comm_get_comm())
741 end subroutine createmat_abort
This module contains subroutines used in 3d eigen analysis for.
real(kind=kreal) function get_length(ecoord)
subroutine mass_beam_33(surf, length, rho, mass)
real(kind=kreal) function get_face4(ecoord)
subroutine mass_s3(surf, thick, rho, mass)
real(kind=kreal) function get_face3(ecoord)
subroutine mass_beam(surf, length, rho, mass)
subroutine mass_c3(etype, nn, ecoord, gausses, mass, lumped, temperature, is_lumped)
subroutine mass_c2(etype, nn, ecoord, gausses, sec_opt, thick, mass, lumped, temperature, is_lumped)
subroutine mass_s4(surf, thick, rho, mass)
This module defined elemact data and function.
subroutine stf_dummy(ndof, nn, ecoord, stiff, element)
integer, parameter kelact_inactive
This module assembles the tangent stiffness matrix and, in the implicit dynamic case,...
real(kind=kreal) function, public fstr_calc_kinetic_energy(hecMESH, fstrSOLID, fstrDYNAMIC, velocity)
Recompute each element mass matrix and evaluate 0.5*v^T*M*v. Only rows owned by this rank are accumul...
subroutine, public fstr_creatematrix_and_dampingforce(hecMESH, hecMAT, fstrSOLID, time, tincr, fstrDYNAMIC, coef)
Assemble the system matrix and, optionally, the dynamic damping force.
subroutine calc_mass_elem(ic_type, nn, ndof, ecoord, fstrSOLID, hecMESH, icel, use_lumped_mass, mass_mat, lumped)
Compute the element mass matrix for the given element type.
subroutine, public fstr_calc_mass_product(hecMESH, fstrSOLID, fstrDYNAMIC, vec, mass_vec)
Recompute each element mass matrix and evaluate M*vec. Only rows owned by this rank are computed; the...
subroutine set_diagonal_mass(nsize, lumped, mass)
subroutine, public fstr_report_lumped_mass_fallback(hecMESH, fstrDYNAMIC)
Report the element types that use the lumped mass although the consistent mass is selected....
Shared finite-rotation nodal kinematics and rotation algebra.
logical function, public fstr_uses_finite_rotation_kinematics(etype, nn, material)
pure subroutine, public shellcomposenodaldisplacement(ndof, nn, disp_old, disp_inc, disp_new)
Finite-rotation nodal kinematics for NLGEOM.
subroutine, public fstr_ensure_finite_rotation_state(hecMESH, fstrSOLID, ndof)
Build the per-node reference frames once, by averaging the triads contributed by adjacent local shell...
This module defines common data and basic structures for analysis.
integer(kind=kint), parameter kel361bbar
integer(kind=kint), parameter kel341sesns
integer(kind=kint), parameter imsg
integer(kind=kint), parameter kel361up
integer(kind=kint), parameter kel361fi
integer(kind=kint), parameter kmassconsistent
subroutine get_coordsys(cdsys_ID, hecMESH, fstrSOLID, coords, icel)
This subroutine fetch coords defined by local coordinate system.
integer(kind=kint), parameter kel361ic
integer(kind=kint), parameter kel361fbar
integer(kind=kint), parameter kmasslumped
mass matrix type
This modules just summarizes all modules used in static analysis.
This modules defines a structure to record history dependent parameter in static analysis.
Data for DYNAMIC ANSLYSIS (fstrDYNAMIC)