In this section, we will build, run, and post-process a simple model of an agitated tank. In doing so, we will use all three components of the M-Star CFD Package.
The Graphical Interface¶
Let’s quickly discuss the M-Star Build graphical interface. This program is also sometimes referred to as the “GUI” for brevity.
This lists out all components of the simulation, including moving geometry, static geometry, fluid models, scalar fields, particles, etc.
Each component represents a part of the simulation input. You click on each Component to display all the Properties associated with it. You may also right click on the component to bring up any supported actions, such as moving or rotating geometry.
This window lists all the inputs for the selected component. Generally, the most common inputs are shown at the top of the list, and less used or advanced options are at the bottom.
This window shows your model geometry and other defined components. You can change the style and toggle annotations on and off through the View menu.
Rotate view - Hold RIGHT mouse button and move
Pan view - Hold SHIFT + Hold RIGHT mouse button and move
Zoom - Use the View menu to change zoom or reset your view
Move objects - Select object with LEFT mouse button and drag to move it.
Command Window (Optional)¶
This window displays any messages to the user. Build errors during model set-up will appear here. You can toggle the Command Window on/off from menu under View->Toggle Command Window.
The First Model¶
This model will be created and running in a matter of minutes. We will use parametric Brep generation to create an agitated system with a tank and Rushton impeller. Before you get started, you’ll want to be sure the software is installed properly and licenses are set-up. Now, if you haven’t already, open M-Star Build from the Windows Start Menu.
Look at the center bottom of the program window to take note of the system. You can change this under the Edit->Unit Settings menu. The default length unit is meters.
Users should always check the active unit system when building a model
Create a tank¶
Create this geometry by clicking Geometry->Add Static Body. From the Tanks section, select Cylindrical Tank
What happened -
Static Object component appears in model listing with Cylinder Tank child geometry
Tank geometry shows up in 3D view
The green main lattice bounding box expanded to contain the newly imported geometry
Select the new Cylinder Tank child component from the model listing. Find the Diameter property in the property grid and modify it. You should see the tank geometry update based on changes to the Diameter property.
Create an impeller¶
Create an impeller by clicking Geometry->Add Moving Body. Select the Rushton Impeller and click OK.
What happened -
Moving body was added to model listing with Rushton impeller child geometry
Geometry shows up in the 3D view
Now let’s move and resize the impeller. Right click on the Moving Body component in the model listing and select one of the Move Along options. You can now interactively move the geometry in the 3D view. Once finished, left click the “Rushton” child component from the model listing. Find the diameter property and modify it to about 1/3 the tank diameter.
Run the simulation¶
In the GUI, Click Run->Run Solver. This command automatically launches M-Star Solve. If the M-Star Build file has not already be saved, you will be prompted to save it as an *.msb file.
Select an output directory
Select the number of GPUs or CPUs you want to use. By default, this number should be equal to the number of physical GPUs or CPUs in the system.
Click OK to execute the simulation. This will automatically launch M-Star Solve and begin writing files to your working directory.
In a moment, you should see output appearing in the working directory. Wait a few minutes while the simulation runs. When you see the simulation time has advanced past 1.0s, close the simulation command window to end the process.
Open M-Star Post by going to the Windows Start Menu and clicking M-Star->M-Star Post . This launches ParaView with our custom post-processing scripts.
Upon opening ParaView, you will see there are many buttons and options. ParaView is a general-purpose visualization tool that presents users with diverse analysis and post-processing capabilities. Typical users will only need to understand and use a small subset of the overall ParaView capability. This section briefly goes over the interface and usage of the M-Star specific routines.
Open M-Star Post from your Windows start menu
Inside ParaView, click the Open button to select your simulation output data “out/Slices.txt” file.
Click the MStarPost script button near the top right of the screen. This action loads in all the slice data and does basic processing automatically.
- What happened -
3D View tab was created, which presents three slices through the flow volume to illustrate the time-varying flow field.
Impeller Forces tab was created, which illustrates the time-evolution of the impeller power number, pumping number, and forces.
Thermodynamics tab was created, which summarizes the power being put into the system and the power dissipated by the fluid
Timing tab was created, which summarizes runtime performance
Press the green play button at the top of the ParaView window to create an animation sequence. If other features are present in the model, such as inlets, outlets, autoblendtime calculators, etc., additional tabs will populate the window.
Congratulations! You have just built, simulated, and post-processed your first model using all three components of the software.