Discussion:
[Gmsh] Merging Surfaces
Mike B.
2009-08-05 10:15:19 UTC
Permalink
Dear All,

I generate a set of surfaces (patches) which together define a closed shell and then use a surface loop to define the closed shell.

Meshing this setup creates a separate mesh for each surface (patch). How can I make Gmsh:
a)  `glue' all these `patches' together and treat them as a single surface?
b) following a), create a single mesh covering the entire closed shell?. Currently, since Gmsh treats each patch seperately and does not `see' the full shell if I want to refine the mesh I must set the element size to be smaller then the sides of the patches, but it should relate to the sides of  the entire shell.

Cheers and thanks,
Mike.
Mark van Doesburg
2009-08-05 10:31:53 UTC
Permalink
Hello Mike,

If you're using an iges file, you can set "Cut and merge" in the general
options of the geometry. It is buggy and painfully slow, however. It
is my intention to re-write this from scratch without OCC, but only for
straight lines.

regards,

Mark.

"Mike B." <***@yahoo.com> wrote:

Dear All,

I generate a set of surfaces (patches) which together define a closed shell and then use a surface loop to define the closed shell.

Meshing this setup creates a separate mesh for each surface (patch). How can I make Gmsh:
a)  `glue' all these `patches' together and treat them as a single surface?
b) following a), create a single mesh covering the entire closed shell?. Currently, since Gmsh treats each patch seperately and does not `see' the full shell if I want to refine the mesh I must set the element size to be smaller then the sides of the patches, but it should relate to the sides of  the entire shell.

Cheers and thanks,
Mike.
Mike B.
2009-08-05 11:00:51 UTC
Permalink
To clarify my previous message, I build the each surface (patch) going from points->lines->line loops->Plane Surface or Ruled Surface. I am not merging STL or IGES files.

Cheers and thanks,

Mike.
Mark van Doesburg
2009-08-05 11:18:37 UTC
Permalink
Hello Mike,


To clarify my previous message, I build the each surface (patch)
going from points->lines->line loops->Plane Surface or Ruled
Surface. I am not merging STL or IGES files.

In that case you have to define the areas where you want the meshes
to touch as a single surface. This same surface should be used in both
surface loops. For example, if you have a small and a large box and want
them to touch at one side, you have to:

1. Define the line loop for the small surface.
2. Define a plane surface for the loop in 1. Use this surface in the
surface loop of the small cube.
3. Define a line loop for the large surface.
4. Create a plane surface with the loop from 3 as the outline, and the
line loop from 2 as a hole.
5. Use the surfaces from 4 and 2 in the surface loop for the large cube.

regards,

Mark.
Adam Zabriskie
2009-08-05 15:37:15 UTC
Permalink
Hello Mike,

I don't know if this is what you want, but physical surfaces and volumes is
what I use to tell Gmsh that multiple surfaces should be treated as one. An
example will probably show better what I mean. I have a channel with
multiple Ruled Surfaces making up the sides of the channel, but I want the
all the sides to be treated as one wall in OpenFOAM. So I specify one
physical surface containing each of the Ruled surfaces. I also specify all
of the volumes inside the channel as one physical volume. I have found if I
don't do this then OpenFOAM generates a surface cutting my channel and
preventing flow through it. I don't know if this example will help since it
sounds like you want Gmsh to ignore the lines between surfaces instead of
creating nodes along the line, which is what it does when meshing 1D.
Physical Surfaces do not make Gmsh ignore the lines used to create the
surfaces. I hope this helps.

Adam Z.
Post by Mike B.
To clarify my previous message, I build the each surface (patch) going from
points->lines->line loops->Plane Surface or Ruled Surface. I am not merging
STL or IGES files.
Cheers and thanks,
Mike.
_______________________________________________
gmsh mailing list
http://www.geuz.org/mailman/listinfo/gmsh
David Colignon
2009-08-05 17:54:56 UTC
Permalink
Post by Mike B.
Dear All,
I generate a set of surfaces (patches) which together define a closed
shell and then use a surface loop to define the closed shell.
a) `glue' all these `patches' together and treat them as a single surface?
Hi Mike,

AFAIK, it is not possible in Gmsh.

Cheers,

Dave

--
David Colignon, Ph.D.
Collaborateur Logistique du F.R.S.-FNRS
CÉCI - Consortium des Équipements de Calcul Intensif
ACE - Applied & Computational Electromagnetics
Institut Montefiore B28
Université de Liège
4000 Liège - BELGIQUE
Tél: +32 (0)4 366 37 32
Fax: +32 (0)4 366 29 10
WWW: http://hpc.montefiore.ulg.ac.be/
Agenda: http://www.google.com/calendar/embed?src=david.colignon%40gmail.com
Post by Mike B.
b) following a), create a single mesh covering the entire closed shell?.
Currently, since Gmsh treats each patch seperately and does not `see'
the full shell if I want to refine the mesh I must set the element size
to be smaller then the sides of the patches, but it should relate to the
sides of the entire shell.
Cheers and thanks,
Mike.
------------------------------------------------------------------------
_______________________________________________
gmsh mailing list
http://www.geuz.org/mailman/listinfo/gmsh
Jean-Francois Remacle
2009-08-07 06:49:05 UTC
Permalink
Post by David Colignon
Post by Mike B.
Dear All,
I generate a set of surfaces (patches) which together define a
closed shell and then use a surface loop to define the closed shell.
Meshing this setup creates a separate mesh for each surface
a) `glue' all these `patches' together and treat them as a single surface?
Hi Mike,
AFAIK, it is not possible in Gmsh.
There is a new experimental feature in GMSH called compound surfaces.

I you aim at meshing together patches 10 and 11, add to your file

Compound Surface(1000) = {10,11} Boundary {{},{},{},{}};

The syntax is still flaky, yet it should produce both a mesh for your
patches and for the compound (use gmsh -saveall in order to have
all the elements in the final file).

Here is a small example of a multiple patch reparametrization.

Not that the stuff works also for edges and volumes.

JFR

Compound edges exist too !

Loading...