I need to measure the water depth in the cylinder ( the picture attach) that mixes with air in Ansys CFX, and I don't find an excellent expression to do that.
You can create a line from bottom to the top of the cylinder. Then use the chart visualization: in data series tab -> data source -> location -> select the line; In X axis tab -> variable -> water volume fraction; In Y axis tab -> variable -> Z.
With this chart you can see where in the Z the volume fraction change. You can apply to different line locations.
Hamidreza Razavi But from the provided image this does not look like very much like a flow with a clearly defined free surface? I wonder what causes in your application this rather diffuse mixing of the gaseous and the liquid phase - in particular the remaining liquid phase volume fraction above the green area? Are you sure, that you have a sufficiently converged solution here? Even visually I would do rather hard to determine a location of a "free surface".
One method you can use, extract the volume fractions from ANSYS. Make a simple code (from Python or MATALB) to calculate the liquid volume fraction >0.5. There you can find the height at each location.