Output medium properties (permeability, porosity, ... )

Yes i know. I’ve previously used VTUinterface to create a vtu file with a permeability gradient depth-dependent (y-dependent) using the " data.func_to_m_dim_field " function in a python script like so Heterogeneous material such as position-dependent Youngs modulus - #3 by joergbuchwald. But the thing is I tried to change the script so it can be y-dependent and also MaterialIDs dependent but with no success. That’s why I was trying to find an alternative. But I’m interested if you know how I can do that ?