我使用ANSYS分析一個基本結構,並且需要在動態分析和靜態分析之間切換。有時我只需要考慮一定的負載。這使解決方案陷入混亂。ANSYS:如何組織我的代碼?
!!! Add wind loads
*DIM,windforce,,4
windforce(1) = 2520
windforce(2) = -1575
windforce(3) = -1890
windforce(4) = -1575
*DO,i,1,3
SFBEAM,i ,1 ,PRES ,windforce(1)
*enddo
*DO,i,4,6
SFBEAM,i ,1 ,PRES ,windforce(2)
*enddo
*DO,i,7,9
SFBEAM,i ,1 ,PRES ,windforce(3)
*enddo
*DO,i,10,12
SFBEAM,i ,1 ,PRES ,windforce(4)
*enddo
FINISH
/SOLU ! enter solution phase
! !!Dynamic Analysis
! antype,modal
! modopt,lanb,40,0,0,,off
! mxpand,0,,,0
! lumpm,1
! solve
! finish
! ! ! Generate Mass and K Matrix
! antype,substr
! seopt,yg_bde,2
! lumpm,1
! m,all,all
! /output,matrix
! solve
! /output
! selist,yg_bde,3
! finish
SOLVE ! solve the resulting system of equations
FINISH
每次我在這個分析之間切換時,我都需要評論一個大的代碼塊。這看起來非常糟糕。
那麼如何組織我的代碼?或者如何使這個代碼模塊化?有沒有ANSYS腳本語言的框架? (對於css
類似scss
)。