Modelling and prediction of foam structure