How to define a complex subdomain easily?

Hello,
I wonder, how to define a complex subdomain easily? Say, I have an airfoil inside a rectangle, and I like to define no slip condition on the airfoil. Assume, I have this domain:

“”"
from mshr import *

box = Rectangle( Point(0, 0), Point(X,Y) )
air = Polygon( [Point(x0,y0), Point(x1,y1), … Point(x0,y0)] )
domain = box-air
“”"

I think, defining subdomain with “near(x[0], X), … etc” won’t work for a complex shape, right?

Thanks for the clue.
Suess

You should use Gmsh for complex geometries, as mshr is no longer maintained.

2 Likes

I see, thank you Dokken.