Getting Started with Ansys FreeFlow: Modeling a Stirred Tank
Hello and welcome to this tutorial on applying Ansys FreeFlow to model a stirred tank reactor. Ansys FreeFlow is a new tool from Ansys that uses smooth particle hydrodynamics (SPH).
Creating a New Project
- Go to File and create a new project.
- If the data is not visible, go to View and check Data.
This is the tree that we will be working from, and there are different parts to it.
Setting Up the Study
- Go to Study and name your study.
- For description, note that you are doing a study with an impeller at 5 radians per second.
Ansys provides enough purpose-built tools to fulfill all the tasks applied.
If you have any issues or need specific aid or improvement, please contact us at Ozen Engineering, Inc. for more information.
Modules and Tools
- Go to Modules to apply tools for your SPH, including post-processing tools.
- The density monitor is applied by default. You can add boundary interaction statistics and mass flow rate.
Since you are not looking at heat transfer, assume everything is at room temperature. Otherwise, apply the SPH-HTC calculator.
Physics and Geometry
- Go into Geometries and import walls.
- Use the impeller and the tank body as your walls.
Walls could be static like the tank body or moving like the impeller.
Defining Surfaces
- Import surfaces for inlet and outlet separately from walls.
- Rename surface one as inlet and surface two as outlet.
Ensure the inlet reference vector points inward by clicking on Invert Normal.
Creating Fluid Inlets and Outlets
- Create a fluid inlet and link it to your inlet surface.
- Provide a mass flow rate of 60 tons of water per hour.
- Create an outlet and enable it for SPH.
Initial Conditions and Motion Frames
- Create a volumetric inlet and add 500 kg of water to the tank body.
- Create a motion frame for the impeller and specify its angular velocity as 5 radians per second.
SPH Settings
- Use the default WC SPH (weakly compressible SPH).
- Set fluid material to water and specify element size as 0.005 meters.
- Use the Wendland kernel type with a kernel distance factor of 1.5.
Simulation and Visualization
- Define simulation duration as 4 seconds with a time interval of 0.01.
- Create a new time plot for mass flow rates over time.
- Use visualization tools like cutting planes and filtering based on properties.
Conclusion
After running your simulation for 4 seconds, you can observe the mixing profile and particle movement. This completes your quick tutorial on setting up SPH for a stirred tank reactor with water and an impeller at 5 radians per second.
Thank you for watching this tutorial, and if you have any questions, please contact us at Ozen Engineering, Inc. for more information.
Getting Started with Ansys FreeFlow: Modeling a Stirred Tank Hello and welcome to this tutorial on applying Ansys FreeFlow to model a stirred tank reactor. Ansys FreeFlow is a new tool from Ansys that uses smooth particle hydrodynamics or SPH.
To start, you can go into File, and then create a new project. This will give you a window with data. If the data is not visible, you can go to View and check Data so that you can see. This is the tree that we will be working from, and there are different parts to it.
First, go to Study and name your study. For description, you can say you are doing a study with an impeller at 5 radians per second. Ansys also provides enough purpose-built tools to fulfill all the tasks applied. From now on, have a look at the Entscheid with Ansys software.
If you have any issues or need specific aid or improvement, please contact us at https://ozeninc.com/contact for more information. So, it's a useful addition to the software, a useful tool in the software is to actually allow you to write a description. Then, go to Modules.
Modules are some of the tools that you can apply for your SPH, including some tools that you can use for post-processing. The density monitor is applied by default. You can add the boundary interaction statistics and the mass flow rate.
You are not looking at heat transfer, so you can assume everything is basically at room temperature; otherwise, you would apply the SPH-HTC calculator. For this, you are using just the SPH mass flow rate, and you can actually check each of these.
And then, there might be options for each module that you add. So, for SPH boundary interaction statistics, you will add nodal forces and stresses, no heat transfer. You could add wetting parameters, but not so much for this application. So, that tells you the wetting time on a surface, for example.
And the boundary curves, you can look at things like force and torque, for example, which could be useful for what you are looking at. And for mass flow rate, you will have to populate this with different surfaces. You haven't added the surfaces yet, so you will do that later.
So, basically, it tells you that if you look at the status, you haven't defined an inlet and outlet or you haven't defined an inlet yet, so that's what you need to do, and basically, the boundary interaction statistics require at least one SPH injection, which is what you are going to do as well.
So, first, let's look at the physics. The physics gives you information about the direction of gravity, when you start applying gravity, when you end the application of gravity.
For your application, you want gravity to always be a constant; it will be geometry-dependent on which direction it is oriented towards. First, you should go into Geometries and import some. You will import some walls. The walls are basically the particles your fluid is going to interact with.
Right-click Geometry and click on Import Walls. You will use the impeller and the tank body as your walls. Walls could be static walls like the tank body or moving walls like the impeller. Click Open, and then you will see the impeller and the tank body already implemented.
So, if you want to visualize these walls, you can go into Windows and click, and if the windows are not visible, you can just go into View and enable Windows. You will go into Windows and click New 3D View, and here you can see the geometries that you have just added, and they are visible.
You can see the eye is open, there's nothing crossing the eye, so that means the impeller and the tank are open.
And if you want to see the impeller inside of the tank body, you will have to make the tank body transparent, so now you can see the tank body with its center demarked by a sphere, and the impeller is just this little body here.
For this application, you are only going to apply a moving frame to the impeller. The shaft is not the shaft itself, but you could also have the shaft moving as an independent body or as part of an impeller. So, basically, these two are the walls.
Make sure that if you go here into the data editors, you can see the name of the body or the wall; it's called impeller. You haven't created a motion frame yet, so you will keep this unchecked. You won't select anything. And materials, you are just going to leave as default materials.
Similarly, the tank body, same thing. Basically, you won't apply a motion frame at all at any point for the tank body; it's a static wall. You will also add surfaces. When you import surfaces for inlet or outlet, for example, they have to be imported separately from walls.
You will go into import surfaces and import surface 1 and surface 2 that you have created, both STL files. And then they are going to be basically your inlet and outlet, so you will actually define them accordingly.
Surface one is supposed to be your inlet, and so you are going to rename that as inlet, and no motion. Also, your surface two is your outlet, at the bottom, so the water is going to flow from the top, drop to the bottom, and you will call it outlet.
One thing to look at is the inlet that you have defined. Look at this arrow; it's saying that the reference vector of the inlet is pointing in the outward direction. In this case, you want the inlet to point into the geometry of the inlet.
So, the right way would be to point inward, so you need to click on Invert Normal. Now it's pointing in the right direction. Similarly, for the outlet, it's pointing inwards. Please note that the output is not the same as the normal output.
The inlet and outlet are defined at the surfaces, but you have to define them elsewhere. Let's create a fluid inlet.
Right-click Inlets and Outlets, Create Fluid Inlet, and then you will go into Fluid Inlet, and then you have to select an entry point, which is your inlet surface, so you have to link your inlet surface to your fluid inlet here. You have to provide a mass flow rate or velocity.
Here, you will provide a mass flow rate of 60 tons of water per hour. Time is when you start and stop. When you start and when you stop, you want the flow to be ongoing from time zero all the way to the end. Similarly, you have to create an outlet.
If you go into outlet, you have outlet01; you will keep this name. You won't prescribe a pressure, but you will enable it for SPH. Finally, you also want to make sure that you have water at time 0 already in the tank.
You could either just simulate the water filling up from nothing or have some water at time 0. So, to do that, you can go into Volumetric Inlet, create Volumetric Inlet, and you can click on Volumetric Inlet here.
You will add 500 kg of water for the SPH, and if you go to the Region tab, you will select a geometry where this mass of water is going to be present in. Use the geometry to compute the tank body. Add a volume of water in the tank body.
You can actually see on the sphere here where that water is being added. You could raise this a little bit as well. Please be sure to correct any misspelled Ansys product names as you transcribe, e.g., 'OptiSling' should be 'optiSLang'. Create the motion for the impeller.
Go to Motion Frames, Right-click on Motion Frames, and select Create Motion Frame. Now you have frame 01 as your newly created motion frame that you will apply to your impeller. For relative position, you can basically match that relative position to the position of your impeller.
So, you have to go back to the impeller to check what it is. You will basically use the pivot point. So, 0, 0, about close to 0, and then 0.3948 something. And then you will just copy that number and place it into here. You want one for 1000, but this is the default value, like a large number.
And for angular velocity, you can either specify the initial angular velocity or the angular acceleration.
Here, you want to have a fixed angular velocity, so you will write the angular velocity here of 5. And it's in the Z direction, so it's rotating about the Z axis, that's why you choose this field and not the other ones. So, that is specified. Now you have to link that motion frame to your body.
So, you will go back to Impeller, and you will go up here. And then on motion frames, make sure you are in the wall tab, and then select frame 01, and now it's linked. Now you have a link; you can verify that it is going to move properly by clicking on the preview.
The Ansys software is moving according to what you want, so this is a nice way to preview that the motion that you specified is correct. So, you will stop this. You will close this. So, you have defined the motion; you have defined the boundary conditions.
And looking back at your geometry selection collection, it's saying that the outlet hasn't been selected yet, so you have to go into outlet; you haven't selected the outlet, so click on the outlet, link the outlet surface to the outlet boundary.
For physics, you mentioned earlier that you have to specify the direction of gravity accordingly. Gravity is actually in the negative Z direction for your geometry. So, what you are going to do is change this to match your geometry, so it's in the negative Z direction. Now, let's go into SPH.
For SPH, you will use the default WC SPH, the weakly compressible SPH. The fluid material is water, alias for turbulence type, the Cleary for viscosity type, and surface tension type you will keep as none. Sound speed is usually recommended as around 10 times your maximum speed.
However, if you go higher, there may be more computational cost associated with it. So, for this application, you are assuming that hopefully, you are going to be like 5 meters per second or maybe more than that actually. But you will keep the sound speed at this point.
It might not be enough, so this is just a trial to see what's going to happen. Also, for kernel size, the kernel is quite important in SPH, so you have to specify an element size, which will tell you about the level of detail and accuracy of your SPH particles.
So, for SPH, let's try an element size of 0.005 meters. So, the smaller you go, the more detailed and the longer it takes to solve.
You will use the Wendland kernel type, and kernel distance factor you will keep at 1. 5. This is in the model parameters; there are some advanced parameters as well, so if you want to go into more detail, there is more discussion about these parameters in the FreeFlow manual.
You also didn't mention anything about the Coloring tab here for the Data Editor. The Coloring tab is going to define the color of your particles as they show up. The Stride also tells you how many particles you want to reveal in your plot.
If you increase the number of strides to 10, you will have at least 1 in each 10 particles, so it will make your animations faster. If you have a bigger number of strides, you will keep it as 1 as the default. You will keep the color blue. You will keep the Olarion solution on by default.
That will be very important, looking at visualization and post-processing. So, basically, that's it for now. So, you don't have any issues with your messages in your status. Now, let's go to your solver to define your run. So, you want to define, like, the simulation duration.
For this simulation, you are going to keep it small, just 4 seconds, just for demonstration purposes. And the time interval, you will lower that to 0. 01. You are using the CM. You will follow your guide created by the team.
You do have to add something for the mass flow so that you can actually later on do some post-processing and plot the mass flow rates over time for the different surfaces. For the time step duration, the number of triangles, and SPH elements can be specified.
Basically, what you can do is wait for the whole simulation to run; it can take a few hours. You can actually monitor the run visually by pressing Auto Refresh and making sure that the particles are visible, as well as the geometries are visible.
You can make them invisible, like you can remove the tank body, or the impeller, or the inlets as well, just for visibility, or the SPH particles. But this is useful to observe how it's going. You can also look at the mass flow rates, for example, on a graph.
To do that, you can create a new time plot. If you go into the Inlet, you have the Inlet mass flow. You are going to put the output at the same plot as the output at the same mass flow.
Now, you don't have any data because it's still in the early stages of the simulation, but once you start getting data, you are going to start seeing lines plotting.
In the meantime, depending on computational efficiency, you could also create some tools for visualization while the simulation is running and actually test them. You can use a cutting plane to visualize particles in a certain segment of your domain, or a cube, for instance. It's very useful.
You can filter based on certain properties so that you only see some particles based on, say, their velocity, and you can filter based on the range. These are some of the key tools that you could use.
If you create a plane, for example, and it actually shows up in here already, so you already have the plane defined here, so the plane is in red.
You can modify the plane directly on the viewer by dragging around it, or you can change the vector as well as the angle; the origin of the plane can be modified as well. There is a lot of flexibility here.
Once you have defined a plane, you would first disable the Eulerian view so that you can see the particles only based on what's in the plane. Click on nodes, and the nodes are red; you will change them to blue. Press OK.
So now you have just blue particles cutting basically close to where half of the impeller is. Please note that the plane is defined for the SPH particles, but you can also define planes for the geometries, for example, geometric entities.
But because it's defined for the SPH particles only, it's only applied for the SPH particles; that means the geometry doesn't get affected by it. You have a full view of the geometry and just looking at the particles themselves.
After running your simulation for 4 seconds, 4-second flow time, a few hours waiting, you get basically these results. The OpsiSling software is not relevant here; the correct tool is actually optiSLang. Let you disable all the other filters that you established here.
You have a lot of user processors that you created in the meantime to better visualize everything. You can see that the water is settling down violently, actually. Please contact us at https://ozeninc.com/contact for more information.
You can see here the tracer study that you were doing, so you can see easily the mixing profile, and some of the particles already exiting the domain through the bottom.
Finally, this is an Eulerian view, and when you do your calculations, the default mode is to do the Eulerian calculation, so it's a continuous profile. You can use Ansys to see through your domain and have a transparent fluid zone.
You can see the profile that should match closely what you have in the SPH view. So, this basically completes your quick tutorial on how to set up SPH for a stirred tank reactor with only water and an impeller at a 5 radians per second speed.
Thank you for watching this tutorial, and if you have any questions, please contact us at https://ozeninc.com/contact for more information.

