下面的代码没有出现楼主的问题.
finish$/clear
/filname,online-1,1
/units,si
/PREP7
ET,1,SHELL63
R,1,0.00625
MP,EX,1,2.1E11$MP,DENS,1,7.8E3$MP,NUXY,1,0.3
K,1,,0 $K,2,0.44,0
KGEN,2,1,2,1,,0.94
L,1,3 $L,2,4
LESIZE,ALL,,,10
A,1,2,4,3
ESIZE,,10
AMESH,1
LPLOT, All
dl,2,,uz $dl,2,,Rotx
dl,4,,uz $dl,4,,Roty
dl,1,,ux $dl,1,,Roty
dl,3,,uy $dl,3,,Rotx
!MODAL ANALYSIS
/SOLU
ANTYPE,MODAL
MODOPT,LANB,10!$mxpand,10,,,YES
SOLVE$FINISH
/SOLU
ANTYPE,HARMIC ! HARMONIC RESPONSE ANALYSIS
HROPT,MSUP,6 ! MODE SUPERPOSITION
hropt,full
HROUT,OFF ! AMPLITUDE, PHASE ANGLE PRINTOUT
F,45,FZ,100 ! FORCE AT X=.1657, NEAR QUARTER POINT
! F, NODE, Lab, VALUE, VALUE2, NEND, NINC
! Specifies force loads at nodes.
HARFRQ,10,1000 ! Defines the frequency range in the harmonic response analysis.
nsubst,100
OUTPR,,NONE
OUTRES,,1
SOLVE$FINISH
/post1
freqb=10
freqe=1000
df=100
nfreq=(freqe-freqb)/df+1
*get,nnod,node,,count !把当前选择的节点总数读出,存到nnod
*dim,r,array,nnod,7,nfreq !建立r数组存储节点结果 [121*7*11(行*列*页)]
*do,i,1,nfreq,1
set,,i !读出第i个频率结果的实部
*get,nd,node,,num,min !读出当前最小节点编号,赋给nmin
*do,j,1,nnod,1
r(j,1,i)=nd
r(j,2,i)=ux(nd)
r(j,4,i)=uy(nd)
r(j,6,i)=uz(nd)
nd=ndnext(nd)
*enddo
set,,i,,1 !读出第i个频率结果的虚部
*get,nd,node,,num,min !读出当前最小节点编号,赋给nmin
*do,j,1,nnod,1
r(j,3,i)=ux(nd)
r(j,5,i)=uy(nd)
r(j,7,i)=uz(nd)
nd=ndnext(nd)
*enddo
*enddo
*cfopen,result,fre
*do,i,1,nfreq,1 !freqb,freqe分别为结果起始频率和截止频率
*vwrite,'SYSNOISE',' DISPLAC','EMENTS','FILE'
(a,a,a7,a4)
*vwrite,'Rev 5.5 ','IBM P2ES','SL 20-AP','R-04'
(a,a,a,a4)
*vwrite,'Displace','_Structu','re'
(a,a,a2)
*vwrite,' 20-APR-','2004 10:','07:13'
(a,a,a5)
*vwrite,'FREQUENC','Y'
(a,a1)
freq=freqb+(i-1)*df !freq为当前存储频率
*vwrite,freq
(e20.8)
*vwrite,'NODAL DI','SPLACEME','NT VALUE','S'
(a,a,a,a1)
*do,j,1,nnod,1
nseq=chrval(j) !将序号转换成字符,便于输出
a=r(j,1,i) !取节点编号值
nd=chrval(a) !将节点编号值转换成字符,便于输出
uxr=r(j,2,i) !取x方向实部到uxr
uxi=r(j,3,i) !取x方向虚部到uxr
uyr=r(j,4,i) !取y方向实部到uxr
uyi=r(j,5,i) !取y方向虚部到uxr
uzr=r(j,6,i) !取z方向实部到uxr
uzi=r(j,7,i) !取z方向虚部到uxr
*vwrite,' ',nseq,' ',nd,uxr,uxi,uyr
(a2,a8,a2,a8,e20.8,e20.8,e20.8)
*vwrite,'','','',uyi,uzr,uzi
(a8,a8,a4,e20.8,e20.8,e20.8)
*vwrite,'','','',0,0,0
(a8,a8,a4,e20.8,e20.8,e20.8)
*vwrite,'','','',0,0,0
(a8,a8,a4,e20.8,e20.8,e20.8)
*enddo
*enddo
*cfclos
FINISH
|