Relationship between strength and porosity for coal compacts