Dear all,
I am solving a flow in a rectangular domain and I need to compute the mass flux on the mid transverse plane (plane S of the following figure).
Therefore, I need to define a differential of surface such as:
dSurf = Measure("ds", domain=mesh, subdomain_data=ft, subdomain_id=surface_marker)
My problem is that I do not know how to tag that surface, since it is not part of the boundaries set. Therefore, if I use the usual approach, that is:
import numpy as np
surface_marker = 2
surface = []
if rank == 0:
boundaries = gmsh.model.getBoundary(volumes, oriented=False)
for boundary in boundaries:
center_of_mass = gmsh.model.occ.getCenterOfMass(boundary[0], boundary[1])
if np.allclose(center_of_mass, [0, 0, 0]):
surface.append(boundary[1])
the mass flux is always zero because there is not any real boundary at [0,0,0].
Does anybody know how to tag surfaces in dolfinx that are not part of the boundaries set?
Thanks in advance.