1. Home
  2. Tutorial
  3. Tutorial 5: Man in the Wind
  4. Meshing and Simulating

Meshing and Simulating


Start Gmsh and create the mesh with:

gmsh -3 man.geo -optimize_netgen man.geo

Note, optimizing is necessary!

Possible output

Start Gmsh and create the mesh with:

gmsh -3 man.geo -optimize_netgen man.geo

Info    : Running 'gmsh -3 man.geo -optimize_netgen man.geo' [Gmsh 4.0.4, 1 node, max. 1 thread]
Info    : Started on Wed Nov 21 16:56:27 2018
Info    : Reading 'man.geo'...
Info    : Reading 'man_model.stl'...
Info    : 13898 facets in solid 0
. . .
Info    : Writing 'man.msh'...
Info    : Done writing 'man.msh'
Info    : Stopped on Wed Nov 21 16:56:43 2018

Opening man.msh won’t be very helpful, but will show something similar to:

Unfortunately, this mesh is not easy to check and inspect.

Copying mesh

Again, to make sure the mesh file will not be overwritten by the results, we copy and rename the files:

cp man.msh mand.msh

Converting to dolfyn input

We now convert the mesh into *.cel, a  *.vrt, a  *.bnd, and optionally an  *.inp file using gmsh2dolfyn, and selecting the correct file to convert, in our case: mand.

gmsh2dolfyn mand

Possible output

Start gmsh2dolfyn converter with:

gmsh2dolfyn mand
 Gmsh2Dolfyn: Converts a Gmsh mesh file to Dolfyn format.
 Input must be in Gmsh version 2.0, 2.1, 2.2 or 4 ascii format.
 Opening the Gmsh file
 File mand.msh opened
 Reading MeshFormat
 MeshFormat: 4 0 8
 Reading PhysicalNames
 Name            2 -> Man                                                         
 Name            3 -> Floor                                                       
 Name            4 -> Inlet                                                       
 Name            5 -> Outlet                                                      
 Name            6 -> Walls                                                       
 Name            1 -> Fluid                                                       
 Entity            1  surface            2 Man
  . . .
 Entity            2  volume             1 Fluid                                  
 Physical entities found            8
 Reading Nodes
 Number of entity blocks:          28  Nodes:       16324
 Creating the dolfyn .vrt file
 File mand.vrt opened
 Point              1  Node            1
  . . .
 Volume             2  Nodes        7711
 Nodes written        16324
 Gmsh 4: Total Gmsh Entity Blocks to be read in:           8
 Gmsh 4: Total Gmsh elements to be read in:       88306
 Creating the dolfyn .cel and .bnd files          14          23
 File mand.cel opened
 File mand.bnd opened
 Element            1 Man      Type            2       13898
  . . .
 Element            2 Fluid    Type            4       71088
 Triangle boundaries:        17218
 Tetrahedral cells:          71088
 Writing the .inp file
 File mand.inp opened
 inp:           2 Man          T
 inp:           3 Floor        T
 inp:           4 Inlet        T
 inp:           5 Outlet       T
 inp:           6 Walls        T
 Done gmsh2dolfyn 2018

Running Pre-Processor

Now we will run the pre-processor, with scaling factor of 0.1. Note that man.geo was made with 10x larger units.

dolgeo -s 0.1 -b mand

If no options are given with the dolgeo command, you will be prompted for them. Fill in case name mand, scaling factor of 0.1 (! important) and bin as format of geometry file.

Possible output

The pre-processor is run with:

dolgeo -s 0.1 -b mand
 Dolfyn PreProcessor
 mand                             T T T F
 Using command line arguments
 Using mand as input
 Opening vertex file
 Initialise vertex list
 . . .
 Region ID:            2  => Man
 Region ID:            3  => Floor
 Region ID:            4  => Inlet
 Region ID:            5  => Outlet
 Region ID:            6  => Walls
 Type 1 regions found:           5           6
 WARNING: check inp-file
 Using:   0.100000001      binary
 Dump binary geometry file

Running Simulation

Finaly we will run the dolfyn simulations.

dolfyn mand

If no case name is inputted directly, you will be prompted. If so, enter case name mand.

Possible output

The pre-processor is run with:

dolfyn mand
 This is dolfyn version 0.607
 Copyright(C) 2002-2016 Cyclone Fluid Dynamics BV
 NL-5583 XM, Waalre, The Netherlands
 see http://www.cyclone.nl and https://www.dolfyn.net

 Using Sparsekit2 by Yousef Saad
 (C) 2005, the Regents of the University of Minnesota
 Modules with patches (C) 2004-2010 by B. Tuinstra
 see http://www.home.zonnet.nl/bouke_1/dolfyn
 Tecplot interface (tecplt.f90) (C) 2006-2012 by
 S.B. Kuang, UNSW, Sydney, Australia
 VTK interface updated (C) 2007 by J. Jacobs
 Static boundary conditions (C) 2011 by J. JoJo
 MKL contributions and suggestions by Runar

 Using case: mand
 Calling dolfyn mand .dge
 mand.dge binary
. . .

 Number of requested steps done.          200

 Opening restart file
 File mand.rst
 Restartfile 400 written

 Writing VTK data file... mand.vtk
 Writing Full Gmsh file...
 Maximum change in PP:   1.82208765       3.45761771E-04   9.99999975E-06
 Arrays cleaned up
 Done mand

That’s it! Now all the calculations have been carried out, we can start to analyze the output.

Was this article helpful to you? Yes No

How can we help?