$ file fsum.v68 sum static and dynamic solution in frequency response $ first excitation frequency must be zero. $ param, ddrmm, -1 must be in bulk for sol 111 $ magnitude of respone at fn due to response at fn + static response. compile sedrcvr list $ alter 'IF ( APP1=.*MMREIG'(,-1) $ if (app1='mmreig') then $ message //'user fatal message. alter fsum requires the presence '/ 'of param,ddrmm,-1 in the bulk data file' $ exit $ endif $ alter 'sdr2.*ovg1' $ after 2nd sdr2 for direct transient, modal-noddrmm paraml ug//'trailer'/1/s,n,nsols $ number of columns in ug call fsum ol2,casedr,oug1,oqg1,oes1,oef1,oqmg1,ostr1//nsols $ $ ougv1 in v2001 is oug1 in v2004 $ end of sedrcvr alter compile fsum nolist noref $ subdmap fsum f,casedr,ougv1,oqg1,oes1,oef1,oqmg1,ostr1//nsols $ type parm,,i,n,nm1,nsols $ paraml f//'dti'/0/3/s,n,zerofreq $ f is fol if (zerofreq><0.0) then $ message //'user fatal message. First frequency must be 0.0'/ ' it is'/zerofreq $ exit $ endif $ nm1 = nsols - 1 $ drmh1 ougv1,oqg1,oes1,oef1/tu,mu,tqg,mqg,tes,mes,tef,mef/ $ drmh1 oqmg1,ostr1,,/tqmg,mqmg,tostr1,mostr1,,,,/ $ convert tables to $ matrices. pugv,opg1 not done intentionally $matprn oqg1,oqmg1,ostr1// $ $matprn ougv1,tu,mu// $ matgen,/v0nm1/6/nsols/1/nm1 $ one zero, rest 1.0 trnsp v0nm1/v0nm1t $ make a column vector matgen,/inn/1/nsols $ identity matrix add inn,v0nm1t/sum1n $ diag plus 1.0 in row 1 call absm mu,sum1n/mucx $ call absm mqg,sum1n/mqgcx $ call absm mes,sum1n/mescx $ call absm mef,sum1n/mefcx $ call absm mqmg,sum1n/mqmgcx $ call absm mostr1,sum1n/mostr1cx $ drmh3 tu,mucx,tqg,mqgcx,tes,mescx,tef,mefcx,f,casedr/ougv1x,oqg1x, oes1x,oef1x/'freq'/1 $ 1=no accel, velo drmh3 tqmg,mqmgcx,tostr1,mostr1cx,,,,,f,casedr/oqmg1x,ostr1x,,/'freq' $ equivx ougv1x/ougv1/always $ equivx oqg1x/oqg1/always $ equivx oes1x/oes1/always $ equivx oef1x/oef1/always $ equivx oqmg1x/oqmg1/always $ equivx ostr1x/ostr1/always $ return $ end $ fsum compile absm nolist noref $ subdmap absm mu,sum1n/mucx $ $ convert a complex double matrix into one with abs values $ for each element in real slot, imag. slot zero $ add first column of abs matrix to all remaining columns diagonal mu/mur/'whole'/1.0 $ abs value of each term, complex format $matprn mur// $ $modtrl mur/////4 $ reset to complex double add5 mur,,,,/mucx//(1.,1.) $ make a legal complex matrix mpyad mucx,sum1n,/ux $ sum column 1 with column n into column n equivx ux/mucx/always $ return $ end $ abs $ end of fsum alter package