# [Gmsh] Bisecting Subdomains of Imported Geometry/Mesh

Andress randalandress1507 at comcast.net
Fri Apr 24 06:49:45 CEST 2020

```Background

I am doing Finite Element Analysis to study the flow of electric current in persons and animals due to stray electric current in bodies of water. I am using FEAtool(a MATLAB plugin) which employs gmsh to generate grids from geometries.

Part of my analysis involves the calculation of the total current through (perpendicular to) the cross section of a sub-domain which is bordered by the intersection of a cut plane and the subdomain surface. This current is the integral of current density over the area of the cross section.

FEAtool does this integration but only over a surface that is a boundary of the subdomain.

Here is an example (See attached illustrations.):

Geometry: a 1m cube (subdomain 2) containing a component (subdomain 1) made of 4 joined cylindrical sections.

Boundaries: 5V/0V on the opposite faces of the cube that are perpendicular to the axes of the cylinders and zero current on the other cube faces.

Solution: current density is plotted and a YZ plane is cut through it in the center (at x = 0.5).

I want to calculate the current flowing through each of the small connecting cylinders by integrating the current density over the two circular, planar intersections of the cut plane and the two small cylinders.

In order to do this wholly within FEAtool, I must create (geometry) the small cylinders so that they are in two pieces and simply share a face/boundary.  That way there is a pre-defined boundary over which FEAtool can do the integration.

Sometimes this is not possible/convenient because the model geometry has been imported and/or is quite complex (such as that of a human body) or because the decision to make such a measurement/cut-plane is made only after the model and mesh is completed and the solution is being examined.

Question

If I export the model geometry and/or the mesh from FEAtool to gmsh can the model/mesh be split by a designated plane within gmsh so that, when exported and imported back into FEAtool, the sub-domains intersected by the plane would have true faces/boundaries so they could be designated in an integration?

If possible, but not required, I would like to be able to designate the sub-domains to be split by the cut plane in gmsh so as to not split a sub-domain over which integration is not needed.

>From the FEAtool perspective, see: http://forum.featool.com/Integration-of-Current-Density-over-Slice-Intersection-td180.html

Kind regards,
Randal

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20200423/9b5bc599/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cylinders-in-box-geometry.jpg
Type: image/jpeg
Size: 161221 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20200423/9b5bc599/attachment-0003.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cylinders-cut-plane-to-integrate.jpg
Type: image/jpeg
Size: 173228 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20200423/9b5bc599/attachment-0004.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cylinders-cut-plane-to-integrate-YZplane at 50cm.jpg
Type: image/jpeg
Size: 150759 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20200423/9b5bc599/attachment-0005.jpg>
```