Let's do some maths
Let's say we want to completely contain the pressure wave within the can so by the time the BB exits there is zero difference in air pressure inside and outside the can, meaning the ideal air volume in the can plus the volume of the barrel should roughly equal cylinder volume:
Vcan + Vbarrel = Vcylinder
The typical cylinder volume is what, ⌀ 24 mm x 50 mm? or ~22.62 cm3, if this is 3/4 ported it becomes ~17 cm3
If my barrel is a 270 mm barrel, ⌀ 6 mm x 270 mm is about 7.63 cm3 (so the ratio is about 2.23 it seems but this is irrelevant)
That gives me about say 9.4 cm3 of air that needs to be diffused inside the can
Assume we are using a replica of a 556 can with an external size of say ⌀ 38 mm x 157 mm, subtracting the body thickness and a layer of butyl tape lining of say 2 mm and fittings etc we have an internal volume of say ⌀ 32 mm x 110 mm or thereabout or 88.47 cm3 of total space inside
Of course we need to leave a clear corridor for the BB to go though and it cannot be so tight, if it is ⌀ 10 mm x 110 mm this is 8.64 cm3 out of the 88.47 cm3 that needs to be kept clear, giving us say 80 cm3 of diffusion zone available
But this BB clear corridor should also be included in the Vcan so this ⌀ 10 mm x 157 mm or 12.33 cm3 is already bigger than the 9.4 cm3 volume we need to normalise
That means, the foam fill material within the 80 cm3 diffusion zone is really just handling impulse pressures
And if we sketch out the wavefronts we can see most pressure is probably in the beginning 1/3 portion of the can, accordingly we can use a dense mesh here, and use a more open mesh in the later 2/3