[Gmsh] surface from extrude in volume
John Daily
John.Daily at lemmasoftware.org
Fri Feb 5 20:47:11 CET 2016
I am trying to embed an extruded object within another volume for the
generation of a 3D mesh. Below is my .geo file. However, when I do 3D mesh,
I get an error "no tetrahedra in region 1 0", which occurs regardless of
how many toroid segments I add to the volume. I would appreciate any help?
I am at a loss here?
Thanks
/////////////////////////
// Geometric Inputs
radius = 3.25;
blc = radius/3;
Box = 3*radius;
lc = radius/5;
ts = 1; // height of toroid
tx = radius; // radial width of toroid, measured in centre of ring
tl = 0; // centre of rotation
/////////////////////////////////////
// Large Bounding box
X0 = -Box;
X1 = Box;
Y0 = -Box;
Y1 = Box;
Z0 = -Box;
Z1 = Box;
pp = newp;
Point(pp) = {X0, Y0, Z0, blc};
Point(pp+1) = {X1, Y0, Z0, blc};
Point(pp+2) = {X1, Y1, Z0, blc};
Point(pp+3) = {X0, Y1, Z0, blc};
lv = newl;
Line(lv) = {pp,pp+1};
Line(lv+1) = {pp+1,pp+2};
Line(lv+2) = {pp+2,pp+3};
Line(lv+3) = {pp+3,pp};
Line Loop(lv+4) = {lv, lv+1, lv+2, lv+3};
bs = news;
Plane Surface(bs) = {lv+4};
v[] = Extrude {0, 0, Z1-Z0} { Surface{bs}; };
/////////////////////////////////////////
// Make a toroid
tpp = newp;
Point(tpp ) = { tx, 0, 0, lc};
Point(tpp+1) = { ts+tx, 0, 0, lc};
Point(tpp+2) = { tx, ts, 0, lc};
Point(tpp+3) = { tx, -ts, 0, lc};
Point(tpp+4) = {-ts+tx, 0, 0, lc};
cc = newc;
Circle(cc ) = {tpp+1, tpp, tpp+2};
Circle(cc+1) = {tpp+2, tpp, tpp+4};
Circle(cc+2) = {tpp+4, tpp, tpp+3};
Circle(cc+3) = {tpp+3, tpp, tpp+1};
ll = newll;
Line Loop(ll) = {cc, cc+1, cc+2, cc+3};
rs = news;
ps = news;
Plane Surface(ps) = {ll};
tv1[] = Extrude {{0, 1, 0},{-tl,0,0}, 2*Pi/3} { Surface{ps} ;};
tv2[] = Extrude {{0, 1, 0},{-tl,0,0}, 2*Pi/3} { Surface{tv1[0]};};
tv3[] = Extrude {{0, 1, 0},{-tl,0,0}, 2*Pi/3} { Surface{tv2[0]};};
// Not correct?
Surface{tv1[0]} In Volume{v[1]};
Surface{tv2[0]} In Volume{v[1]};
Surface{tv3[0]} In Volume{v[1]};
Physical Volume(1) = {v[1]};
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20160205/18224743/attachment.html>
More information about the gmsh
mailing list