Three dimensional finite element modeling of smart foam.