Depending on the method of "insertion" (sprayed foam that expands and fills the cavity, cut blocks "stuffed" in, etc.), I would think the results would depend dramatically on the adherence to the structure. Seems like it would also have much to do with the density of the foam.
If it isn't bonded to the structure, I would agree with Greg's local panel mode. If it is bonded, I would think it might turn the structure into a sandwich composite unless the cavity is particularly large...then I think you are back to the local panel mode.