Try asking this same question in the "simulation" category. This is the sketching category.
There is an easy way to simulate non-solid materials for the fluid simulation package, I'm not sure if that is also possible with the thermo/stress package; but someone who frequents that category will be able to help you.
If you really need to actually solid model the bubbles, then you would want to create one bubble, then use pattern feature to pattern it to fill an area. Do one pattern to make a 2D array, then do a second pattern to pull that into the 3rd dimension. This will probably not only bring your computer to a slow crawl, but probably take it past the braking point. A much better solution is to just use an analysis that accounts for the holes in the foam.
I've never tried it, but there is a "Move Discussion" option on the right panel of a thread you have started... you could try that rather than re-asking
You can always define your graphite foam part to be "porous media" in Flow. However, if there is no flow through the porous media, I am not sure how the results will turn out. Just set some temperature goals in the graphite foam and see if you obtain a reasonable result.