Petr Karnakov
Current Organizations / Institutes
The organizations/institutes from the scholar's latest article
Previous Organizations / Institutes
The organizations / institutes from the scholar's other articles in the past ten years
Petr Karnakov has a total of 31 co-authors. Here are the top co-authors by number of shared publications:
- Petros Koumoutsakos
Harvard University
13 shared publications - Costas Papadimitriou
Department of Mechanical Engineering, University of Thessaly, Volos, Greece
3 shared publications - Georgios Arampatzis
ETH Zurich
3 shared publications Sergey Litvinov
Computational Science and Engineering Laboratory, ETH Zürich, Clausiusstrasse 33, Zürich CH-8092, Switzerland
3 shared publicationsDaniel Wälchli
2 shared publications- Daniel Wälchli
ETH Zurich
2 shared publications
Latest Publications
- 22 January 2026
- Published by Elsevier in Computer Methods in Applied Mechanics and Engineering
- Vol. 452
Reinforcement learning closures for underresolved partial differential equations using synthetic data
- 22 January 2026
- Published by Elsevier in Computer Methods in Applied Mechanics and Engineering
- Vol. 452
Reinforcement learning closures for underresolved partial differential equations using synthetic data
- 30 June 2025
- Published by Cambridge University Press (CUP) in Journal of Fluid Mechanics
- Vol. 1014, A15
Contactless precision steering of particles in a fluid inside a cube with rotating walls
Contactless manipulation of small objects is essential for biomedical and chemical applications, such as cell analysis, assisted fertilisation and precision chemistry. Established methods, including optical, acoustic and magnetic tweezers, are now complemented by flow control techniques that use flow-induced motion to enable precise and versatile manipulation. However, trapping multiple particles in fluid remains a challenge. This study introduces a novel control algorithm capable of steering multiple particles in flow. The system uses rotating disks to generate flow fields that transport particles to precise locations. Disk rotations are governed by a feedback control policy based on the optimising a discrete loss framework, which combines fluid dynamics equations with path objectives into a single loss function. Our experiments, conducted in both simulations and with the physical device, demonstrate the capability of the approach to transport two beads simultaneously to predefined locations, advancing robust contactless particle manipulation for biomedical applications.
- 30 June 2025
- Published by Cambridge University Press (CUP) in Journal of Fluid Mechanics
- Vol. 1014, A15
Contactless precision steering of particles in a fluid inside a cube with rotating walls
Contactless manipulation of small objects is essential for biomedical and chemical applications, such as cell analysis, assisted fertilisation and precision chemistry. Established methods, including optical, acoustic and magnetic tweezers, are now complemented by flow control techniques that use flow-induced motion to enable precise and versatile manipulation. However, trapping multiple particles in fluid remains a challenge. This study introduces a novel control algorithm capable of steering multiple particles in flow. The system uses rotating disks to generate flow fields that transport particles to precise locations. Disk rotations are governed by a feedback control policy based on the optimising a discrete loss framework, which combines fluid dynamics equations with path objectives into a single loss function. Our experiments, conducted in both simulations and with the physical device, demonstrate the capability of the approach to transport two beads simultaneously to predefined locations, advancing robust contactless particle manipulation for biomedical applications.
- Open Access
- 16 June 2025
- Published by American Physical Society (APS) in Physical Review Fluids
- Vol. 10 (8)
Data-driven shape inference in three-dimensional steady-state supersonic flows using ODIL and JAX-Fluids
We present a data- and first-principles-driven method for inferring the shape of a solid obstacle and its flow field in three-dimensional steady-state supersonic flows. The proposed method combines the optimizing a discrete loss (ODIL) technique with the automatically differentiable JAX-Fluids computational fluid dynamics (CFD) solver to study the joint reconstruction of flow fields and obstacle shapes. ODIL minimizes the discrete residual of the governing partial differential equation (PDE) by gradient descent-based algorithms. The ODIL framework inherits the characteristics of the chosen numerical discretization of the underlying PDE, including its consistency and stability. Discrete residuals and their automatic differentiation gradients are computed by the JAX-Fluids solver, which provides nonlinear shock-capturing schemes and level-set-based immersed solid boundaries. We use synthetic data to validate this approach on challenging inverse problems, including the shape inference of a solid obstacle in three-dimensional steady-state supersonic flow. Specifically, we study flows around a cylinder, a sphere, and an ellipse. We investigate two distinct approaches for the obstacle shape representation: (1) , where the obstacle is described by a small set of parameters (e.g., the radius of the cylinder and the sphere) that are optimized together with the flow field, and (2) , where the level-set function is directly optimized at each point of the computational mesh, without relying on predefined shapes. For the former, a thorough comparison with physics-informed neural networks is provided. We show that the nonlinear shock-capturing discretization in combination with the level-set-based interface representation allows for accurate inference of the obstacle shape and its flow field for the ODIL method. The proposed approach opens new avenues for solving complex inverse problems in supersonic aerodynamics.
- 16 June 2025
- Published by American Physical Society (APS) in Physical Review Fluids
- Vol. 10 (8)
Open AccessData-driven shape inference in three-dimensional steady-state supersonic flows using ODIL and JAX-Fluids
We present a data- and first-principles-driven method for inferring the shape of a solid obstacle and its flow field in three-dimensional steady-state supersonic flows. The proposed method combines the optimizing a discrete loss (ODIL) technique with the automatically differentiable JAX-Fluids computational fluid dynamics (CFD) solver to study the joint reconstruction of flow fields and obstacle shapes. ODIL minimizes the discrete residual of the governing partial differential equation (PDE) by gradient descent-based algorithms. The ODIL framework inherits the characteristics of the chosen numerical discretization of the underlying PDE, including its consistency and stability. Discrete residuals and their automatic differentiation gradients are computed by the JAX-Fluids solver, which provides nonlinear shock-capturing schemes and level-set-based immersed solid boundaries. We use synthetic data to validate this approach on challenging inverse problems, including the shape inference of a solid obstacle in three-dimensional steady-state supersonic flow. Specifically, we study flows around a cylinder, a sphere, and an ellipse. We investigate two distinct approaches for the obstacle shape representation: (1) , where the obstacle is described by a small set of parameters (e.g., the radius of the cylinder and the sphere) that are optimized together with the flow field, and (2) , where the level-set function is directly optimized at each point of the computational mesh, without relying on predefined shapes. For the former, a thorough comparison with physics-informed neural networks is provided. We show that the nonlinear shock-capturing discretization in combination with the level-set-based interface representation allows for accurate inference of the obstacle shape and its flow field for the ODIL method. The proposed approach opens new avenues for solving complex inverse problems in supersonic aerodynamics.
- 29 January 2025
- Published by American Physical Society (APS) in Physical Review Letters
- Vol. 134 (4) , 044001
Optimal Navigation in Microfluidics via the Optimization of a Discrete Loss
Optimal path planning and control of microscopic devices navigating in fluid environments is essential for applications ranging from targeted drug delivery to environmental monitoring. These tasks are challenging due to the complexity of microdevice-flow interactions. We introduce a closed-loop control method that optimizes a discrete loss (ODIL) in terms of dynamics and path objectives. In comparison with reinforcement learning, ODIL is more robust, up to 3 orders faster, and excels in high-dimensional action and state spaces, making it a powerful tool for navigating complex flow environments.
- 29 January 2025
- Published by American Physical Society (APS) in Physical Review Letters
- Vol. 134 (4) , 044001
Optimal Navigation in Microfluidics via the Optimization of a Discrete Loss
Optimal path planning and control of microscopic devices navigating in fluid environments is essential for applications ranging from targeted drug delivery to environmental monitoring. These tasks are challenging due to the complexity of microdevice-flow interactions. We introduce a closed-loop control method that optimizes a discrete loss (ODIL) in terms of dynamics and path objectives. In comparison with reinforcement learning, ODIL is more robust, up to 3 orders faster, and excels in high-dimensional action and state spaces, making it a powerful tool for navigating complex flow environments.
- Top Cited PapersOpen Access
- 21 December 2023
- Published by Oxford University Press (OUP) in PNAS Nexus
- Vol. 3 (1) , pgae005
Solving inverse problems in physics by optimizing a discrete loss: Fast and accurate learning without neural networks
In recent years, advances in computing hardware and computational methods have prompted a wealth of activities for solving inverse problems in physics. These problems are often described by systems of partial differential equations (PDEs). The advent of machine learning has reinvigorated the interest in solving inverse problems using neural networks (NNs). In these efforts, the solution of the PDEs is expressed as NNs trained through the minimization of a loss function involving the PDE. Here, we show how to accelerate this approach by five orders of magnitude by deploying, instead of NNs, conventional PDE approximations. The framework of optimizing a discrete loss (ODIL) minimizes a cost function for discrete approximations of the PDEs using gradient-based and Newton’s methods. The framework relies on grid-based discretizations of PDEs and inherits their accuracy, convergence, and conservation properties. The implementation of the method is facilitated by adopting machine-learning tools for automatic differentiation. We also propose a multigrid technique to accelerate the convergence of gradient-based optimizers. We present applications to PDE-constrained optimization, optical flow, system identification, and data assimilation. We compare ODIL with the popular method of physics-informed neural networks and show that it outperforms it by several orders of magnitude in computational speed while having better accuracy and convergence rates. We evaluate ODIL on inverse problems involving linear and nonlinear PDEs including the Navier–Stokes equations for flow reconstruction problems. ODIL bridges numerical methods and machine learning and presents a powerful tool for solving challenging, inverse problems across scientific domains.
- 21 December 2023
- Published by Oxford University Press (OUP) in PNAS Nexus
- Vol. 3 (1) , pgae005
Top Cited PapersOpen AccessSolving inverse problems in physics by optimizing a discrete loss: Fast and accurate learning without neural networks
In recent years, advances in computing hardware and computational methods have prompted a wealth of activities for solving inverse problems in physics. These problems are often described by systems of partial differential equations (PDEs). The advent of machine learning has reinvigorated the interest in solving inverse problems using neural networks (NNs). In these efforts, the solution of the PDEs is expressed as NNs trained through the minimization of a loss function involving the PDE. Here, we show how to accelerate this approach by five orders of magnitude by deploying, instead of NNs, conventional PDE approximations. The framework of optimizing a discrete loss (ODIL) minimizes a cost function for discrete approximations of the PDEs using gradient-based and Newton’s methods. The framework relies on grid-based discretizations of PDEs and inherits their accuracy, convergence, and conservation properties. The implementation of the method is facilitated by adopting machine-learning tools for automatic differentiation. We also propose a multigrid technique to accelerate the convergence of gradient-based optimizers. We present applications to PDE-constrained optimization, optical flow, system identification, and data assimilation. We compare ODIL with the popular method of physics-informed neural networks and show that it outperforms it by several orders of magnitude in computational speed while having better accuracy and convergence rates. We evaluate ODIL on inverse problems involving linear and nonlinear PDEs including the Navier–Stokes equations for flow reconstruction problems. ODIL bridges numerical methods and machine learning and presents a powerful tool for solving challenging, inverse problems across scientific domains.
- Open Access
- 4 February 2022
- Published by American Association for the Advancement of Science (AAAS) in Science Advances
- Vol. 8 (5) , eabm0590
Computing foaming flows across scales: From breaking waves to microfluidics
Crashing ocean waves, cappuccino froths, and microfluidic bubble crystals are examples of foamy flows. Foamy flows are critical in numerous natural and industrial processes and remain notoriously difficult to compute as they involve coupled, multiscale physical processes. Computations need to resolve the interactions of the bubbles separated by stable thin liquid films. We present the multilayer volume-of-fluid method (Multi-VOF) that advances the state of the art in simulation capabilities of foamy flows. The method introduces a scheme to handle multiple bubbles that do not coalesce. Multi-VOF is verified and validated with experimental results and complemented with open-source software. We demonstrate capturing of crystalline structures of bubbles in realistic microfluidics devices and foamy flows involving tens of thousands of bubbles in a waterfall. The present technique extends the classical volume-of-fluid methodology and allows for large-scale predictive simulations of flows with multiple interfaces.
- 4 February 2022
- Published by American Association for the Advancement of Science (AAAS) in Science Advances
- Vol. 8 (5) , eabm0590
Open AccessComputing foaming flows across scales: From breaking waves to microfluidics
Crashing ocean waves, cappuccino froths, and microfluidic bubble crystals are examples of foamy flows. Foamy flows are critical in numerous natural and industrial processes and remain notoriously difficult to compute as they involve coupled, multiscale physical processes. Computations need to resolve the interactions of the bubbles separated by stable thin liquid films. We present the multilayer volume-of-fluid method (Multi-VOF) that advances the state of the art in simulation capabilities of foamy flows. The method introduces a scheme to handle multiple bubbles that do not coalesce. Multi-VOF is verified and validated with experimental results and complemented with open-source software. We demonstrate capturing of crystalline structures of bubbles in realistic microfluidics devices and foamy flows involving tens of thousands of bubbles in a waterfall. The present technique extends the classical volume-of-fluid methodology and allows for large-scale predictive simulations of flows with multiple interfaces.
- Open Access
- 1 February 2022
- Published by Elsevier in Computer Methods in Applied Mechanics and Engineering
- Vol. 389
Korali: Efficient and scalable software framework for Bayesian uncertainty quantification and stochastic optimization
- 1 February 2022
- Published by Elsevier in Computer Methods in Applied Mechanics and Engineering
- Vol. 389
Open AccessKorali: Efficient and scalable software framework for Bayesian uncertainty quantification and stochastic optimization
- Open Access
- 12 November 2020
- Published by American Physical Society (APS) in Physical Review Fluids
- Vol. 5 (11) , 110503
Breaking waves: To foam or not to foam?
This paper is associated with a video winner of a 2019 American Physical Society's Division of Fluid Dynamics (DFD) Gallery of Fluid Motion Award for work presented at the DFD Gallery of Fluid Motion. The original video is available online at the Gallery of Fluid Motion, https://doi.org/10.1103/APS.DFD.2019.GFM.V0018.
- 12 November 2020
- Published by American Physical Society (APS) in Physical Review Fluids
- Vol. 5 (11) , 110503
Open AccessBreaking waves: To foam or not to foam?
This paper is associated with a video winner of a 2019 American Physical Society's Division of Fluid Dynamics (DFD) Gallery of Fluid Motion Award for work presented at the DFD Gallery of Fluid Motion. The original video is available online at the Gallery of Fluid Motion, https://doi.org/10.1103/APS.DFD.2019.GFM.V0018.
- Open Access
Optimal Allocation of Limited Test Resources for the Quantification of COVID-19 Infections
The systematic identification of infected individuals is critical for the containment of the COVID-19 pandemic. Presently, the spread of the disease is mostly quantified by the reported numbers of infections, hospitalizations, recoveries and deaths; these quantities inform epidemiology models that provide forecasts for the spread of the epidemic and guide policy making. The veracity of these forecasts depends on the discrepancy between the numbers of reported and unreported, yet infectious, individuals. We combine Bayesian experimental design with an epidemiology model and propose a methodology for the optimal allocation of limited testing resources in space and time, which maximizes the information gain for such unreported infections. The proposed approach is applicable at the onset and spreading of the epidemic and can forewarn for a possible recurrence of the disease after relaxation of interventions. We examine its application in Switzerland; the open source software is, however, readily adaptable to countries around the world. We find that following the proposed methodology can lead to vastly less uncertain predictions for the spread of the disease. Estimates of the effective reproduction number and of the future number of unreported infections are improved, which in turn can provide timely and systematic guidance for the effective identification of infectious individuals and for decision-making.
Open AccessOptimal Allocation of Limited Test Resources for the Quantification of COVID-19 Infections
The systematic identification of infected individuals is critical for the containment of the COVID-19 pandemic. Presently, the spread of the disease is mostly quantified by the reported numbers of infections, hospitalizations, recoveries and deaths; these quantities inform epidemiology models that provide forecasts for the spread of the epidemic and guide policy making. The veracity of these forecasts depends on the discrepancy between the numbers of reported and unreported, yet infectious, individuals. We combine Bayesian experimental design with an epidemiology model and propose a methodology for the optimal allocation of limited testing resources in space and time, which maximizes the information gain for such unreported infections. The proposed approach is applicable at the onset and spreading of the epidemic and can forewarn for a possible recurrence of the disease after relaxation of interventions. We examine its application in Switzerland; the open source software is, however, readily adaptable to countries around the world. We find that following the proposed methodology can lead to vastly less uncertain predictions for the spread of the disease. Estimates of the effective reproduction number and of the future number of unreported infections are improved, which in turn can provide timely and systematic guidance for the effective identification of infectious individuals and for decision-making.
- Open Access
Optimal Testing Strategy for the Identification of COVID-19 Infections
The systematic identification of infectious, yet unreported, individuals is critical for the containment of the COVID-19 pandemic. We present a strategy for identifying the location, timing and extent of testing that maximizes information gain for such infections. The optimal testing strategy relies on Bayesian experimental design and forecasting epidemic models that account for time dependent interventions. It is applicable at the onset and spreading of the epidemic and can forewarn for a possible recurrence of the disease after relaxation of interventions. We examine its application in Switzerland and show that it can provide timely and systematic guidance for the effective identification of infectious individuals with finite testing resources. The methodology and the open source code are readily adaptable to countries around the world. We present a strategy for the optimal allocation of testing resources in order to detect COVID-19 infections in a country’s population .
Open AccessOptimal Testing Strategy for the Identification of COVID-19 Infections
The systematic identification of infectious, yet unreported, individuals is critical for the containment of the COVID-19 pandemic. We present a strategy for identifying the location, timing and extent of testing that maximizes information gain for such infections. The optimal testing strategy relies on Bayesian experimental design and forecasting epidemic models that account for time dependent interventions. It is applicable at the onset and spreading of the epidemic and can forewarn for a possible recurrence of the disease after relaxation of interventions. We examine its application in Switzerland and show that it can provide timely and systematic guidance for the effective identification of infectious individuals with finite testing resources. The methodology and the open source code are readily adaptable to countries around the world. We present a strategy for the optimal allocation of testing resources in order to detect COVID-19 infections in a country’s population .