reset reset aprepro #{rw = 60} # rectangle width #{rh = 30} # rectangle height #{cr = 0.5} # circle radius #{frw = 0.0} # fraction of rectangle width to which to move circle left from center of rectangle #{sz = 0.75} # mesh size, relative to some unknown nominal resolution; play with it! create surface rectangle width {rw/2} height {rh} zplane #{Rect = Id("surface")} create surface circle radius {cr} zplane #{Circ = Id("surface")} move Surface {Circ} x {-frw*rw} include_merged subtract volume {Circ} from volume {Rect} #{CylinderChannel = Id("surface")} surface {CylinderChannel} sizing function skeleton scale {sz} time_accuracy_level 3 surface {CylinderChannel} Scheme hole rad_intervals 32 bias -3 mesh surface {CylinderChannel} #surface {CylinderChannel} smooth scheme laplacian #smooth surface {CylinderChannel} create surface rectangle width {rw/2} height {rh} zplane #{RightChannel = Id("surface")} move Surface {RightChannel} x {rw/2} include_merged merge all imprint all surface {RightChannel} size auto factor 4 surface {RightChannel} Scheme map mesh surface {RightChannel} merge all imprint all block 1 surface {CylinderChannel} {RightChannel} block 1 element type QUAD Sideset 1 add curve 1,7 # top Sideset 2 add curve 10 # right Sideset 3 add curve 3,9 # bottom Sideset 4 add curve 2 # left Sideset 5 add curve 6 # circle