26 fstrDYNAMIC, fstrRESULT, fstrPARAM, &
27 fstrCPL, fstrFREQ, hecLagMAT, restart_step_num)
31 type(hecmwst_local_mesh) :: hecMESH
32 type(hecmwst_matrix) :: hecMAT
35 type(hecmwst_result_data) :: fstrRESULT
40 type(hecmwst_matrix_lagrange) :: hecLagMAT
41 integer(kind=kint) :: restart_step_num
46 integer(kind=kint) :: numnode, numelm, startmode, endmode, nummode, ndof, im, in, ntotal, vistype
47 integer(kind=kint) :: numfreq, idnode, numdisp, imonit, nmonit, monitnode(1)
48 integer(kind=kint) :: freqiout(3)
49 integer(kind=kint) :: ierr
50 integer(kind=kint),
parameter :: ilogin = 9056
51 real(kind=kreal),
allocatable :: eigenvalue(:), loadvecre(:), loadvecim(:)
52 real(kind=kreal),
allocatable :: bjre(:), bjim(:)
53 real(kind=kreal),
allocatable :: dispre(:), dispim(:), velre(:), velim(:), accre(:), accim(:)
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
58 numnode = hecmesh%n_node
59 numelm = hecmesh%n_elem
61 startmode = fstrfreq%start_mode
62 endmode = fstrfreq%end_mode
63 nummode = endmode - startmode +1
65 freqdata%numMode = nummode
66 freqdata%numNodeDOF = numnode*ndof
67 allocate(freqdata%eigOmega(nummode))
68 allocate(freqdata%eigVector(numnode*ndof, nummode))
70 call setupfreqparam(fstrdynamic, f_start, f_end, numfreq, freqdata%rayAlpha, freqdata%rayBeta, idnode, vistype, freqiout)
76 if( monitnode(1) <= hecmesh%nn_internal ) imonit = monitnode(1)
79 if( imonit > 0 ) nmonit = 1
80 call hecmw_allreduce_i1(hecmesh, nmonit, hecmw_sum)
81 if( nmonit == 0 )
then
83 write(*, *)
"Error: monitor node not found:", idnode
84 write(
ilog,*)
"Error: monitor node not found:", idnode
86 call hecmw_abort( hecmw_comm_get_comm() )
90 write(*,*)
"Rayleigh alpha:", freqdata%rayAlpha
91 write(*,*)
"Rayleigh beta:", freqdata%rayBeta
92 write(
ilog,*)
"Rayleigh alpha:", freqdata%rayAlpha
93 write(
ilog,*)
"Rayleigh beta:", freqdata%rayBeta
97 allocate(eigenvalue(nummode))
98 allocate(loadvecre(numnode*ndof))
99 allocate(loadvecim(numnode*ndof))
100 allocate(bjre(nummode))
101 allocate(bjim(nummode))
102 allocate(dispre(numnode*ndof))
103 allocate(dispim(numnode*ndof))
104 allocate(velre(numnode*ndof))
105 allocate(velim(numnode*ndof))
106 allocate(accre(numnode*ndof))
107 allocate(accim(numnode*ndof))
113 write(*,*)
"--frequency analysis--"
114 write(*, *)
"read from=", trim(fstrfreq%eigenlog_filename)
115 write(
ilog,*)
"read from=", trim(fstrfreq%eigenlog_filename)
116 write(*, *)
"start mode=", startmode
117 write(
ilog,*)
"start mode=", startmode
118 write(*, *)
"end mode=", endmode
119 write(
ilog,*)
"end mode=", endmode
121 open(unit=ilogin, file=trim(fstrfreq%eigenlog_filename), status=
"OLD", action=
"READ", iostat=ierr)
123 if(
myrank == 0 )
write(*,*)
"Error: cannot open eigenlog file: ", trim(fstrfreq%eigenlog_filename)
124 call hecmw_abort( hecmw_comm_get_comm() )
126 call read_eigen_values(ilogin, startmode, endmode, eigenvalue, freqdata%eigOmega)
135 if(
myrank == 0 )
write(*,*)
"calc mass matrix"
136 call calcmassmatrix(fstrparam, hecmesh, hecmat, fstrsolid, fstreig, heclagmat)
137 if(
myrank == 0 )
write(*,*)
"scale eigenvector"
138 call scaleeigenvector(hecmesh, fstreig, ndof*numnode, nummode, freqdata%eigVector)
141 write(*, *)
"start frequency:", f_start
142 write(
ilog,*)
"start frequency:", f_start
143 write(*, *)
"end frequency:", f_end
144 write(
ilog,*)
"end frequency:", f_end
145 write(* ,*)
"number of the sampling points", numfreq
146 write(
ilog,*)
"number of the sampling points", numfreq
147 write(* ,*)
"monitor nodeid=", idnode
148 write(
ilog,*)
"monitor nodeid=", idnode
152 freq = (f_end-f_start)/dble(numfreq)*dble(im) + f_start
153 omega = 2.0d0 * 3.14159265358979d0 * freq
155 call calcfreqcoeff(hecmesh, freqdata, loadvecre, loadvecim, omega, bjre, bjim)
157 call calcvelvector(freqdata, omega, bjre, bjim, velre, velim)
158 call calcaccvector(freqdata, omega, bjre, bjim, accre, accim)
160 if( imonit > 0 )
then
161 dx = sqrt(dispre(3*(imonit-1)+1)**2 + dispim(3*(imonit-1)+1)**2)
162 dy = sqrt(dispre(3*(imonit-1)+2)**2 + dispim(3*(imonit-1)+2)**2)
163 dz = sqrt(dispre(3*(imonit-1)+3)**2 + dispim(3*(imonit-1)+3)**2)
164 val = sqrt(dx**2 + dy**2 + dz**2)
165 write(*, *) freq,
"[Hz] : ", val
166 write(
ilog, *) freq,
"[Hz] : ", val
171 write(*, *) freq,
"[Hz] : ", im,
".res"
172 write(
ilog,*) freq,
"[Hz] : ", im,
".res"
174 if(
ivisual==1 .and. vistype==1)
then
175 write(*, *) freq,
"[Hz] : ", im,
".vis"
176 write(
ilog,*) freq,
"[Hz] : ", im,
".vis"
179 call output_result(hecmesh, hecmat, fstrsolid, fstrdynamic,
'fstrRES',
'frequency', freq, im, &
180 iresult==1,
ivisual==1 .and. vistype==1, dispre, dispim, velre, velim, accre, accim)
185 write(*, *)
"start time:", t_start
186 write(
ilog,*)
"start time:", t_start
187 write(*, *)
"end time:", t_end
188 write(
ilog,*)
"end time:", t_end
189 write(*, *)
"frequency:", freq
190 write(
ilog,*)
"frequency:", freq
191 write(*, *)
"node id:", idnode
192 write(
ilog,*)
"node id:", idnode
193 write(*, *)
"num disp:", numdisp
194 write(
ilog,*)
"num disp:", numdisp
197 omega = 2.0d0 * 3.14159265358979d0 * freq
198 call calcfreqcoeff(hecmesh, freqdata, loadvecre, loadvecim, omega, bjre, bjim)
201 time = (t_end-t_start)/dble(numdisp)*dble(im-1) + t_start
205 if( imonit > 0 )
then
206 dx = dispre(3*(imonit-1)+1)
207 dy = dispre(3*(imonit-1)+2)
208 dz = dispre(3*(imonit-1)+3)
209 dxi = dispim(3*(imonit-1)+1)
210 dyi = dispim(3*(imonit-1)+2)
211 dzi = dispim(3*(imonit-1)+3)
216 write(*, *)
"time=", time,
" : ", im,
".res"
217 write(
ilog,*)
"time=", time,
" : ", im,
".res"
219 if(
ivisual==1 .and. vistype==2)
then
220 write(*, *)
"time=", time,
" : ", im,
".vis"
221 write(
ilog,*)
"time=", time,
" : ", im,
".vis"
224 call output_result(hecmesh, hecmat, fstrsolid, fstrdynamic,
'fstrDYNA',
'TOTALTIME', time, im, &
225 iresult==1,
ivisual==1 .and. vistype==2, dispre, dispim, velre, velim, accre, accim)
228 deallocate(freqdata%eigOmega)
229 deallocate(freqdata%eigVector)
230 deallocate(eigenvalue)
231 deallocate(loadvecre)
232 deallocate(loadvecim)
246 integer(kind=kint),
intent(in) :: logfile
247 integer(kind=kint),
intent(in) :: startmode
248 integer(kind=kint),
intent(in) :: endmode
249 real(kind=kreal),
intent(inout) :: eigenvalue(:)
250 real(kind=kreal),
intent(inout) :: anglfreq(:)
252 integer(kind=kint) :: im, endflag, id
253 character(len=HECMW_MSG_LEN) :: line
254 real(kind=kreal) :: freq
261 read(logfile,
'(A80)', err=119) line
262 if(trim(adjustl(line)) ==
"NO. EIGENVALUE FREQUENCY (HZ) X Y Z X")
then
267 read(logfile,
'(A80)') line
270 read(logfile,
'(A80)') line
272 do im=1, (endmode-startmode+1)
273 read(logfile,
'(i5,3e12.4,a)', err=119) id, eigenvalue(im), anglfreq(im), freq, line
278 119
write(*,*)
"Error to find eigenvalue information from logfile"
279 write(
ilog,*)
"Error to find eigenvalue information from logfile"
285 integer(kind=kint),
intent(in) :: logfile
286 integer(kind=kint),
intent(in) :: startmode
287 integer(kind=kint),
intent(in) :: endmode
288 integer(kind=kint),
intent(in) :: numdof
289 integer(kind=kint),
intent(in) :: numnode
290 real(kind=kreal),
intent(inout) :: eigenvector(:, :)
292 integer(kind=kint) :: im, in, gblid, j, idx
293 real(kind=kreal) :: vec(6)
294 character(len=HECMW_MSG_LEN) :: line
301 read(logfile,
'(a80)', err=119,
end=119) line
302 if(line(1:9) ==
" Mode No.")
then
309 do im=1, (endmode-startmode+1)
312 read(logfile,
'(a80)', err=119,
end=119) line
313 if(line(1:9) ==
" Mode No.")
then
318 read(logfile,
'(a80)', err=119) line
319 read(logfile,
'(a80)', err=119) line
320 read(logfile,
'(a80)', err=119) line
321 read(logfile,
'(a80)', err=119) line
326 read(logfile,
'(i10,2e12.4)', err=119) gblid, (vec(j), j=1,2)
330 read(logfile,
'(i10,3e16.8)', err=119) gblid, (vec(j), j=1,3)
333 read(logfile,
'(i10,6e12.4)', err=119) gblid, (vec(j), j=1,6)
340 idx = (in-1)*numdof + j
341 eigenvector(idx,im) = vec(j)
348 119
write(*,*)
"Error to find eigenvector from logfile"
349 write(ilog,*)
"Error to find eigenvector from logfile"
356 type(hecmwst_local_mesh),
intent(in) :: hecMESH
357 integer(kind=kint),
intent(in) :: startmode
358 integer(kind=kint),
intent(in) :: endmode
359 integer(kind=kint),
intent(in) :: numdof
360 integer(kind=kint),
intent(in) :: numnode
361 real(kind=kreal),
intent(inout) :: eigenvector(:, :)
363 integer(kind=kint),
parameter :: compidx = 1
364 integer(kind=kint) :: imode, idx, ind, a, b, nallcomp, j
365 type(hecmwst_result_data) :: eigenres
366 character(len=HECMW_NAME_LEN) :: name
370 do imode=startmode, endmode
372 call hecmw_result_read_by_name(hecmesh, name, imode, eigenres)
375 do ind=1,eigenres%nn_component
376 nallcomp = nallcomp + eigenres%nn_dof(ind)
379 idx = imode - startmode + 1
382 a = (ind-1)*nallcomp + j
383 b = (ind-1)*numdof + j
384 eigenvector(b,idx) = eigenres%node_val_item(a)
394 type(hecmwst_result_data) :: res
397 if(
associated(res%nn_dof))
deallocate(res%nn_dof)
398 if(
associated(res%ne_dof))
deallocate(res%ne_dof)
399 if(
associated(res%node_label))
deallocate(res%node_label)
400 if(
associated(res%elem_label))
deallocate(res%elem_label)
401 if(
associated(res%node_val_item))
deallocate(res%node_val_item)
402 if(
associated(res%elem_val_item))
deallocate(res%elem_val_item)
407 type(hecmwst_result_data) :: res
412 nullify(res%node_label)
413 nullify(res%elem_label)
414 nullify(res%node_val_item)
415 nullify(res%elem_val_item)
428 type(fstr_solid),
intent(inout) :: fstrSOLID
429 integer(kind=kint),
intent(in) :: iout(3)
431 integer(kind=kint) :: i
435 fstrsolid%output_ctrl(i)%outinfo%on(1) = (iout(1) == 1)
436 fstrsolid%output_ctrl(i)%outinfo%on(15) = (iout(2) == 1)
437 fstrsolid%output_ctrl(i)%outinfo%on(16) = (iout(3) == 1)
449 type(hecmwst_local_mesh) :: hecMESH
450 type(hecmwst_matrix) :: hecMAT
451 type(fstr_solid) :: fstrSOLID
452 type(fstr_dynamic) :: fstrDYNAMIC
453 integer(kind=kint),
intent(in) :: istp
454 real(kind=kreal),
intent(in) :: disp(:)
455 real(kind=kreal),
intent(in) :: vel(:)
456 real(kind=kreal),
intent(in) :: acc(:)
458 integer(kind=kint) :: ndof, ntotal, idx
462 ntotal = ndof*hecmesh%n_node
465 if( fstrdynamic%idx_eqa == 1 .and. istp > 0 ) idx = 2
466 fstrdynamic%DISP(1:ntotal,idx) = disp(1:ntotal)
467 fstrdynamic%VEL (1:ntotal,idx) = vel(1:ntotal)
468 fstrdynamic%ACC (1:ntotal,idx) = acc(1:ntotal)
470 hecmat%X(1:ntotal) = disp(1:ntotal) - fstrsolid%unode(1:ntotal) - fstrsolid%dunode(1:ntotal)
471 call fstr_apply_solution_increment( hecmesh, fstrsolid, ndof, hecmat%X )
472 call fstr_updatenewton( hecmesh, hecmat, fstrsolid, 0.0d0, 0.0d0, 1 )
473 call fstr_update_reaction_spc( 1, hecmesh, fstrsolid )
476 call fstr_nodalstress2d( hecmesh, fstrsolid )
477 else if( ndof == 6 )
then
478 call fstr_nodalstress6d( hecmesh, fstrsolid )
480 call fstr_nodalstress3d( hecmesh, fstrsolid )
489 subroutine output_result(hecMESH, hecMAT, fstrSOLID, fstrDYNAMIC, nameid, glabel, gvalue, istp, &
490 wres, wvis, dispRe, dispIm, velRe, velIm, accRe, accIm)
492 type(hecmwst_local_mesh) :: hecMESH
493 type(hecmwst_matrix) :: hecMAT
494 type(fstr_solid) :: fstrSOLID
495 type(fstr_dynamic) :: fstrDYNAMIC
496 character(len=*),
intent(in) :: nameid
497 character(len=*),
intent(in) :: glabel
498 real(kind=kreal),
intent(in) :: gvalue
499 integer(kind=kint),
intent(in) :: istp
500 logical,
intent(in) :: wres, wvis
501 real(kind=kreal),
intent(in) :: dispre(:), dispim(:)
502 real(kind=kreal),
intent(in) :: velre(:), velim(:)
503 real(kind=kreal),
intent(in) :: accre(:), accim(:)
505 type(hecmwst_result_data) :: visre, visim
506 character(len=HECMW_HEADER_LEN) :: header
507 character(len=HECMW_MSG_LEN) :: comment
508 character(len=HECMW_NAME_LEN) :: label, resid
509 real(kind=kreal) :: gval(1)
512 if( .not. (wres .or. wvis) )
return
516 comment=
'frequency_result'
517 call hecmw_result_init(hecmesh, istp, header, comment)
521 call hecmw_result_add(hecmw_result_dtype_global, 1, label, gval)
524 call updatesolidresult(hecmesh, hecmat, fstrsolid, fstrdynamic, istp, dispre, velre, accre)
525 if( wres )
call fstr_write_result_add(hecmesh, fstrsolid, istp,
'_real', fstrdynamic)
526 if( wvis )
call fstr_make_result(hecmesh, fstrsolid, visre, istp, gvalue, fstrdynamic,
'_real')
528 call updatesolidresult(hecmesh, hecmat, fstrsolid, fstrdynamic, istp, dispim, velim, accim)
529 if( wres )
call fstr_write_result_add(hecmesh, fstrsolid, istp,
'_imag', fstrdynamic)
530 if( wvis )
call fstr_make_result(hecmesh, fstrsolid, visim, istp, gvalue, fstrdynamic,
'_imag')
534 call hecmw_result_write_by_name(resid)
535 call hecmw_result_finalize()
539 call fstr_merge_result(hecmesh, visre, visim)
540 call hecmw_result_free(visim)
541 call fstr2hecmw_mesh_conv(hecmesh)
542 call hecmw_visualize_init
543 call hecmw_visualize( hecmesh, visre, istp )
544 call hecmw2fstr_mesh_conv(hecmesh)
545 call hecmw_result_free(visre)
552 type(hecmwst_local_mesh),
intent(in) :: hecmesh
553 type(fstr_freqanalysis),
intent(in) :: freqData
554 integer(kind=kint),
intent(in) :: numdof
555 real(kind=kreal),
intent(inout) :: loadvecre(:)
556 real(kind=kreal),
intent(inout) :: loadvecim(:)
558 integer(kind=kint),
parameter :: MAXNODE = 100
559 integer(kind=kint) :: sgrpID, is, ie, ic, nsurf, ic_type, outtype, node_index(MAXNODE)
560 integer(kind=kint) :: nn, iss, nodeid, dof_index, ndof
561 integer(kind=kint) :: i, j, k, l, m, isn, nsize
562 integer(kind=kint) :: iwk(60), nodLOCAL(20)
563 real(kind=kreal) :: vect(60), xx(20), yy(20), zz(20), forcere(3), forceim(3)
567 do i=1,freqdata%FLOAD_ngrp_tot
568 if(freqdata%FLOAD_ngrp_TYPE(i) == kfloadtype_surf)
then
569 sgrpid = freqdata%FLOAD_ngrp_ID(i)
570 dof_index = freqdata%FLOAD_ngrp_DOF(i)
573 forcere(dof_index) = freqdata%FLOAD_ngrp_valre(i)
574 forceim(dof_index) = freqdata%FLOAD_ngrp_valim(i)
576 is = hecmesh%surf_group%grp_index(sgrpid-1) + 1
577 ie = hecmesh%surf_group%grp_index(sgrpid)
579 ic = hecmesh%surf_group%grp_item(2*j-1)
580 nsurf = hecmesh%surf_group%grp_item(2*j)
581 ic_type = hecmesh%elem_type(ic)
582 nn = hecmw_get_max_node(ic_type)
583 isn = hecmesh%elem_node_index(ic-1)
585 nodlocal(k) = hecmesh%elem_node_item(isn+k)
586 xx(k) = hecmesh%node(3*nodlocal(k)-2)
587 yy(k) = hecmesh%node(3*nodlocal(k)-1)
588 zz(k) = hecmesh%node(3*nodlocal(k) )
590 iwk(ndof*(k-1)+l) = ndof*(nodlocal(k)-1)+l
594 call dl_c3_freq(ic_type, nn, xx, yy, zz, nsurf, forcere, vect, nsize)
596 loadvecre(iwk(k)) = loadvecre(iwk(k)) + vect(k)
599 call dl_c3_freq(ic_type, nn, xx, yy, zz, nsurf, forceim, vect, nsize)
601 loadvecim(iwk(k)) = loadvecim(iwk(k)) + vect(k)
610 subroutine dl_c3_freq(ETYPE, NN, XX, YY, ZZ, LTYPE, force, VECT, nsize)
612 integer(kind=kint),
intent(in) :: ETYPE
613 integer(kind=kint),
intent(in) :: NN
614 integer(kind=kint),
intent(in) :: LTYPE
615 real(kind=kreal),
intent(in) :: xx(:)
616 real(kind=kreal),
intent(in) :: yy(:)
617 real(kind=kreal),
intent(in) :: zz(:)
618 real(kind=kreal),
intent(in) :: force(3)
619 real(kind=kreal),
intent(inout) :: vect(:)
620 integer(kind=kint),
intent(inout) :: nsize
622 integer(kind=kint),
parameter :: NDOF = 3
623 real(kind=kreal) :: wg, area
624 integer(kind=kint) :: NOD(NN)
625 real(kind=kreal) :: elecoord(3, nn), localcoord(3), normal(3)
626 real(kind=kreal) :: h(nn)
627 integer(kind=kint) :: I, IG2, NSUR, SURTYPE
630 call getsubface( etype, ltype, surtype, nod )
631 nsur = getnumberofnodes( surtype )
634 elecoord(1,i)=xx(nod(i))
635 elecoord(2,i)=yy(nod(i))
636 elecoord(3,i)=zz(nod(i))
639 vect(1:nsize) = 0.0d0
640 do ig2=1,numofquadpoints( surtype )
641 call getquadpoint( surtype, ig2, localcoord(1:2) )
642 call getshapefunc( surtype, localcoord(1:2), h(1:nsur) )
644 wg=getweight( surtype, ig2 )
645 normal=surfacenormal( surtype, nsur, localcoord(1:2), elecoord(:,1:nsur) )
646 area=dsqrt( dot_product(normal, normal) )
648 vect(3*nod(i)-2)=vect(3*nod(i)-2)+area*wg*h(i)*force(1)
649 vect(3*nod(i)-1)=vect(3*nod(i)-1)+area*wg*h(i)*force(2)
650 vect(3*nod(i) )=vect(3*nod(i) )+area*wg*h(i)*force(3)
657 type(hecmwst_local_mesh),
intent(in) :: hecMESH
658 type(fstr_freqanalysis),
intent(in) :: freqData
659 integer(kind=kint),
intent(in) :: numdof
660 real(kind=kreal),
intent(inout) :: loadvecre(:)
661 real(kind=kreal),
intent(inout) :: loadvecim(:)
663 integer(kind=kint) :: i, vecsize, ig, is, ie, in, nodeid, dof_index
667 do i=1, freqdata%FLOAD_ngrp_tot
668 if(freqdata%FLOAD_ngrp_TYPE(i) == kfloadtype_node)
then
669 ig = freqdata%FLOAD_ngrp_ID(i)
670 is = hecmesh%node_group%grp_index(ig-1) + 1
671 ie = hecmesh%node_group%grp_index(ig)
673 nodeid = hecmesh%node_group%grp_item(in)
674 dof_index = freqdata%FLOAD_ngrp_DOF(i)
675 loadvecre((nodeid-1)*numdof + dof_index) = loadvecre((nodeid-1)*numdof + dof_index) + freqdata%FLOAD_ngrp_valre(i)
676 loadvecim((nodeid-1)*numdof + dof_index) = loadvecim((nodeid-1)*numdof + dof_index) + freqdata%FLOAD_ngrp_valim(i)
683 subroutine calcmassmatrix(fstrPARAM, hecMESH, hecMAT, fstrSOLID, fstrEIG, hecLagMAT)
685 type(fstr_param),
intent(in) :: fstrPARAM
686 type(hecmwst_local_mesh),
intent(in) :: hecMESH
687 type(hecmwst_matrix),
intent(inout) :: hecMAT
688 type(fstr_solid),
intent(inout) :: fstrSOLID
689 type(fstr_eigen),
intent(inout) :: fstrEIG
690 type(hecmwst_matrix_lagrange),
intent(inout) :: hecLagMAT
692 integer(kind=kint) :: ntotal
693 type(hecmwst_ebc) :: hecEBC
697 fstrsolid%dunode = 0.d0
698 call fstr_creatematrix_and_dampingforce( hecmesh, hecmat, fstrsolid, 0.d0, 0.d0 )
699 call hecmw_ebc_init(hecmat, hecebc)
700 call fstr_addbc(1, hecmesh, hecmat, fstrsolid, fstrparam, heclagmat, 2, hecebc)
701 call hecmw_ebc_apply(hecmesh, hecmat, hecebc)
702 call hecmw_ebc_finalize(hecebc)
704 call setmass(fstrsolid, hecmesh, hecmat, fstreig)
710 type(hecmwst_local_mesh),
intent(in) :: hecMESH
711 type(fstr_eigen),
intent(in) :: fstrEIG
712 integer(kind=kint),
intent(in) :: ntotaldof
713 integer(kind=kint),
intent(in) :: nmode
714 real(kind=kreal),
intent(inout) :: eigenvector(:, :)
716 integer(kind=kint) :: imode, idof, nintdof
717 real(kind=kreal) :: mas
720 nintdof = hecmesh%nn_internal*hecmesh%n_dof
725 mas = mas + fstreig%mass(idof)*eigenvector(idof,imode)**2
727 call hecmw_allreduce_r1(hecmesh, mas, hecmw_sum)
729 eigenvector(idof,imode) = eigenvector(idof,imode) / sqrt(mas)
736 type(fstr_eigen),
intent(in) :: fstreig
737 real(kind=kreal),
intent(in) :: eigenvector(:, :)
738 integer(kind=kint),
intent(in) :: imode
739 integer(kind=kint),
intent(in) :: jmode
740 real(kind=kreal),
intent(inout) :: prod
742 integer(kind=kint) :: idof, s
744 s =
size(eigenvector(:,1))
748 prod = prod + eigenvector(idof,imode)*fstreig%mass(idof)*eigenvector(idof,jmode)
755 integer(kind=kint),
intent(in) :: im
756 real(kind=kreal),
intent(in) :: vector(:)
758 integer(kind=kint) :: i, s
763 write(*,
'("eigenvec",i2.2,":[",e12.5,", ")') im, vector(i)
765 write(*,
'(e12.5,", ")') vector(i)
767 write(*,
'(e12.5,"];")') vector(i)
776 type(hecmwst_local_mesh),
intent(in) :: hecMESH
777 real(kind=kreal),
intent(in) :: a(:)
778 real(kind=kreal),
intent(in) :: b(:)
779 real(kind=kreal),
intent(inout) :: c
781 integer(kind=kint) :: nintdof
783 nintdof = hecmesh%nn_internal*hecmesh%n_dof
784 c = dot_product(a(1:nintdof), b(1:nintdof))
785 call hecmw_allreduce_r1(hecmesh, c, hecmw_sum)
789 subroutine calcfreqcoeff(hecMESH, freqData, loadRe, loadIm, inpOmega, bjRe, bjIm)
791 type(hecmwst_local_mesh),
intent(in) :: hecMESH
792 type(fstr_freqanalysis_data),
intent(in) :: freqData
793 real(kind=kreal),
intent(in) :: loadre(:)
794 real(kind=kreal),
intent(in) :: loadim(:)
795 real(kind=kreal),
intent(in) :: inpomega
796 real(kind=kreal),
intent(inout) :: bjre(:)
797 real(kind=kreal),
intent(inout) :: bjim(:)
799 integer(kind=kint) :: imode
800 real(kind=kreal) :: ujfr, ujfi, a, b, alp, beta
803 alp = freqdata%rayAlpha
804 beta = freqdata%rayBeta
806 do imode=1, freqdata%numMode
807 call calcdotproduct(hecmesh, freqdata%eigVector(:,imode), loadre, ujfr)
808 call calcdotproduct(hecmesh, freqdata%eigVector(:,imode), loadim, ujfi)
810 a = ujfr*(freqdata%eigOmega(imode)**2 - inpomega**2) + ujfi*(alp + beta*freqdata%eigOmega(imode)**2)*inpomega
811 b = (freqdata%eigOmega(imode)**2 - inpomega**2)**2 + ((alp + beta*freqdata%eigOmega(imode)**2)*inpomega)**2
814 a = ujfi*(freqdata%eigOmega(imode)**2 -inpomega**2) - ujfr*(alp + beta*freqdata%eigOmega(imode)**2)*inpomega
815 b = (freqdata%eigOmega(imode)**2 - inpomega**2)**2 + ((alp + beta*freqdata%eigOmega(imode)**2)*inpomega)**2
823 type(fstr_freqanalysis_data),
intent(in) :: freqdata
824 real(kind=kreal),
intent(in) :: bjre(:)
825 real(kind=kreal),
intent(in) :: bjim(:)
826 real(kind=kreal),
intent(inout) :: dispre(:)
827 real(kind=kreal),
intent(inout) :: dispim(:)
829 integer(kind=kint) :: imode
835 do imode=1, freqdata%numMode
836 dispre(:) = dispre(:) + bjre(imode)*freqdata%eigVector(:,imode)
837 dispim(:) = dispim(:) + bjim(imode)*freqdata%eigVector(:,imode)
844 type(fstr_freqanalysis_data),
intent(in) :: freqData
845 real(kind=kreal),
intent(in) :: omega
846 real(kind=kreal),
intent(in) :: bjre(:)
847 real(kind=kreal),
intent(in) :: bjim(:)
848 real(kind=kreal),
intent(inout) :: velre(:)
849 real(kind=kreal),
intent(inout) :: velim(:)
851 integer(kind=kint) :: imode
857 do imode=1, freqdata%numMode
858 velre(:) = velre(:) - omega * bjim(imode) * freqdata%eigVector(:,imode)
859 velim(:) = velim(:) + omega * bjre(imode) * freqdata%eigVector(:,imode)
865 type(fstr_freqanalysis_data),
intent(in) :: freqData
866 real(kind=kreal),
intent(in) :: omega
867 real(kind=kreal),
intent(in) :: bjre(:)
868 real(kind=kreal),
intent(in) :: bjim(:)
869 real(kind=kreal),
intent(inout) :: accre(:)
870 real(kind=kreal),
intent(inout) :: accim(:)
872 integer(kind=kint) :: imode
878 do imode=1, freqdata%numMode
879 accre(:) = accre(:) - omega**2 * bjre(imode) * freqdata%eigVector(:,imode)
880 accim(:) = accim(:) - omega**2 * bjim(imode) * freqdata%eigVector(:,imode)
885 subroutine setupfreqparam(fstrDYNAMIC, f_start, f_end, numfreq, raym, rayk, idnode, vistype, ioutl)
887 type(fstr_dynamic),
intent(in) :: fstrDYNAMIC
888 real(kind=kreal),
intent(inout) :: f_start
889 real(kind=kreal),
intent(inout) :: f_end
890 integer(kind=kint),
intent(inout) :: numfreq
891 real(kind=kreal),
intent(inout) :: raym
892 real(kind=kreal),
intent(inout) :: rayk
893 integer(kind=kint),
intent(inout) :: idnode
894 integer(kind=kint),
intent(inout) :: vistype
895 integer(kind=kint),
intent(inout) :: ioutl(3)
899 f_start = fstrdynamic%t_start
900 f_end = fstrdynamic%t_end
901 numfreq = fstrdynamic%n_step
902 raym = fstrdynamic%ray_m
903 rayk = fstrdynamic%ray_k
904 idnode = fstrdynamic%nout_monit
905 vistype = fstrdynamic%ngrp_monit
906 ioutl(1:3) = fstrdynamic%iout_list(1:3)
912 type(fstr_freqanalysis_data),
intent(in) :: freqData
913 real(kind=kreal),
intent(in) :: time
914 real(kind=kreal),
intent(in) :: omega
915 real(kind=kreal),
intent(in) :: bjre(:)
916 real(kind=kreal),
intent(in) :: bjim(:)
917 real(kind=kreal),
intent(inout) :: dispre(:)
918 real(kind=kreal),
intent(inout) :: dispim(:)
920 integer(kind=kint) :: imode, idf, s
921 complex(kind=kreal) :: a, b, c
926 a = exp(dcmplx(0.0d0, omega*time))
928 do imode=1, freqdata%numMode
929 s =
size(freqdata%eigvector(:,imode))
930 b = dcmplx(bjre(imode), bjim(imode)) * a
932 c = b*dcmplx(freqdata%eigVector(idf,imode), 0.0d0)
933 dispre(idf) = dispre(idf) + dble(c)
934 dispim(idf) = dispim(idf) + imag(c)
942 type(fstr_freqanalysis_data),
intent(in) :: freqData
943 real(kind=kreal),
intent(in) :: time
944 real(kind=kreal),
intent(in) :: omega
945 real(kind=kreal),
intent(in) :: bjre(:)
946 real(kind=kreal),
intent(in) :: bjim(:)
947 real(kind=kreal),
intent(inout) :: velre(:)
948 real(kind=kreal),
intent(inout) :: velim(:)
950 integer(kind=kint) :: imode, idf, s
951 complex(kind=kreal) :: a, b, c
956 a = dcmplx(0.0d0, 1.0d0)*dcmplx(omega, 0.0d0)*exp(dcmplx(0.0d0, omega*time))
958 do imode=1, freqdata%numMode
959 s =
size(freqdata%eigvector(:,imode))
960 b = dcmplx(bjre(imode), bjim(imode)) * a
962 c = b*dcmplx(freqdata%eigVector(idf,imode), 0.0d0)
963 velre(idf) = velre(idf) + dble(c)
964 velim(idf) = velim(idf) + imag(c)
972 type(fstr_freqanalysis_data),
intent(in) :: freqData
973 real(kind=kreal),
intent(in) :: time
974 real(kind=kreal),
intent(in) :: omega
975 real(kind=kreal),
intent(in) :: bjre(:)
976 real(kind=kreal),
intent(in) :: bjim(:)
977 real(kind=kreal),
intent(inout) :: accre(:)
978 real(kind=kreal),
intent(inout) :: accim(:)
980 integer(kind=kint) :: imode, idf, s
981 complex(kind=kreal) :: a, b, c
986 a = dcmplx(-1.0d0, 0.0d0)*dcmplx(omega**2, 0.0d0)*exp(dcmplx(0.0d0, omega*time))
988 do imode=1, freqdata%numMode
989 s =
size(freqdata%eigvector(:,imode))
990 b = dcmplx(bjre(imode), bjim(imode)) * a
992 c = b*dcmplx(freqdata%eigVector(idf,imode), 0.0d0)
993 accre(idf) = accre(idf) + dble(c)
994 accim(idf) = accim(idf) + imag(c)
1002 type(fstr_dynamic),
intent(in) :: fstrDYNAMIC
1003 real(kind=kreal),
intent(inout) :: t_start
1004 real(kind=kreal),
intent(inout) :: t_end
1005 real(kind=kreal),
intent(inout) :: dynafreq
1006 integer(kind=kint),
intent(inout) :: numdisp
1009 t_start = fstrdynamic%gamma
1010 t_end = fstrdynamic%beta
1011 dynafreq = fstrdynamic%t_delta
1012 numdisp = fstrdynamic%nout
subroutine nullify_result_data(res)
subroutine free_result_data(res)
This module contains steady state frequency analysis.
subroutine calcdispvector(freqData, bjRe, bjIm, dispRe, dispIm)
subroutine read_eigen_vector(logfile, startmode, endmode, numdof, numnode, eigenvector)
subroutine fstr_solve_frequency_analysis(hecMESH, hecMAT, fstrSOLID, fstrEIG, fstrDYNAMIC, fstrRESULT, fstrPARAM, fstrCPL, fstrFREQ, hecLagMAT, restart_step_num)
subroutine calcfreqcoeff(hecMESH, freqData, loadRe, loadIm, inpOmega, bjRe, bjIm)
subroutine read_eigen_vector_res(hecMESH, startmode, endmode, numdof, numnode, eigenvector)
subroutine calcaccvector(freqData, omega, bjRe, bjIm, accRe, accIm)
subroutine extract_surf2node(hecMESH, freqData, numdof, loadvecRe, loadvecIm)
subroutine writeoutvector(im, vector)
subroutine calcdispvectortime(freqData, time, omega, bjRe, bjIm, dispRe, dispIm)
subroutine checkorthvector(fstrEIG, eigenvector, imode, jmode, prod)
subroutine updatesolidresult(hecMESH, hecMAT, fstrSOLID, fstrDYNAMIC, istp, disp, vel, acc)
subroutine setupdynaparam(fstrDYNAMIC, t_start, t_end, dynafreq, numdisp)
subroutine calcvelvectortime(freqData, time, omega, bjRe, bjIm, velRe, velIm)
subroutine output_result(hecMESH, hecMAT, fstrSOLID, fstrDYNAMIC, nameid, glabel, gvalue, istp, wres, wvis, dispRe, dispIm, velRe, velIm, accRe, accIm)
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 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 function to calculate to do updates.
This module defines common data and basic structures for analysis.
integer(kind=kint), pointer iresult
integer(kind=kint) myrank
PARALLEL EXECUTION.
integer(kind=kint), parameter ilog
FILE HANDLER.
integer(kind=kint), pointer ivisual
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 coupling analysis.
Data for DYNAMIC ANSLYSIS (fstrDYNAMIC)
Package of data used by Lanczos eigenvalue solver.
FSTR INNER CONTROL PARAMETERS (fstrPARAM)