[Gmsh] Error transfinite volume

Christophe Geuzaine cgeuzaine at ulg.ac.be
Fri Nov 7 17:02:51 CET 2008


Amit Itagi wrote:
> Christophe,
> 
> Is it possible to include "progression" in the layers for the extrusion 
> step ? Ultimately, that is what I want. Hence, I was avoiding 

Hi - here's an example:

// the mesh nodes should match the points below

Point(1) = {0,0,0,1};
Point(2) = {1,0,0,1};
Point(3) = {3,0,0,1};
Point(4) = {7,0,0,1};
Point(5) = {15,0,0,1};

n = 4; // number of intervals
r = 2; // progression

// progression using transfinite mesh

Point(6) = {0,0.4,0,1};
Point(7) = {15,0.4,0,1};
Line(1) = {6,7};
Transfinite Line {1} = n+1 Using Progression r;

// progression using extruded mesh

a = (r - 1) / (r^n - 1);
one[0] = 1;
layer[0] = a;
For i In {1:n-1}
   one[i] = 1;
   layer[i] = layer[i-1] + a * r^i;
EndFor
Point(10) = {0,0.8,0,1};
Extrude {15,0,0} {
   Point{10}; Layers{one[], layer[]};
}









> extrusion.  If that is not possible, could you tell me that rule for the 
> node ordering ?
> 
> Thanks
> 
> Rgds,
> Amit
> 
> 
> 
> On Wed, Nov 5, 2008 at 2:08 PM, Christophe Geuzaine <cgeuzaine at ulg.ac.be 
> <mailto:cgeuzaine at ulg.ac.be>> wrote:
> 
>     David Colignon wrote:
> 
>         Hi Amit,
> 
>         the ordering of the nodes in your "Transfinite Volume" commands
>         is not correct. You should have:
> 
>         Transfinite Volume{233}={1,2,3,4,101,102,103,104};
>         Transfinite Volume{235}={1,2,6,5,101,102,106,105};
>         Transfinite Volume{237}={2,3,7,6,102,103,107,106};
>         Transfinite Volume{239}={3,4,8,7,103,104,108,107};
>         Transfinite Volume{241}={4,1,5,8,104,101,105,108};
> 
> 
>     PS : for this kind of geometry it is probably simpler to use extrusion
> 
> 
>     Point(1) = {-1,-1,0,0.2};
>     Point(2) = {1,-1,0,0.2};
>     Point(3) = {1,1,0,0.2};
>     Point(4) = {-1,1,0,0.2};
>     Line(1) = {1,2};
>     Line(2) = {2,3};
>     Line(3) = {3,4};
>     Line(4) = {4,1};
>     Line Loop(5) = {4,1,2,3};
>     Plane Surface(6) = {5};
>     Point(5) = {-5,-5,0,1};
>     Point(6) = {5,-5,0,1};
>     Point(7) = {5,5,0,1};
>     Point(8) = {-5,5,0,1};
>     Line(5) = {5,6};
>     Line(6) = {6,7};
>     Line(7) = {7,8};
>     Line(8) = {8,5};
>     Line(9) = {1,5};
>     Line(10) = {2,6};
>     Line(11) = {3,7};
>     Line(12) = {4,8};
>     Line Loop(13) = {1,10,-5,-9};
>     Plane Surface(14) = {13};
>     Line Loop(15) = {2,11,-6,-10};
>     Plane Surface(16) = {15};
>     Line Loop(17) = {3,12,-7,-11};
>     Plane Surface(18) = {17};
>     Line Loop(19) = {4,9,-8,-12};
>     Plane Surface(20) = {19};
> 
>     Transfinite Line{1,2,3,4}=5;
>     Transfinite Line{5,6,7,8}=5;
>     Transfinite Line{9,10,11,12}=5 Using Progression 1.2;
> 
>     Transfinite Surface{6}={1,2,3,4};
>     Transfinite Surface{14}={1,2,6,5};
>     Transfinite Surface{16}={2,3,7,6};
>     Transfinite Surface{18}={3,4,8,7};
>     Transfinite Surface{20}={4,1,5,8};
> 
>     Recombine Surface{6,14:20:2};
>     Extrude {0, 0, 10} {
>      Surface{20, 18, 16, 14, 6}; Layers{5}; Recombine;
>     }
> 
> 
>         Cheers,
> 
>         Dave
> 
> 
> 
>     -- 
>     Prof. Christophe Geuzaine
>     University of Liege, Electrical Engineering and Computer Science
>     http://www.montefiore.ulg.ac.be/~geuzaine
>     <http://www.montefiore.ulg.ac.be/%7Egeuzaine>
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh


-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine