%F %F %F %E %E %E !formats for each column ![]() *cfopen,named_deformation_data_time_%current_time%,DAT includes the time step in the file name as a variable !WRITING TO A FILE: !set the file name as desired. !GETTING THE SELECTED NODE ID LIST !only necessary if you also want to keep the node numbers !COMPRESSING ARRAYS TO ONLY SELECTED NODES for the coordinate locations and displacements: *vget,nodal_data_full(1,4),node,U,X !*VGET,ParR,Entity,ENTNUM,Item1,IT1NUM,Item2,IT2NUM,KLOOP *dim,nodeid_comp,array,numnode !array for containing NODE ID for ONLY selected nodes *dim,nodeid_full,array,nummax !array for containing NODE ID *dim,nodal_data_comp,array,numnode,6 !array for pressures of ONLY selected nodes *dim,nodal_data_full,array,nummax,6 !array for pressures of all 1-to-nummax nodes *vget,mask(1),NODE,NSEL !mask for selected nodes *get,numnode,NODE,count !Number of selected nodes *get,nummax,NODE,num,max !Max Node id in selected nodes *GET,numb_sets,ACTIVE,0,SET,NSET !get number of results setsĬMSEL,s,face_of_interest !select the named selection ![]() RESUME !this is necessary to read the db file which was saved earlierĪlls !this selects everything, good place to start ! See Solving Units in the help system for more information. ! NOTE: Any data that requires units (such as mass) is assumed to be in the consistent solver unit system. ! Active UNIT system in Workbench when this object was created: Metric (m, kg, N, s, V, A) ! Commands inserted into this file will be executed immediately after the ANSYS /POST1 command. Finally, using *VWRITE we write that array into a text file. Using the node numbers of the named selection in combination with the *VMASK command, we create a compressed array of the desired information only at the nodes of interest. The desired information (coordinate locations and displacements) for the full model are put into an array using *VGET. Alternatively to using a named selection, we could select nodes of interest using the available selection commands such as NSEL and ESEL. Then, we select the nodal named selection. We use a DO -loop to cycle through all results. Then, calculate the total number of results sets in the study. The general method below is to load the results from the db file using RESUME. I typically do not use a file header but one could insert that if desired. For a structural system in which I am interested in deformations, I typically like to a file format of “X Y Z UX UY UZ” where X, Y, Z are the coordinate locations and UX,UY,UZ are the deformations at each node in the named selection. Next, we insert a Commands (APDL) object into the Solutionīelow is the command snippet that we use to export the data. Then, we must make sure to set the output to save an mapdl db file to yes. One could use a set of faces or edges, vertices, or volumes. Here we have chosen to use a single face as the named selection. We begin by creating a Named Selection to define the regions of the model where we are interested in results. One could also use this in a thermal, modal, or transient structural with a few changes needed. In this static structural example, there are three time steps as we change the forces on the bracket. With a snippet one inserts a Commands (APDL) object in the solution and writes APDL code to perform the desired functions.īelow we use a simple example of an L-shaped bracket. One can right-click on a desired result and use Export, but that can be tedious if there a lot of results to save. ![]() Commonly, we need to save results from an Ansys Workbench study as a text file for post-processing in another program, such as Excel.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |