28 fstrDYNAMIC, fstrPARAM, fstrFREQ, hecLagMAT)
32 type(hecmwst_local_mesh) :: hecMESH
33 type(hecmwst_matrix) :: hecMAT
39 type(hecmwst_matrix_lagrange) :: hecLagMAT
44 integer(kind=kint) :: numnode, numelm, startmode, endmode, nummode, ndof, im, vistype
45 integer(kind=kint) :: numfreq, idnode, numdisp, imonit, nmonit, monitnode(1)
46 integer(kind=kint) :: freqiout(3)
47 integer(kind=kint) :: ierr
48 integer(kind=kint),
parameter :: ilogin = 9056
49 real(kind=kreal),
allocatable :: eigenvalue(:), loadvecre(:), loadvecim(:)
50 real(kind=kreal),
allocatable :: bjre(:), bjim(:)
51 real(kind=kreal),
allocatable :: dispre(:), dispim(:), velre(:), velim(:), accre(:), accim(:)
52 real(kind=kreal),
allocatable :: usre(:), usim(:)
53 real(kind=kreal),
allocatable :: totloadre(:), totloadim(:)
54 real(kind=kreal) :: freq, omega, val, dx, dy, dz, f_start, f_end
55 real(kind=kreal) :: t_start, t_end, time, dxi, dyi, dzi
56 complex(kind=kreal) :: eiwt
60 numnode = hecmesh%n_node
61 numelm = hecmesh%n_elem
63 startmode = fstrfreq%start_mode
64 endmode = fstrfreq%end_mode
65 nummode = endmode - startmode +1
67 freqdata%numMode = nummode
68 freqdata%numNodeDOF = numnode*ndof
69 allocate(freqdata%eigOmega(nummode))
70 allocate(freqdata%eigVector(numnode*ndof, nummode))
72 call setupfreqparam(fstrdynamic, f_start, f_end, numfreq, freqdata%rayAlpha, freqdata%rayBeta, idnode, vistype, freqiout)
78 if( monitnode(1) <= hecmesh%nn_internal ) imonit = monitnode(1)
81 if( imonit > 0 ) nmonit = 1
82 call hecmw_allreduce_i1(hecmesh, nmonit, hecmw_sum)
83 if( nmonit == 0 )
then
85 write(*, *)
"Error: monitor node not found:", idnode
86 write(
ilog,*)
"Error: monitor node not found:", idnode
88 call hecmw_abort( hecmw_comm_get_comm() )
92 write(*,*)
"Rayleigh alpha:", freqdata%rayAlpha
93 write(*,*)
"Rayleigh beta:", freqdata%rayBeta
94 write(
ilog,*)
"Rayleigh alpha:", freqdata%rayAlpha
95 write(
ilog,*)
"Rayleigh beta:", freqdata%rayBeta
99 allocate(eigenvalue(nummode))
100 allocate(loadvecre(numnode*ndof))
101 allocate(loadvecim(numnode*ndof))
102 allocate(bjre(nummode))
103 allocate(bjim(nummode))
104 allocate(dispre(numnode*ndof))
105 allocate(dispim(numnode*ndof))
106 allocate(velre(numnode*ndof))
107 allocate(velim(numnode*ndof))
108 allocate(accre(numnode*ndof))
109 allocate(accim(numnode*ndof))
110 allocate(usre(numnode*ndof))
111 allocate(usim(numnode*ndof))
112 allocate(totloadre(numnode*ndof))
113 allocate(totloadim(numnode*ndof))
121 write(*,*)
"--frequency analysis--"
122 write(*, *)
"read from=", trim(fstrfreq%eigenlog_filename)
123 write(
ilog,*)
"read from=", trim(fstrfreq%eigenlog_filename)
124 write(*, *)
"start mode=", startmode
125 write(
ilog,*)
"start mode=", startmode
126 write(*, *)
"end mode=", endmode
127 write(
ilog,*)
"end mode=", endmode
129 open(unit=ilogin, file=trim(fstrfreq%eigenlog_filename), status=
"OLD", action=
"READ", iostat=ierr)
131 if(
myrank == 0 )
write(*,*)
"Error: cannot open eigenlog file: ", trim(fstrfreq%eigenlog_filename)
132 call hecmw_abort( hecmw_comm_get_comm() )
134 call read_eigen_values(ilogin, startmode, endmode, eigenvalue, freqdata%eigOmega)
148 isacc = fstrfreq%FACC_ngrp_tot > 0
152 if(
myrank == 0 )
write(*,*)
"calc quasi-static displacement of acceleration input"
158 if(
myrank == 0 )
write(*,*)
"calc mass matrix"
159 call calcmassmatrix(fstrparam, hecmesh, hecmat, fstrsolid, fstreig, heclagmat)
160 if(
myrank == 0 )
write(*,*)
"scale eigenvector"
161 call scaleeigenvector(hecmesh, fstreig, ndof*numnode, nummode, freqdata%eigVector)
164 write(*, *)
"start frequency:", f_start
165 write(
ilog,*)
"start frequency:", f_start
166 write(*, *)
"end frequency:", f_end
167 write(
ilog,*)
"end frequency:", f_end
168 write(* ,*)
"number of the sampling points", numfreq
169 write(
ilog,*)
"number of the sampling points", numfreq
170 write(* ,*)
"monitor nodeid=", idnode
171 write(
ilog,*)
"monitor nodeid=", idnode
175 freq = (f_end-f_start)/dble(numfreq)*dble(im) + f_start
176 omega = 2.0d0 * 3.14159265358979d0 * freq
179 totloadre(:) = loadvecre(:)
180 totloadim(:) = loadvecim(:)
181 if( isacc )
call addaccelerationload(fstreig, freqdata, omega, usre, usim, totloadre, totloadim)
182 call calcfreqcoeff(hecmesh, freqdata, totloadre, totloadim, omega, bjre, bjim)
184 call calcvelvector(freqdata, omega, bjre, bjim, velre, velim)
185 call calcaccvector(freqdata, omega, bjre, bjim, accre, accim)
194 if( imonit > 0 )
then
195 dx = sqrt(dispre(3*(imonit-1)+1)**2 + dispim(3*(imonit-1)+1)**2)
196 dy = sqrt(dispre(3*(imonit-1)+2)**2 + dispim(3*(imonit-1)+2)**2)
197 dz = sqrt(dispre(3*(imonit-1)+3)**2 + dispim(3*(imonit-1)+3)**2)
198 val = sqrt(dx**2 + dy**2 + dz**2)
199 write(*, *) freq,
"[Hz] : ", val
200 write(
ilog, *) freq,
"[Hz] : ", val
204 if(fstrparam%fg_result==1)
then
205 write(*, *) freq,
"[Hz] : ", im,
".res"
206 write(
ilog,*) freq,
"[Hz] : ", im,
".res"
208 if(fstrparam%fg_visual==1 .and. vistype==1)
then
209 write(*, *) freq,
"[Hz] : ", im,
".vis"
210 write(
ilog,*) freq,
"[Hz] : ", im,
".vis"
213 call output_result(hecmesh, hecmat, fstrsolid, fstrdynamic, fstrparam, &
214 'fstrRES',
'frequency', freq, im, &
215 fstrparam%fg_result==1, fstrparam%fg_visual==1 .and. vistype==1, &
216 dispre, dispim, velre, velim, accre, accim)
221 write(*, *)
"start time:", t_start
222 write(
ilog,*)
"start time:", t_start
223 write(*, *)
"end time:", t_end
224 write(
ilog,*)
"end time:", t_end
225 write(*, *)
"frequency:", freq
226 write(
ilog,*)
"frequency:", freq
227 write(*, *)
"node id:", idnode
228 write(
ilog,*)
"node id:", idnode
229 write(*, *)
"num disp:", numdisp
230 write(
ilog,*)
"num disp:", numdisp
234 if( isacc .and. freq <= 0.0d0 )
then
236 write(*, *)
"Error: !FACCELERATION requires a positive frequency for the time history output"
237 write(
ilog,*)
"Error: !FACCELERATION requires a positive frequency for the time history output"
239 call hecmw_abort( hecmw_comm_get_comm() )
242 omega = 2.0d0 * 3.14159265358979d0 * freq
244 totloadre(:) = loadvecre(:)
245 totloadim(:) = loadvecim(:)
246 if( isacc )
call addaccelerationload(fstreig, freqdata, omega, usre, usim, totloadre, totloadim)
247 call calcfreqcoeff(hecmesh, freqdata, totloadre, totloadim, omega, bjre, bjim)
250 time = (t_end-t_start)/dble(numdisp)*dble(im-1) + t_start
256 eiwt = exp(dcmplx(0.0d0, omega*time))
261 if( imonit > 0 )
then
262 dx = dispre(3*(imonit-1)+1)
263 dy = dispre(3*(imonit-1)+2)
264 dz = dispre(3*(imonit-1)+3)
265 dxi = dispim(3*(imonit-1)+1)
266 dyi = dispim(3*(imonit-1)+2)
267 dzi = dispim(3*(imonit-1)+3)
271 if(fstrparam%fg_result==1)
then
272 write(*, *)
"time=", time,
" : ", im,
".res"
273 write(
ilog,*)
"time=", time,
" : ", im,
".res"
275 if(fstrparam%fg_visual==1 .and. vistype==2)
then
276 write(*, *)
"time=", time,
" : ", im,
".vis"
277 write(
ilog,*)
"time=", time,
" : ", im,
".vis"
280 call output_result(hecmesh, hecmat, fstrsolid, fstrdynamic, fstrparam, &
281 'fstrDYNA',
'TOTALTIME', time, im, &
282 fstrparam%fg_result==1, fstrparam%fg_visual==1 .and. vistype==2, &
283 dispre, dispim, velre, velim, accre, accim)
286 deallocate(freqdata%eigOmega)
287 deallocate(freqdata%eigVector)
288 deallocate(eigenvalue)
289 deallocate(loadvecre)
290 deallocate(loadvecim)
301 deallocate(totloadre)
302 deallocate(totloadim)
308 integer(kind=kint),
intent(in) :: logfile
309 integer(kind=kint),
intent(in) :: startmode
310 integer(kind=kint),
intent(in) :: endmode
311 real(kind=kreal),
intent(inout) :: eigenvalue(:)
312 real(kind=kreal),
intent(inout) :: anglfreq(:)
314 integer(kind=kint) :: im, endflag, id
315 character(len=HECMW_MSG_LEN) :: line
316 real(kind=kreal) :: freq
323 read(logfile,
'(A80)', err=119) line
324 if(trim(adjustl(line)) ==
"NO. EIGENVALUE FREQUENCY (HZ) X Y Z X")
then
329 read(logfile,
'(A80)') line
332 read(logfile,
'(A80)') line
334 do im=1, (endmode-startmode+1)
335 read(logfile,
'(i5,3e12.4,a)', err=119) id, eigenvalue(im), anglfreq(im), freq, line
340 119
write(*,*)
"Error to find eigenvalue information from logfile"
341 write(
ilog,*)
"Error to find eigenvalue information from logfile"
347 integer(kind=kint),
intent(in) :: logfile
348 integer(kind=kint),
intent(in) :: startmode
349 integer(kind=kint),
intent(in) :: endmode
350 integer(kind=kint),
intent(in) :: numdof
351 integer(kind=kint),
intent(in) :: numnode
352 real(kind=kreal),
intent(inout) :: eigenvector(:, :)
354 integer(kind=kint) :: im, in, gblid, j, idx
355 real(kind=kreal) :: vec(6)
356 character(len=HECMW_MSG_LEN) :: line
363 read(logfile,
'(a80)', err=119,
end=119) line
364 if(line(1:9) ==
" Mode No.")
then
371 do im=1, (endmode-startmode+1)
374 read(logfile,
'(a80)', err=119,
end=119) line
375 if(line(1:9) ==
" Mode No.")
then
380 read(logfile,
'(a80)', err=119) line
381 read(logfile,
'(a80)', err=119) line
382 read(logfile,
'(a80)', err=119) line
383 read(logfile,
'(a80)', err=119) line
388 read(logfile,
'(i10,2e12.4)', err=119) gblid, (vec(j), j=1,2)
392 read(logfile,
'(i10,3e16.8)', err=119) gblid, (vec(j), j=1,3)
395 read(logfile,
'(i10,6e12.4)', err=119) gblid, (vec(j), j=1,6)
402 idx = (in-1)*numdof + j
403 eigenvector(idx,im) = vec(j)
410 119
write(*,*)
"Error to find eigenvector from logfile"
411 write(ilog,*)
"Error to find eigenvector from logfile"
418 type(hecmwst_local_mesh),
intent(in) :: hecMESH
419 integer(kind=kint),
intent(in) :: startmode
420 integer(kind=kint),
intent(in) :: endmode
421 integer(kind=kint),
intent(in) :: numdof
422 integer(kind=kint),
intent(in) :: numnode
423 real(kind=kreal),
intent(inout) :: eigenvector(:, :)
425 integer(kind=kint),
parameter :: compidx = 1
426 integer(kind=kint) :: imode, idx, ind, a, b, nallcomp, j
427 type(hecmwst_result_data) :: eigenres
428 character(len=HECMW_NAME_LEN) :: name
432 do imode=startmode, endmode
434 call hecmw_result_read_by_name(hecmesh, name, imode, eigenres)
437 do ind=1,eigenres%nn_component
438 nallcomp = nallcomp + eigenres%nn_dof(ind)
441 idx = imode - startmode + 1
444 a = (ind-1)*nallcomp + j
445 b = (ind-1)*numdof + j
446 eigenvector(b,idx) = eigenres%node_val_item(a)
456 type(hecmwst_result_data) :: res
459 if(
associated(res%nn_dof))
deallocate(res%nn_dof)
460 if(
associated(res%ne_dof))
deallocate(res%ne_dof)
461 if(
associated(res%node_label))
deallocate(res%node_label)
462 if(
associated(res%elem_label))
deallocate(res%elem_label)
463 if(
associated(res%node_val_item))
deallocate(res%node_val_item)
464 if(
associated(res%elem_val_item))
deallocate(res%elem_val_item)
469 type(hecmwst_result_data) :: res
474 nullify(res%node_label)
475 nullify(res%elem_label)
476 nullify(res%node_val_item)
477 nullify(res%elem_val_item)
490 type(fstr_solid),
intent(inout) :: fstrSOLID
491 integer(kind=kint),
intent(in) :: iout(3)
493 integer(kind=kint) :: i
497 fstrsolid%output_ctrl(i)%outinfo%on(1) = (iout(1) == 1)
498 fstrsolid%output_ctrl(i)%outinfo%on(15) = (iout(2) == 1)
499 fstrsolid%output_ctrl(i)%outinfo%on(16) = (iout(3) == 1)
509 subroutine updatesolidresult(hecMESH, hecMAT, fstrSOLID, fstrDYNAMIC, fstrPARAM, istp, disp, vel, acc)
511 type(hecmwst_local_mesh) :: hecMESH
512 type(hecmwst_matrix) :: hecMAT
513 type(fstr_solid) :: fstrSOLID
514 type(fstr_dynamic) :: fstrDYNAMIC
515 type(fstr_param) :: fstrPARAM
516 integer(kind=kint),
intent(in) :: istp
517 real(kind=kreal),
intent(in) :: disp(:)
518 real(kind=kreal),
intent(in) :: vel(:)
519 real(kind=kreal),
intent(in) :: acc(:)
521 integer(kind=kint) :: ndof, ntotal, idx
525 ntotal = ndof*hecmesh%n_node
528 if( fstrdynamic%idx_eqa == 1 .and. istp > 0 ) idx = 2
529 fstrdynamic%DISP(1:ntotal,idx) = disp(1:ntotal)
530 fstrdynamic%VEL (1:ntotal,idx) = vel(1:ntotal)
531 fstrdynamic%ACC (1:ntotal,idx) = acc(1:ntotal)
533 hecmat%X(1:ntotal) = disp(1:ntotal) - fstrsolid%unode(1:ntotal) - fstrsolid%dunode(1:ntotal)
534 call fstr_apply_solution_increment( hecmesh, fstrsolid, ndof, hecmat%X )
535 call fstr_updatenewton( hecmesh, hecmat, fstrsolid, fstrparam, 0.0d0, 0.0d0, 1 )
536 call fstr_update_reaction_spc( 1, hecmesh, fstrsolid )
539 call fstr_nodalstress2d( hecmesh, fstrsolid )
540 else if( ndof == 6 )
then
541 call fstr_nodalstress6d( hecmesh, fstrsolid )
543 call fstr_nodalstress3d( hecmesh, fstrsolid )
552 subroutine output_result(hecMESH, hecMAT, fstrSOLID, fstrDYNAMIC, fstrPARAM, nameid, glabel, gvalue, &
553 istp, wres, wvis, dispRe, dispIm, velRe, velIm, accRe, accIm)
555 type(hecmwst_local_mesh) :: hecMESH
556 type(hecmwst_matrix) :: hecMAT
557 type(fstr_solid) :: fstrSOLID
558 type(fstr_dynamic) :: fstrDYNAMIC
559 type(fstr_param) :: fstrPARAM
560 character(len=*),
intent(in) :: nameid
561 character(len=*),
intent(in) :: glabel
562 real(kind=kreal),
intent(in) :: gvalue
563 integer(kind=kint),
intent(in) :: istp
564 logical,
intent(in) :: wres, wvis
565 real(kind=kreal),
intent(in) :: dispre(:), dispim(:)
566 real(kind=kreal),
intent(in) :: velre(:), velim(:)
567 real(kind=kreal),
intent(in) :: accre(:), accim(:)
569 type(hecmwst_result_data) :: visre, visim
570 character(len=HECMW_HEADER_LEN) :: header
571 character(len=HECMW_MSG_LEN) :: comment
572 character(len=HECMW_NAME_LEN) :: label, resid
573 real(kind=kreal) :: gval(1)
576 if( .not. (wres .or. wvis) )
return
580 comment=
'frequency_result'
581 call hecmw_result_init(hecmesh, istp, header, comment)
585 call hecmw_result_add(hecmw_result_dtype_global, 1, label, gval)
588 call updatesolidresult(hecmesh, hecmat, fstrsolid, fstrdynamic, fstrparam, istp, dispre, velre, accre)
589 if( wres )
call fstr_write_result_add(hecmesh, fstrsolid, istp,
'_real', fstrdynamic)
590 if( wvis )
call fstr_make_result(hecmesh, fstrsolid, visre, istp, gvalue, fstrdynamic,
'_real')
592 call updatesolidresult(hecmesh, hecmat, fstrsolid, fstrdynamic, fstrparam, istp, dispim, velim, accim)
593 if( wres )
call fstr_write_result_add(hecmesh, fstrsolid, istp,
'_imag', fstrdynamic)
594 if( wvis )
call fstr_make_result(hecmesh, fstrsolid, visim, istp, gvalue, fstrdynamic,
'_imag')
598 call hecmw_result_write_by_name(resid)
599 call hecmw_result_finalize()
603 call fstr_merge_result(hecmesh, visre, visim)
604 call hecmw_result_free(visim)
605 call fstr2hecmw_mesh_conv(hecmesh)
606 call hecmw_visualize_init
607 call hecmw_visualize( hecmesh, visre, istp )
608 call hecmw2fstr_mesh_conv(hecmesh)
609 call hecmw_result_free(visre)
616 type(hecmwst_local_mesh),
intent(in) :: hecmesh
617 type(fstr_freqanalysis),
intent(in) :: freqData
618 real(kind=kreal),
intent(inout) :: loadvecre(:)
619 real(kind=kreal),
intent(inout) :: loadvecim(:)
621 integer(kind=kint),
parameter :: MAXNODE = 100
622 integer(kind=kint) :: sgrpID, is, ie, ic, nsurf, ic_type
623 integer(kind=kint) :: nn, dof_index, ndof
624 integer(kind=kint) :: i, j, k, l, isn, nsize
625 integer(kind=kint) :: iwk(60), nodLOCAL(20)
626 real(kind=kreal) :: vect(60), xx(20), yy(20), zz(20), forcere(3), forceim(3)
630 do i=1,freqdata%FLOAD_ngrp_tot
631 if(freqdata%FLOAD_ngrp_TYPE(i) == kfloadtype_surf)
then
632 sgrpid = freqdata%FLOAD_ngrp_ID(i)
633 dof_index = freqdata%FLOAD_ngrp_DOF(i)
636 forcere(dof_index) = freqdata%FLOAD_ngrp_valre(i)
637 forceim(dof_index) = freqdata%FLOAD_ngrp_valim(i)
639 is = hecmesh%surf_group%grp_index(sgrpid-1) + 1
640 ie = hecmesh%surf_group%grp_index(sgrpid)
642 ic = hecmesh%surf_group%grp_item(2*j-1)
643 nsurf = hecmesh%surf_group%grp_item(2*j)
644 ic_type = hecmesh%elem_type(ic)
645 nn = hecmw_get_max_node(ic_type)
646 isn = hecmesh%elem_node_index(ic-1)
648 nodlocal(k) = hecmesh%elem_node_item(isn+k)
649 xx(k) = hecmesh%node(3*nodlocal(k)-2)
650 yy(k) = hecmesh%node(3*nodlocal(k)-1)
651 zz(k) = hecmesh%node(3*nodlocal(k) )
653 iwk(ndof*(k-1)+l) = ndof*(nodlocal(k)-1)+l
657 call dl_c3_freq(ic_type, nn, xx, yy, zz, nsurf, forcere, vect, nsize)
659 loadvecre(iwk(k)) = loadvecre(iwk(k)) + vect(k)
662 call dl_c3_freq(ic_type, nn, xx, yy, zz, nsurf, forceim, vect, nsize)
664 loadvecim(iwk(k)) = loadvecim(iwk(k)) + vect(k)
673 subroutine dl_c3_freq(ETYPE, NN, XX, YY, ZZ, LTYPE, force, VECT, nsize)
675 integer(kind=kint),
intent(in) :: ETYPE
676 integer(kind=kint),
intent(in) :: NN
677 integer(kind=kint),
intent(in) :: LTYPE
678 real(kind=kreal),
intent(in) :: xx(:)
679 real(kind=kreal),
intent(in) :: yy(:)
680 real(kind=kreal),
intent(in) :: zz(:)
681 real(kind=kreal),
intent(in) :: force(3)
682 real(kind=kreal),
intent(inout) :: vect(:)
683 integer(kind=kint),
intent(inout) :: nsize
685 integer(kind=kint),
parameter :: NDOF = 3
686 real(kind=kreal) :: wg, area
687 integer(kind=kint) :: NOD(NN)
688 real(kind=kreal) :: elecoord(3, nn), localcoord(3), normal(3)
689 real(kind=kreal) :: h(nn)
690 integer(kind=kint) :: I, IG2, NSUR, SURTYPE
693 call getsubface( etype, ltype, surtype, nod )
694 nsur = getnumberofnodes( surtype )
697 elecoord(1,i)=xx(nod(i))
698 elecoord(2,i)=yy(nod(i))
699 elecoord(3,i)=zz(nod(i))
702 vect(1:nsize) = 0.0d0
703 do ig2=1,numofquadpoints( surtype )
704 call getquadpoint( surtype, ig2, localcoord(1:2) )
705 call getshapefunc( surtype, localcoord(1:2), h(1:nsur) )
707 wg=getweight( surtype, ig2 )
708 normal=surfacenormal( surtype, nsur, localcoord(1:2), elecoord(:,1:nsur) )
709 area=dsqrt( dot_product(normal, normal) )
711 vect(3*nod(i)-2)=vect(3*nod(i)-2)+area*wg*h(i)*force(1)
712 vect(3*nod(i)-1)=vect(3*nod(i)-1)+area*wg*h(i)*force(2)
713 vect(3*nod(i) )=vect(3*nod(i) )+area*wg*h(i)*force(3)
720 type(hecmwst_local_mesh),
intent(in) :: hecMESH
721 type(fstr_freqanalysis),
intent(in) :: freqData
722 integer(kind=kint),
intent(in) :: numdof
723 real(kind=kreal),
intent(inout) :: loadvecre(:)
724 real(kind=kreal),
intent(inout) :: loadvecim(:)
726 integer(kind=kint) :: i, ig, is, ie, in, nodeid, dof_index
730 do i=1, freqdata%FLOAD_ngrp_tot
731 if(freqdata%FLOAD_ngrp_TYPE(i) == kfloadtype_node)
then
732 ig = freqdata%FLOAD_ngrp_ID(i)
733 is = hecmesh%node_group%grp_index(ig-1) + 1
734 ie = hecmesh%node_group%grp_index(ig)
736 nodeid = hecmesh%node_group%grp_item(in)
737 dof_index = freqdata%FLOAD_ngrp_DOF(i)
738 loadvecre((nodeid-1)*numdof + dof_index) = loadvecre((nodeid-1)*numdof + dof_index) + freqdata%FLOAD_ngrp_valre(i)
739 loadvecim((nodeid-1)*numdof + dof_index) = loadvecim((nodeid-1)*numdof + dof_index) + freqdata%FLOAD_ngrp_valim(i)
746 subroutine calcmassmatrix(fstrPARAM, hecMESH, hecMAT, fstrSOLID, fstrEIG, hecLagMAT)
748 type(fstr_param),
intent(in) :: fstrPARAM
749 type(hecmwst_local_mesh),
intent(in) :: hecMESH
750 type(hecmwst_matrix),
intent(inout) :: hecMAT
751 type(fstr_solid),
intent(inout) :: fstrSOLID
752 type(fstr_eigen),
intent(inout) :: fstrEIG
753 type(hecmwst_matrix_lagrange),
intent(inout) :: hecLagMAT
755 type(hecmwst_ebc) :: hecEBC
759 fstrsolid%dunode = 0.d0
760 call fstr_creatematrix_and_dampingforce( hecmesh, hecmat, fstrsolid, 0.d0, 0.d0 )
761 call hecmw_ebc_init(hecmat, hecebc)
762 call fstr_addbc(1, hecmesh, hecmat, fstrsolid, fstrparam, heclagmat, 2, hecebc)
763 call hecmw_ebc_apply(hecmesh, hecmat, hecebc)
764 call hecmw_ebc_finalize(hecebc)
766 call setmass(fstrsolid, hecmesh, hecmat, fstreig)
778 type(hecmwst_local_mesh) :: hecMESH
779 type(hecmwst_matrix) :: hecMAT
780 type(fstr_solid) :: fstrSOLID
781 type(fstr_param) :: fstrPARAM
782 type(fstr_freqanalysis),
intent(in) :: fstrFREQ
783 type(hecmwst_matrix_lagrange) :: hecLagMAT
784 integer(kind=kint),
intent(in) :: loadcase
785 real(kind=kreal),
intent(inout) :: us(:)
787 type(hecmwst_local_mesh),
pointer :: hecmeshmpc
788 type(hecmwst_matrix),
pointer :: hecMATmpc
789 type(hecmwst_ebc) :: hecEBC
790 integer(kind=kint) :: ndof, ntotal, i, ig, ik, in, idof, idofS, idofE
791 real(kind=kreal) :: val(fstrfreq%FACC_ngrp_tot)
795 ntotal = ndof*hecmesh%n_node
799 if( loadcase == kfloadcase_re )
then
800 val(:) = fstrfreq%FACC_ngrp_valre(1:fstrfreq%FACC_ngrp_tot)
802 val(:) = fstrfreq%FACC_ngrp_valim(1:fstrfreq%FACC_ngrp_tot)
805 if( maxval(abs(val)) <= 0.0d0 )
return
808 call hecmw_mpc_mat_init(hecmesh, hecmat, hecmeshmpc, hecmatmpc)
811 fstrsolid%dunode = 0.d0
812 call fstr_creatematrix_and_dampingforce( hecmesh, hecmat, fstrsolid, 0.d0, 0.d0 )
814 call fstr_addspring(1, hecmesh, hecmat, fstrsolid)
816 call hecmw_mat_clear_b(hecmat)
818 call hecmw_ebc_init(hecmat, hecebc)
819 call fstr_addbc(1, hecmesh, hecmat, fstrsolid, fstrparam, heclagmat, 2, hecebc)
822 do i=1, fstrfreq%FACC_ngrp_tot
823 ig = fstrfreq%FACC_ngrp_ID(i)
825 idofs = fstrfreq%FACC_ngrp_type(i)/10
826 idofe = fstrfreq%FACC_ngrp_type(i) - idofs*10
828 do ik=hecmesh%node_group%grp_index(ig-1)+1, hecmesh%node_group%grp_index(ig)
829 in = hecmesh%node_group%grp_item(ik)
831 call hecmw_ebc_set(hecebc, in, idof, val(i))
836 call hecmw_mpc_mat_ass(hecmesh, hecmat, hecmeshmpc, hecmatmpc)
837 call hecmw_mpc_trans_rhs(hecmesh, hecmat, hecmatmpc)
838 call hecmw_ebc_apply(hecmeshmpc, hecmatmpc, hecebc)
841 hecmatmpc%Iarray(98) = 1
842 hecmatmpc%Iarray(97) = 1
844 call solve_lineq(hecmeshmpc, hecmatmpc)
845 call hecmw_mpc_tback_sol(hecmesh, hecmat, hecmatmpc)
847 call hecmw_update_r(hecmesh, hecmat%X, hecmat%NP, ndof)
848 us(1:ntotal) = hecmat%X(1:ntotal)
850 call hecmw_ebc_finalize(hecebc)
851 call hecmw_mpc_mat_finalize(hecmesh, hecmat, hecmeshmpc, hecmatmpc)
861 type(hecmwst_local_mesh),
intent(in) :: hecmesh
862 type(fstr_freqanalysis),
intent(in) :: fstrFREQ
863 type(fstr_freqanalysis_data),
intent(in) :: freqData
865 real(kind=kreal),
parameter :: tol = 1.0d-8
866 integer(kind=kint) :: ndof, i, ig, ik, in, idof, idofS, idofE, imode, nerr
867 real(kind=kreal) :: vmax
872 do imode=1, freqdata%numMode
874 vmax = maxval(abs(freqdata%eigVector(1:hecmesh%nn_internal*ndof, imode)))
875 call hecmw_allreduce_r1(hecmesh, vmax, hecmw_max)
876 do i=1, fstrfreq%FACC_ngrp_tot
877 ig = fstrfreq%FACC_ngrp_ID(i)
879 idofs = fstrfreq%FACC_ngrp_type(i)/10
880 idofe = min(fstrfreq%FACC_ngrp_type(i) - idofs*10, ndof)
881 do ik=hecmesh%node_group%grp_index(ig-1)+1, hecmesh%node_group%grp_index(ig)
882 in = hecmesh%node_group%grp_item(ik)
884 if( in > hecmesh%nn_internal ) cycle
887 if( abs(freqdata%eigVector(ndof*(in-1)+idof, imode)) > tol*vmax ) nerr = nerr + 1
893 call hecmw_allreduce_i1(hecmesh, nerr, hecmw_sum)
895 if( myrank == 0 )
then
896 write(*, *)
"Error: the DOFs of !FACCELERATION must be constrained in the eigen analysis"
897 write(ilog,*)
"Error: the DOFs of !FACCELERATION must be constrained in the eigen analysis"
899 call hecmw_abort( hecmw_comm_get_comm() )
905 type(hecmwst_local_mesh),
intent(in) :: hecmesh
906 type(fstr_eigen),
intent(in) :: fstrEIG
907 integer(kind=kint),
intent(in) :: ntotaldof
908 integer(kind=kint),
intent(in) :: nmode
909 real(kind=kreal),
intent(inout) :: eigenvector(:, :)
911 integer(kind=kint) :: imode, idof, nintdof
912 real(kind=kreal) :: mas
915 nintdof = hecmesh%nn_internal*hecmesh%n_dof
920 mas = mas + fstreig%mass(idof)*eigenvector(idof,imode)**2
922 call hecmw_allreduce_r1(hecmesh, mas, hecmw_sum)
924 eigenvector(idof,imode) = eigenvector(idof,imode) / sqrt(mas)
931 type(fstr_eigen),
intent(in) :: fstreig
932 real(kind=kreal),
intent(in) :: eigenvector(:, :)
933 integer(kind=kint),
intent(in) :: imode
934 integer(kind=kint),
intent(in) :: jmode
935 real(kind=kreal),
intent(inout) :: prod
937 integer(kind=kint) :: idof, s
939 s =
size(eigenvector(:,1))
943 prod = prod + eigenvector(idof,imode)*fstreig%mass(idof)*eigenvector(idof,jmode)
950 integer(kind=kint),
intent(in) :: im
951 real(kind=kreal),
intent(in) :: vector(:)
953 integer(kind=kint) :: i, s
958 write(*,
'("eigenvec",i2.2,":[",e12.5,", ")') im, vector(i)
960 write(*,
'(e12.5,", ")') vector(i)
962 write(*,
'(e12.5,"];")') vector(i)
971 type(hecmwst_local_mesh),
intent(in) :: hecMESH
972 real(kind=kreal),
intent(in) :: a(:)
973 real(kind=kreal),
intent(in) :: b(:)
974 real(kind=kreal),
intent(inout) :: c
976 integer(kind=kint) :: nintdof
978 nintdof = hecmesh%nn_internal*hecmesh%n_dof
979 c = dot_product(a(1:nintdof), b(1:nintdof))
980 call hecmw_allreduce_r1(hecmesh, c, hecmw_sum)
984 subroutine calcfreqcoeff(hecMESH, freqData, loadRe, loadIm, inpOmega, bjRe, bjIm)
986 type(hecmwst_local_mesh),
intent(in) :: hecMESH
987 type(fstr_freqanalysis_data),
intent(in) :: freqData
988 real(kind=kreal),
intent(in) :: loadre(:)
989 real(kind=kreal),
intent(in) :: loadim(:)
990 real(kind=kreal),
intent(in) :: inpomega
991 real(kind=kreal),
intent(inout) :: bjre(:)
992 real(kind=kreal),
intent(inout) :: bjim(:)
994 integer(kind=kint) :: imode
995 real(kind=kreal) :: ujfr, ujfi, a, b, alp, beta
998 alp = freqdata%rayAlpha
999 beta = freqdata%rayBeta
1001 do imode=1, freqdata%numMode
1002 call calcdotproduct(hecmesh, freqdata%eigVector(:,imode), loadre, ujfr)
1003 call calcdotproduct(hecmesh, freqdata%eigVector(:,imode), loadim, ujfi)
1005 a = ujfr*(freqdata%eigOmega(imode)**2 - inpomega**2) + ujfi*(alp + beta*freqdata%eigOmega(imode)**2)*inpomega
1006 b = (freqdata%eigOmega(imode)**2 - inpomega**2)**2 + ((alp + beta*freqdata%eigOmega(imode)**2)*inpomega)**2
1009 a = ujfi*(freqdata%eigOmega(imode)**2 -inpomega**2) - ujfr*(alp + beta*freqdata%eigOmega(imode)**2)*inpomega
1010 b = (freqdata%eigOmega(imode)**2 - inpomega**2)**2 + ((alp + beta*freqdata%eigOmega(imode)**2)*inpomega)**2
1023 type(fstr_eigen),
intent(in) :: fstreig
1024 type(fstr_freqanalysis_data),
intent(in) :: freqData
1025 real(kind=kreal),
intent(in) :: omega
1026 real(kind=kreal),
intent(in) :: usre(:)
1027 real(kind=kreal),
intent(in) :: usim(:)
1028 real(kind=kreal),
intent(inout) :: loadre(:)
1029 real(kind=kreal),
intent(inout) :: loadim(:)
1031 integer(kind=kint) :: n
1032 real(kind=kreal) :: c
1035 n = freqdata%numNodeDOF
1036 c = freqdata%rayAlpha / omega
1039 loadre(1:n) = loadre(1:n) - fstreig%mass(1:n)*(usre(1:n) + c*usim(1:n))
1040 loadim(1:n) = loadim(1:n) - fstreig%mass(1:n)*(usim(1:n) - c*usre(1:n))
1049 complex(kind=kreal),
intent(in) :: coef
1050 real(kind=kreal),
intent(in) :: usre(:)
1051 real(kind=kreal),
intent(in) :: usim(:)
1052 real(kind=kreal),
intent(inout) :: vecre(:)
1053 real(kind=kreal),
intent(inout) :: vecim(:)
1057 vecre(:) = vecre(:) + dble(coef)*usre(:) - aimag(coef)*usim(:)
1058 vecim(:) = vecim(:) + dble(coef)*usim(:) + aimag(coef)*usre(:)
1063 type(fstr_freqanalysis_data),
intent(in) :: freqdata
1064 real(kind=kreal),
intent(in) :: bjre(:)
1065 real(kind=kreal),
intent(in) :: bjim(:)
1066 real(kind=kreal),
intent(inout) :: dispre(:)
1067 real(kind=kreal),
intent(inout) :: dispim(:)
1069 integer(kind=kint) :: imode
1075 do imode=1, freqdata%numMode
1076 dispre(:) = dispre(:) + bjre(imode)*freqdata%eigVector(:,imode)
1077 dispim(:) = dispim(:) + bjim(imode)*freqdata%eigVector(:,imode)
1084 type(fstr_freqanalysis_data),
intent(in) :: freqData
1085 real(kind=kreal),
intent(in) :: omega
1086 real(kind=kreal),
intent(in) :: bjre(:)
1087 real(kind=kreal),
intent(in) :: bjim(:)
1088 real(kind=kreal),
intent(inout) :: velre(:)
1089 real(kind=kreal),
intent(inout) :: velim(:)
1091 integer(kind=kint) :: imode
1097 do imode=1, freqdata%numMode
1098 velre(:) = velre(:) - omega * bjim(imode) * freqdata%eigVector(:,imode)
1099 velim(:) = velim(:) + omega * bjre(imode) * freqdata%eigVector(:,imode)
1105 type(fstr_freqanalysis_data),
intent(in) :: freqData
1106 real(kind=kreal),
intent(in) :: omega
1107 real(kind=kreal),
intent(in) :: bjre(:)
1108 real(kind=kreal),
intent(in) :: bjim(:)
1109 real(kind=kreal),
intent(inout) :: accre(:)
1110 real(kind=kreal),
intent(inout) :: accim(:)
1112 integer(kind=kint) :: imode
1118 do imode=1, freqdata%numMode
1119 accre(:) = accre(:) - omega**2 * bjre(imode) * freqdata%eigVector(:,imode)
1120 accim(:) = accim(:) - omega**2 * bjim(imode) * freqdata%eigVector(:,imode)
1125 subroutine setupfreqparam(fstrDYNAMIC, f_start, f_end, numfreq, raym, rayk, idnode, vistype, ioutl)
1127 type(fstr_dynamic),
intent(in) :: fstrDYNAMIC
1128 real(kind=kreal),
intent(inout) :: f_start
1129 real(kind=kreal),
intent(inout) :: f_end
1130 integer(kind=kint),
intent(inout) :: numfreq
1131 real(kind=kreal),
intent(inout) :: raym
1132 real(kind=kreal),
intent(inout) :: rayk
1133 integer(kind=kint),
intent(inout) :: idnode
1134 integer(kind=kint),
intent(inout) :: vistype
1135 integer(kind=kint),
intent(inout) :: ioutl(3)
1139 f_start = fstrdynamic%t_start
1140 f_end = fstrdynamic%t_end
1141 numfreq = fstrdynamic%n_step
1142 raym = fstrdynamic%ray_m
1143 rayk = fstrdynamic%ray_k
1144 idnode = fstrdynamic%nout_monit
1145 vistype = fstrdynamic%ngrp_monit
1146 ioutl(1:3) = fstrdynamic%iout_list(1:3)
1152 type(fstr_freqanalysis_data),
intent(in) :: freqData
1153 real(kind=kreal),
intent(in) :: time
1154 real(kind=kreal),
intent(in) :: omega
1155 real(kind=kreal),
intent(in) :: bjre(:)
1156 real(kind=kreal),
intent(in) :: bjim(:)
1157 real(kind=kreal),
intent(inout) :: dispre(:)
1158 real(kind=kreal),
intent(inout) :: dispim(:)
1160 integer(kind=kint) :: imode, idf, s
1161 complex(kind=kreal) :: a, b, c
1166 a = exp(dcmplx(0.0d0, omega*time))
1168 do imode=1, freqdata%numMode
1169 s =
size(freqdata%eigvector(:,imode))
1170 b = dcmplx(bjre(imode), bjim(imode)) * a
1172 c = b*dcmplx(freqdata%eigVector(idf,imode), 0.0d0)
1173 dispre(idf) = dispre(idf) + dble(c)
1174 dispim(idf) = dispim(idf) + imag(c)
1182 type(fstr_freqanalysis_data),
intent(in) :: freqData
1183 real(kind=kreal),
intent(in) :: time
1184 real(kind=kreal),
intent(in) :: omega
1185 real(kind=kreal),
intent(in) :: bjre(:)
1186 real(kind=kreal),
intent(in) :: bjim(:)
1187 real(kind=kreal),
intent(inout) :: velre(:)
1188 real(kind=kreal),
intent(inout) :: velim(:)
1190 integer(kind=kint) :: imode, idf, s
1191 complex(kind=kreal) :: a, b, c
1196 a = dcmplx(0.0d0, 1.0d0)*dcmplx(omega, 0.0d0)*exp(dcmplx(0.0d0, omega*time))
1198 do imode=1, freqdata%numMode
1199 s =
size(freqdata%eigvector(:,imode))
1200 b = dcmplx(bjre(imode), bjim(imode)) * a
1202 c = b*dcmplx(freqdata%eigVector(idf,imode), 0.0d0)
1203 velre(idf) = velre(idf) + dble(c)
1204 velim(idf) = velim(idf) + imag(c)
1212 type(fstr_freqanalysis_data),
intent(in) :: freqData
1213 real(kind=kreal),
intent(in) :: time
1214 real(kind=kreal),
intent(in) :: omega
1215 real(kind=kreal),
intent(in) :: bjre(:)
1216 real(kind=kreal),
intent(in) :: bjim(:)
1217 real(kind=kreal),
intent(inout) :: accre(:)
1218 real(kind=kreal),
intent(inout) :: accim(:)
1220 integer(kind=kint) :: imode, idf, s
1221 complex(kind=kreal) :: a, b, c
1226 a = dcmplx(-1.0d0, 0.0d0)*dcmplx(omega**2, 0.0d0)*exp(dcmplx(0.0d0, omega*time))
1228 do imode=1, freqdata%numMode
1229 s =
size(freqdata%eigvector(:,imode))
1230 b = dcmplx(bjre(imode), bjim(imode)) * a
1232 c = b*dcmplx(freqdata%eigVector(idf,imode), 0.0d0)
1233 accre(idf) = accre(idf) + dble(c)
1234 accim(idf) = accim(idf) + imag(c)
1242 type(fstr_dynamic),
intent(in) :: fstrDYNAMIC
1243 real(kind=kreal),
intent(inout) :: t_start
1244 real(kind=kreal),
intent(inout) :: t_end
1245 real(kind=kreal),
intent(inout) :: dynafreq
1246 integer(kind=kint),
intent(inout) :: numdisp
1249 t_start = fstrdynamic%gamma
1250 t_end = fstrdynamic%beta
1251 dynafreq = fstrdynamic%t_delta
1252 numdisp = fstrdynamic%nout
subroutine nullify_result_data(res)
subroutine free_result_data(res)
This module contains steady state frequency analysis.
subroutine fstr_solve_frequency_analysis(hecMESH, hecMAT, fstrSOLID, fstrEIG, fstrDYNAMIC, fstrPARAM, fstrFREQ, hecLagMAT)
subroutine calcdispvector(freqData, bjRe, bjIm, dispRe, dispIm)
subroutine read_eigen_vector(logfile, startmode, endmode, numdof, numnode, eigenvector)
subroutine addquasistaticvector(coef, usRe, usIm, vecRe, vecIm)
subroutine calcfreqcoeff(hecMESH, freqData, loadRe, loadIm, inpOmega, bjRe, bjIm)
subroutine updatesolidresult(hecMESH, hecMAT, fstrSOLID, fstrDYNAMIC, fstrPARAM, istp, disp, vel, acc)
subroutine read_eigen_vector_res(hecMESH, startmode, endmode, numdof, numnode, eigenvector)
subroutine calcaccvector(freqData, omega, bjRe, bjIm, accRe, accIm)
subroutine writeoutvector(im, vector)
subroutine output_result(hecMESH, hecMAT, fstrSOLID, fstrDYNAMIC, fstrPARAM, nameid, glabel, gvalue, istp, wres, wvis, dispRe, dispIm, velRe, velIm, accRe, accIm)
subroutine addaccelerationload(fstrEIG, freqData, omega, usRe, usIm, loadRe, loadIm)
subroutine calcdispvectortime(freqData, time, omega, bjRe, bjIm, dispRe, dispIm)
subroutine checkorthvector(fstrEIG, eigenvector, imode, jmode, prod)
subroutine setupdynaparam(fstrDYNAMIC, t_start, t_end, dynafreq, numdisp)
subroutine calcquasistaticdisp(hecMESH, hecMAT, fstrSOLID, fstrPARAM, fstrFREQ, hecLagMAT, loadcase, us)
subroutine calcvelvectortime(freqData, time, omega, bjRe, bjIm, velRe, velIm)
subroutine checkaccelerationdof(hecMESH, fstrFREQ, freqData)
subroutine setupfreqparam(fstrDYNAMIC, f_start, f_end, numfreq, raym, rayk, idnode, vistype, ioutl)
subroutine read_eigen_values(logfile, startmode, endmode, eigenvalue, anglfreq)
subroutine calcmassmatrix(fstrPARAM, hecMESH, hecMAT, fstrSOLID, fstrEIG, hecLagMAT)
subroutine assemble_nodeload(hecMESH, freqData, numdof, loadvecRe, loadvecIm)
subroutine calcaccvectortime(freqData, time, omega, bjRe, bjIm, accRe, accIm)
subroutine setupoutputitem(fstrSOLID, iout)
subroutine calcdotproduct(hecMESH, a, b, c)
subroutine scaleeigenvector(hecMESH, fstrEIG, ntotaldof, nmode, eigenvector)
subroutine extract_surf2node(hecMESH, freqData, loadvecRe, loadvecIm)
subroutine dl_c3_freq(ETYPE, NN, XX, YY, ZZ, LTYPE, force, VECT, nsize)
subroutine calcvelvector(freqData, omega, bjRe, bjIm, velRe, velIm)
Essential boundary conditions kept as per-DOF marks and values so that they can be imposed on the mat...
This module contains auxiliary functions in calculation setup.
integer(kind=kint) function node_global_to_local(hecMESH, list, n)
This module provides a function to deal with prescribed displacement.
This module assembles the tangent stiffness matrix and, in the implicit dynamic case,...
Set up lumped mass matrix.
Finite-rotation nodal kinematics for NLGEOM.
This module provides functions to calculation nodal stress.
This module provides function to calculate residual of nodal force.
subroutine, public fstr_update_reaction_spc(cstep, hecMESH, fstrSOLID)
Set fstrSOLIDREACTION at constrained DOFs using current fstrSOLIDQFORCE. Constrained DOFs are enumera...
This module provides functions to deal with spring force.
This module provides function to calculate to do updates.
This module defines common data and basic structures for analysis.
integer(kind=kint) myrank
PARALLEL EXECUTION.
integer(kind=kint), parameter kfloadcase_im
integer(kind=kint), parameter ilog
FILE HANDLER.
integer(kind=kint), parameter kfloadcase_re
HECMW to FSTR Mesh Data Converter. Converting Connectivity of Element Type 232, 342 and 352.
This module provide a function to prepare output of static analysis.
Data for DYNAMIC ANSLYSIS (fstrDYNAMIC)
Package of data used by Lanczos eigenvalue solver.
FSTR INNER CONTROL PARAMETERS (fstrPARAM)