5 Replies Latest reply on Apr 18, 2016 8:19 AM by Dave Laban

    How to import global variables and equations in Ansys?

    Federico Giacci

      Hi all!

      I have done these steps:

      - tools>equations: I defined some global variable. Let's take as an example 'a'=100um

      -I design a circle. With Smart dimensions I say that its diameter is ='a'.

      -Now in equations I can see that D1@Sketch1='a'.

      -Tools>Ansys Workbench

       

      My final goal is: I am in Ansys, with all my variables and equations imported (how?), and I change a value of one parameter in Ansys, generate again the geometry and run a simulation, without going back to solidworks to modify the geometry. How can I do this?

       

      I am really a novel, so if you can help me I would be grateful!

      Thank you in advance

      Federico

        • Re: How to import global variables and equations in Ansys?
          Dave Laban

          1.  Create part as you did.
          2.  Export part to Ansys.
          3.  In Ansys, make sure View > Properties is enabled.  In the Properties pane, under Basic Geometry Options, make sure "Parameters" is ticked.  Make a note of "Parameter Key", by default it is "DS".  This is the flag Ansys looks for when importing variables.
          4. Go back to SolidWorks and rename your "A" variable to "DS_A".
          5. Back in Ansys, right-click on Geometry and select "Update from CAD".
          6. In the Properties pane, under Advanced Geometry Options, make sure "Smart CAD Update" is ticked.
          7. Create a Static Structural study by dragging from the Toolbox and dropping on the Geometry cell you created earlier.  Double click on Model to open up the Mechanical Editor.
          8. In Mechanical Editor, expand the tree under Geometry to find your part.  Click on the part in the tree.  In the Details pane there should be a line called "CAD Parameters", with "DS_A" in the list.
          9. Click in the empty box to the left of "DS_A" so the blue "P" shows.  This is now parameterised.
          10. Setup your structural study as normal and run.  Create an Equivalent Stress plot in the Solution folder.
          11. Click on your Equivalent Stress plot in the tree.  In the Details pane, find the Results section and click in the empty box to the left of "Maximum" so the blue "P" shows.  The result is now parameterised.
          12. Go back to the Project Schematic.  You should now see a new "Parameter Set" hanging off the bottom of your Static Structural study.  Double click on this and the Parameter Set view shows.
          13. In the Outline of All Parameters pane, click on "DS_A".  A table of design points should now be visible.  Here, you can add rows for your different values of "DS_A".  Once you have populated these rows, you can then "Update All Design Points" and your analysis will whirr away until they're all done.

          14. Basically all your variables in SW need the "DS_" key ahead of them, these will then be available to edit in Ansys.  For equations, you'll need "DS_" at the start but you shouldn't need to specify values within Ansys, SolidWorks will take care of that because of the "Smart CAD Update" we ticked earlier.

           

          Good luck!