[Gmsh] internal node structure

Trevor Irons trevorirons at gmail.com
Tue Jul 29 23:14:09 CEST 2014


I had not seen tutorial t.15 which includes the 'surface in volume'
command. This is almost exactly what I want! Except...

After mesh generation, when you click 'surface edges' I do not want the
internal surfaces recognized as surfaces.

The reason for this is that I am then exporting this to VTK format and then
a FEM program I have written. And surfaces are recognized as outer solution
space surfaces and have boundary conditions placed on them, which of
course, I do not want applied internally.

Is there a way to scrub the internal `surface' but retain the mesh
structure?


-- Trevor


On 29 July 2014 14:34, Trevor Irons <trevorirons at gmail.com> wrote:

> Greetings. Thanks to everyone for such a quality software project. I have
> a question I have been struggling with for some time, and am not quite sure
> it is even possible. I want to find a way to specify the internal structure
> somewhat explicitly for a mesh.
>
> As an example, I would like to embed a cylinder into a cube. The code
> below does this, but the cylinder and larger bounding box are not
> topologically connected. I instead would like a single mesh structure, but
> internally nodes to be densely located on the cylinder. I realize I could
> sort of do this with attractors, but I want to be able to quite explicitly
> set the internal node location.
>
> If there is an example showing this, I would greatly appreciate it. All I
> really need is some kind of combine function for the currently generated
> meshes.
>
> I saw in the examples t11.geo sort of did this with fields. Is this my
> best bet? I would prefer a more explicit definition than that.
>
> Thanks for any ideas.
>
> ///////////////////////////////////////////////
> // My attempt .geo file
>
> lc = 1e-1; // Target element size
> R = .25;   // Magnet Radius
> D0 = 10;   // Top of magnet
> D1 = 11;   // Bottom of magnet
>
> // Total Solution Space
> X0 = -2.;
> X1 =  2.;
> Y0 = -2.;
> Y1 =  2.;
> Z0 =  9.;
> Z1 = 12.;
>
> ////////////////////////////////////
> // North Pole
>
> Point(0) = { 0, 0, D0, lc};
> Point(1) = { R, 0, D0, lc};
> Point(2) = { 0, R, D0, lc};
> Point(3) = {-R, 0, D0, lc};
>
> // Connect up the points
> Circle(4) = {1, 0, 3};
> Line(5) = {3,1};
> Line Loop(6) = {4,5};
> Plane Surface(7) = {6};
>
> ////////////////////////////////////
> // South Pole
>
> Point(8)  = { 0,  -0.0001, D0, lc};
> Point(9)  = { R,  -0.0001, D0, lc};
> Point(10) = { 0, -R, D0, lc};
> Point(11) = {-R,  -0.0001, D0, lc};
>
> // Connect up the points
> Circle(12) = {11, 8, 9};
> Line(13) = {9, 11};
> Line Loop(14) = {12, 13};
> Plane Surface(15) = {14};
>
> //////////////////////////////////////
> // Extrude
> Extrude {0, 0, D1-D0} { Surface{7};  }
> Extrude {0, 0, D1-D0} { Surface{15}; }
>
> /////////////////////////////////////
> // Large Bounding box
> Point(116)  = {X0, Y0, Z0};
> Point(117)  = {X1, Y0, Z0};
> Point(118)  = {X1, Y1, Z0};
> Point(119)  = {X0, Y1, Z0};
> Line(120) = {116,117};
> Line(121) = {117,118};
> Line(122) = {118,119};
> Line(123) = {119,116};
> Line Loop(124) = {120, 121, 122, 123};
> Plane Surface(125) = {124};
> Extrude {0, 0, Z1-Z0} { Surface{125}; }
>
> //////////////////////////////////////
> // Rings of sensitivity calculation
> //Circle(222) = {2.*1, 0, 2.*2};
>
>
> //////////////////////////////////////
> // Volumes
>
> Physical Volume("plus") = {2};
> Physical Volume("minus") = {1};
> Physical Volume("background") = {3};
> Coherence;
> Coherence;
>
> -- Trevor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20140729/32b19ca5/attachment.html>