RealFlow | Cinema 4D is able to simulate interactions between different fluids to achieve effects like the separation of water and oil, or sand being washed away by water.

The scene setup follows exactly the same rules as with a single fluid:

 

A typical setup for a water-and-oil simulation.

Checking Links

The most important part is to check the  links between the scene objects:

 

 

Both fluid containers have to be linked to the "Gravity" daemon and the "Collider" tag of the bin.

 

Density & Surface Tension

The fluids' "Density" parameters are the key to oil-water separation or foamy materials:

"Surface Tension" can be used to create bubble-like structures or drops, and create a better, more realistic impression, and slightly higher "Viscosity" for the oil is also helpful.

 

The settings for "Fluid_Oil" with low "Density" and increased "Viscosity". "Surface tension" creates drops.

Alternatives

If the result with  "Liquid - PBD" fluid does not meet your expectations you can also try to redo the simulation with  "Liquid - SPH".

 

Result from the scene above. Water mixes with oil and creates drops during the separation process.