How to parse domain functional instead of Box2D?

Hello all,

I’m modeling Duncan & Toor’s ternary diffusion experiment with Palabos. My question isn’t related to the diffusion, but something more basic: Geometry definition. The geometry of the authors’ experiment is

where they put a mixture of gas 1 and gas 2 on the left bulb and a mixture of gas 2 with gas 3 on the right one, and let them diffuse. The authors then analyze the mole fractions of each component at each bulb at some predetermined times.

I am, at some iteration steps, calculating the average concentration of each species at each bulb, but this function takes as argument a Box2D object. The best possible would be to parse a domain functional representing the circular bulb to the function getAverageDensity, but I can’t see how I can do that.

So, my question is: Is it possible to parse a domain functional to this function? Also, how’s the best way to calculate mole fractions in this case?

Thanks in advance,