A closed-form three scale model for ductile rocks with a plastically compressible porous matrix