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) :: factor, 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 jj_n_amp = fstrsolid%CLOAD_ngrp_amp(ig0)
94 if (jj_n_amp <= 0)
then
95 factor = fstrsolid%FACTOR(2)
97 call table_amp(hecmesh, fstrsolid, cstep, jj_n_amp, ctime, factor)
101 ig = fstrsolid%CLOAD_ngrp_ID(ig0)
102 ityp = fstrsolid%CLOAD_ngrp_DOF(ig0)
103 fval = fstrsolid%CLOAD_ngrp_val(ig0)
104 is0 = hecmesh%node_group%grp_index(ig-1) + 1
105 ie0 = hecmesh%node_group%grp_index(ig)
107 if( fstrsolid%CLOAD_ngrp_rotID(ig0) > 0 )
then
108 rid = fstrsolid%CLOAD_ngrp_rotID(ig0)
109 if (.not. rinfo%conds(rid)%active)
then
110 rinfo%conds(rid)%active = .true.
111 rinfo%conds(rid)%center_ngrp_id = fstrsolid%CLOAD_ngrp_centerID(ig0)
112 rinfo%conds(rid)%torque_ngrp_id = ig
114 if (ityp > ndof) ityp = ityp - ndof
115 rinfo%conds(rid)%vec(ityp) = factor * fval
120 in = hecmesh%node_group%grp_item(ik)
121 fstrsolid%GL(ndof*(in-1)+ityp) = fstrsolid%GL(ndof*(in-1)+ityp) + factor*fval
127 if (.not. rinfo%conds(rid)%active) cycle
129 n_nodes = hecmw_ngrp_get_number(hecmesh, rinfo%conds(rid)%torque_ngrp_id)
132 ig = rinfo%conds(rid)%center_ngrp_id
134 ccoord(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, hecmesh%node)
135 cdisp(idof) = hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, fstrsolid%unode)
136 cdisp(idof) = cdisp(idof) + hecmw_ngrp_get_totalvalue(hecmesh, ig, ndof, idof, fstrsolid%dunode)
138 ccoord(1:ndof) = ccoord(1:ndof) + cdisp(1:ndof)
140 tval = dsqrt(dot_product(rinfo%conds(rid)%vec(1:ndof), rinfo%conds(rid)%vec(1:ndof)))
141 if (tval < 1.d-16)
then
142 write(*,*)
'###ERROR### : norm of torque vector must be > 0.0'
143 call hecmw_abort(hecmw_comm_get_comm())
145 normal(1:ndof) = rinfo%conds(rid)%vec(1:ndof) / tval
146 tval = tval / dble(n_nodes)
148 ig = rinfo%conds(rid)%torque_ngrp_id
149 is0 = hecmesh%node_group%grp_index(ig-1) + 1
150 ie0 = hecmesh%node_group%grp_index(ig)
152 in = hecmesh%node_group%grp_item(ik)
153 cdiff(1:ndof) = hecmesh%node(ndof*(in-1)+1:ndof*in) + fstrsolid%unode(ndof*(in-1)+1:ndof*in) &
154 & + fstrsolid%dunode(ndof*(in-1)+1:ndof*in) - ccoord(1:ndof)
156 fval = dot_product(vect(1:ndof), vect(1:ndof))
157 if (fval < 1.d-16)
then
158 write(*,*)
'###ERROR### : torque node is at the same position as that of center node in rotational surface.'
159 call hecmw_abort(hecmw_comm_get_comm())
161 vect(1:ndof) = (tval/fval) * vect(1:ndof)
162 fstrsolid%GL(ndof*(in-1)+1:ndof*in) = fstrsolid%GL(ndof*(in-1)+1:ndof*in) + vect(1:ndof)
173 integer(kind=kint),
intent(in) :: cstep
174 real(kind=kreal),
intent(in) :: ctime
175 type(hecmwst_local_mesh),
intent(in) :: hecmesh
178 integer(kind=kint) :: ndof, ig0, ig, ltype, iS0, iE0, ik, icel, ic_type, nn, is
179 integer(kind=kint) :: isect, id, iset, ihead, nsize, grpid, i, j, jj_n_amp
180 integer(kind=kint) :: iwk(60), nodLocal(20)
181 real(kind=kreal) :: xx(20), yy(20), zz(20), vect(60), params(0:6)
182 real(kind=kreal) :: factor, rho, thick, pa1
184 type(tmaterial),
pointer :: material
188 do ig0 = 1, fstrsolid%DLOAD_ngrp_tot
189 grpid = fstrsolid%DLOAD_ngrp_GRPID(ig0)
191 jj_n_amp = fstrsolid%DLOAD_ngrp_amp(ig0)
192 if (jj_n_amp <= 0)
then
193 factor = fstrsolid%factor(2)
195 call table_amp(hecmesh, fstrsolid, cstep, jj_n_amp, ctime, factor)
199 ig = fstrsolid%DLOAD_ngrp_ID(ig0)
200 ltype = fstrsolid%DLOAD_ngrp_LID(ig0)
202 params(i) = fstrsolid%DLOAD_ngrp_params(i, ig0)
205 fg_surf = (ltype == 100)
207 is0 = hecmesh%surf_group%grp_index(ig-1) + 1
208 ie0 = hecmesh%surf_group%grp_index(ig)
210 is0 = hecmesh%elem_group%grp_index(ig-1) + 1
211 ie0 = hecmesh%elem_group%grp_index(ig)
215 ltype = hecmesh%surf_group%grp_item(2*ik) * 10
216 icel = hecmesh%surf_group%grp_item(2*ik-1)
217 ic_type = hecmesh%elem_type(icel)
219 icel = hecmesh%elem_group%grp_item(ik)
220 ic_type = hecmesh%elem_type(icel)
224 if( fstrsolid%elements(icel)%elemact_flag == kelact_inactive ) cycle
226 if (hecmw_is_etype_link(ic_type)) cycle
227 if (hecmw_is_etype_patch(ic_type)) cycle
229 nn = hecmw_get_max_node(ic_type)
231 is = hecmesh%elem_node_index(icel-1)
232 if (fstrsolid%DLOAD_follow == 0)
then
234 nodlocal(j) = hecmesh%elem_node_item (is+j)
236 xx(j) = hecmesh%node( 3*nodlocal(j)-2 )
237 yy(j) = hecmesh%node( 3*nodlocal(j)-1 )
238 zz(j) = hecmesh%node( 3*nodlocal(j) )
241 iwk( ndof*(j-1)+i ) = ndof*( nodlocal(j)-1 )+i
246 nodlocal(j) = hecmesh%elem_node_item (is+j)
249 xx(j) = hecmesh%node( 3*nodlocal(j)-2 )+fstrsolid%unode( 2*nodlocal(j)-1 )+fstrsolid%dunode( 2*nodlocal(j)-1 )
250 yy(j) = hecmesh%node( 3*nodlocal(j)-1 )+fstrsolid%unode( 2*nodlocal(j) )+fstrsolid%dunode( 2*nodlocal(j) )
251 else if (ndof==3)
then
252 xx(j) = hecmesh%node( 3*nodlocal(j)-2 )+fstrsolid%unode( 3*nodlocal(j)-2 )+fstrsolid%dunode( 3*nodlocal(j)-2 )
253 yy(j) = hecmesh%node( 3*nodlocal(j)-1 )+fstrsolid%unode( 3*nodlocal(j)-1 )+fstrsolid%dunode( 3*nodlocal(j)-1 )
254 zz(j) = hecmesh%node( 3*nodlocal(j) )+fstrsolid%unode( 3*nodlocal(j) )+fstrsolid%dunode( 3*nodlocal(j) )
255 else if (ndof==6)
then
256 xx(j) = hecmesh%node( 3*nodlocal(j)-2 )+fstrsolid%unode( 6*nodlocal(j)-5 )+fstrsolid%dunode( 6*nodlocal(j)-5 )
257 yy(j) = hecmesh%node( 3*nodlocal(j)-1 )+fstrsolid%unode( 6*nodlocal(j)-4 )+fstrsolid%dunode( 6*nodlocal(j)-4 )
258 zz(j) = hecmesh%node( 3*nodlocal(j) )+fstrsolid%unode( 6*nodlocal(j)-3 )+fstrsolid%dunode( 6*nodlocal(j)-3 )
262 iwk( ndof*(j-1)+i ) = ndof*( nodlocal(j)-1 )+i
267 isect = hecmesh%section_ID(icel)
269 material => fstrsolid%elements(icel)%gausses(1)%pMaterial
270 rho = material%variables(m_density)
274 id = hecmesh%section%sect_opt(isect)
277 else if (id == 1)
then
279 else if (id == 2)
then
285 if (ic_type==301)
then
286 ihead = hecmesh%section%sect_R_index(isect-1)
287 call dl_c1(ic_type,nn,xx(1:nn),yy(1:nn),zz(1:nn),rho,thick,ltype,params,vect(1:nn*ndof),nsize)
289 elseif( ic_type == 241 .or. ic_type == 242 .or. ic_type == 231 .or. ic_type == 232 .or. ic_type == 2322 )
then
290 call dl_c2(ic_type,nn,xx(1:nn),yy(1:nn),rho,pa1,ltype,params,vect(1:nn*ndof),nsize,iset)
292 else if ( ic_type == 341 .or. ic_type == 351 .or. ic_type == 361 .or. &
293 ic_type == 342 .or. ic_type == 352 .or. ic_type == 362 )
then
294 call dl_c3(ic_type,nn,xx(1:nn),yy(1:nn),zz(1:nn),rho,ltype,params,vect(1:nn*ndof),nsize)
296 else if ( ic_type == 641 )
then
297 ihead = hecmesh%section%sect_R_index(isect-1)
298 call dl_beam_641(ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), rho, ltype, params, &
299 hecmesh%section%sect_R_item(ihead+1:), vect(1:nn*ndof), nsize)
301 else if( ( ic_type == 741 ) .or. ( ic_type == 743 ) .or. ( ic_type == 731 ) )
then
302 call dl_shell(ic_type, nn, ndof, xx, yy, zz, rho, thick, ltype, params, vect, nsize, fstrsolid%elements(icel)%gausses)
304 else if( ( ic_type==761 ) .or. ( ic_type==781 ) )
then
305 call dl_shell_33(ic_type, nn, ndof, xx, yy, zz, rho, thick, ltype, params, vect, nsize, &
306 fstrsolid%elements(icel)%gausses)
310 write(*,*)
"### WARNING: DLOAD",ic_type
315 fstrsolid%GL(iwk(j)) = fstrsolid%GL(iwk(j)) + factor * vect(j)
324 integer(kind=kint),
intent(in) :: cstep
327 real(kind=kreal) :: factor
329 factor = fstrsolid%factor(2)
330 call uloading(cstep, factor, fstrsolid%GL)
338 type(hecmwst_local_mesh),
intent(in) :: hecmesh
339 type(hecmwst_matrix),
intent(inout) :: hecMAT
342 integer(kind=kint) :: i
344 do i = 1, hecmesh%n_node * hecmesh%n_dof
345 hecmat%B(i) = fstrsolid%GL(i) - fstrsolid%QFORCE(i)
348 do i = 1, hecmat%NDOF * hecmat%NP
350 fstrsolid%EFORCE(i) = fstrsolid%GL(i)
359 integer(kind=kint),
intent(in) :: cstep
360 real(kind=kreal),
intent(in) :: ctime
361 type(hecmwst_local_mesh),
intent(in) :: hecmesh
362 type(hecmwst_matrix),
intent(inout) :: hecMAT
365 integer(kind=kint) :: ndof, ig0, ig, iS0, iE0, ik, in, grpid
366 integer(kind=kint) :: itype, is, iE, icel, ic_type, nn, isect, cdsys_ID, id, iset
367 integer(kind=kint) :: i, j, ihead, tstep, nodLocal(20), iwk(60)
368 real(kind=kreal) :: factor, fval, pa1
369 real(kind=kreal) :: xx(20), yy(20), zz(20), tt(20), tt0(20), coords(3,3), vect(60)
370 real(kind=kreal) :: local_coords(3,3)
374 if (fstrsolid%TEMP_ngrp_tot > 0 .or. fstrsolid%TEMP_irres > 0)
then
375 do ig0 = 1, fstrsolid%TEMP_ngrp_tot
376 grpid = fstrsolid%TEMP_ngrp_GRPID(ig0)
378 factor = fstrsolid%factor(2)
380 ig = fstrsolid%TEMP_ngrp_ID(ig0)
381 fval = fstrsolid%TEMP_ngrp_val(ig0)
382 is0 = hecmesh%node_group%grp_index(ig-1) + 1
383 ie0 = hecmesh%node_group%grp_index(ig)
385 in = hecmesh%node_group%grp_item(ik)
386 pa1 = fstrsolid%temp_bak(in)
387 fstrsolid%temperature(in) = pa1 + (fval - pa1) * factor
391 if (fstrsolid%TEMP_irres > 0)
then
393 & fstrsolid%TEMP_rtype, fstrsolid%TEMP_interval, fstrsolid%TEMP_factor, ctime, &
394 & fstrsolid%temperature, fstrsolid%temp_bak)
399 if( fstrsolid%elemact%ELEMACT_egrp_tot > 0 ) &
402 if( fstrsolid%TEMP_ngrp_tot > 0 .or. fstrsolid%TEMP_irres > 0 )
then
404 do itype = 1, hecmesh%n_elem_type
405 is = hecmesh%elem_type_index(itype-1) + 1
406 ie = hecmesh%elem_type_index(itype)
407 ic_type = hecmesh%elem_type_item(itype)
408 if (hecmw_is_etype_link(ic_type)) cycle
409 if (hecmw_is_etype_patch(ic_type)) cycle
411 nn = hecmw_get_max_node(ic_type)
417 if( fstrsolid%elements(icel)%elemact_flag == kelact_inactive ) cycle
420 is = hecmesh%elem_node_index(icel-1)
422 nodlocal(j) = hecmesh%elem_node_item(is+j)
425 xx(j) = hecmesh%node(3*nodlocal(j)-2) + fstrsolid%unode(ndof*nodlocal(j)-1)
426 yy(j) = hecmesh%node(3*nodlocal(j)-1) + fstrsolid%unode(ndof*nodlocal(j))
427 else if (ndof == 3)
then
428 xx(j) = hecmesh%node(3*nodlocal(j)-2) + fstrsolid%unode(ndof*nodlocal(j)-2)
429 yy(j) = hecmesh%node(3*nodlocal(j)-1) + fstrsolid%unode(ndof*nodlocal(j)-1)
430 zz(j) = hecmesh%node(3*nodlocal(j)) + fstrsolid%unode(ndof*nodlocal(j))
432 tt0(j) = fstrsolid%last_temp(nodlocal(j))
433 tt(j) = fstrsolid%temperature(nodlocal(j))
436 iwk(ndof*(j-1)+i) = ndof*(nodlocal(j)-1)+i
441 isect = hecmesh%section_ID(icel)
442 cdsys_id = hecmesh%section%sect_orien_ID(isect)
446 id = hecmesh%section%sect_opt(isect)
449 else if (id == 1)
then
451 else if (id == 2)
then
457 if (ic_type == 641)
then
458 isect = hecmesh%section_ID(icel)
459 ihead = hecmesh%section%sect_R_index(isect-1)
461 call tload_beam_641( ic_type, nn, ndof, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), &
462 fstrsolid%elements(icel)%gausses, hecmesh%section%sect_R_item(ihead+1:), &
466 hecmat%B(iwk(j)) = hecmat%B(iwk(j)) + vect(j)
472 local_coords = coords
476 hecmesh, fstrsolid, icel, vect, cdsys_id, local_coords, &
477 iset, pa1, iwk, hecmat%B)
488 hecMESH, fstrSOLID, icel, vect, cdsys_ID, coords, &
490 integer(kind=kint),
intent(in) :: ic_type, nn, isect, ndof, cdsys_ID, iset
491 real(kind=kreal),
intent(in) :: xx(*), yy(*), zz(*), tt(*), tt0(*), pa1
492 real(kind=kreal),
intent(inout) :: coords(3,3)
493 type(hecmwst_local_mesh),
intent(in) :: hecmesh
495 integer(kind=kint),
intent(in) :: icel
496 real(kind=kreal),
intent(out) :: vect(*)
497 integer(kind=kint),
intent(in) :: iwk(*)
498 real(kind=kreal),
intent(inout) :: b(*)
500 integer(kind=kint) :: j, myrank
505 if (ic_type == 241 .or. ic_type == 242 .or. ic_type == 231 .or. ic_type == 232)
then
506 call tload_c2(ic_type, nn, xx(1:nn), yy(1:nn), tt(1:nn), tt0(1:nn), &
507 fstrsolid%elements(icel)%gausses, pa1, iset, vect(1:nn*2))
509 else if (ic_type == 361)
then
510 if (fstrsolid%sections(isect)%elemopt361 ==
kel361fi)
then
512 ( ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), &
513 fstrsolid%elements(icel)%gausses, vect(1:nn*ndof), cdsys_id, coords)
514 else if (fstrsolid%sections(isect)%elemopt361 ==
kel361bbar)
then
515 call tload_c3d8bbar &
516 ( ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), &
517 fstrsolid%elements(icel)%gausses, vect(1:nn*ndof), cdsys_id, coords)
518 else if (fstrsolid%sections(isect)%elemopt361 ==
kel361ic)
then
520 ( ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), &
521 fstrsolid%elements(icel)%gausses, vect(1:nn*ndof), cdsys_id, coords)
522 else if (fstrsolid%sections(isect)%elemopt361 ==
kel361fbar)
then
523 call tload_c3d8fbar &
524 ( ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), &
525 fstrsolid%elements(icel)%gausses, vect(1:nn*ndof), cdsys_id, coords)
528 else if (ic_type == 341 .or. ic_type == 351 .or. &
529 ic_type == 342 .or. ic_type == 352 .or. ic_type == 362)
then
531 ( ic_type, nn, xx(1:nn), yy(1:nn), zz(1:nn), tt(1:nn), tt0(1:nn), &
532 fstrsolid%elements(icel)%gausses, vect(1:nn*ndof), cdsys_id, coords)
534 else if (ic_type == 741 .or. ic_type == 743 .or. ic_type == 731)
then
535 if (myrank == 0)
then
536 write(
imsg,*)
'*------------------------', &
537 '-------------------*'
538 write(
imsg,*)
' Thermal loading option for shell elements', &
540 write(
imsg,*)
'*------------------------', &
541 '-------------------*'
542 call hecmw_abort(hecmw_comm_get_comm())
548 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 function to check input data of IFSTR solver.
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
subroutine get_coordsys(cdsys_ID, hecMESH, fstrSOLID, coords)
This subroutine fetch coords defined by local coordinate system.
integer(kind=kint), parameter imsg
logical function fstr_isloadactive(fstrSOLID, nbc, cstep)
integer(kind=kint), parameter kel361fi
integer(kind=kint), parameter kel361ic
subroutine table_amp(hecMESH, fstrSOLID, cstep, jj_n_amp, time, f_t)
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)