We propose a comprehensive immersed boundary-based dynamic contact angle framework capable of handling arbitrary surfaces of mixed wettabilities in three dimensions. We study a number of dynamic contact angle models and implement them as a boundary condition for the Continuum Surface Force method. Special care is taken to capture the contact angle hysteresis by using separate models for the advancing and receding contact lines. The framework is able to account for surfaces of varying wettability by making the contact angle dependent on the local boundary condition.
We validate our framework using cases where glycerol droplets impact solid surfaces at low Weber numbers. We show how a truly dynamic contact angle model is needed for advancing contact lines and how a separate dynamic model is needed for receding contact lines. To test our framework for industrially relevant problems on a more complex surface, we simulate droplet impact on a printed circuit board. We show how the local surface properties control the final droplet deposition and that the framework is capable of handling adjacent surfaces of considerably different wettabilities.