Notice: The Ansys Innovation Space websites will be temporarily unavailable on Monday November 6 from 8:30 EDT to 1:00pm EDT for scheduled maintenance.
We apologize for any inconvenience this may cause and appreciate your understanding.
General

General

Discovery SpaceClaim – Scripting examples

    • SolutionSolution
      Participant

      Please find attached a couple of Discovery SpaceClaim scripts which create Named Selection groups – inlet, outlet, wall and fluid, for the attached model. These scripts use logic to identify the faces (inlet, outlet) based on their location in the model shown below.

       width=

      Script “create-ns-midpoint-option.py” shows how to loop through bodies and its faces to identify face midpoint, compare it with center coordinates of inlet and outlet.

      Script “create-ns-ray-option.py” shows the use of Selection option “Ray” for selecting faces with know locations.