Why Multiphase Stirred Tank Simulations Need Automation
When modeling multiphase stirred-tank systems, engineers often face many operating parameters that influence hydrodynamics, mixing, and mass transfer. Traditional CFD workflows can make systematic studies of these parameters tedious, requiring extensive manual setup and case management.
PyFluent is a Pythonic interface to Ansys Fluent that allows users to automate, control, and extend CFD simulations programmatically. One particularly powerful feature is the ability to design and execute parametric studies, helping engineers quickly explore how different operating conditions affect performance.
Case Study: Gas–Liquid Stirred Tank with Mass Transfer
The model considered here is a stirred tank reactor with:
Two Eulerian phases:
- Primary: liquid water
- Secondary: dispersed gas bubbles (fixed size)
Mass transfer between phases: O₂ and CO₂ are transferred between the gas bubbles and the surrounding water, allowing for realistic modeling of oxygenation and carbonation/degasification processes.
Moving reference frame (MRF) to represent the mechanical stirring, giving control over the impeller’s rotation speed.
In practice, process performance depends heavily on design and operating conditions. For example:
- Impeller rotation speed affects turbulence levels, bubble breakup and dispersion, and gas–liquid contact time.
- Gas injection velocity influences gas holdup, bubble residence time, and the rate of oxygen dissolution or CO₂ stripping.

Exploring these parameters systematically allows us to understand trade-offs between mixing energy, gas transfer efficiency, and operating costs.
PyFluent Workflow for Parametric Studies
Using PyFluent, we can script a study in which rotation speed and gas injection velocity are varied automatically. The workflow typically includes:
1. Base Model Setup
- Geometry and mesh are defined in Fluent.
- Multiphase (Eulerian–Eulerian) and species mass transfer models are activated.
- Bubble diameter is fixed, while O₂ and CO₂ transfer coefficients are assigned.
2. Looped Case Execution
For each combination of rotation speed and gas velocity, PyFluent modifies boundary conditions and solver settings, runs the simulation, and records results. In this portion of the code, we apply a full factorial approach by looping through the different parameters and applying them to the boundary conditions and moving the reference zone:

3. Post-Processing Automation
PyFluent extracts key quantities like dissolved oxygen concentration, dissipation, torque, and strain rates.

Results: How Rotation Speed and Gas Velocity Affect Performance
Rotation Speed: Higher impeller speeds improved gas dispersion and increased O₂ transfer, but at the cost of higher energy input.

Gas Injection Velocity: Increasing the gas flow improved O₂ availability but led to bubble coalescence at very high velocities, reducing mass transfer efficiency.

The average values of torque on the impeller walls, dissipation rate, and strain rate are plotted below:

How PyFluent Simplifies Large-Scale CFD Parameter Sweeps
Parametric studies, design of experiments, and evaluation routines can be reduced to a few dozen lines of Python code while also leveraging both Fluent and Python’s visualization and data analysis tools. PyFluent’s capability simplifies:
- Set up and execution of multiple cases
- Consistent boundary condition management
- Automated data extraction and visualization
- Rapid design space exploration
This enables engineers and researchers to focus on efficiently interpreting results. Details about the simulation setup are shown in this video:
<iframe width=”560″ height=”315″ src=”https://www.youtube.com/embed/Hkorx3UckbQ?si=2ask7RXkc0zqy1m_” title=”YouTube video player” frameborder=”0″ allow=”accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share” referrerpolicy=”strict-origin-when-cross-origin” allowfullscreen></iframe>
Why PyFluent Parametric Studies Matter for Multiphase Process Design
Parametric studies in PyFluent enable engineers to explore “what if?” scenarios in multiphase stirred tanks — whether it’s testing different stirring intensities, gas flow rates, or bubble sizes. By combining CFD’s physics fidelity with Python’s automation power, PyFluent opens the door to efficient, reproducible, and scalable design exploration.
For engineers working with bioreactors, fermenters, or chemical stirred tanks, this approach provides a clear pathway to improve process efficiency while reducing the manual workload of CFD simulations.
Running parametric CFD studies or working with multiphase stirred tank models? SimuTech Group’s CFD consulting engineers work with Ansys Fluent, PyFluent, and multiphase simulation workflows. For more on stirred tank modeling, see our article on Ansys FreeFlow and EnSight for visualizing heat transfer in a stirred tank. Learn more about Ansys Fluent or contact us to discuss your project.




