! Commands inserted into this file will be executed immediately after the ANSYS /POST1 command. ! Active UNIT system in Workbench when this object was created: U.S. Customary (in, lbm, lbf, s, V, A) ! NOTE: Any data that requires units (such as mass) is assumed to be in the consistent solver unit system. ! See Solving Units in the help system for more information. !/OUTPUT,'bolt_output','txt',,'C:\Users\robert.ponder\Desktop\Learn FEA' NUMBEAMS=1 ! Analyst should specify total number of beams *DO,i,1,NUMBEAMS ! Begin DO loop to process through each beam connection individually /COM,********************************************* /COM,The following results are for Beam %i% /COM,********************************************* ESEL,,TYPE,,BEAM%i% !Select beam by type, where TYPE is parameter value assigned to BEAM%i% !Note that X axis is axial force PRESOL,SMISC,1 !Print the element force results in local X for node I PRESOL,SMISC,5 !Print the element force results in local y for node I PRESOL,SMISC,6 !Print the element force results in local Z for node I PRESOL,SMISC,14 !Print the element force results in local X for node J PRESOL,SMISC,18 !Print the element force results in local Y for node J PRESOL,SMISC,19 !Print the element force results in local Z for node J *ENDDO ! Conclude the DO loop !/OUT /COM ************************************************* Print to .txt *GET,el_num,ELEM,,NUM,MAX ! get element number *GET,nodenum1,ELEM,el_num,node,1 !get the two nodes *GET,nodenum2,ELEM,el_num,node,2 !get the two nodes *GET,stressX1,NODE,nodenum1,RF,FX *GET,stressY1,NODE,nodenum1,RF,FY *GET,stressZ1,NODE,nodenum1,RF,FZ *GET,stressX2,NODE,nodenum2,RF,FX *GET,stressY2,NODE,nodenum2,RF,FY *GET,stressZ2,NODE,nodenum2,RF,FZ nodenum2 *MSG,INFO,stressX1,stressY1,stressZ1,stressX2,stressY2,stressZ2 *CFOPEN, 'cf_ansys', 'csv',, *vwrite,'el_num,','Axial1,','Shear11,','Shear12,','Axial2,','Shear21,','Shear22'!Print header for .txt (A7,A7,A8,A8,A7,A8,A8) *vwrite,'BEAM%i%,',stressX1,',',stressY1,',',stressZ1,',',stressX2,',',stressY2,',',stressZ2 (A8,E13.8,A1,E13.8,A1,E13.8,A1,E13.8,A1,E13.8,A1,E13.8) *CFCLOS