CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

Efficiently changing many BC types in a PyFluent script

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 14, 2025, 18:41
Question Efficiently changing many BC types in a PyFluent script
  #1
New Member
 
Bryan
Join Date: Feb 2025
Posts: 1
Rep Power: 0
br35cu29 is on a distinguished road
Hi all!

I'm using PyFluent to launch Fluent and automate my setup.

My project involves simulating chillers on a roof. I am representing airflow through the chillers with recirculating inlet and outlet boundary conditions. As far as I am aware, the only way to enable this feature in Fluent is by entering the following two commands through the TUI:

(rpsetvar 'icepak? #t)
(models-changed)

I can set and change common boundary types simultaneously for multiple surfaces quite easily in Fluent Meshing, but I can't find recirculating conditions there. So, in my PyFluent setup script, I change the necessary boundary types using the following example command:

solver.tui.define.boundary_conditions.modify_zones .zone_type('my_boundary_name', 'recirculation-inlet')

The challenge I'm encountering is that I have hundreds of recirculating inlet-outlet pairs. Changing boundary types in Fluent not only appears to be a slow process, but it also scales exponentially with increasing numbers of boundaries to change. For example, when I tried to change ~800 boundaries in a for-loop, it took about 175 seconds to change each boundary; on track to complete the loop after ~44 hours. After grouping some boundaries together so that I only had ~90 boundaries to change, it was taking only 16 seconds to change each boundary; on track to complete after <20 mins.

In my current project, I have ~350 boundaries to change, which takes about 5 hours. This is right on the edge of what is feasible given the number of models I need to setup.

Using either Fluent, Fluent Meshing, or the traditional Ansys Mesher, is there a more efficient way to change these boundaries?

Much appreciated!!
br35cu29 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[PyFoam] having problems with pyfoam Installation vitorspadetoventurin OpenFOAM Community Contributions 3 December 2, 2014 07:18
[ICEM] Generalize ICEM script for different sizes of same geometry. Akash kumar ANSYS Meshing & Geometry 0 November 16, 2014 08:38
Changing Boundary Types otq OpenFOAM Pre-Processing 0 October 8, 2013 12:00
[swak4Foam] a script for changing variables in groovyBC in 0 folder immortality OpenFOAM Community Contributions 38 July 22, 2013 17:57
changing the names and types of a boundaryField gerado OpenFOAM Running, Solving & CFD 0 March 24, 2009 08:55


All times are GMT -4. The time now is 02:22.