General Mechanical

General Mechanical

Selecting nodes on a surface

    • amit.pandey
      Subscriber

      Hello,

      I am trying to remodel a deformed lens by the following steps:

      Extracting the deformed .STL file

      Reading the file in MATLAB

      Fitting a surface to the deformed lens surfaces.

      Extracting the polynomial equation of the surface and using the equation to remodel the lens in the Optical simulation software and evaluating the change in performance.

      For this, I am interested on the surface nodes because the optical simulation is only calculating the ray paths based on surface interactions. So it is enough to have two surfaces and the distance between these surfaces.

      Is there a way to select nodes only on one or maybe nodes on selected surface(s)?

      Any lead is appreciated.


      With best regards,

      Amit

    • peteroznewman
      Subscriber
      Hello Amit Optical surface deformation is usually measured in nm so you do not want to export an STL file because you will lose a lot of precision in that operation.
      It is much better to export the deformations directly to a text file.
      You can make a Named Selection of all the nodes on the the front surface and another Names Selection of all the nodes on the back surface.
      It is important to create a Coordinate System at the vertex of each surface with the Z axis normal to the surface.
      You should write out the coordinates of the undeformed nodes of each surface in its coordinate frame to check that the nodes exactly match the formula for each surface.
      Then you can write out the deformation of each node in those same coordinate frames.
      You should use Zernike polynomials to fit the surface. The coefficients of those are directly usable in most Optical simulation software such as Zemax or CodeV.
      If you don't want to write the matlab code to fit the deformations with Zernike polynomials, you can try out software written to do this called Sigfit by Sigmadyne.
      https://www.sigmadyne.com/sigweb/downloads/MSC-UC-2011-Genberg.pdf
    • amit.pandey
      Subscriber
      Hello Peter Thank you for the response.
      The idea of developing this method was not to use a commercially available software like Sigfit or ZEMAX STAR. (Honestly, I am just pushing myself to take the longer and more complex route :) )
      "You can make a Named Selection of all the nodes on the the front surface and another Names Selection of all the nodes on the back surface." when generating a named selection, how do I filter out the nodes on one surface? I see the following options in the selection worksheet but I do not see a combination of the various options to have a filter that gives me nodes only on the surface.
      To select the nodes on the convex surface, what I am trying to do is, first select all nodes in the Add step. Then remove the nodes on the faces grouped into a named selection one by one. There are three faces which needs to be removed (two highlighted green faces and one flat face at the bottom). However the generate button does only what is expected of the ADD step and nothing else. Is it because there are shared nodes between the convex faces and the highlighted faces that ANSYS is not able to remove the nodes?
    • amit.pandey
      Subscriber
      Update: I was able to get the nodes on the surface by the following step:




    • amit.pandey
      Subscriber
      Hi Peter
      Could you please elaborate a little: You should write out the coordinates of the undeformed nodes of each surface in its coordinate frame to check that the nodes exactly match the formula for each surface?
      What formula are we talking about here?
      And after adding the respective new coordinate systems, how do I extract the position of nodes on the surfaces with respect to the new coordinate systems?
    • peteroznewman
      Subscriber
      Hello Amit Nodal Named Selections are tricky, glad to see you figured it out.
      Optical surfaces are typically defined using a Sag equation.
      A spherical surface is defined by the Radius of Curvature R and the Diameter D. I would replace D/2 with r in the equation below because if you have the X,Y coordinates of a node in the coordinate frame as I described above, then the value of r is simply the square root of the sum of the squares, and the Z coordinate is the SAG.
      CAD systems can create a perfect spherical surface, so it is likely that the nodes in the model lie exactly on the surface defined by this equation.
      Many optics use an aspheric surface https://en.wikipedia.org/wiki/Sagitta_(optics)
      The optical design engineer would provide the coefficients in that equation to the mechanical design engineer/analyst who can recreate the surface precisely.
      The CAD geometry you have may not precisely match this sag equation if it is an aspheric surface. It is a good idea to check the deviation of the sag of each node location from the sag value calculated from the equation and provided coefficients. The error should be less than a small fraction of a nanometer.
      I don't know how to export nodal coordinates in a local coordinate frame in ANSYS (I know how to do it in Nastran). I expect there is a way. That might be a good question for a new Discussion and perhaps an ANSYS staff member will reply. It would make sense if you only have two surfaces, to align them so the global coordinate frame is on the vertex of one of the surfaces with the Z coordinate pointing to the other vertex, then the local coordinates of the other surface is easily obtained by subtracting the lens thickness from the z coordinate of the second surface.
      I tested a Directional Deformation result and you get to specify the local coordinate system in which to measure the deformation, which is good. However, when you export the data, the nodal location is given in Global coordinates, which seems silly. What is worse, the text file doesn't even name the coordinate system in which the deformation is measured, so you need to do careful bookkeeping.
    • amit.pandey
      Subscriber
      Dear Peter
      Thank you for the detailed explanation.
      I will create a new discussion for the extraction o nodal data in terms of custom coordinate systems.

      Bets regards Amit
Viewing 6 reply threads
  • You must be logged in to reply to this topic.