Let's suppose that you mean something similar to what @ChetMiller proposed in the comments. That is, a sphere between two place frictionless walls or, equivalently, a sphere with two diametrically opposing force.
If we express this problem in spherical coordinates the stress, strain and displacement are independent of the azimuth. That means that it can be expressed in axisymmetric solid spherical harmonics. The expressions are rather long, so if you are interested you could read reference 1.
Note: A foam is probably not well represented by this model since it will present non-linear behavior. Probably, a hyperelastic behavior comes into place.
References
- Hiramatsu, Y., & Oka, Y. (1966, May). Determination of the tensile strength of rock by a compression test of an irregular test piece. In International Journal of Rock Mechanics and Mining Sciences & Geomechanics Abstracts (Vol. 3, No. 2, pp. 89-90). Pergamon.