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), direc(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(ic_type,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
382 integer(kind=kint) :: ndof, ig0, ig, iS0, iE0, ik, in, grpid
383 integer(kind=kint) :: itype, is, iE, icel, ic_type, nn, isect, cdsys_ID, id, iset
384 integer(kind=kint) :: i, j, ihead, tstep, nodLocal(20), iwk(60)
385 real(kind=kreal) :: factor, fval, pa1
386 real(kind=kreal) :: xx(20), yy(20), zz(20), tt(20), tt0(20), coords(3,3), vect(60)
387 real(kind=kreal) :: local_coords(3,3)
391 if (fstrsolid%TEMP_ngrp_tot > 0 .or. fstrsolid%TEMP_irres > 0)
then
392 do ig0 = 1, fstrsolid%TEMP_ngrp_tot
393 grpid = fstrsolid%TEMP_ngrp_GRPID(ig0)
395 factor = fstrsolid%factor(2)
397 ig = fstrsolid%TEMP_ngrp_ID(ig0)
398 fval = fstrsolid%TEMP_ngrp_val(ig0)
399 is0 = hecmesh%node_group%grp_index(ig-1) + 1
400 ie0 = hecmesh%node_group%grp_index(ig)
402 in = hecmesh%node_group%grp_item(ik)
403 pa1 = fstrsolid%temp_bak(in)
404 fstrsolid%temperature(in) = pa1 + (fval - pa1) * factor
408 if (fstrsolid%TEMP_irres > 0)
then
410 & fstrsolid%TEMP_rtype, fstrsolid%TEMP_interval, fstrsolid%TEMP_factor, ctime, &
411 & fstrsolid%temperature, fstrsolid%temp_bak)
416 if( fstrsolid%elemact%ELEMACT_egrp_tot > 0 ) &
419 if( fstrsolid%TEMP_ngrp_tot > 0 .or. fstrsolid%TEMP_irres > 0 )
then
421 do itype = 1, hecmesh%n_elem_type
422 is = hecmesh%elem_type_index(itype-1) + 1
423 ie = hecmesh%elem_type_index(itype)
424 ic_type = hecmesh%elem_type_item(itype)
425 if (hecmw_is_etype_link(ic_type)) cycle
426 if (hecmw_is_etype_patch(ic_type)) cycle
428 nn = hecmw_get_max_node(ic_type)
434 if( fstrsolid%elements(icel)%elemact_flag == kelact_inactive ) cycle
437 is = hecmesh%elem_node_index(icel-1)
439 nodlocal(j) = hecmesh%elem_node_item(is+j)
442 xx(j) = hecmesh%node(3*nodlocal(j)-2) + fstrsolid%unode(ndof*nodlocal(j)-1)
443 yy(j) = hecmesh%node(3*nodlocal(j)-1) + fstrsolid%unode(ndof*nodlocal(j))
444 else if (ndof == 3)
then
445 xx(j) = hecmesh%node(3*nodlocal(j)-2) + fstrsolid%unode(ndof*nodlocal(j)-2)
446 yy(j) = hecmesh%node(3*nodlocal(j)-1) + fstrsolid%unode(ndof*nodlocal(j)-1)
447 zz(j) = hecmesh%node(3*nodlocal(j)) + fstrsolid%unode(ndof*nodlocal(j))
449 tt0(j) = fstrsolid%last_temp(nodlocal(j))
450 tt(j) = fstrsolid%temperature(nodlocal(j))
453 iwk(ndof*(j-1)+i) = ndof*(nodlocal(j)-1)+i
458 isect = hecmesh%section_ID(icel)
459 cdsys_id = hecmesh%section%sect_orien_ID(isect)
460 call get_coordsys(cdsys_id, hecmesh, fstrsolid, coords, icel)
463 id=hecmesh%section%sect_opt(isect)
466 else if (id == 1)
then
468 else if (id == 2)
then
474 if (ic_type == 641)
then
475 isect = hecmesh%section_ID(icel)
476 ihead = hecmesh%section%sect_R_index(isect-1)
478 call tload_beam_641( ic_type, nn, ndof, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), &
479 fstrsolid%elements(icel)%gausses, hecmesh%section%sect_R_item(ihead+1:), &
483 hecmat%B(iwk(j)) = hecmat%B(iwk(j)) + vect(j)
489 local_coords = coords
493 hecmesh, fstrsolid, icel, vect, cdsys_id, local_coords, &
494 iset, pa1, iwk, hecmat%B)
505 hecMESH, fstrSOLID, icel, vect, cdsys_ID, coords, &
507 integer(kind=kint),
intent(in) :: ic_type, nn, isect, ndof, cdsys_ID, iset
508 real(kind=kreal),
intent(in) :: xx(*), yy(*), zz(*), tt(*), tt0(*), pa1
509 real(kind=kreal),
intent(inout) :: coords(3,3)
510 type(hecmwst_local_mesh),
intent(in) :: hecmesh
512 integer(kind=kint),
intent(in) :: icel
513 real(kind=kreal),
intent(out) :: vect(*)
514 integer(kind=kint),
intent(in) :: iwk(*)
515 real(kind=kreal),
intent(inout) :: b(*)
517 integer(kind=kint) :: j, myrank
522 if (ic_type == 241 .or. ic_type == 242 .or. ic_type == 231 .or. ic_type == 232)
then
523 call tload_c2(ic_type, nn, xx(1:nn), yy(1:nn), tt(1:nn), tt0(1:nn), &
524 fstrsolid%elements(icel)%gausses, pa1, iset, vect(1:nn*2))
526 else if (ic_type == 361)
then
527 if (fstrsolid%sections(isect)%elemopt361 ==
kel361fi)
then
529 ( ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), &
530 fstrsolid%elements(icel)%gausses, vect(1:nn*ndof), cdsys_id, coords)
531 else if (fstrsolid%sections(isect)%elemopt361 ==
kel361bbar)
then
532 call tload_c3d8bbar &
533 ( ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), &
534 fstrsolid%elements(icel)%gausses, vect(1:nn*ndof), cdsys_id, coords)
535 else if (fstrsolid%sections(isect)%elemopt361 ==
kel361ic)
then
537 ( ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), &
538 fstrsolid%elements(icel)%gausses, vect(1:nn*ndof), cdsys_id, coords)
539 else if (fstrsolid%sections(isect)%elemopt361 ==
kel361fbar)
then
540 call tload_c3d8fbar &
541 ( ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), &
542 fstrsolid%elements(icel)%gausses, vect(1:nn*ndof), cdsys_id, coords)
543 else if (fstrsolid%sections(isect)%elemopt361 ==
kel361up)
then
549 ( ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), &
550 fstrsolid%elements(icel)%gausses, vect(1:nn*ndof), cdsys_id, coords )
553 else if (ic_type == 341 .or. ic_type == 351 .or. &
554 ic_type == 342 .or. ic_type == 352 .or. ic_type == 362)
then
556 ( ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), &
557 fstrsolid%elements(icel)%gausses, vect(1:nn*ndof), cdsys_id, coords)
559 else if (ic_type == 741 .or. ic_type == 743 .or. ic_type == 731)
then
560 if (myrank == 0)
then
561 write(
imsg,*)
'*------------------------', &
562 '-------------------*'
563 write(
imsg,*)
' Thermal loading option for shell elements', &
565 write(
imsg,*)
'*------------------------', &
566 '-------------------*'
567 call hecmw_abort(hecmw_comm_get_comm())
573 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_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, icel, vect, cdsys_ID, coords, iset, pa1, iwk, B)
Calculate thermal load based on element type.
subroutine process_thermal_loads(cstep, ctime, hecMESH, hecMAT, fstrSOLID)
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)