是要求传递函数吧,该你一个例子吧
- !固定端施加加速度为1m/s^2: 用大质量和一个大集中力实现
- !用20*Log|u_out/u_in| 求得曲线。
- FINISH
- /CLEAR
- /PREP7 !进入前处理模块PREP7
- LENGTH = 46
- NUMB = 100
- ET, 1, BEAM3 !定义第一类单元为平面梁单元BEAM3
- R, 1, 0.12, 9e-4, 0.3 !定义单元的第一类实常数:Area,Inertia,Height
- MP, EX, 1, 207e9 !定义第一类材料的弹性模量EX
- MP,PRXY,1,0.3
- MP, DENS,1,7800
- *DO,I,1,NUMB
- XN=(I-1)*LENGTH/NUMB
- N, I, XN, 0 !定义各个结点
- *ENDDO
- TYPE, 1 !使用第一类单元
- REAL, 1 !使用第一类实常数
- MAT, 1 !使用第一类材料
- *DO,I,1,NUMB-1
- E,I,I+1 !按上面设置定义单元
- *ENDDO
- FINISH !退出后模块
-
- /SOLU !进入求解模块SOLUTION
- ANTYPE,3
- D,1, , , , , ,UX,ROTZ, , , ,
- DMPRAT,0.01,
- df=0.01
- nf=299
- f0=0.01
- *do,i,1,nf,1
- f1=f0+(i-1)*df
- f2=i*df
- omega=2*3.1415926*f1
- uxa=1/omega/omega
- harfrq,f1,f2
- kbc,0
- nsubst,1
- D,1,uy,uxa
- ALLSEL
- solv
- *enddo
- fini
-
- /post26
- nsol,2,100,u,y,uout
- nsol,3,1,u,y,uin
- ! 计算传递函数
- NUMVAR,200
- PLCPLX,0
- PRCPLX,1
- FILLDATA,191,,,,1,1
- REALVAR,191,191
- FILLDATA,192,,,,0,0
- FILLDATA,193,,,,1,0
- FILLDATA,194,,,,-1,0
- FILLDATA,195,,,,1,1
- VARNAME,195,NSET
- !
- ! Name: udB
- ! ID: 4
- ! Function: 20*log(abs({uout}/{uin}))
- QUOT,200,2,3
- ABS,199,200
- CLOG,200,199
- FILLDATA,198,,,,20,0
- REALVAR,198,198
- PROD,4,198,200,,udB
- !
- STORE,MERGE
- XVAR,1
- PLVAR,4,
- fini
复制代码
|