Sphere meshing

Dear all,
I have a volume V to be meshed with spheres. This volume must contains spheres having exactly two diameters (D1 and D2) and the following condition must be met:

  • total volume of D1 spheres: 0.15V
    total volume of D2 spheres: 0.20
    V

As far as I know, there’s no way to do this directly in GiD. However, I can modify the .mdpa file (the problem will run in Kratos) with an external script starting from a sphere mesh as close to the final one as I can. I already tried this option and it is working.
The question is: is there any smarter / efficient way to do this?
Thanks in advance,

Massimiliano