[Gmsh] Remeshing of deformed meshes and tracking of subdomains

2020-05-29 Thread Tim Furlan

Dear gmsh users and developers,

i am dealing with high-deformation FEM simulations involving contact. I 
would like to replace the deformed mesh with a new one after a certain 
number of steps (potentially many times during one simulation). I use 
Abaqus as the FEM solver if it matters, and use the python api of gmsh.


For the remeshing, i create geometrical surfaces for all faces of my 
elements on the boundary of the domain. This means also creating lines 
for all element edges and keeping track of them, since they might occur 
more than once and with different directions.


I need to track certain subdomains (e.g. parts of the surface) to impose 
the boundary conditions, and the solution i came up with is to compound 
the corresponding surface faces and their respective boundaries (to 
allow both refinement and coarsening). To do this, i need to split the 
boundaries of the subdomains in a lot of segments (so that they end when 
a domain ends).


Tracking the subdomains only through physical tags seems unfeasible 
since the subdomain boundaries are then only preserved inaccurately.


I feel that i might be missing an easier way to do what i want. I looked 
into the tutorials and found the following options:


- The createGeometry() command is able to create geometry from a mesh 
(basically doing what i do by hand i guess?). However, i did not find an 
easy way to track boundary conditions using this, as i can not rely on 
identifying them by feature angles. Is there any way to obtain the 
elements the resulting entities are derived from?


- The tutorial on meshing of discrete curves looks like it follows a 
similar approach. However, i was unable to extend this approach to 3d 
surfaces. Is it possible to define discrete entities for the different 
parts of the body surface i want to remesh instead of using compounds? I 
was especially confused with how to handle e.g. element edges that 
belong to multiple surface parts.


I would appreciate any input on a more elegant/efficient way to solve 
the problem.



Kind regard and thanks in advance

Tim




___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] Remeshing of deformed meshes and tracking of subdomains

2020-05-29 Thread Tim Furlan
Dear gmsh users and developers,

i am dealing with high-deformation FEM simulations involving contact. I
would like to replace the deformed mesh with a new one after a certain
number of steps (potentially many times during one simulation). I use
Abaqus as the FEM solver if it matters, and use the python api of gmsh.

For the remeshing, i create geometrical surfaces for all faces of my
elements on the boundary of the domain. This means also creating lines for
all element edges and keeping track of them, since they might occur more
than once and with different directions.

I need to track certain subdomains (e.g. parts of the surface) to impose
the boundary conditions, and the solution i came up with is to compound
the corresponding surface faces and their respective boundaries (to allow
both refinement and coarsening). To do this, i need to split the
boundaries of the subdomains in a lot of segments (so that they end when a
domain ends).

Tracking the subdomains only through physical tags seems unfeasible since
the subdomain boundaries are then only preserved inaccurately.

I feel that i might be missing an easier way to do what i want. I looked
into the tutorials and found the following options:

- The createGeometry() command is able to create geometry from a mesh
(basically doing what i do by hand i guess?). However, i did not find an
easy way to track boundary conditions using this, as i can not rely on
identifying them by feature angles. Is there any way to obtain the
elements the resulting entities are derived from?

- The tutorial on meshing of discrete curves looks like it follows a
similar approach. However, i was unable to extend this approach to 3d
surfaces. Is it possible to define discrete entities for the different
parts of the body surface i want to remesh instead of using compounds? I
was especially confused with how to handle e.g. element edges that belong
to multiple surface parts.

I would appreciate any input on a more elegant/efficient way to solve the
problem.


Kind regard and thanks in advance

Tim


___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Remeshing of deformed meshes and tracking of subdomains

2020-05-30 Thread Christophe Geuzaine

Hi Tim,

> On 29 May 2020, at 17:30, Tim Furlan  wrote:
> 
> Dear gmsh users and developers,
> 
> i am dealing with high-deformation FEM simulations involving contact. I would 
> like to replace the deformed mesh with a new one after a certain number of 
> steps (potentially many times during one simulation). I use Abaqus as the FEM 
> solver if it matters, and use the python api of gmsh.
> 
> For the remeshing, i create geometrical surfaces for all faces of my elements 
> on the boundary of the domain. This means also creating lines for all element 
> edges and keeping track of them, since they might occur more than once and 
> with different directions.
> 
> I need to track certain subdomains (e.g. parts of the surface) to impose the 
> boundary conditions, and the solution i came up with is to compound the 
> corresponding surface faces and their respective boundaries (to allow both 
> refinement and coarsening). To do this, i need to split the boundaries of the 
> subdomains in a lot of segments (so that they end when a domain ends).
> 
> Tracking the subdomains only through physical tags seems unfeasible since the 
> subdomain boundaries are then only preserved inaccurately.
> 

It's indeed a "classical" problem. I don't think there's a definitive answer 
about whether it's better to change/reconstruct the CAD and/or 
deform/untangle/adapt the mesh.

> I feel that i might be missing an easier way to do what i want. I looked into 
> the tutorials and found the following options:
> 
> - The createGeometry() command is able to create geometry from a mesh 
> (basically doing what i do by hand i guess?). However, i did not find an easy 
> way to track boundary conditions using this, as i can not rely on identifying 
> them by feature angles. Is there any way to obtain the elements the resulting 
> entities are derived from?
> 
> - The tutorial on meshing of discrete curves looks like it follows a similar 
> approach. However, i was unable to extend this approach to 3d surfaces. Is it 
> possible to define discrete entities for the different parts of the body 
> surface i want to remesh instead of using compounds? I was especially 
> confused with how to handle e.g. element edges that belong to multiple 
> surface parts.
> 

You should be able to do this indeed, i.e. define discrete surfaces after 
deformation and remesh those.  Maybe send a small example?

It might be better to open an issue on the gitlab for this, so that we can 
track progress.

Christophe


> I would appreciate any input on a more elegant/efficient way to solve the 
> problem.
> 
> 
> Kind regard and thanks in advance
> 
> Tim
> 
> 
> 
> 
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine




___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh