Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
Ansys Products

Ansys Products

Discuss installation & licensing of our Ansys Teaching and Research products.

How to intelligently add local sizes in pyfluent and conveniently obtain zone na

    • haibin wu
      Subscriber

      I now want to use pyfluent to add local dimensions in fluent meshing, as shown in the figure. I would like to select zone name by label as "oil_fluid-oil_fluid_0", "oil_fluid-oil_fluid_1"...'oil_fluid oil_fluid_5'(six zone). I successfully created a local size using the following code, but now I want to make my code more intelligent because the number of zones I have may change in the future. I would like to know if there is a way to directly select all zones with 'oil_fluid oil_fluid' in their names. Regardless of whether the number of zones increases or decreases, I can quickly select the zone I want. What can i do? Please help me, thank you very much!!!!

          meshing_session.workflow.TaskObject["Add Local Sizing"].Arguments.setState(AddChild="yes",
      BOIControlName="bodysize_oil",
      BOIExecutio="Body Size",
      BOIFaceLabelList=["oil_fluid-oil_fluid_0",
      "oil_fluid-oil_fluid_1",
      "oil_fluid-oil_fluid_2",
      "oil_fluid-oil_fluid_3",
      "oil_fluid-oil_fluid_4",
      "oil_fluid-oil_fluid_5"],
      BOISize=2)
    • haibin wu
      Subscriber
      i got it. I used the following code to select all zones with "oil_fluid oil_fluid" in their names. At present, it has solved my problem, but I also want to know if there are other ways to obtain zone name by label to achieve intelligent and convenient selection of zone name meshing_session.workflow.TaskObject["Add Local Sizing"].Arguments.setState( AddChild="yes", BOIControlName="bodysize_oil", BOIExecutio="Body Size", BOIFaceLabelList='*oil_fluid-oil_fluid*', BOISize=2)
    • Rob
      Forum Moderator

      /forum/forums/topic/how-to-intelligently-add-local-sizes-in-pyfluent-and-conveniently-obtain-zone-na/

Viewing 2 reply threads
  • The topic ‘How to intelligently add local sizes in pyfluent and conveniently obtain zone na’ is closed to new replies.
[bingo_chatbox]