Professional Documents
Culture Documents
Meshing Using SALOME: Original by Otto J Oeleht August 2017
Meshing Using SALOME: Original by Otto J Oeleht August 2017
Introduction
Following tutorial is composed using OpenFOAM-4.1 and OpenFOAM-4.x. For
viewing the results and for post-processing Paraview-5.0.1 is used. In creation
of object and the mesh SALOME-8.2.0 was used.
Meshing
First we need to create a car. In order to create 3D objects there are many
different application, but it is important to keep in mind that the file you’re
importing is in BREP, STEP, IGES, STL or XAO format. In this tutorial we
are using SALOME application in order to create our object, because we will
mesh the object using the same application. You can download the application
and fin the installation guide can be found here:
http://www.salome-platform.org/downloads/current-version
If you have experience in creating 3D objects, then you can just import the
car’s object using (File → Import).
If you don’t have any experience in creation of 3D models, then you can create
a new car model by making use of 2 boxes: (New Entity → Primitives → Box).
1
The box below can be made using size measures (1). The box on the top needs
to be made using two points (New Entity → Point), points are divided into
diagonals (2).
Now you need to create a Background Mesh around the car. It is again made
by using a box made by making use of two points. Note that, in order for the-
re should be some space behind the car and below the car’s bottom side and
car’s base (If car is located at z = 0, then the background mesh box should be
z = −0.2).
Next you need to cut the car out of the box (Operations → Boolean → Cut). If
the cutting process fails (for more complicated cars), then you should increase
the tolerance limit (Repair → Limit tolerance).
2
Now you need to name different parts of the car. The names should be as follow:
• The input hole (inlet)
• The output hole (outlet)
• Roof (top)
• Bottom (bottom)
• Two sides (sides)
• The body of the car (autoKeha) - name it like this because another script
later has coded it in using this name.
To do that you need to right click on the cut and select Create Group, and then
type the parts (except the carBody) in, in the numbered order.
3
The car body can be added as follow. Select ”Select All”, and from the menu
on the left and then select all recently added parts. After that click ”Remove”.
4
If an error appears on the missing libgfortran package, then it is often
resolved by installing libgfortran3:i386 or libgfortran3. On Ubuntu 16.04
write following to the terminal: ”sudo apt-get install libgfortran3”.
In the opened window choose Fineness: Custom and Growth Rate change to 0.01
(0.005, and Max. Size 0.5 and Min. Size 0.1 (those are if you’re on a cluster)).
In she submenu ”2D”choose NETGEN 1D-2D algorithm and NETGEN 2D. For
Parameters hypothesis change Growth Rate to 0.01 (0.005, and Max. Size 0.5
and Min. Size 0.1) then change Nb. Segs per Edge to 6 (or 8 if on cluster), Nb.
Segs per Radius change to 8 (or 10). Then click on Apply and Close.
In the left menu, right-click on your just made Mesh and select ”Compute”.
This procedure is needed in oder to even display the Mesh.
If you get a warning, that the Meshi could not be displayed, because Mesh
Size exceeds current limit, then the limit can be changed as follows: File
→ Preferences → General → Automatic Update Size limit.
Now you need to right-click on your mesh on the left menu and choose Create
Groups from Geometry. Now choose all your Mesh pieces under Elements and
Nodes.
5
Now you have made a car Mesh together with a Background Mesh. Now you
need to export it. In order to do that right-click on the mesh and select Export
→ UNV file.
Next you have to copy 0 folder from AllrunKaust into the main folder. If you
named Mesh parts as in the tutorial, then you don’t have to change anything
in the folder, if not then you have to change each file in 0 folder - change the
parts under BoundaryFields accordingly.
6
In 0 folder initial conditions are described. In each file there is a dimen-
”
sions” field. This field corresponds to the international SI units system [kg
m s K mol A cd]. In the file ”p”describes the placement of pressure, U is
the movement of air, k and omega corresponed to k-omega turbulence model
(https://en.wikipedia.org/wiki/K%E2%80%93omega turbulence model).
Next you need to open a terminal and move to the main folder. Now you first
need to run a command ideasUnvToFoam auto1.unv”. with that command you
”
create a mesh for OpenFOAM application. Secondly you need to prepare the
parallel computation. For that open the decomposeParDict.
NumberOfSubdomains is the number of cores to use (default 2), method
describes the distribution method, simpleCoeffs describes the method
parameters. NB! When n(x y z) then x*y*z=numberOfSubdomains.
Run command decomposePar”, which gives each processor its own part to
”
calculate (folders will appear - processor0...processorN). Now you can run the
simulation using command mpirun -np 2 pimpleFoam -parallel”, where 2 is the
”
number of cores to use.
After the end of the simulation you need to run command reconstructPar”,
”
which adds up different calculations from different cores. Simulation is now
finished and ready for visualisation. The folders with numbers are different ti-
mesteps when the simulation output was written.
In order to display the output use command paraFoam”. In the window click
”
Apply in the left menu. Now choose option Slice.
7
In the left under Properties untick Show Plane checkbox, and click on button
Y Normal. After that Apply. Turn the slice so you could see it. From the top,
most leftmost menu choose parameter U to be displayed, now by controlling the
time you can see the wind resistance in time to your car.
https://youtu.be/ Uf QPUMg U
Cutting your Mesh in Z Normal direction, you can see cross section of the wind
resistance.
Used processor:
8
• Intel Xeon Processor E5-2660 v2 @ 2.2 GHz (20 threadi)
2 second simulation with one thread:
ExecutionTime=55.83 s
2 s simulation with two threads, simple method (2 1 1):
ExecutionTime=57.93 s
2 s simulation with two threads, simple method (1 2 1):
ExecutionTime=62.51 s
2 s simulation with two threads, simple method (1 1 2):
ExecutionTime=63.96 s
iseAutoKLASTER
Processor:
• Intel Xeon Processor E5-2660 v2 @ 2.2 GHz (20 threadi)
9
Strong Scaling in iseAutoKLASTER
In High Performance Computing different number of Sub-Domains are used to
make use of Strong Scaling (using different amount of memory is called weak
scaling). Calculating Strong Scaling works as the following:
• t1 is one Sub-Domain’s calculation time
10