The computational multiphase flow community has grappled with mass loss in the level set method for decades. Numerous solutions have been proposed, from fixing the reinitialization step to combining the level set method with other conservative schemes. However, our work reveals a more fundamental culprit: the smooth Heaviside and delta functions inherent to the standard formulation. We propose a novel approach using variational analysis to incorporate a mass conservation constraint. It introduces a Lagrange multiplier that enforces overall mass balance. Notably, as the delta function sharpens, i.e., approaches the Dirac delta limit, the Lagrange multiplier approaches zero. However, the exact Lagrange multiplier method disrupts the signed distance property of the level set function. This motivates us to develop an approximate version of the Lagrange multiplier that preserves both overall mass and signed distance property of the level set function. Our framework even recovers existing mass-conserving level set methods, revealing some inconsistencies in prior analyses. We extend this approach to three-phase flows for fluid-structure interaction (FSI) simulations. Rigorous test problems confirm that the FSI dynamics produced by our simple, easy-to-implement immersed formulation with the approximate Lagrange multiplier method are accurate and match state-of-the-art solvers.
Next, we develop a simulation infrastructure to perform fully resolved simulations of wave energy converter (WEC) devices. We use the fictitious domain Brinkman penalization (FD/BP) technique, which is computationally more efficient than the body-conforming grid techniques. Simulating WEC devices involves complex fluid-structure interactions and, if done accurately, can be used to test different types of controllers in a more realistic setting. We simulate the dynamics of an inertial sea wave energy converter (ISWEC) device and a heaving vertical cylinder point absorber device in a numerical wave tank (NWT) for regular and irregular waves. We test various control strategies: proportional-derivative (PD) control, model predictive control (MPC), and model-free reinforcement learning (RL) techniques to optimize the performance of such devices. Results show that the fully resolved multiphase simulations are closer to reality than the predominantly used boundary element method (BEM) based on linear potential flow theory models that overpredict the WEC dynamics.