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.