Smoothed Particle Hydrodynamics (SPH) is an innovative meshless simulation method ideal for modeling complex fluid flows with free surfaces and moving boundaries. This blog introduces the fundamentals of SPH, explores its advantages for stirred tank applications with continuous inlet and outlet flows, details the setup and preprocessing in Ansys FreeFlow, discusses solver execution and postprocessing capabilities, and highlights practical considerations and visualization techniques for engineers exploring next-generation CFD tools.
Challenges
Simulating a stirred tank is far from trivial. The geometry combines rotating machinery, complex free-surface behavior, and sometimes multiple inlets and outlets. Mesh deformation around impeller blades, frequent re-meshing to capture splashing or vortex formation, and the difficulty of tracking interfaces between phases can slow down setup.
These challenges make stirred tanks a great test case for Smoothed Particle Hydrodynamics (SPH), where the meshless particle-based approach naturally handles moving boundaries, free surfaces, and large deformations without the constant requirement of mesh updates.
Engineering Solution
Smoothed Particle Hydrodynamics (SPH) has become an increasingly popular meshless method for modeling free-surface flows, multiphase problems, and highly deformable fluids. One of the open-source tools enabling researchers and engineers to harness SPH is Ansys FreeFlow — a simulation environment with a clean interface for setup, powerful visualization capabilities, and flexible preprocessing options.
In this post, we’ll walk through an example SPH simulation of a stirred tank partially filled with water, equipped with a continuous inlet stream, and explore how FreeFlow’s features help at every stage — from model setup to postprocessing.
Preprocessing in FreeFlow
Setting up the simulation involves defining the physical domain, boundaries, and initial conditions. FreeFlow’s preprocessing tools make this step straightforward:
Defining walls and moving objects: Static boundaries (tank walls) and moving parts (impeller blades) can be created and assigned material properties. Moving objects can be given prescribed motion or rotational speed, allowing them to directly interact with the flow.
To enable rotation or other types of motion, first define a frame motion setting by going to Motion Frame and create a Frame, as shown below. For rotational motion, you can define the relative position and orientation, the angular velocity or acceleration, and the start and end times.
To assign this motion to an object, select the object and under the Wall tab in the Data Editors, link the created motion frame to the object in Motion Frame option.
Creating inlets and outlets: We define a continuous inlet for water supply, specifying flow rate or velocity profile. We can also include an outlet at the bottom of the domain to act as a drain. The inlets and outlets must be first imported as surfaces into the Geometries section of the Data tree. Then link the inlet to the imported surface and assign either a mass flow rate or a velocity.
Volume inlets for initialization: Useful for filling the initial domain with fluid particles, ensuring consistent particle spacing and initial density.
You can select what mass of fluid you want the system to be initialized with, when to add the mass, and at what location. Here, we selected the walls of the tank to constrain the liquid water added at t=0 s.
Material properties: Assign water density, viscosity type, and artificial speed of sound (for compressibility control in SPH). Speed of sound should be set at around 10 times the maximum speed attained by the fluid. The accuracy of the model is also dependent on the choice of element size, Kernel type, and the Kernel distance factor. For this example, we kept a relatively coarse element size for preliminary studies and to speed up our results. The settings can be selected in Data -> SPH -> Data Editors -> SPH (tab) -> Model Parameters (tab)
Results
Once configured, FreeFlow handles the SPH solver execution — calculating particle interactions, updating velocities and positions, and applying boundary conditions each timestep. For a stirred tank with continuous addition of water and draining, the solver captures the swirling and mixing flow patterns, and interactions between inlet jets and impeller-induced circulation.
We can use a combination of tools to visualize the liquid surface and the interactions between particles and solid surfaces. We will walk through a number of options that can add useful insight to your simulations.
Postprocessing and Visualization
One of FreeFlow’s biggest strengths is built-in postprocessing, which avoids the need to export to external tools. You can analyze and present your results directly:
While the simulation is running, we can visualize the results by enabling Auto-refresh. This is a good way to check that the simulation is making sense physically in the early stages of running, and it is particularly helpful for large simulations that may take hours to process
Variable-based coloring: Visualize the fluid colored by velocity magnitude, pressure, density, or other custom scalar fields. Once you select the variable, FreeFlow will list them in the colormaps. This allows you to use the same color settings and scale consistently.
Cutting planes: Slice through the 3D particle field to reveal internal flow structures. Ideal for isolating regions inside the stirred tank that are otherwise hidden by surface particles. By creating a plane for SPH processes, we can visualize the particles on a subsection of the domain. Other tools like the Cube and Filter can provide helpful insights into the postprocessing workflows. Here's an animation generated from a cutting plane:
To set the coordinates for the plane, you can use the settings in the Data Editors panel, or manually move it in the 3D Viewer. To make the particles visible only from the cutting plane, first make the SPH nodes invisible, and then in the Coloring tab in the Data Editors of the recently created plane, check the Visible box, check the Nodes box, and choose a property you want the nodes to be colored by.
Custom user processes: Create masks, filters, or selection tools to visualize only specific parts of the flow (e.g., inlet jet core or impeller tip region). For example, a Cube can be tagged back into the SPH and applied to a Filter to visualize the path of a portion of the fluid throughout the domain, similar to a tracer, allowing us to study mixing in a reactor. Note that it takes a while for the tracer mass to decrease in the tank due to draining.
Mass flow plots: Monitor inlet and outlet mass flows over time, providing instant insight into steady-state behavior or transient fluctuations. Here, we see that there’s more liquid coming out and flowing in, which means that the water level is down with time. Thus, this has not reached steady state. This is what we see when we plot the total mass of water over time
Animation and video creation: Export time-resolved particle data as high-quality videos for presentations or reports. The animation tool can be called by going to Tools -> Animation. Once open, you can add scenes from any time point.
Vectors: We can select to view vectors from a SPH plane, allowing the visualization of flow direction. To reduce the crowding of vectors due to the large number of nodes, you can increase the stride number. Here, we see flow induced by the impeller on the fluid:
Once the pre- and post-processing workflows are set up, you can run the simulation with other operating parameters. Here, we increased the angular speed of the impeller from 5 rad/s to 20 rad/s. As a result, we can see the impeller has a bigger impact of the fluid velocity in its vicinity:
A video showing the set-by-step process of setting up a FreeFlow simulation is shown here:
Benefits
Ansys FreeFlow’s integration of preprocessing, simulation, and postprocessing makes it a powerful choice for SPH modeling — especially when you need moving boundaries, complex inlet conditions, and high-quality visual output in one workflow. The stirred tank example demonstrates how easily you can go from concept to fully visualized results, without switching between multiple software packages.
If you’re working with free-surface flows, multiphase interactions, or fluid–structure interactions, Freeflow offers both the technical depth and usability to get you there.
Ozen Engineering Expertise
Ozen Engineering Inc. utilizes its extensive consulting expertise in CFD, FEA, thermal, optics, photonics, and electromagnetic simulations to deliver outstanding results on engineering projects. We tackle complex challenges, including multiphase flows and erosion modeling, using Ansys software. Our team specializes in expert consulting and training in engineering simulations with Ansys, particularly Ansys Icepak AEDT, helping clients maximize its potential through scripting and automation.
We deliver customized engineering solutions in thermal management, fluid dynamics, and electromagnetic simulations. Our consulting, training, and support optimize performance and reliability across new and existing systems. Learn more at https://ozeninc.com.
Suggested blogs by Ozen Engineering
BioPharma and Downstream Process Simulation using ANSYS [Link]
Creating a Reduced Order Model for Vortex Prediction in Stirred Tank [Link]
Modeling Bubble Dynamics in a Stirred Tank Reactor Using ANSYS Fluent and Population Balance Model [Link]
Simulation of Steady Vortex in a Stirred Tank using Ansys Fluent Software Parametric Workflow [Link]
Simulation Best Practices for Mixing Equipment Webinar [Link]
The Role of CFD on Bioreactor Scale Up Process [Link]
How to Predict Performance of Bioreactors and Mixing Tanks [Link]
Aug 11, 2025 9:50:56 AM