40 type(hecmwst_local_mesh) :: hecmesh
41 type(hecmwst_matrix) :: hecmat
43 real(kind=kreal),
intent(in) :: time
44 real(kind=kreal),
intent(in) :: tincr
46 real(kind=kreal),
intent(in),
optional :: coef(6)
48 integer(kind=kint) :: ndof, itype, is, ie, ic_type, nn, icel, iis, i, j, in, jn
49 integer(kind=kint) :: nodlocal(fstrsolid%max_ncon)
50 real(kind=kreal) :: stiff_mat(fstrsolid%max_ncon_stf*6, fstrsolid%max_ncon_stf*6)
51 real(kind=kreal) :: mass_mat(20*6, 20*6), damp_mat(20*6, 20*6)
52 real(kind=kreal) :: mat(20*6, 20*6), lumped(20*6)
53 real(kind=kreal) :: tt(fstrsolid%max_ncon), ecoord(3,fstrsolid%max_ncon)
54 real(kind=kreal) :: u(6,fstrsolid%max_ncon), u_inc(6,fstrsolid%max_ncon)
55 real(kind=kreal) :: du(6*20), u_prev(6,fstrsolid%max_ncon)
56 real(kind=kreal) :: triad_tri(9,fstrsolid%max_ncon)
57 real(kind=kreal) :: triad_cur(9,fstrsolid%max_ncon)
58 real(kind=kreal) :: triad_ref(9,fstrsolid%max_ncon)
59 real(kind=kreal) :: shell_drill(fstrsolid%max_ncon)
60 real(kind=kreal) :: veca(20*6), vecb(20*6)
61 real(kind=kreal) :: acc(20*6), vec(20*6), df(20*6)
62 real(kind=kreal) :: a1, a2, a3, b1, b2, b3, thick
63 type(tmaterial),
pointer :: material
66 is_dynamic =
present(fstrdynamic) .and.
present(coef)
68 call hecmw_mat_clear( hecmat )
70 fstrsolid%DFORCE = 0.0d0
71 a1 = coef(1); a2 = coef(2); a3 = coef(3)
72 b1 = coef(4); b2 = coef(5); b3 = coef(6)
78 do itype = 1, hecmesh%n_elem_type
79 is = hecmesh%elem_type_index(itype-1) + 1
80 ie = hecmesh%elem_type_index(itype )
81 ic_type = hecmesh%elem_type_item(itype)
84 if (hecmw_is_etype_link(ic_type)) cycle
85 if (hecmw_is_etype_patch(ic_type)) cycle
87 nn = hecmw_get_max_node(ic_type)
100 iis = hecmesh%elem_node_index(icel-1)
101 nn = hecmesh%elem_node_index(icel) - iis
104 if( .not. hecmw_has_internal_node( hecmesh, nn, hecmesh%elem_node_item(iis+1:iis+nn) ) ) cycle
108 in = hecmesh%elem_node_item(iis+j)
111 ecoord(i,j) = hecmesh%node(3*(in-1)+i)
114 u_inc(i,j) = fstrsolid%dunode(ndof*(in-1)+i)
115 u_prev(i,j) = fstrsolid%unode(ndof*(in-1)+i)
116 u(i,j) = u_prev(i,j)+u_inc(i,j)
118 if( is_dynamic )
then
120 du(ndof*(j-1)+i) = fstrsolid%dunode(ndof*(in-1)+i)
121 vec(ndof*(j-1)+i) = fstrdynamic%VEL(ndof*(in-1)+i,1)
122 acc(ndof*(j-1)+i) = fstrdynamic%ACC(ndof*(in-1)+i,1)
125 if( fstrsolid%TEMP_ngrp_tot > 0 .or. fstrsolid%TEMP_irres > 0 )
then
126 tt(j) = fstrsolid%temperature( nodlocal(j) )
128 if( ic_type == 741 .or. ic_type == 743 .or. ic_type == 731 )
then
129 triad_tri(1:9,j) = 0.0d0
130 triad_cur(1:9,j) = 0.0d0
131 triad_ref(1:9,j) = 0.0d0
132 shell_drill(j) = 0.0d0
133 if(
associated(fstrsolid%shell_dtriad) ) triad_tri(1:9,j) = fstrsolid%shell_dtriad(9*(in-1)+1:9*(in-1)+9)
134 if(
associated(fstrsolid%shell_triad) ) triad_cur(1:9,j) = fstrsolid%shell_triad(9*(in-1)+1:9*(in-1)+9)
135 if(
associated(fstrsolid%shell_ref_triad) ) triad_ref(1:9,j) = fstrsolid%shell_ref_triad(9*(in-1)+1:9*(in-1)+9)
136 if(
associated(fstrsolid%shell_ddrill) ) shell_drill(j) = fstrsolid%shell_ddrill(in)
140 if( ic_type == 741 .or. ic_type == 743 .or. ic_type == 731 )
then
141 material => fstrsolid%elements(icel)%gausses(1)%pMaterial
150 call stf_dummy( ndof, nn, ecoord(:,1:nn), u(1:3,1:nn), &
151 & stiff_mat(1:nn*ndof, 1:nn*ndof), fstrsolid%elements(icel) )
152 call hecmw_mat_ass_elem(hecmat, nn, nodlocal, stiff_mat)
162 time, tincr, is_dynamic, fstrsolid, hecmesh, icel, nodlocal, &
163 triad_tri, triad_cur, triad_ref, shell_drill, &
164 stiff_mat, mass_mat, damp_mat, lumped )
167 if( is_dynamic )
then
170 veca(i) = -a3*du(i) + a2*vec(i) + a1*acc(i)
171 vecb(i) = -b3*du(i) + b2*vec(i) + b1*acc(i)
175 material => fstrsolid%elements(icel)%gausses(1)%pMaterial
177 a3, b3, veca, vecb, stiff_mat, mass_mat, damp_mat, mat, df )
179 call hecmw_mat_ass_elem(hecmat, nn, nodlocal, mat)
184 fstrsolid%DFORCE(ndof*(nodlocal(j)-1)+i) = fstrsolid%DFORCE(ndof*(nodlocal(j)-1)+i)+df(ndof*(j-1)+i)
189 call hecmw_mat_ass_elem(hecmat, nn, nodlocal, stiff_mat)
209 time, tincr, is_dynamic, fstrSOLID, hecMESH, icel, nodLOCAL, &
210 triad_tri, triad_cur, triad_ref, shell_drill, &
211 stiff_mat, mass_mat, damp_mat, lumped )
217 integer(kind=kint),
intent(in) :: ic_type, ndof
218 integer(kind=kint),
intent(inout) :: nn
219 real(kind=kreal),
intent(in) :: ecoord(:,:), u(:,:), u_prev(:,:), tt(:)
220 real(kind=kreal),
intent(in) :: time, tincr
221 logical,
intent(in) :: is_dynamic
223 type(hecmwst_local_mesh),
intent(in) :: hecMESH
224 integer(kind=kint),
intent(in) :: icel
225 integer(kind=kint),
intent(inout) :: nodLOCAL(:)
226 real(kind=kreal),
intent(in) :: triad_tri(:,:), triad_cur(:,:)
227 real(kind=kreal),
intent(in) :: triad_ref(:,:), shell_drill(:)
228 real(kind=kreal),
intent(inout) :: stiff_mat(:,:), mass_mat(:,:), damp_mat(:,:)
229 real(kind=kreal),
intent(inout) :: lumped(:)
231 type(tmaterial),
pointer :: material
232 integer(kind=kint) :: isect, ihead, cdsys_id, sec_opt
233 real(kind=kreal) :: coords(3,3), thick
234 real(kind=kreal) :: rho, length, surf
237 isect = hecmesh%section_ID(icel)
238 ihead = hecmesh%section%sect_R_index(isect-1)
239 cdsys_id = hecmesh%section%sect_orien_ID(isect)
240 sec_opt = hecmesh%section%sect_opt(isect)
242 if( cdsys_id > 0 )
call get_coordsys(cdsys_id, hecmesh, fstrsolid, coords, icel)
244 material => fstrsolid%elements(icel)%gausses(1)%pMaterial
245 thick = hecmesh%section%sect_R_item(ihead+1)
247 if( ic_type==241 .or. ic_type==242 .or. ic_type==231 .or. ic_type==232 .or. ic_type==2322)
then
248 if( material%nlgeom_flag /= infinitesimal )
call createmat_abort( ic_type, 2 )
249 call stf_c2( ic_type, nn, ecoord(1:2,1:nn), fstrsolid%elements(icel)%gausses(:), thick, &
250 stiff_mat(1:nn*ndof,1:nn*ndof), fstrsolid%elements(icel)%iset, u(1:2,1:nn) )
252 if( is_dynamic )
call mass_c2(ic_type, nn, ecoord(1:2,1:nn), fstrsolid%elements(icel)%gausses, &
253 sec_opt, thick, mass_mat, lumped)
255 elseif( ic_type==301 )
then
256 call stf_c1( ic_type, nn, ecoord(:,1:nn), thick, fstrsolid%elements(icel)%gausses(:), &
257 stiff_mat(1:nn*ndof,1:nn*ndof), u(1:3,1:nn) )
259 elseif( ic_type==361 )
then
260 if( fstrsolid%sections(isect)%elemopt361 ==
kel361fi )
then
261 call stf_c3( ic_type, nn, ecoord(:,1:nn), fstrsolid%elements(icel)%gausses(:), &
262 stiff_mat(1:nn*ndof,1:nn*ndof), cdsys_id, coords, time, tincr, u(1:3,1:nn), tt(1:nn) )
263 else if( fstrsolid%sections(isect)%elemopt361 ==
kel361bbar )
then
264 call stf_c3d8bbar( ic_type, nn, ecoord(:,1:nn), fstrsolid%elements(icel)%gausses(:), &
265 stiff_mat(1:nn*ndof,1:nn*ndof), cdsys_id, coords, time, tincr, u(1:3,1:nn), tt(1:nn) )
266 else if( fstrsolid%sections(isect)%elemopt361 ==
kel361ic )
then
267 call stf_c3d8ic( ic_type, nn, ecoord(:,1:nn), fstrsolid%elements(icel)%gausses(:), &
268 stiff_mat(1:nn*ndof,1:nn*ndof), cdsys_id, coords, time, tincr, u(1:3,1:nn), &
269 fstrsolid%elements(icel)%aux, tt(1:nn) )
270 else if( fstrsolid%sections(isect)%elemopt361 ==
kel361fbar )
then
271 call stf_c3d8fbar( ic_type, nn, ecoord(:,1:nn), fstrsolid%elements(icel)%gausses(:), &
272 stiff_mat(1:nn*ndof,1:nn*ndof), cdsys_id, coords, time, tincr, u(1:3,1:nn), tt(1:nn) )
273 else if( fstrsolid%sections(isect)%elemopt361 ==
kel361up )
then
274 call stf_c3_up( ic_type, nn, ecoord(:,1:nn), fstrsolid%elements(icel)%gausses(:), &
275 stiff_mat(1:nn*ndof,1:nn*ndof), cdsys_id, coords, time, tincr, &
276 1, fstrsolid%elements(icel)%p, u(1:3,1:nn), tt(1:nn) )
279 if( is_dynamic )
call mass_c3(ic_type, nn, ecoord(1:3,1:nn), fstrsolid%elements(icel)%gausses, mass_mat, lumped)
281 elseif( ic_type==341 .or. ic_type==351 .or. ic_type==342 .or. ic_type==352 .or. ic_type==362 )
then
284 if( .not. (ic_type==341 .and. fstrsolid%sections(isect)%elemopt341 ==
kel341sesns) )
then
285 call stf_c3( ic_type, nn, ecoord(:,1:nn), fstrsolid%elements(icel)%gausses(:), &
286 stiff_mat(1:nn*ndof,1:nn*ndof), cdsys_id, coords, time, tincr, u(1:3,1:nn), tt(1:nn) )
289 if( is_dynamic )
call mass_c3(ic_type, nn, ecoord(1:3,1:nn), fstrsolid%elements(icel)%gausses, mass_mat, lumped)
291 else if( ic_type == 511 )
then
292 call stf_connector( ic_type, nn, ecoord(:,1:nn), fstrsolid%elements(icel)%gausses(:), &
293 stiff_mat(1:nn*ndof,1:nn*ndof), u(1:3,1:nn), tt(1:nn))
295 if( is_dynamic )
call dmp_connector( ic_type, nn, ecoord(:,1:nn), fstrsolid%elements(icel)%gausses(:), &
296 damp_mat(1:nn*ndof,1:nn*ndof), u(1:3,1:nn), tt(1:nn))
298 else if( ic_type == 611 )
then
299 if( material%nlgeom_flag /= infinitesimal )
call createmat_abort( ic_type, 2 )
300 call stf_beam(ic_type, nn, ecoord, hecmesh%section%sect_R_item(ihead+1:), &
301 & material%variables(m_youngs), material%variables(m_poisson), stiff_mat(1:nn*ndof,1:nn*ndof))
303 if( is_dynamic )
then
304 surf = hecmesh%section%sect_R_item(ihead+4)
306 rho = material%variables(m_density)
307 call mass_beam(surf, length, rho, mass_mat)
310 else if( ic_type == 641 )
then
311 if( material%nlgeom_flag /= infinitesimal )
call createmat_abort( ic_type, 2 )
312 call stf_beam_641(ic_type, nn, ecoord, fstrsolid%elements(icel)%gausses(:), &
313 & hecmesh%section%sect_R_item(ihead+1:), stiff_mat(1:nn*ndof,1:nn*ndof))
315 if( is_dynamic )
then
316 surf = hecmesh%section%sect_R_item(ihead+4)
318 rho = material%variables(m_density)
322 else if( ( ic_type == 741 ) .or. ( ic_type == 743 ) .or. ( ic_type == 731 ) )
then
323 call stf_shell_mitc(ic_type, nn, ndof, ecoord(1:3,1:nn), fstrsolid%elements(icel)%gausses(:), &
324 stiff_mat(1:nn*ndof,1:nn*ndof), thick, 0, nddisp=u(1:ndof,1:nn), &
325 element=fstrsolid%elements(icel), ndtriad=triad_tri(1:9,1:nn), &
326 ndreftriad=triad_ref(1:9,1:nn), &
327 ndcurtriad=triad_cur(1:9,1:nn), nddrill=shell_drill(1:nn))
329 if( is_dynamic )
then
330 rho = material%variables(m_density)
331 call mass_shell(ic_type, nn, ecoord(1:3,1:nn), rho, thick, fstrsolid%elements(icel)%gausses, mass_mat, lumped)
334 else if( ic_type == 761 )
then
335 if( material%nlgeom_flag /= infinitesimal )
call createmat_abort( ic_type, 2 )
336 call stf_shell_mitc(731, 3, 6, ecoord(1:3,1:3), fstrsolid%elements(icel)%gausses(:), &
337 & stiff_mat(1:nn*ndof,1:nn*ndof), thick, 2)
339 if( is_dynamic )
then
341 rho = material%variables(m_density)
342 call mass_s3(surf, thick, rho, mass_mat)
345 else if( ic_type == 781 )
then
346 if( material%nlgeom_flag /= infinitesimal )
call createmat_abort( ic_type, 2 )
347 call stf_shell_mitc(741, 4, 6, ecoord(1:3,1:4), fstrsolid%elements(icel)%gausses(:), &
348 & stiff_mat(1:nn*ndof,1:nn*ndof), thick, 1)
350 if( is_dynamic )
then
352 rho = material%variables(m_density)
353 call mass_s4(surf, thick, rho, mass_mat)
356 elseif( ic_type==3414 )
then
357 if( material%mtype /= incomp_newtonian )
call createmat_abort( ic_type, 3, material%mtype )
358 call stf_c3_vp( ic_type, nn, ecoord(:,1:nn), fstrsolid%elements(icel)%gausses(:), &
359 stiff_mat(1:nn*ndof,1:nn*ndof), tincr, u_prev(1:4,1:nn) )
361 else if( ic_type == 881 .or. ic_type == 891 )
then
362 call stf_c3d4_sesns( ic_type, nn, nodlocal, ecoord(:,1:nn), fstrsolid%elements(icel)%gausses(:), &
363 stiff_mat, cdsys_id, coords, time, tincr, u(1:3,1:nn), tt(1:nn) )
366 call createmat_abort( ic_type, 1 )
379 a3, b3, vecA, vecB, stiff_mat, mass_mat, damp_mat, mat, df )
381 integer(kind=kint),
intent(in) :: ic_type, nn, ndof
382 type(tmaterial),
pointer,
intent(in) :: material
384 real(kind=kreal),
intent(in) :: a3, b3
385 real(kind=kreal),
intent(in) :: veca(:), vecb(:)
386 real(kind=kreal),
intent(in) :: stiff_mat(:,:), mass_mat(:,:), damp_mat(:,:)
387 real(kind=kreal),
intent(out) :: mat(:,:), df(:)
389 integer(kind=kint) :: i, j
390 real(kind=kreal) :: ray_m, ray_k, c1, c2
391 real(kind=kreal) :: vecc(20*6), kb(20*6)
393 if( material%is_elem_Rayleigh_damping )
then
394 ray_m = material%variables(m_damping_rm)
395 ray_k = material%variables(m_damping_rk)
397 ray_m = fstrdynamic%ray_m
398 ray_k = fstrdynamic%ray_k
406 mat(j,i) = c1*stiff_mat(j,i) + c2*mass_mat(j,i)
409 if( ic_type == 511 )
then
412 mat(j,i) = mat(j,i) + b3*damp_mat(j,i)
419 vecc(i) = veca(i) + ray_m*vecb(i)
425 kb(i) = kb(i) + stiff_mat(i,j)*vecb(j)
430 df(1:nn*ndof) = matmul(mass_mat(1:nn*ndof,1:nn*ndof), vecc(1:nn*ndof))
432 df(i) = df(i) + ray_k*kb(i)
434 if( ic_type == 511 )
then
437 df(i) = df(i) + damp_mat(i,j)*vecb(j)
444 subroutine createmat_abort( ic_type, flag, mtype )
445 integer(kind=kint),
intent(in) :: ic_type
446 integer(kind=kint),
intent(in) :: flag
447 integer(kind=kint),
intent(in),
optional :: mtype
450 write(*,*)
'###ERROR### : Element type not supported for static analysis'
451 else if( flag == 2 )
then
452 write(*,*)
'###ERROR### : Element type not supported for nonlinear static analysis'
453 else if( flag == 3 )
then
454 write(*,*)
'###ERROR### : This element is not supported for this material'
456 write(*,*)
' ic_type = ', ic_type
457 if(
present(mtype) )
write(*,*)
' mtype = ', mtype
458 call hecmw_abort(hecmw_comm_get_comm())
459 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)
subroutine mass_c2(etype, nn, ecoord, gausses, sec_opt, thick, mass, lumped, temperature)
real(kind=kreal) function get_face4(ecoord)
subroutine mass_s3(surf, thick, rho, mass)
real(kind=kreal) function get_face3(ecoord)
subroutine mass_c3(etype, nn, ecoord, gausses, mass, lumped, temperature)
subroutine mass_beam(surf, length, rho, mass)
subroutine mass_s4(surf, thick, rho, mass)
This module defined elemact data and function.
integer, parameter kelact_inactive
subroutine stf_dummy(ndof, nn, ecoord, u, stiff, element)
This module assembles the tangent stiffness matrix and, in the implicit dynamic case,...
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_stiff_and_mass_elem(ic_type, nn, ndof, ecoord, u, u_prev, tt, time, tincr, is_dynamic, fstrSOLID, hecMESH, icel, nodLOCAL, triad_tri, triad_cur, triad_ref, shell_drill, stiff_mat, mass_mat, damp_mat, lumped)
Compute the element tangent stiffness (and, in the dynamic case, the element mass and connector dampi...
subroutine calc_damping_mat_and_force_elem(ic_type, nn, ndof, material, fstrDYNAMIC, a3, b3, vecA, vecB, stiff_mat, mass_mat, damp_mat, mat, df)
Combine the element K, M (and connector C) into the effective dynamic system matrix mat = c1*K + c2*M...
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 element shell triads at shared nodes....
This module defines common data and basic structures for analysis.
integer(kind=kint), parameter kel361bbar
integer(kind=kint), parameter kel341sesns
integer(kind=kint), parameter kel361up
integer(kind=kint), parameter kel361fi
subroutine get_coordsys(cdsys_ID, hecMESH, fstrSOLID, coords, icel)
This subroutine fetch coords defined by local coordinate system.
integer(kind=kint), parameter kel361ic
integer(kind=kint), parameter kel361fbar
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)