1. Home
  2. Tutorial
  3. Tutorial 6: Von Karman Vo...
  4. Meshing and Simulating

Meshing and Simulating


Start Gmsh and create the mesh with:

gmsh -3 model.geo

Start Gmsh and create the mesh with:

gmsh -3 model.geo

Info    : Running 'gmsh -3 model.geo' [Gmsh 4.0.4, 1 node, max. 1 thread]
Info    : Started on Sat Nov 24 20:19:43 2018
Info    : Reading 'model.geo'...
Info    : Done reading 'model.geo'
. . .
Info    : Writing 'model.msh'...
Info    : Done writing 'model.msh'
Info    : Stopped on Sat Nov 24 20:19:44 2018

Opening model.msh will show something similar to:

Copying mesh

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

cp model.msh karman.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: karman.

gmsh2dolfyn karman

Start gmsh2dolfyn converter with:

gmsh2dolfyn karman
 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 karman.msh opened
 Reading MeshFormat
 MeshFormat: 4 0 8
 Reading PhysicalNames
 Name            2 -> Wall                                                         
 Name            3 -> In                                                           
 Name            4 -> Out                                                          
 Name            5 -> Bottom                                                       
 Name            6 -> Top                                                          
 Name            7 -> Front                                                        
 Name            8 -> Back                                                         
 Name            1 -> Fluid                                                        
 Entity            1  surface            8 Back  
  . . .
 Entity           16  volume             1 Fluid                                   
 Physical entities found           68
 Reading Nodes
 Number of entity blocks:         204  Nodes:       34460
 Creating the dolfyn .vrt file
 File karman.vrt opened
 Point              1  Node            1
  . . .
 Surface          409  Nodes        4321
 Nodes written        34460
 Gmsh 4: Total Gmsh Entity Blocks to be read in:          68
 Gmsh 4: Total Gmsh elements to be read in:       51380
 Creating the dolfyn .cel and .bnd files          14          23
 File karman.cel opened
 File karman.bnd opened
 Element            1 Back     Type            3         160
  . . .
 Element           16 Fluid    Type            5        4500
 Quad boundaries:            34460
 Hexahedral cells:           16920
 Writing the .inp file
 File karman.inp opened
 inp:           2 Wall         T
 inp:           3 In           T
 inp:           4 Out          T
 inp:           5 Bottom       T
 inp:           6 Top          T
 inp:           7 Front        T
 inp:           8 Back         T
 Done gmsh2dolfyn 2018

Running Pre-Processor

dolgeo -s 1.0 -b karman

If no options are given with the karman command, you will be prompted for them. Fill in case name mand, scaling factor of 1.0 and bin as format of geometry file.

The pre-processor is run with:

dolgeo -s 0.1 -b karman
 Dolfyn PreProcessor
 karman                             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:   1.000000001      binary
 Dump binary geometry file

Running Simulation

Finaly we will run the dolfyn simulations.

dolfyn karman

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

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? No Yes

How can we help?