Displacement Coordinates

download Displacement Coordinates

of 4

Transcript of Displacement Coordinates

  • 8/13/2019 Displacement Coordinates

    1/4

  • 8/13/2019 Displacement Coordinates

    2/4

    *vget,UY_cs4(1),node,1,U,y ! get UY for selected nodes, note the resultsare recorded in the new result coordinate system

    *vmask,mask(1)

    *vget,DY_cs4(1),node,1,loc,y ! get Y-location for selected nodes, node the locations are recorded in the current active coordinate system

    *VOPER,UY_RS4(1),UY_CS4(1),ADD,DY_CS4(1), , , ! add the last two arrays together, we get the deformed shape in the current active coordiante system

    ! the array index number matchesthe node number

    *DIM,UY_sort,ARRAY,NMax,1,1, , , ! set a new array to hold the sorted data

    *VFUN,UY_sort(1),DSORT,UY_RS4(1), , , , ! sort the data down c = UY_sort(1)

    --------------------------------------------

    Command object to save the database

    /COPY,file,rst,,update,rst,/COPY,file,db,,update,db,

    resu,update,dbfile,update,rstfini/prep7/show,png/gfile,500!/edge,1,1/view,1,1,1,1/title, Element Plot before Updatingeplot

    UPGEOM,1,1,1,'update','rst',/title, Element Plot After Updatingeplot/title, nodes Plot After Updatingnplot

    /prep7CMSEL,S,ObjectFace ! named selection from WB/view,1,1,1,1

  • 8/13/2019 Displacement Coordinates

    3/4

    /title, selected the nodal component created by Nodal_component named SelectionNPLOT

    ESLN,S/title, Plotting the elements attached to the selected nodal componentEPLOT

    CSYS,0*GET,XMIN,NODE,,MNLOC,X*GET,XMAX,NODE,,MXLOC,X*GET,YMIN,NODE,,MNLOC,Y*GET,YMAX,NODE,,MXLOC,Y*GET,ZMIN,NODE,,MNLOC,Z*GET,ZMAX,NODE,,MXLOC,ZLENG = 100 ! Used in SCLEMXLN = (XMAX-XMIN)>(YMAX-YMIN)>(ZMAX-ZMIN)!SCLE = LENG/MXLN ! Original Command to scale output to LENGSCLE = 1 ! Scale set to 1 to get STL file same as model size/NOPR*CFOPEN,C:\Temp\ObjectFace,stl ! output filename - make sure you have a c:\tempdirectory*VWRITE('solid ANSYS')

    *GET,NELE,ELEM,,COUNT*DIM,N,ARRAY,4*DIM,E,ARRAY,NELE,3ENUM = 0NQUA = 0*DO,I,1,NELE,1ENUM = ELNEXT(ENUM)*DO,J,1,4,1N(J) = NELEM(ENUM,J)*ENDDO*IF,N(4),NE,N(3),THENNQUA = NQUA+1E(NQUA,1) = N(1)

    E(NQUA,2) = N(3)E(NQUA,3) = N(4)*ENDIFNX = NORMNX(N(1),N(2),N(3))NY = NORMNY(N(1),N(2),N(3))NZ = NORMNZ(N(1),N(2),N(3))*VWRITE,NX,NY,NZ('facet normal',3(2X,E16.9))*VWRITE('outer loop')*DO,J,1,3,1*VWRITE,SCLE*NX(N(J)),SCLE*NY(N(J)),SCLE*NZ(N(J))('vertex',3(2X,E16.9))

    *ENDDO*VWRITE('endloop')*VWRITE('endfacet')*ENDDO*DO,I,1,NQUA,1NX = NORMNX(E(I,1),E(I,2),E(I,3))NY = NORMNY(E(I,1),E(I,2),E(I,3))NZ = NORMNZ(E(I,1),E(I,2),E(I,3))

  • 8/13/2019 Displacement Coordinates

    4/4

    *VWRITE,NX,NY,NZ('facet normal',3(2X,E16.9))*VWRITE('outer loop')*DO,J,1,3,1*VWRITE,SCLE*NX(E(I,J)),SCLE*NY(E(I,J)),SCLE*NZ(E(I,J))('vertex',3(2X,E16.9))*ENDDO*VWRITE('endloop')*VWRITE('endfacet')*ENDDO*VWRITE('endsolid ANSYS')*CFCLOS/GOPR