CASL-HJX is a high-performance C++ framework for solving deterministic and stochastic Hamilton-Jacobi equations in two spatial dimensions. It integrates operator-splitting techniques with implicit treatment of parabolic terms, yielding substantial speedups over explicit methods commonly used for stochastic problems. The solver leverages monotone schemes to ensure convergence to viscosity solutions, for which we provide numerical evidence through systematic validation. The Hamilton-Jacobi-Bellman formulation enables global optimization beyond local methods. This performance advantage opens the door to applications that were previously intractable, including real-time control and rapid design iteration. We demonstrate the framework's capabilities on benchmark PDEs as well as a neuroscience case study designing energy-efficient controllers for neural populations. The modular architecture allows users to define custom Hamiltonians and boundary conditions, making CASL-HJX broadly applicable to optimal control, front propagation, and uncertainty quantification across finance, engineering, and machine learning. Although currently limited to two spatial dimensions, CASL-HJX addresses critical gaps where gradient-based methods struggle in non-convex landscapes and local optimization yields suboptimal results. Complete source code, documentation, and examples are freely available.
Level-set methods provide a powerful computational framework for simulating free boundary problems in materials science. This paper presents a unified perspective on their application to two distinct phenomena: multicomponent alloy solidification and epitaxial island growth. Although these problems differ significantly in physical mechanisms and characteristic length scales, they can both be effectively addressed within the level-set framework, highlighting the versatility of the method across diverse applications. We outline the mathematical formulations and highlight computational advances and common features across applications. This overview highlights the role of level-set methods as a foundational tool in predictive materials modeling.
We present a sharp finite-volume framework on adaptive Cartesian grids for the time-dependent advection-diffusion-reaction equation on irregular compound domains whose piecewise smooth boundaries may contain kinks and carry segmentwise Robin data. The framework combines kink-aware boundary treatment, second-order gradient recovery on compound interfaces, and semi-Lagrangian transport within a single solver. Advective fluxes are absorbed into the right-hand side, reducing each implicit time step to a Poisson-type solve with modified diagonal, while characteristic backtraces that exit the domain are handled through a PDE-based extrapolation procedure designed for interfaces with kinks. Two finite-volume formulations are considered: a symmetric scheme that produces second-order accurate solutions with first-order accurate gradients and yields a symmetric linear system at every time step, and a nonsymmetric superconvergent scheme that produces second-order accurate solutions and gradients, measured in the (L^\infty)-norm. Backward Euler and BDF2 time integration strategies are supported, and the temporal accuracy of the semi-Lagrangian backtrace is verified against standard characteristic-Galerkin error estimates. Numerical experiments in two and three spatial dimensions confirm second-order convergence across a progression of test geometries of increasing complexity, including compound domains assembled by Boolean operations and configurations with up to eight kinks. The present work extends compound-domain Robin solvers on piecewise smooth embedded boundaries to the full time-dependent advection-diffusion-reaction equation while retaining second-order accurate gradients in both two and three spatial dimensions.
This study develops an event-based, energy-efficient control strategy for desynchronizing coupled neuronal networks using optimal control theory. Inspired by phase resetting techniques in Parkinson’s disease treatment, we incorporate stochasticity of the system’s dynamics into deterministic models to address neural system intrinsic noise. We use an advanced computational solver for nonlinear stochastic partial differential equations to solve the stochastic Hamilton–Jacobi–Bellman equation via level set methods for a single neuron model; this allows us to find control inputs which drive the dynamics close to the system’s phaseless set. When applied to coupled neuronal networks, these inputs achieve effective randomization of neuronal spike timing, leading to significant network desynchronization. Compared to its deterministic counterpart, our stochastic method can achieve considerable energy savings. The event-based control minimizes unnecessary charge transfer, potentially extending implanted stimulator battery life while maintaining robustness against variations in neuronal coupling strengths and network heterogeneities. These findings highlight the potential for developing energy-efficient neurostimulation techniques with implications for deep brain stimulation protocols. The presented computational framework could also be applied to other domains for which stochastic optimal control problems are prevalent.
Experiments have shown that surfactant introduced to a liquid-filled maze can find the solution path. We reveal how the maze-solving dynamics arise from interactions between the added surfactant and endogenous surfactant present at the liquid surface. We simulate the dynamics using a nonlinear model solved with a discrete mimetic scheme on a graph. Endogenous surfactant transforms local spreading into a non-local problem with an omniscient view of the maze geometry, key to the maze-solving dynamics. Our results offer insight into surfactant-driven transport in complex networks such as lung airways.
We consider the inverse problem of finding guiding pattern shapes that result in desired self-assembly morphologies of block copolymer melts. Specifically, we model polymer self-assembly using the self-consistent field theory and derive, in a non-parametric setting, the sensitivity of the dissimilarity between the desired and the actual morphologies to arbitrary perturbations in the guiding pattern shape. The sensitivity is then used for the optimization of the confining pattern shapes such that the dissimilarity between the desired and the actual morphologies is minimized. The efficiency and robustness of the proposed gradient-based algorithm are demonstrated in a number of examples related to templating vertical interconnect accesses (VIA).
Recognising that surfactants can impede the drag reduction resulting from superhydrophobic surfaces (SHSs), we investigate the impact of spatio-temporal fluctuations in surfactant concentration on the drag-reduction properties of SHSs. We model the unsteady transport of soluble surfactant in a channel flow bounded by two SHSs. The flow is laminar, pressure-driven, and the SHSs are periodic in the streamwise and spanwise directions. We assume that the channel length is much longer than the streamwise period, the streamwise period is much longer than the channel height and spanwise period, and bulk diffusion is sufficiently strong for cross-channel concentration gradients to be small. By combining long-wave and homogenisation theories, we derive an unsteady advection-diffusion equation for surfactant-flux transport over the length of the channel, which is coupled to a quasi-steady advection-diffusion equation for surfactant transport over individual plastrons. As diffusion over the length of the channel is typically small, the surfactant flux is governed by a nonlinear wave equation. In the fundamental case of the transport of a bolus of surfactant, we predict its propagation speed and describe its nonlinear evolution via interaction with the SHS. The propagation speed can fall below the average streamwise velocity as the surfactant adsorbs and rigidifies the plastrons. Smaller concentrations of surfactant are advected faster than larger ones, so that wave-steepening effects can lead to shock formation in the surfactant-flux distribution. Our asymptotic results reveal how unsteady surfactant transport can affect the spatio-temporal evolution of the slip velocity, drag reduction and effective slip length in SHS channels.
We propose a data-driven mean-curvature solver for the level-set method. This work is the natural extension to R3 of our two-dimensional error-correcting strategy presented in Larios-Cárdenas and Gibou (October 2022) [1] and the hybrid inference system of Larios-Cárdenas and Gibou (August 2022) [2]. However, in contrast to [1], [2], which built resolution-dependent dictionaries of curvature neural networks, here we develop a single pair of neural models in R3, regardless of the mesh size. The core of our system comprises two feedforward neural networks. These models ingest preprocessed level-set, gradient, and curvature information to fix numerical mean-curvature approximations for selected nodes along the interface. To reduce the problem's complexity, we have used the local Gaussian curvature κG to classify stencils and fit these networks separately to non-saddle (where κG⪆0) and saddle (where κG⪅0) input patterns. The Gaussian curvature is essential for enhancing generalization and simplifying neural network design. For example, non-saddle stencils are easier to handle because they exhibit a mean-curvature error distribution characterized by monotonicity and symmetry. While the latter has allowed us to train only on half the mean-curvature spectrum, the former has helped us blend the machine-learning-corrected output and the baseline estimation seamlessly around near-flat regions. On the other hand, the saddle-pattern error structure is less clear; thus, we have exploited no latent characteristics beyond what is known. Such a stencil distinction makes learning-tuple generation in R3 quite involving. In this regard, we have trained our models on not only spherical but also sinusoidal and hyperbolic paraboloidal patches at various configurations. Our approach to building their data sets is systematic but gleans samples randomly while ensuring well-balancedness. Furthermore, we have resorted to standardization and dimensionality reduction as a preprocessing step and integrated layer-wise regularization to minimize outlying effects. In addition, our strategy leverages mean-curvature rotation and reflection invariance to improve stability and precision at inference time. The synergy among all these features has led to a performant mean-curvature solver that works for any grid resolution. Experiments with several interfaces confirm that our proposed system can yield more accurate mean-curvature estimations in the L1 and L∞ norms than modern particle-based interface reconstruction and level-set schemes around under-resolved regions. Although there is ample room for improvement, this research already shows the potential of machine learning to remedy geometrical problems in well-established numerical methods. Our neural networks are available online at https://github.com/UCSB-CASL/Curvature_ECNet_3D.
Superhydrophobic surfaces (SHSs) can reduce the friction drag in turbulent flows. In the laminar regime, it has been shown that trace amounts of surfactant can negate this drag reduction, at times rendering these surfaces no better than solid walls (Peaudecerf et al., Proc. Natl. Acad. Sci. USA 114(28), 7254-9, 2017). However, surfactant effects on the drag-reducing properties of SHSs have not yet been studied under turbulent flow conditions, where predicting the effects of surfactant in direct numerical simulations remains expensive by today’s standards. We present a model for turbulent flow inclusive of surfactant, in either a channel or boundary-layer configuration, over long but finite-length streamwise ridges that are periodic in the spanwise direction, with period P and gas fraction ϕ. We adopt a technique based on a shifted log law to acquire an expression for the drag reduction. The average streamwise and spanwise slip lengths are derived by introducing a local laminar model within the viscous sublayer, whereby the effect of surfactant is modelled by modifying the average streamwise and spanwise slip lengths. Our model agrees with available laboratory experimental data from the literature when conditions are clean (surfactant-free), or when there are low surfactant levels. However, we find an appreciable drag increase for larger background surfactant concentrations that are characteristic of turbulent flows over SHSs for marine applications.
Recent experimental and computational investigations have shown that trace amounts of surfactants, unavoidable in practice, can critically impair the drag reduction of superhydrophobic surfaces (SHSs), by inducing Marangoni stresses at the air-liquid interface. However, predictive models for realistic SHS geometries do not yet exist, which has limited the understanding and mitigation of these adverse surfactant effects. To address this issue, we derive a model for laminar, three-dimensional flow over SHS gratings as a function of geometry and soluble surfactant properties, which together encompass 10 dimensionless groups. We establish that the grating length g is the key geometric parameter and predict that the ratio between actual and surfactant-free slip increases with g2. Guided by our model, we perform synergistic numerical simulations and microfluidic experiments, finding good agreement with the theory as we vary surfactant type and SHS geometry. Our model also enables the estimation, based on velocity measurements, of a priori unknown properties of surfactants inherently present in microfluidic systems. For SHSs, we show that surfactant effects can be predicted by a single parameter, representing the ratio between the grating length and the interface length scale beyond which the flow mobilizes the air-water interface. This mobilization length is more sensitive to the surfactant chemistry than to its concentration, such that even trace-level contaminants may significantly increase drag if they are highly surface active. These findings advance the fundamental understanding of realistic interfacial flows and provide practical strategies to maximize superhydrophobic drag reduction.
Although superhydrophobic surfaces (SHSs) show promise for drag reduction applications, their performance can be compromised by traces of surfactant, which generate Marangoni stresses that increase drag. This question is addressed for soluble surfactant in a three-dimensional laminar channel flow, with periodic SHSs made of long finite-length longitudinal grooves located on both walls. We assume that bulk diffusion is sufficiently strong for cross-channel concentration gradients to be small. Exploiting long-wave theory and accounting for the difference between the rapid transverse and slower longitudinal Marangoni flows, we derive a one-dimensional model for surfactant transport from the full three-dimensional transport equations. Our one-dimensional model allows us to predict the drag reduction and surfactant distribution across the parameter space. The system exhibits multiple regimes, involving competition between Marangoni effects, bulk and interfacial diffusion, bulk and interfacial advection, shear dispersion and surfactant exchange between the bulk and the interface. We map out asymptotic regions in the high-dimensional parameter space, and derive explicit closed-form approximations of the drag reduction, without any fitting or empirical parameters. The physics underpinning the drag reduction effect and the negative effect of surfactant is discussed through analysis of the velocity field and surfactant concentrations, which show both uniform and non-uniform stress distributions. Our theoretical predictions of the drag reduction compare well with results from the literature solving numerically the full three-dimensional transport problem. Our atlas of maps provides a comprehensive analytical guide for designing surfactant-contaminated channels with SHSs, to maximise the drag reduction in applications.
We present a computational method for the simulation of the solidification of multicomponent alloys in the sharp-interface limit. Contrary to the case of binary alloys where a fixed point iteration is adequate, we hereby propose a Newton-type approach to solve the non-linear system of coupled PDEs arising from the time discretization of the governing equations, allowing for the first time sharp-interface simulations of the multialloy solidification. A combination of spatially adaptive quadtree grids, Level-Set Method, and sharp-interface numerical methods for imposing boundary conditions is used to accurately and efficiently resolve the complex behavior of the solidification front. The convergence behavior of the Newton-type iteration is theoretically analyzed in a one-dimensional setting and further investigated numerically in multiple spatial dimensions. We validate the overall computational method on the case of axisymmetric radial solidification admitting an analytical solution and show that the overall method's accuracy is close to second order. Finally, we perform numerical experiments for the directional solidification of a Co-Al-W ternary alloy with a phase diagram obtained from the PANDAT™ database and analyze the solutal segregation dependence on the processing conditions and alloy properties.
We present a scalable strategy for development of mesh-free hybrid neuro-symbolic partial differential equation solvers based on existing mesh-based numerical discretization methods. Particularly, this strategy can be used to efficiently train neural network surrogate models of partial differential equations by (i) leveraging the accuracy and convergence properties of advanced numerical methods, solvers, and preconditioners, as well as (ii) better scalability to higher order PDEs by strictly limiting optimization to first order automatic differentiation. The presented neural bootstrapping method (hereby dubbed NBM) is based on evaluation of the finite discretization residuals of the PDE system obtained on implicit Cartesian cells centered on a set of random collocation points with respect to trainable parameters of the neural network. Importantly, the conservation laws and symmetries present in the bootstrapped finite discretization equations inform the neural network about solution regularities within local neighborhoods of training points. We apply NBM to the important class of elliptic problems with jump conditions across irregular interfaces in three spatial dimensions. We show the method is convergent such that model accuracy improves by increasing number of collocation points in the domain and predonditioning the residuals. We show NBM is competitive in terms of memory and training speed with other PINN-type frameworks. The algorithms presented here are implemented using \texttt{JAX} in a software package named \texttt{JAX-DIPS} (https://github.com/JAX-DIPS/JAX-DIPS), standing for differentiable interfacial PDE solver. We open sourced \texttt{JAX-DIPS} to facilitate research into use of differentiable algorithms for developing hybrid PDE solvers.
Aquaporins provide a unique approach for imaging genetic activity in deep tissues by increasing the rate of cellular water diffusion, which generates a magnetic resonance contrast. However, distinguishing aquaporin signals from the tissue background is challenging because water diffusion is influenced by structural factors, such as cell size and packing density. Here, we developed a Monte Carlo model to analyze how cell radius and intracellular volume fraction quantitatively affect aquaporin signals. We demonstrated that a differential imaging approach based on subtracting signals at two diffusion times can improve specificity by unambiguously isolating aquaporin signals from the tissue background. We further used Monte Carlo simulations to analyze the connection between diffusivity and the percentage of cells engineered to express aquaporin and established a mapping that accurately determined the volume fraction of aquaporin-expressing cells in mixed populations. The quantitative framework developed in this study will enable a broad range of applications in biomedical synthetic biology, requiring the use of aquaporins to noninvasively monitor the location and function of genetically engineered devices in live animals.
We present a numerical method for the solution of interfacial growth governed by the Stefan model coupled with incompressible fluid flow. An algorithm is presented which takes special care to enforce sharp interfacial conditions on the temperature, the flow velocity and pressure, and the interfacial velocity. The approach utilizes level-set methods for sharp and implicit interface tracking, hybrid finite-difference/finite-volume discretizations on adaptive quadtree grids, and a pressure-free projection method for the solution of the incompressible Navier-Stokes equations. The method is first verified with numerical convergence tests using a synthetic solution. Then, computational studies of ice formation on a cylinder in crossflow are performed and provide good quantitative agreement with existing experimental results, reproducing qualitative phenomena that have been observed in past experiments. Finally, we investigate the role of varying Reynolds and Stefan numbers on the emerging interface morphologies and provide new insights around the time evolution of local and average heat transfer at the interface.
We present an error-neural-modeling-based strategy for approximating two-dimensional curvature in the level-set method. Our main contribution is a redesigned hybrid solver [Larios-Cárdenas and Gibou, J. Comput. Phys. (May 2022), 10.1016/j.jcp.2022.111291] that relies on numerical schemes to enable machine-learning operations on demand. In particular, our routine features double predicting to harness curvature symmetry invariance in favor of precision and stability. The core of this solver is a multilayer perceptron trained on circular- and sinusoidal-interface samples. Its role is to quantify the error in numerical curvature approximations and emit corrected estimates for select grid vertices along the free boundary. These corrections arise in response to preprocessed context level-set, curvature, and gradient data. To promote neural capacity, we have adopted sample negative-curvature normalization, reorientation, and reflection-based augmentation. In the same manner, our system incorporates dimensionality reduction, well-balancedness, and regularization to minimize outlying effects. Our training approach is likewise scalable across mesh sizes. For this purpose, we have introduced dimensionless parametrization and probabilistic subsampling during data production. Together, all these elements have improved the accuracy and efficiency of curvature calculations around under-resolved regions. In most experiments, our strategy has outperformed the numerical baseline at twice the number of redistancing steps while requiring only a fraction of the cost.
We present a machine learning framework that blends image super-resolution technologies with passive, scalar transport in the level-set method. Here, we investigate whether we can compute on-the-fly, data-driven corrections to minimize numerical viscosity in the coarse-mesh evolution of an interface. The proposed system's starting point is the semi-Lagrangian formulation. And, to reduce numerical dissipation, we introduce an error-quantifying multilayer perceptron. The role of this neural network is to improve the numerically estimated surface trajectory. To do so, it processes localized level-set, velocity, and positional data in a single time frame for select vertices near the moving front. Our main contribution is thus a novel machine-learning-augmented transport algorithm that operates alongside selective redistancing and alternates with conventional advection to keep the adjusted interface trajectory smooth. Consequently, our procedure is more efficient than full-scan convolutional-based applications because it concentrates computational effort only around the free boundary. Also, we show through various tests that our strategy is effective at counteracting both numerical diffusion and mass loss. In simple advection problems, for example, our method can achieve the same precision as the baseline scheme at twice the resolution but at a fraction of the cost. Similarly, our hybrid technique can produce feasible solidification fronts for crystallization processes. On the other hand, tangential shear flows and highly deforming simulations can precipitate bias artifacts and inference deterioration. Likewise, stringent design velocity constraints can limit our solver's application to problems involving rapid interface changes. In the latter cases, we have identified several opportunities to enhance robustness without forgoing our approach's basic concept.
We present a highly scalable strategy for developing mesh-free neuro-symbolic partial differential equation solvers from existing numerical discretizations found in scientific computing. This strategy is unique in that it can be used to efficiently train neural network surrogate models for the solution functions and the differential operators, while retaining the accuracy and convergence properties of state-of-the-art numerical solvers. This neural bootstrapping method is based on minimizing residuals of discretized differential systems on a set of random collocation points with respect to the trainable parameters of the neural network, achieving unprecedented resolution and optimal scaling for solving physical and biological systems.