Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Constructing a structured mesh in a complex geometry

Please login with a confirmed email address before reporting spam

Hi,

I have a cantilevered beam that consists of a material sandwich and is also a complex shape, for example a U rather than straight. I am using a coupled multiphysics analysis (Electrostatics, Structural Mechanics and moving frame) to calculate its deflection under an electrostatic force caused by an applied (static) voltage. To calculate the force, I am using Maxwell's stress tensor. I found that the results are very sensitive to the mesh (even for a more straightforward shape), and a free mesh basically seems to give out random results.

Ivar has discussed this issue here: www.comsol.com/community/exchange/71/ and also advocates a structured mesh.

The problem is, it seems to be incredibly difficult to construct a structured mesh for a complex shape (for example consisting of brick elements). The swept mesh feature doesn't seem to work for anything other than a shape bounded by 4 sides, where each side is a simple rectangle. I have trawled through the documentation and a few tutorials but haven't found anything very useful so far. I tried to manually subdivide my structure into sub volumes, but when a domain boundary (between air and my object for example) is a plane that is anything other than a rectangle, it doesn't work. Can anybody suggest anything please, including pointers to good documentation / tutorials?

Thanks in advance.

6 Replies Last Post 05.09.2010, 12:42 GMT-4
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 03.09.2010, 06:02 GMT-4
Hi

its not so limited (and its better in V4) ;) 3D mesh "sweep mesh" has a limit on the topology: no new surfaces along the sweep direction, and on the number of faces at the arrival (only one (if its not the opposite, anyhow the selector does not allow you to choose more than one where it's appropriate) the destination face must have the same topology as the external source face.

But you have also the seep mesh (and revolve) from a 2D structure into a 3D one, not only the mesh sweeping fully in 3D

--
Good luck
Ivar
Hi its not so limited (and its better in V4) ;) 3D mesh "sweep mesh" has a limit on the topology: no new surfaces along the sweep direction, and on the number of faces at the arrival (only one (if its not the opposite, anyhow the selector does not allow you to choose more than one where it's appropriate) the destination face must have the same topology as the external source face. But you have also the seep mesh (and revolve) from a 2D structure into a 3D one, not only the mesh sweeping fully in 3D -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 03.09.2010, 06:52 GMT-4
Hi Ivar,

Many thanks. Could you please elaborate a bit on extruding the geometry and sweeping from 2-D to 3-D?

Here's what I tried. I draw my 3-D structure by first defining a 2-D workplane (call it G2) and then extruding it to 3-D (call it G1). I have attached a screen shot of G1. The big block at the bottom is a substrate, the block above it is air. The coloured U-shaped blocks are various materials, the uncoloured U-block is air. The various sub domains are a misguided attempt to manually divide it into rectangular blocks (cuboids).

Now I tried to extrude the mesh, along with the structure geometry, but I can't figure out how to do it. I basically have to extrude multiple shapes corresponding to the U section, substrate and air that I draw in G2. When I create a rectangular mesh in G2 and extrude it, it creates multiple work planes, with each mesh being in a different work plane. I can't seem to reconcile the workplanes.

Alternately, say I create the bottom U section in G2, define a mesh and extrude the mesh to G1. If I change to draw mode, I see that the geometry boundaries match the mesh. Then, if I try to copy the structure by using the array command, the geometry copies, but not the mesh.

How can I extrude, or sweep or copy the mesh in this kind of exercise?

Even if I have the mesh for all 4 U sections, how do I then generate a mesh for the substrate (which has the bottom plate of the bottom U section on its top boundary) and air (which contains all the U sections) using any of these techniques?

Many thanks, Dinesh
Hi Ivar, Many thanks. Could you please elaborate a bit on extruding the geometry and sweeping from 2-D to 3-D? Here's what I tried. I draw my 3-D structure by first defining a 2-D workplane (call it G2) and then extruding it to 3-D (call it G1). I have attached a screen shot of G1. The big block at the bottom is a substrate, the block above it is air. The coloured U-shaped blocks are various materials, the uncoloured U-block is air. The various sub domains are a misguided attempt to manually divide it into rectangular blocks (cuboids). Now I tried to extrude the mesh, along with the structure geometry, but I can't figure out how to do it. I basically have to extrude multiple shapes corresponding to the U section, substrate and air that I draw in G2. When I create a rectangular mesh in G2 and extrude it, it creates multiple work planes, with each mesh being in a different work plane. I can't seem to reconcile the workplanes. Alternately, say I create the bottom U section in G2, define a mesh and extrude the mesh to G1. If I change to draw mode, I see that the geometry boundaries match the mesh. Then, if I try to copy the structure by using the array command, the geometry copies, but not the mesh. How can I extrude, or sweep or copy the mesh in this kind of exercise? Even if I have the mesh for all 4 U sections, how do I then generate a mesh for the substrate (which has the bottom plate of the bottom U section on its top boundary) and air (which contains all the U sections) using any of these techniques? Many thanks, Dinesh


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 03.09.2010, 07:19 GMT-4
And one more question please on the other part of your earlier response:

"its not so limited (and its better in V4) ;) 3D mesh "sweep mesh" has a limit on the topology: no new surfaces along the seep direction, and on the number of faces at the arrival (only one (if its not the opposite, anyhow the selector does not allow you to choose more than one where it's appropriate) the destination face must have the same topology as the external source face."

In that screen shot, if I try to generate a swept mesh in the substrate by sweeping from the front face to the back, or one side to the other, I get an "invalid topology" error. I can only guess this is because the top surface (which is not the source or destination in the sweep) has a boundary with the U section above it. But you say this should not be a problem?
And one more question please on the other part of your earlier response: "its not so limited (and its better in V4) ;) 3D mesh "sweep mesh" has a limit on the topology: no new surfaces along the seep direction, and on the number of faces at the arrival (only one (if its not the opposite, anyhow the selector does not allow you to choose more than one where it's appropriate) the destination face must have the same topology as the external source face." In that screen shot, if I try to generate a swept mesh in the substrate by sweeping from the front face to the back, or one side to the other, I get an "invalid topology" error. I can only guess this is because the top surface (which is not the source or destination in the sweep) has a boundary with the U section above it. But you say this should not be a problem?

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 04.09.2010, 03:37 GMT-4
Hi

sorry I should have been more precise:

you have the sweep a mesh of a 3D volume, by defining the mesh on a surface (boundary) and "sweep" it trhough the volume more or less normal to the surface.

But you have also the workplane 2D surface you mesh and then you "extrude" or "revolve" the MESH into the 3D (in V3.5 its there, in V4 I'm not sure if it's there yet, I do not have access to my Comsol from here, now).

By the way you can also extrude and revolve (with twist) a surface into a 3D geometry. these functions are handy for more complex geoemtries, that are difficult to define diretly in 3D

--
Good luck
Ivar
Hi sorry I should have been more precise: you have the sweep a mesh of a 3D volume, by defining the mesh on a surface (boundary) and "sweep" it trhough the volume more or less normal to the surface. But you have also the workplane 2D surface you mesh and then you "extrude" or "revolve" the MESH into the 3D (in V3.5 its there, in V4 I'm not sure if it's there yet, I do not have access to my Comsol from here, now). By the way you can also extrude and revolve (with twist) a surface into a 3D geometry. these functions are handy for more complex geoemtries, that are difficult to define diretly in 3D -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 04.09.2010, 04:58 GMT-4
Hi Ivar,

Thanks, but neither of the techniques you mention work for me in 3.5a. Firstly, I cannot sweep the geometry in 3-D normal to the source, even with a single target boundary. If the other defining boundaries are not rectangular surfaces, I get a message saying invalid topology. Its very restrictive.

Secondly, for the reasons I mentioned in my previous post (the second one chronologically), I cannot extrude my mesh either. Essentially, this is because I have to extrude multiple times from 2-D to 3-D to create my full structure. When I extrude a mesh multiple times, I get separate meshes in separate workplanes, not the full consolidated mesh I want.

What am I doing wrong?
Hi Ivar, Thanks, but neither of the techniques you mention work for me in 3.5a. Firstly, I cannot sweep the geometry in 3-D normal to the source, even with a single target boundary. If the other defining boundaries are not rectangular surfaces, I get a message saying invalid topology. Its very restrictive. Secondly, for the reasons I mentioned in my previous post (the second one chronologically), I cannot extrude my mesh either. Essentially, this is because I have to extrude multiple times from 2-D to 3-D to create my full structure. When I extrude a mesh multiple times, I get separate meshes in separate workplanes, not the full consolidated mesh I want. What am I doing wrong?

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 05.09.2010, 12:42 GMT-4
Hi

Most probably you are not doing anything "wrong" it's just that you are hitting some of the limitations in 3D meshing and need to find a way around it. If you sweep a mesh and have a topology change, COMSOL need sto "decide" what to do, at that bifurcation, but it cannot, you must do it explicitely yourself.
The easiest is then really too redesign your volume with internal boundaries such that you have simple topologies, by sections, then you will manage to mesh your structure.

I agree this is rather cumbersome in V3.5 as you cannot save your meshing strategy, to rerun it later, you must note it down, and for complex geometries it can become very lengthy. For that V4 is far better as your sequence is stored and you can come an edit it at will.

Meshing is still somewhat an art, only exercices and detailed analysis of your failures will get you to the "expert" level, just do not give up, you will soon see that yuo "think" the meshing when you construct your models

--
Good luck
Ivar
Hi Most probably you are not doing anything "wrong" it's just that you are hitting some of the limitations in 3D meshing and need to find a way around it. If you sweep a mesh and have a topology change, COMSOL need sto "decide" what to do, at that bifurcation, but it cannot, you must do it explicitely yourself. The easiest is then really too redesign your volume with internal boundaries such that you have simple topologies, by sections, then you will manage to mesh your structure. I agree this is rather cumbersome in V3.5 as you cannot save your meshing strategy, to rerun it later, you must note it down, and for complex geometries it can become very lengthy. For that V4 is far better as your sequence is stored and you can come an edit it at will. Meshing is still somewhat an art, only exercices and detailed analysis of your failures will get you to the "expert" level, just do not give up, you will soon see that yuo "think" the meshing when you construct your models -- Good luck Ivar

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.