Membrane-based desalination processes, such as reverse osmosis and membrane distillation, have become widely used for water recovery in recent years. However, these processes face challenges such as membrane fouling due to polarization caused by concentration and temperature gradients. In this project, we aimed to address this challenge by using high-fidelity simulations to gain a comprehensive understanding of mass and heat transport in membrane-based desalination systems.