Mesh density


I’ve been solving the advection equation on a “donut shaped” domain, but the size of the individual elements seem to vary quite a lot. To make the mesh I wrote this code:

hdonut = 0.025
wp = WorkPlane()
base = wp.Circle(0,0, 1).Circle(0,0, 0.25).Reverse().Face() = “base” = “wall”
geo2 = OCCGeometry(base, dim = 2)
donut = Mesh(geo2.GenerateMesh(maxh = hdonut, quad_dominated = False))

This creates the geometry I want, but it looks like the elements get smaller the further they are from the center. Ideally I’d like to keep the mesh as uniform as possible, but there doesn’t seem to be any way to set the a minimal mesh size.

Is there some easy fix to this, or alternatively could I set the internal node points using numpy arrays and polar coordinate transformations?