MAIA bb96820c
Multiphysics at AIA
|
In the second tutorial, we will simulate the flow around a 2D square which exhibits the vortex shedding phenomenon. We will build up the simulation step by step, including configuring the property files in (1) geometry setup, (2) grid generation and (3) flow simulaiton. In the end, you will be able to build up your own simluation cases.
General Ideas
To simulate the flow around a 2D square, we need to define a computational domain surrounding our object. For this tutorial, we simply define a 2D rectangular box as the boundary of the compuataional domain.
To limit the effect of disturbances cased by the boundary conditions, we need to place the boundary sufficiently far away from the object (the 2D square). Furthermore, since we are intersetd in the vortex shedding phenomeon downstream the obejct, we need to make the flow domain extend far enough in the flow direction. Check the follwoing image for some suggested geometry setups.
Implimentation
The geometry consists of 5 parts (4 boundary segments and 1 squre object) and they are supposed to be stored in STL files.
In this tutorial, you need to create the STL files, copy the given content from below into each file and place them in the /stl
folder. (Optional: After completing the simulation you're free to try different geometries.)
The STL in 2D is made up of the following information:
inlet.stl
outlet.stl
upperSponge.stl
lowerSponge.stl
square.stl
After creating geometry STL files, we need to specify the them in the geometry.toml
file. Follow the instructions given in the geometry.toml file and fill in all the missing values with ?
.
Note: For detailed information, please check property file overview (old) and geometry generation documentation (old).
Define the Boundary Conditions in the geometry.toml
:
Now we have finished the geometry setups! You can find the reference solution of the geometry.toml file in the /solution
folder.
Fill in all missing values in properties_grid.toml
to configure properties in the grid generation process. Some suggestions are given for the refinment properites.
Generate the grid by running the MAIA (with properties_grid.toml) and view it using ParaView. For more detail on how to setup and run the simulation with MAIA, please refer to Tutorial 1.
Optional: You can play with the values in properties_grid.toml until you think the resulting grid is satisfying. Remember: there are multiple grid setup possibilities!
Below is a reference grid solution generatied by property files in the /solution
folder.
Add all the missing values to the exemplary properties_run.toml
. Use the following settings:
Parallel Computing: Flow simulation consumes a lot of computational resources, therefore it is a better idea to conduct the simulation on computational nodes with multiple process. MAIA is designed to achieve efficient parallel computing on computational nodes.
With SLURM in AIA cluster, you can use the following commmand to obtain an interactive job, then run parallel computing simulation using MPI.
ssh -X fe1
.si -X {nProcs/node} {nNodes} {hh:mm:ss}
, e.g. si -X 12 1 00:15:00
.mpirun -np 12 ./maia properties_run.toml
.Note: Never run any long simulations (>60s) or any simulation using more than 1 or 2 cores on one of the frontend nodes!
Finally, you can visualize the results in ParaView. The result should look like this: