...
Typically users model such things by creating a boolean operation so that these surfaces never really touch one another, it's either/or and not both at the same time. This can be complicated to set up and nearly impossible when trying to use a simulation like flowing water to do this effect. So in RenderMan you can add an attribute to the shape called Intersection Priority. It's a simple number to specify priority where lower higher numbers are higher priority.
...