[Gmsh] help in combining two volumes

Alfred Lu alfredwjlu at gmail.com
Thu May 19 15:51:03 CEST 2011


Dear gmsh list:

Hi, It is my first time to post here. Now I am trying to build a vessel
model with some stenosis in the inner side.

following is my geo code

---
// Gmsh project created on Tue May 17 04:19:43 2011
lc = 0.1;
Point(1) = {0, 0, 0, lc};
Point(2) = {1, 0, 0, lc};
Point(3) = {0, 1, 0, lc};
Point(4) = {-1, 0, 0, lc};
Point(5) = {0, -1, 0, lc};

Point(6) = {1.1, 0, 0, lc};
Point(7) = {0, 1.1, 0, lc};
Point(8) = {-1.1, 0, 0, lc};
Point(9) = {0, -1.1, 0, lc};

Circle(1) = {5, 1, 4};
Circle(2) = {4, 1, 3};
Circle(3) = {3, 1, 2};
Circle(4) = {2, 1, 5};
Circle(5) = {9, 1, 8};
Circle(6) = {8, 1, 7};
Circle(7) = {7, 1, 6};
Circle(8) = {6, 1, 9};

Line Loop(1) = {1, 2, 3, 4};
Plane Surface(1) = {1};

Line Loop(2) = {5, 6, 7, 8};
Plane Surface(2) = {2, 1};

vol1[] = Extrude {0, 0, 10} {
  Surface{1};
};
Printf("vol1 = %g", vol1[1]);

vol2[] = Extrude {0, 0, 10} {
  Surface{2};
};
Printf("vol2 = %g", vol2[1]);

r = 0.2;
p0 = newp; Point(p0) = {0, 1.1, 5, lc};
p1 = newp; Point(p1) = {-r, 1.1, 5, lc};
p2 = newp; Point(p2) = {r, 1.1, 5, lc};
p3 = newp; Point(p3) = {0, 1.1, 5+r, lc};
c1 = newreg; Circle(c1) = {p2, p0, p3};
c2 = newreg; Circle(c2) = {p3, p0, p1};
l1 = newreg; Line(l1) = {p1, p2};
lp0 = newreg;
Line Loop(lp0) = {c1, c2, l1};
s0 = newreg;
Plane Surface(s0) = {lp0};

vol3[] = Extrude {{1, 0, 0}, {1.1, 1.1, 5}, Pi} {
  Surface{77};
};
Printf("vol3 = %g", vol3[1]);

Compound Volume(4) = {vol2[1], vol3[1]};
---

you may notice i use vol3 to simulate the stenosis, vol1 is the tunnel to
let blood go through, vol2 is the wall of the vessel.
*but I don't know how to compound vol3 with vol2, can anyone help me out?
appreciate!!*

*another question: If I try to rotate a surface 360 degree to form a volume
by using extrude command, why I can not see the volume in the window?*

thank you for your help.

Alfred
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20110519/c0ee67cc/attachment.html>