1. Home
  2. Tutorial
  3. Tutorial 4: Transfinite Meshes
  4. Input Files

Input Files

In this example we are going to use t6.geo, which we will edit slightly.

All alterations are mentioned below the sample code:

t6.geo

Include "t1.geo";

Delete{ Surface{1}; Curve{4}; }

p1 = newp; Point(p1) = {-0.05, 0.05, 0, lc};
p2 = newp; Point(p2) = {-0.05, 0.1, 0, lc};

l1 = newl; Line(l1) = {1, p1};
l2 = newl; Line(l2) = {p1, p2};
l3 = newl; Line(l3) = {p2, 4};

Curve Loop(2) = {2, -1, l1, l2, l3, -3};
Plane Surface(1) = {-2};

Transfinite Curve{2} = 20 Using Bump 0.25;

Transfinite Curve{l1} = 6;
Transfinite Curve{l2} = 6;
Transfinite Curve{l3} = 10;

Transfinite Curve{-1,3} = 30 Using Progression 1.05;

Transfinite Surface{1} = {1,2,3,4};

Recombine Surface{1};

Mesh.Smoothing = 100;

/* * * * * * * * * * * *
 * Dolfyn added lines: *
 * * * * * * * * * * * */

 // Making a volume

Extrude {0,0,0.01} {Surface{1}; Layers{1}; Recombine; }

// Boundaries (non-default)

Physical Volume ("Fluid")  = {1} ;

Physical Surface("Top")    = {17};
Physical Surface("Left")   = {29,25,21};
Physical Surface("Right")  = {37};
Physical Surface("Bottom") = {33};
Physical Surface("Front")  = {38};
Physical Surface("Back")   = {1};

Note

We edited the following (line numbers according to original document):

  • line 27 – Changed the refinement to 0.25, to make it more subtle
  • line 38 – Changed the refinement to 1.05, to make it more subtle
  • Commented out lines:
    • line 55-73 – we don’t need the second surface and we will define our own Physical instances
  • Added lines (important!):
    • line 81 – Added an extrude to create a volume
    • line 85-92 – defined a new Physical Volume and Physical Surfaces

Visually the model will look like this:

Lastly, the t6d.din file.

> See the DINGuide (on the Downloads page) for reference.

t6d.din

title Test Gmsh t6.geo model

steps 50  1.e-3

opendx off
use gmsh fluid

pref,10
solver,w,off
density,1.2
vislam 120.e-6

boundary,left
wall
noslip
0.0 0.0 0.0
adiabatic

boundary,right
wall
noslip
0.0 0.0 0.0
adiabatic

boundary,front
symp

boundary,back
symp

boundary,top
inlet
0.0 -0.1 0.0
1.2
293
inle
0.05 0.01

boundary,bottom
outlet
1.0

Again use gmsh fluid is used (line 6), to produce a full *.msh file, but ommitting the results on the boudaries.

Was this article helpful to you? Yes No

How can we help?