The Cahn-Hilliard equation describes phase separation in a binary mixture, typically modeled with a phase variable that represents the concentration of one phase or the concentration difference between the two phases. Though the system is energetically driven toward solutions within the physically meaningful range of the phase variable, numerical methods often struggle to maintain these bounds, leading to physically invalid quantities and numerical difficulties. In this work, we introduce a novel splitting and discretization for the Cahn-Hilliard equation, coupled with the Navier-Stokes equations, which inherently preserves the bounds of the phase variable. This approach transforms the fourth-order Cahn-Hilliard equation into a second-order Helmholtz equation and a second-order nonlinear equation with implicit energy barriers, which is reformulated and solved with a safeguarded optimization-based solution method. Our scheme ensures the phase variable remains in the valid range, robustly handles large density ratios, conserves mass and momentum, maintains consistency between these quantities, and achieves second-order accuracy. We demonstrate the method's effectiveness through a variety of studies of two-dimensional, two-phase fluid mixtures.
Read full abstract