trin porosity function to needed calculations only