Modeling the failure of magmatic foams with application to Stromboli volcano, Italy