Dear Rob and dear DrAmine, thank you very much for your comments. However, as I mentioned above, I want to use the maximum value (for every fixed x) as a condition for every time step. The specific application is shown in the attached figure: there three types of gas interface:
bulk gas-powder interface
enclosed gas-powder interface
enclosed gas-solid wall interface
I want to loop the multiphase zone to find out 1. bulk gas-powder interface, where I give a source there. for the other twos, no source terms will be added. My idea is to loop every fixed coordinate (fixed x, y) of interface coordinate, and then find out the max. fixed x/y , which is the value I really want. Could you give me some suggestions? Thank you again for your kind help. I am looking forward to your reply.