30 subroutine fstr_ass_load(cstep, ctime, hecMESH, hecMAT, fstrSOLID, fstrPARAM)
32 integer(kind=kint),
intent(in) :: cstep
33 real(kind=kreal),
intent(in) :: ctime
34 type(hecmwst_matrix),
intent(inout) :: hecmat
35 type(hecmwst_local_mesh),
intent(in) :: hecMESH
40 fstrsolid%GL(:) = 0.0d0
41 fstrsolid%EFORCE(:) = 0.0d0
53 call hecmw_update_r(hecmesh, fstrsolid%GL, hecmesh%n_node, hecmesh%n_dof)
56 call hecmw_mat_clear_b(hecmat)
71 integer(kind=kint),
intent(in) :: cstep
72 real(kind=kreal),
intent(in) :: ctime
73 type(hecmwst_local_mesh),
intent(in) :: hecmesh
76 integer(kind=kint) :: n_rot, rid, n_nodes, idof, ndof
77 integer(kind=kint) :: ig0, ig, ityp, iS0, iE0, ik, in, grpid, jj_n_amp
78 real(kind=kreal) :: aval, fval, tval
79 real(kind=kreal) :: normal(3), ccoord(3), cdisp(3), cdiff(3)
80 real(kind=kreal) :: vect(60)
86 n_rot = fstrsolid%CLOAD_ngrp_rot
90 do ig0 = 1, fstrsolid%CLOAD_ngrp_tot
91 grpid = fstrsolid%CLOAD_ngrp_GRPID(ig0)
93 ig = fstrsolid%CLOAD_ngrp_ID(ig0)
94 ityp = fstrsolid%CLOAD_ngrp_DOF(ig0)
95 fval = fstrsolid%CLOAD_ngrp_val(ig0)
96 jj_n_amp = fstrsolid%CLOAD_ngrp_amp(ig0)
98 if (jj_n_amp <= 0)
then
99 aval = fstrsolid%FACTOR(2) * fval
108 if (jj_n_amp <= 0 .and.
fstr_isloadactive(fstrsolid, grpid, cstep-1)) aval = fval
109 is0 = hecmesh%node_group%grp_index(ig-1) + 1
110 ie0 = hecmesh%node_group%grp_index(ig)
112 if( fstrsolid%CLOAD_ngrp_rotID(ig0) > 0 )
then
113 rid = fstrsolid%CLOAD_ngrp_rotID(ig0)
114 if (.not. rinfo%conds(rid)%active)
then
115 rinfo%conds(rid)%active = .true.
116 rinfo%conds(rid)%center_ngrp_id = fstrsolid%CLOAD_ngrp_centerID(ig0)
117 rinfo%conds(rid)%torque_ngrp_id = ig
119 if (ityp > ndof) ityp = ityp - ndof
120 rinfo%conds(rid)%vec(ityp) = aval
125 in = hecmesh%node_group%grp_item(ik)
126 fstrsolid%GL(ndof*(in-1)+ityp) = fstrsolid%GL(ndof*(in-1)+ityp) + aval
132 if (.not. rinfo%conds(rid)%active) cycle
134 n_nodes = hecmw_ngrp_get_number(hecmesh, rinfo%conds(rid)%torque_ngrp_id)
137 ig = rinfo%conds(rid)%center_ngrp_id
139 ccoord(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, hecmesh%node)
140 cdisp(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, fstrsolid%unode)
141 cdisp(idof) = cdisp(idof) + hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, fstrsolid%dunode)
143 ccoord(1:ndof) = ccoord(1:ndof) + cdisp(1:ndof)
145 tval = dsqrt(dot_product(rinfo%conds(rid)%vec(1:ndof), rinfo%conds(rid)%vec(1:ndof)))
146 if (tval < 1.d-16)
then
147 write(*,*)
'###ERROR### : norm of torque vector must be > 0.0'
148 call hecmw_abort(hecmw_comm_get_comm())
150 normal(1:ndof) = rinfo%conds(rid)%vec(1:ndof) / tval
151 tval = tval / dble(n_nodes)
153 ig = rinfo%conds(rid)%torque_ngrp_id
154 is0 = hecmesh%node_group%grp_index(ig-1) + 1
155 ie0 = hecmesh%node_group%grp_index(ig)
157 in = hecmesh%node_group%grp_item(ik)
158 cdiff(1:ndof) = hecmesh%node(ndof*(in-1)+1:ndof*in) + fstrsolid%unode(ndof*(in-1)+1:ndof*in) &
159 & + fstrsolid%dunode(ndof*(in-1)+1:ndof*in) - ccoord(1:ndof)
161 fval = dot_product(vect(1:ndof), vect(1:ndof))
162 if (fval < 1.d-16)
then
163 write(*,*)
'###ERROR### : torque node is at the same position as that of center node in rotational surface.'
164 call hecmw_abort(hecmw_comm_get_comm())
166 vect(1:ndof) = (tval/fval) * vect(1:ndof)
167 fstrsolid%GL(ndof*(in-1)+1:ndof*in) = fstrsolid%GL(ndof*(in-1)+1:ndof*in) + vect(1:ndof)
178 integer(kind=kint),
intent(in) :: cstep
179 real(kind=kreal),
intent(in) :: ctime
180 type(hecmwst_local_mesh),
intent(in) :: hecmesh
183 integer(kind=kint) :: ndof, ig0, ig, ltype, iS0, iE0, ik, icel, ic_type, nn, is
184 integer(kind=kint) :: isect, id, iset, ihead, nsize, grpid, i, j, jj_n_amp
185 integer(kind=kint) :: iwk(60), nodLocal(20)
186 real(kind=kreal) :: xx(20), yy(20), zz(20), vect(60), params(0:6)
187 real(kind=kreal) :: factor, aval, rho, thick, pa1
189 type(tmaterial),
pointer :: material
193 do ig0 = 1, fstrsolid%DLOAD_ngrp_tot
194 grpid = fstrsolid%DLOAD_ngrp_GRPID(ig0)
196 jj_n_amp = fstrsolid%DLOAD_ngrp_amp(ig0)
197 ig = fstrsolid%DLOAD_ngrp_ID(ig0)
198 ltype = fstrsolid%DLOAD_ngrp_LID(ig0)
200 params(i) = fstrsolid%DLOAD_ngrp_params(i, ig0)
202 if (jj_n_amp <= 0)
then
203 factor = fstrsolid%factor(2)
211 if (dabs(params(0)) > 1.d-30)
then
212 factor = aval / params(0)
220 if (jj_n_amp <= 0 .and.
fstr_isloadactive(fstrsolid, grpid, cstep-1)) factor = 1.0d0
222 fg_surf = (ltype == 100)
224 is0 = hecmesh%surf_group%grp_index(ig-1) + 1
225 ie0 = hecmesh%surf_group%grp_index(ig)
227 is0 = hecmesh%elem_group%grp_index(ig-1) + 1
228 ie0 = hecmesh%elem_group%grp_index(ig)
232 ltype = hecmesh%surf_group%grp_item(2*ik) * 10
233 icel = hecmesh%surf_group%grp_item(2*ik-1)
234 ic_type = hecmesh%elem_type(icel)
236 icel = hecmesh%elem_group%grp_item(ik)
237 ic_type = hecmesh%elem_type(icel)
241 if( fstrsolid%elements(icel)%elemact_flag == kelact_inactive ) cycle
243 if (hecmw_is_etype_link(ic_type)) cycle
244 if (hecmw_is_etype_patch(ic_type)) cycle
246 nn = hecmw_get_max_node(ic_type)
248 is = hecmesh%elem_node_index(icel-1)
249 if (fstrsolid%DLOAD_follow == 0)
then
251 nodlocal(j) = hecmesh%elem_node_item (is+j)
253 xx(j) = hecmesh%node( 3*nodlocal(j)-2 )
254 yy(j) = hecmesh%node( 3*nodlocal(j)-1 )
255 zz(j) = hecmesh%node( 3*nodlocal(j) )
258 iwk( ndof*(j-1)+i ) = ndof*( nodlocal(j)-1 )+i
263 nodlocal(j) = hecmesh%elem_node_item (is+j)
266 xx(j) = hecmesh%node( 3*nodlocal(j)-2 )+fstrsolid%unode( 2*nodlocal(j)-1 )+fstrsolid%dunode( 2*nodlocal(j)-1 )
267 yy(j) = hecmesh%node( 3*nodlocal(j)-1 )+fstrsolid%unode( 2*nodlocal(j) )+fstrsolid%dunode( 2*nodlocal(j) )
268 else if (ndof==3)
then
269 xx(j) = hecmesh%node( 3*nodlocal(j)-2 )+fstrsolid%unode( 3*nodlocal(j)-2 )+fstrsolid%dunode( 3*nodlocal(j)-2 )
270 yy(j) = hecmesh%node( 3*nodlocal(j)-1 )+fstrsolid%unode( 3*nodlocal(j)-1 )+fstrsolid%dunode( 3*nodlocal(j)-1 )
271 zz(j) = hecmesh%node( 3*nodlocal(j) )+fstrsolid%unode( 3*nodlocal(j) )+fstrsolid%dunode( 3*nodlocal(j) )
272 else if (ndof==6)
then
273 xx(j) = hecmesh%node( 3*nodlocal(j)-2 )+fstrsolid%unode( 6*nodlocal(j)-5 )+fstrsolid%dunode( 6*nodlocal(j)-5 )
274 yy(j) = hecmesh%node( 3*nodlocal(j)-1 )+fstrsolid%unode( 6*nodlocal(j)-4 )+fstrsolid%dunode( 6*nodlocal(j)-4 )
275 zz(j) = hecmesh%node( 3*nodlocal(j) )+fstrsolid%unode( 6*nodlocal(j)-3 )+fstrsolid%dunode( 6*nodlocal(j)-3 )
279 iwk( ndof*(j-1)+i ) = ndof*( nodlocal(j)-1 )+i
284 isect = hecmesh%section_ID(icel)
286 material => fstrsolid%elements(icel)%gausses(1)%pMaterial
287 rho = material%variables(m_density)
291 id = hecmesh%section%sect_opt(isect)
294 else if (id == 1)
then
296 else if (id == 2)
then
302 if (ic_type==301)
then
303 ihead = hecmesh%section%sect_R_index(isect-1)
304 call dl_c1(nn,xx(1:nn),yy(1:nn),zz(1:nn),rho,thick,ltype,params,vect(1:nn*ndof),nsize)
306 elseif( ic_type == 241 .or. ic_type == 242 .or. ic_type == 231 .or. ic_type == 232 .or. ic_type == 2322 )
then
307 call dl_c2(ic_type,nn,xx(1:nn),yy(1:nn),rho,pa1,ltype,params,vect(1:nn*ndof),nsize,iset)
309 else if ( ic_type == 341 .or. ic_type == 351 .or. ic_type == 361 .or. &
310 ic_type == 342 .or. ic_type == 352 .or. ic_type == 362 )
then
311 call dl_c3(ic_type,nn,xx(1:nn),yy(1:nn),zz(1:nn),rho,ltype,params,vect(1:nn*ndof),nsize)
313 else if ( ic_type == 641 )
then
314 ihead = hecmesh%section%sect_R_index(isect-1)
315 call dl_beam_641(ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), rho, ltype, params, &
316 hecmesh%section%sect_R_item(ihead+1:), vect(1:nn*ndof), nsize)
318 else if( ( ic_type == 741 ) .or. ( ic_type == 743 ) .or. ( ic_type == 731 ) )
then
319 call dl_shell(ic_type, nn, ndof, xx, yy, zz, rho, thick, ltype, params, vect, nsize, fstrsolid%elements(icel)%gausses)
321 else if( ( ic_type==761 ) .or. ( ic_type==781 ) )
then
322 call dl_shell_33(ic_type, nn, ndof, xx, yy, zz, rho, thick, ltype, params, vect, nsize, &
323 fstrsolid%elements(icel)%gausses)
327 write(*,*)
"### WARNING: DLOAD",ic_type
332 fstrsolid%GL(iwk(j)) = fstrsolid%GL(iwk(j)) + factor * vect(j)
341 integer(kind=kint),
intent(in) :: cstep
344 real(kind=kreal) :: factor
346 factor = fstrsolid%factor(2)
347 call uloading(cstep, factor, fstrsolid%GL)
355 type(hecmwst_local_mesh),
intent(in) :: hecmesh
356 type(hecmwst_matrix),
intent(inout) :: hecMAT
359 integer(kind=kint) :: i
361 do i = 1, hecmesh%n_node * hecmesh%n_dof
362 hecmat%B(i) = fstrsolid%GL(i) - fstrsolid%QFORCE(i)
365 do i = 1, hecmat%NDOF * hecmat%NP
367 fstrsolid%EFORCE(i) = fstrsolid%GL(i)
376 integer(kind=kint),
intent(in) :: cstep
377 real(kind=kreal),
intent(in) :: ctime
378 type(hecmwst_local_mesh),
intent(in) :: hecmesh
379 type(hecmwst_matrix),
intent(inout) :: hecMAT
383 integer(kind=kint) :: ndof, ig0, ig, iS0, iE0, ik, in, grpid
384 integer(kind=kint) :: itype, is, iE, icel, ic_type, nn, isect, cdsys_ID, id, iset
385 integer(kind=kint) :: i, j, ihead, nodLocal(20), iwk(60)
386 real(kind=kreal) :: factor, fval, pa1
387 real(kind=kreal) :: xx(20), yy(20), zz(20), tt(20), tt0(20), coords(3,3), vect(60)
388 real(kind=kreal) :: local_coords(3,3)
392 if (fstrsolid%TEMP_ngrp_tot > 0 .or. fstrsolid%TEMP_irres > 0)
then
393 do ig0 = 1, fstrsolid%TEMP_ngrp_tot
394 grpid = fstrsolid%TEMP_ngrp_GRPID(ig0)
396 factor = fstrsolid%factor(2)
398 ig = fstrsolid%TEMP_ngrp_ID(ig0)
399 fval = fstrsolid%TEMP_ngrp_val(ig0)
400 is0 = hecmesh%node_group%grp_index(ig-1) + 1
401 ie0 = hecmesh%node_group%grp_index(ig)
403 in = hecmesh%node_group%grp_item(ik)
404 pa1 = fstrsolid%temp_bak(in)
405 fstrsolid%temperature(in) = pa1 + (fval - pa1) * factor
409 if (fstrsolid%TEMP_irres > 0)
then
411 & fstrsolid%TEMP_rtype, fstrsolid%TEMP_interval, fstrsolid%TEMP_factor, ctime, &
412 & fstrsolid%temperature, fstrsolid%temp_bak)
417 if( fstrsolid%elemact%ELEMACT_egrp_tot > 0 ) &
420 if( fstrsolid%TEMP_ngrp_tot > 0 .or. fstrsolid%TEMP_irres > 0 )
then
422 do itype = 1, hecmesh%n_elem_type
423 is = hecmesh%elem_type_index(itype-1) + 1
424 ie = hecmesh%elem_type_index(itype)
425 ic_type = hecmesh%elem_type_item(itype)
426 if (hecmw_is_etype_link(ic_type)) cycle
427 if (hecmw_is_etype_patch(ic_type)) cycle
429 nn = hecmw_get_max_node(ic_type)
435 if( fstrsolid%elements(icel)%elemact_flag == kelact_inactive ) cycle
438 is = hecmesh%elem_node_index(icel-1)
440 nodlocal(j) = hecmesh%elem_node_item(is+j)
443 xx(j) = hecmesh%node(3*nodlocal(j)-2) + fstrsolid%unode(ndof*nodlocal(j)-1)
444 yy(j) = hecmesh%node(3*nodlocal(j)-1) + fstrsolid%unode(ndof*nodlocal(j))
445 else if (ndof == 3)
then
446 xx(j) = hecmesh%node(3*nodlocal(j)-2) + fstrsolid%unode(ndof*nodlocal(j)-2)
447 yy(j) = hecmesh%node(3*nodlocal(j)-1) + fstrsolid%unode(ndof*nodlocal(j)-1)
448 zz(j) = hecmesh%node(3*nodlocal(j)) + fstrsolid%unode(ndof*nodlocal(j))
450 tt0(j) = fstrsolid%last_temp(nodlocal(j))
451 tt(j) = fstrsolid%temperature(nodlocal(j))
454 iwk(ndof*(j-1)+i) = ndof*(nodlocal(j)-1)+i
459 isect = hecmesh%section_ID(icel)
460 cdsys_id = hecmesh%section%sect_orien_ID(isect)
461 call get_coordsys(cdsys_id, hecmesh, fstrsolid, coords, icel)
464 id=hecmesh%section%sect_opt(isect)
467 else if (id == 1)
then
469 else if (id == 2)
then
475 if (ic_type == 641)
then
476 isect = hecmesh%section_ID(icel)
477 ihead = hecmesh%section%sect_R_index(isect-1)
479 call tload_beam_641( nn, ndof, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), &
480 fstrsolid%elements(icel)%gausses, hecmesh%section%sect_R_item(ihead+1:), &
481 fstrparam%ref_temp, &
485 hecmat%B(iwk(j)) = hecmat%B(iwk(j)) + vect(j)
491 local_coords = coords
495 hecmesh, fstrsolid, fstrparam, icel, vect, cdsys_id, local_coords, &
496 iset, pa1, iwk, hecmat%B)
507 hecMESH, fstrSOLID, fstrPARAM, icel, vect, cdsys_ID, coords, &
509 integer(kind=kint),
intent(in) :: ic_type, nn, isect, ndof, cdsys_ID, iset
510 real(kind=kreal),
intent(in) :: xx(*), yy(*), zz(*), tt(*), tt0(*), pa1
511 real(kind=kreal),
intent(inout) :: coords(3,3)
512 type(hecmwst_local_mesh),
intent(in) :: hecmesh
515 integer(kind=kint),
intent(in) :: icel
516 real(kind=kreal),
intent(out) :: vect(*)
517 integer(kind=kint),
intent(in) :: iwk(*)
518 real(kind=kreal),
intent(inout) :: b(*)
520 integer(kind=kint) :: j, myrank
525 if (ic_type == 241 .or. ic_type == 242 .or. ic_type == 231 .or. ic_type == 232)
then
526 call tload_c2(ic_type, nn, xx(1:nn), yy(1:nn), tt(1:nn), tt0(1:nn), &
527 fstrsolid%elements(icel)%gausses, pa1, iset, vect(1:nn*2))
529 else if (ic_type == 361)
then
530 if (fstrsolid%sections(isect)%elemopt361 ==
kel361fi)
then
532 ( ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), fstrparam%ref_temp, &
533 fstrsolid%elements(icel)%gausses, vect(1:nn*ndof), cdsys_id, coords)
534 else if (fstrsolid%sections(isect)%elemopt361 ==
kel361bbar)
then
535 call tload_c3d8bbar &
536 ( ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), fstrparam%ref_temp, &
537 fstrsolid%elements(icel)%gausses, vect(1:nn*ndof), cdsys_id, coords)
538 else if (fstrsolid%sections(isect)%elemopt361 ==
kel361ic)
then
540 ( ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), fstrparam%ref_temp, &
541 fstrsolid%elements(icel)%gausses, vect(1:nn*ndof), cdsys_id, coords)
542 else if (fstrsolid%sections(isect)%elemopt361 ==
kel361fbar)
then
543 call tload_c3d8fbar &
544 ( ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), fstrparam%ref_temp, &
545 fstrsolid%elements(icel)%gausses, vect(1:nn*ndof), cdsys_id, coords)
546 else if (fstrsolid%sections(isect)%elemopt361 ==
kel361up)
then
552 ( ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), fstrparam%ref_temp, &
553 fstrsolid%elements(icel)%gausses, vect(1:nn*ndof), cdsys_id, coords )
556 else if (ic_type == 341 .or. ic_type == 351 .or. &
557 ic_type == 342 .or. ic_type == 352 .or. ic_type == 362)
then
559 ( ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), fstrparam%ref_temp, &
560 fstrsolid%elements(icel)%gausses, vect(1:nn*ndof), cdsys_id, coords)
562 else if (ic_type == 741 .or. ic_type == 743 .or. ic_type == 731 .or. &
563 ic_type == 761 .or. ic_type == 781)
then
564 if (myrank == 0)
then
565 write(
imsg,*)
'*------------------------', &
566 '-------------------*'
567 write(
imsg,*)
' Thermal loading option for shell elements', &
569 write(
imsg,*)
'*------------------------', &
570 '-------------------*'
571 call hecmw_abort(hecmw_comm_get_comm())
577 b(iwk(j)) = b(iwk(j)) + vect(j)
This modules defines common structures for fem analysis.
subroutine fstr_rotinfo_init(n, rinfo)
subroutine fstr_rotinfo_finalize(rinfo)
This module provides functions to take into account external load.
subroutine process_thermal_loads(cstep, ctime, hecMESH, hecMAT, fstrSOLID, fstrPARAM)
subroutine process_concentrated_loads(cstep, ctime, hecMESH, fstrSOLID)
Process concentrated nodal forces (CLOAD)
subroutine fstr_ass_load(cstep, ctime, hecMESH, hecMAT, fstrSOLID, fstrPARAM)
This subroutine assmble following external force into fstrSOLIDGL and hecMATB afterwards.
subroutine update_rhs_vector(hecMESH, hecMAT, fstrSOLID)
Update right-hand side vector.
subroutine process_user_loads(cstep, fstrSOLID)
subroutine process_distributed_loads(cstep, ctime, hecMESH, fstrSOLID)
subroutine calculate_thermal_load(ic_type, nn, xx, yy, zz, tt, tt0, isect, ndof, hecMESH, fstrSOLID, fstrPARAM, icel, vect, cdsys_ID, coords, iset, pa1, iwk, B)
Calculate thermal load based on element type.
This module provide a function to elemact elements.
subroutine fstr_update_elemact_solid(hecMESH, fstrSOLID, cstep, ctime)
This module provides the entry point for ELEMCHECK (pre-analysis input validation)
subroutine fstr_get_thickness(hecMESH, mid, thick)
This module provides functions to deal with spring force.
subroutine fstr_update_ndforce_spring(cstep, hecMESH, fstrSOLID, B)
This module defines common data and basic structures for analysis.
integer(kind=kint), parameter kel361bbar
integer(kind=kint), parameter imsg
integer(kind=kint), parameter kel361up
logical function fstr_isloadactive(fstrSOLID, nbc, cstep)
integer(kind=kint), parameter kel361fi
subroutine fstr_get_amplitude(hecMESH, fstrSOLID, cstep, jj_n_amp, time, value)
Evaluate the amplitude-scaled target value a(t) for static analysis.
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 module provides aux functions.
subroutine cross_product(v1, v2, vn)
This modules defines a structure to record history dependent parameter in static analysis.
subroutine, public read_temperature_result(hecMESH, nstep, sstep, rtype, interval, factor, ctime, temp, temp_bak)
Read in temperature distribution from external file.
This subroutine read in used-defined loading tangent.
subroutine uloading(cstep, factor, exForce)
This subroutine take consider of user-defined external loading.
FSTR INNER CONTROL PARAMETERS (fstrPARAM)