Parametric Building Design - Using SA/V ratio

I am creating a parametric building for energy analysis. I am stuck on how to create a box that changes dimensions when the SA/V ratio is changed. The SA/V ratio is known and the height of the building, z is known. I have tried an expression function and that does not work.