Gmsh for dolfyn tutorial (4)


Contents


Introduction and Files
First tutorial (t2.geo)
Second and third tutorial (t3a.geo and t3b.geo)
Fourth tutorial (t4.geo)
Fifth tutorial (t5.geo)
Sixth tutorial (t6.geo)
Seventh tutorial (STL file of a man)
Eighth tutorial (Von Karman vortex street)

Second model (t4.geo)

Use the Gmsh tutorial "t4.geo":

Include "t1.geo";

...

Extrude {0,0,0.005} {Surface{24}; Layers{1}; Recombine; }

//
// Boundaries (non-default)
//
Physical Volume("Fluid") = {1};
Physical Surface("Sin") = {61};
Physical Surface("Sout") = {85};
Physical Surface("Ssym1") = {24};
Physical Surface("Ssym2") = {126};

Note the four "Physical Surfaces".

Start Gmsh and create the mesh with:

$ gmsh -3 t4.geo
Info : Running '../gmsh -3 t4.geo'

...

Info : Mesh 2D complete (0.908057 s)
Info : Meshing 3D...
Info : Meshing volume 1 (extruded)
Info : Mesh 3D complete (0.016001 s)
Info : 2430 vertices 4567 elements
Info : Writing 't4.msh'
Info : Wrote 't4.msh'
Info : Stopped on Thu Apr 16 14:31:47 2009


Copy the *.msh file and start the translator followed by the preprocessor:

$ cp t4.msh t4d.msh
$ gmsh2dolfyn
Gmsh2Dolfyn: Converts a Gmsh mesh file to Dolfyn format.
(Input must be in Gmsh version 2.0 ascii format.
Output is in Dolfyn version Jan 2009 format.)

Input Gmsh filename, excluding the .msh suffix
t4d
Opening the Gmsh file
Reading MeshFormat
Reading PhysicalNames
Reading Nodes
Creating the dolfyn .vrt file
Total Gmsh elements to be read in: 3770
Creating the dolfyn .cel and .bnd files
Writing the .inp file
Done gmsh2dolfyn
$ preprocessor
Dolfyn PreProcessor
Input casename:
t4d
Using t3ad as input
Opening vertex file
Initialise vertex list
...
Region ID: 2 => Sin
Region ID: 3 => Sout
Region ID: 4 => Ssym1
Region ID: 5 => Ssym2
Type 1 regions found: 4 5
WARNING: check inp-file
Enter scaling factor (1.0):
1.0
Using: 1.000000
Enter format of geometry file (bin|ascii):
bin
Dump binary geometry file
Done

The *.din file for t3ad contains:

title Test Gmsh t4.geo model
steps 200 1.e-3

opendx off
use gmsh

density,1.0
vislam 20.e-6

relax 0.7 0.3 0.7
init,field,0.0 0.0 0.0,,1.e-4,1e-4

scheme UVW LUX 0.8
scheme KEPS LUD 0.8

slope UVW vnf
slope P vnf
slope KEPS vnf

boundary,0
wall
noslip
0.0 0.0 0.0
adiabatic

boundary,sin
inlet
0.01 0.0 0.0
1.0
293
inle
0.25 0.01

boundary,sout
outlet
1.0

boundary,ssym1
symp

boundary,ssym2
symp

Start dolfyn:.

$ dolfyn
This is dolfyn version 0.524
Copyright(C) 2002-2009 Cyclone Fluid Dynamics BV
NL-5583 XM, Waalre, The Netherlands
see http://www.cyclone.nl and http://www.dolfyn.net
Using Sparsekit2 by Yousef Saad
(C) 2005, the Regents of the University of Minnesota
Modules with patches (C) 2004-2008 by B. Tuinstra
see http://www.home.zonnet.nl/bouke_1/dolfyn
Tecplot interface (C) 2006 by S.B. Kuang
VTK interface updated (C) 2007 by J. Jacobs


Enter case:
t4d
Using case: t4d
Appending echo to file t4d.txt
t4d.geo binary

...

Writing Gmsh data file... 2524
Writing Gmsh data vectors cell
Writing Gmsh data pressure cell
Done

...

Done t4d

Finally start Gmsh with:

$ gmsh t4d.msh t4d_uvwc.msh

The result in Gmsh is:

t4d.png


<< First < Previous Next > Last >>



Cyclone www.dolfyn.net