General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

How can I get the coordinates of the node of minimum value?

    • Devarsh
      Subscriber

      Hello

      In the transient thermal simulation, I need to get the coordinates of the node at which the temperature is minimum. At that time-step, I used the Minimum probe on the temperature contour view, but could not select that particular node through nodal selection.

    • Ashish Khemka
      Forum Moderator


      You can see the node id and coordinates for the selected node at the bottom:

      Regards Ashish Khemka
    • Devarsh
      Subscriber
      Hello Ashish
      Thank you for the reply. However, my question was about selecting the node itself. The node of minimum value is in the middle of the geometry. When I try to select that node, only nodes on outer surface of the geometry (the outer surface of cylinder in the image)are selected. I cannot select the node IN THE CYLINDER itself. For example, in the figure I have shared, the selected node (green colored)looks to be near the minimum probe, but it actually is on the cylindrical surface and not on the section plane. I need to select the node that is at the minimum probe.
      Can you suggest any method by which I can select the node which is inside the domain and not on outer surface? Or any other method to get the coordinates of the probed node?
      Thanks!
    • Ashish Khemka
      Forum Moderator

      You can create a named selection for the node of interest.
      Named Selections (ansys.com)
      Regards Ashish Khemka
    • Devarsh
      Subscriber

      But to create a named selection, I need to select the node first, right? I am unable to select the node.
      My problem includes a solid cylinder, in which I have a certain temperature (and stress) distribution. The minimum temperature in the cylinder occurs at the central axis at some height. I understand that I can get the coordinates of that node once I select it, or get complete thermal history of the node by creating a named selection. But, when I use node selection tool, I can only select nodes that are on the outer surface of the cylinder, I cannot select a node that is INSIDE the cylinder. I cannot create a named selection without "selecting" the node, edge or surface, right? So, how can I get around this?
      Also, the link for named selection is not working for me. Could you give a short description how would that help select the node?
      Thanks!
    • Erik Kostson
      Ansys Employee



      One can script this (sample script below runs in the script console - have in mind we do not provide any additional help with this it is just a sample that can be modified to perform a certain task):
      ---
      sol=ExtAPI.DataModel.Project.Model.Analyses[0].GetResultsData
      sol.CurrentResultSet=1000000 # last step

      temp=sol.GetResult("TEMP")

      mesh=ExtAPI.DataModel.Project.Model.Analyses[0].MeshData

      meshIds = mesh.NodeIds

      mintempif=1E9

      for nodeId in meshIds:
      tempnode=temp.GetNodeValues(nodeId)
      if tempnode[0]<=mintempif:
      mintempif=tempnode[0]
      index=nodeId
      Z=mesh.NodeById(index).Z
      Y=mesh.NodeById(index).Y
      X=mesh.NodeById(index).X

      sol.Dispose
      slMn = ExtAPI.SelectionManager

      slMn.ClearSelection
      sel = slMn.CreateSelectionInfo(SelectionTypeEnum.MeshNodes)

      sel.Ids=[index]

      nstempmin=ExtAPI.DataModel.Project.Model.AddNamedSelection() # named selection for lowest temperature node

      nstempmin.Location = sel

      ---
      or another way is to export the temperatures to excel sort by temperature and look a the node location and number - to do his one needs to set node location in options:


      Then to export go to the temperature result right mouse button click and select export to excel:
      And then locate the lowest temperature
      say using the INDEX function in excel (say if we have 8282 nodes, the temps, in column E, node nr in A, the function in excel would be =INDEX(A2:A8282,MATCH(MIN(E2:E8282),E2:E8282,0)).
      All the best

      Erik




Viewing 5 reply threads
  • The topic ‘How can I get the coordinates of the node of minimum value?’ is closed to new replies.