begun implementation of porosity gradient function