Towards Physics-Informed Neural Networks for Magma-Chamber Cooling: A Case Study of the Rio Pisco Pluton
Abstract
1. Introduction
2. State of the Art
3. Model Framework and Geological Configuration
3.1. Geological Setting
3.2. PINN
3.3. Physics Equations
3.3.1. Darcy Flow and Mass Conservation
3.3.2. Energy Conservation
4. Materials and Methods
4.1. Materials
4.2. Methods
4.2.1. Formulating the Initial Geometry and Parameterization
| Listing 1. Source code for the chamber geometry. |
| 1 chamber = Rectangle ( 2 point_1=(0, 0), 3 point_2=(1, 1), 4 parameterization=Parameterization ({ 5 Parameter ("time") : (beginTime, endTime) 6 }) 7 ) |
4.2.2. Building the Deep Neural Network Topology
| Listing 2. Source code for the definition of the ANN. |
| 1 network = instantiate_arch ( 2 input_keys=[Key("time"), Key("x"), Key("y")], 3 output_keys=[Key("Temperature"), Key("XVelocity"), Key(" YVelocity"), 4 Key("Pressure_water"), Key("Pressure_steam"), 5 Key("Saturation_water"), Key("Saturation_steam")], 6 cfg=cfg.arch.fully_connected |
4.2.3. Integrating Physics
| Listing 3. Source code for the input and output keys. |
| 1 time, x, y = Symbol("time"), Symbol("x"), Symbol("y") 2 T = Function("Temperature")(time, x, y) 3 # etc.... |
| Listing 4. Source code for output equations. |
| 1 mass_storage = phi ∗ (rho_w ∗ S_w + rho_s ∗ S_s) 2 mass_eq = mass_storage.diff(time) ∗ dt_factor + (div_rhoq_w + div_rhoq_s) − q_sf 3 self.equations["mass_conservation"] = mass_eq |
| Listing 5. Source code for the interior constraint. | |
| 1 | interior = PointwiseInteriorConstraint( |
| 2 | nodes=nodes, |
| 3 | geometry=chamber, |
| 4 | outvar={ |
| 5 | "mass_conservation": 0, |
| 6 | "energy_conservation": 0, |
| 7 | "darcy_x": 0, |
| 8 | "darcy_y": 0, |
| 9 | "sat_sum": 0, |
| 10 | }, |
| 11 | batch_size=cfg.batch_size.interior, |
| 12 | lambda_weighting={ |
| 13 | "mass_conservation": 5.0, |
| 14 | "energy_conservation": 5.0, |
| 15 | "darcy_x": 10.0, |
| 16 | "darcy_y": 10.0, |
| 17 | "sat_sum": 3.0, |
| 18 | } |
| 19 | ) |
- A left-wall constraint restricts horizontal flow past the left wall throughout all times.
- A top-wall constraint restricts vertical flow past the top wall as well as restricts temperature to be 20 degrees Celsius at the top of the chamber.
- A right-wall flow constraint enforces across the right boundary. A separate right-wall thermal constraint, applied on a fixed deterministic grid, imposes the geothermal gradient , where is the normalized depth coordinate. In physical units, this corresponds to 25 °C/km, ranging from 20 °C at the surface to 170 °C at 6 km depth, matching the boundary condition reported in [3].
- A bottom-wall constraint restricts vertical flow past the bottom wall as well as specifying a vertical heat flux upwards of 65 mW/m2.
- A pressure anchor pins both phase pressures to zero, , on a small square at the center of the normalized domain, evaluated only at the initial instant ( in normalized time). Because Darcy’s law depends only on pressure gradients, this anchor fixes an otherwise-free additive gauge so that the network can learn a well-posed pressure field; it is not a sustained boundary condition during the simulation.
- An initial-interior constraint restricted to the time window (i.e., 0– in physical units) provides the network with a consistent starting state. It pins the temperature field to generate_initial_temps—the discretization of the chamber geometry—and additionally fixes , , , , and .
- Geological data constraint contains temperature data taken from [3] directly and encourages the model to match these temperatures on the left wall.
4.2.4. Training Strategy
- Loss Function and Residual Weights
- Sampling Method
- Validation and Visualization
4.2.5. Model Assumptions and Limitations
5. Results
5.1. Network Loss
5.2. Predicted Cooling Time Compared to Previous Work
5.3. Predicted Temperatures and Velocities Compared to HYDROTHERM Results
6. Discussion
7. Conclusions and Future Work
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Kipp, K.L.; Hsieh, P.A.; Charlton, S.R. Guide to the Revised Ground-Water Flow and Heat Transport Simulator: Hydrotherm Version 3; Technical Report; United State Geological Survey: Reston, VA, USA, 2008.
- Hennigh, O.; Narasimhan, S.; Nabian, M.A.; Subramaniam, A.; Tangsali, K.; Fang, Z.; Rietmann, M.; Byeon, W.; Choudhry, S. NVIDIA SimNet™: An AI-Accelerated Multi-Physics Simulation Framework. In International Conference on Computational Science; Springer International Publishing: Cham, Switzerland, 2021; pp. 447–461. [Google Scholar]
- González Olivares, L.U. Conduction Plus Convection Heat Flow Modeling for the Linga Complex, Peru. Ph.D. Thesis, Loma Linda University, Loma Linda, CA, USA, 2017. [Google Scholar]
- Bear, J. Dynamics of Fluids in Porous Media; Elsevier: Amsterdam, The Netherlands, 1972. [Google Scholar]
- Ingebritsen, S.E.; Sanford, W.E.; Neuzil, C.E. Groundwater in Geologic Processes; Cambridge University Press: Cambridge, UK, 2010. [Google Scholar]
- Dufek, J.; Bachmann, O. Quantum magmatism: Magmatic processes at conduit scale. J. Geophys. Res. 2010, 115, B07203. [Google Scholar]
- Weinberg, R.F.; Sial, A.N.; Pessoa, R.R. Thermal evolution of batholiths and implications for magma emplacement. Earth-Sci. Rev. 2018, 185, 107–129. [Google Scholar]
- Zambra, C.E.; Gonzalez-Olivares, L.; González, J.; Clausen, B.L. Temporal evolution of cooling by natural convection in an enclosed magma chamber. Processes 2022, 10, 108. [Google Scholar] [CrossRef]
- Ingebritsen, S.E.; Geiger, S.; Hurwitz, S.; Driesner, T. Numerical simulation of magmatic hydrothermal systems. Rev. Geophys. 2010, 48, RG1002. [Google Scholar] [CrossRef]
- Pruess, K.; Oldenburg, C.; Moridis, G. TOUGH2 User’s Guide, Version 2.0; Technical Report LBNL-43134; Lawrence Berkeley National Laboratory: Berkeley, CA, USA, 1999.
- Raissi, M.; Perdikaris, P.; Karniadakis, G.E. Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. J. Comput. Phys. 2019, 378, 686–707. [Google Scholar] [CrossRef]
- Cai, S.; Wang, Z.; Wang, S.; Perdikaris, P.; Karniadakis, G.E. Physics-informed neural networks for heat transfer problems. Int. J. Heat. Mass. Transf. 2021, 166, 120789. [Google Scholar] [CrossRef]
- Wang, S.; Teng, Y.; Perdikaris, P. Understanding and mitigating gradient pathologies in physics-informed neural networks. SIAM J. Sci. Comput. 2021, 43, A3055–A3081. [Google Scholar] [CrossRef]
- Shukla, K.; Jagtap, A.D.; Karniadakis, G.E. Parallel physics-informed neural networks via domain decomposition. J. Comput. Phys. 2022, 447, 110683. [Google Scholar] [CrossRef]
- Karniadakis, G.E.; Kevrekidis, I.G.; Lu, L.; Perdikaris, P.; Wang, S.; Yang, L. Physics-informed machine learning. Nat. Rev. Phys. 2021, 3, 422–440. [Google Scholar] [CrossRef]
- Fourier, J. The Analytical Theory of Heat; Cambridge University Press: Cambridge, UK, 1822. [Google Scholar]
- Driesner, T.; Geiger, S. Numerical Simulation of Multiphase Fluid Flow in Hydrothermal Systems. Rev. Mineral. Geochem. 2007, 65, 187–212. [Google Scholar] [CrossRef]
- Darcy, H. Les Fontaines Publiques de la ville de Dijon; Victor Dalmont: Paris, France, 1856. [Google Scholar]
- Naser, M.Z. Fundamental flaws of physics-informed neural networks and explainability methods in engineering systems. Comput. Ind. Eng. 2026, 212, 111704. [Google Scholar] [CrossRef]






| Depth (km) | Time (Years) | Temperature (°C) |
|---|---|---|
| 0 | 20,000 | 20 |
| 1 | 20,000 | 50 |
| 2 | 20,000 | 190 |
| 3 | 20,000 | 460 |
| 4 | 20,000 | 730 |
| 5 | 20,000 | 880 |
| 6 | 20,000 | 900 |
| 0 | 120,000 | 20 |
| 1 | 120,000 | 250 |
| 2 | 120,000 | 350 |
| 3 | 120,000 | 360 |
| 4 | 120,000 | 530 |
| 5 | 120,000 | 650 |
| 6 | 120,000 | 700 |
| 0 | 175,000 | 20 |
| 1 | 175,000 | 240 |
| 2 | 175,000 | 340 |
| 3 | 175,000 | 380 |
| 4 | 175,000 | 480 |
| 5 | 175,000 | 560 |
| 6 | 175,000 | 600 |
| 0 | 300,000 | 20 |
| 1 | 300,000 | 130 |
| 2 | 300,000 | 250 |
| 3 | 300,000 | 320 |
| 4 | 300,000 | 380 |
| 5 | 300,000 | 430 |
| 6 | 300,000 | 450 |
| Setting | Value |
|---|---|
| Optimizer | Adam |
| Initial LR | |
| (defaults) | |
| LR scheduler | TensorFlow-style exponential decay |
| Decay rate | 0.995 |
| Decay steps | 10,000 |
| Total training steps | 50,000 |
| Constraint | Variable/Target | |
|---|---|---|
| Left wall | 1.0 | |
| Top wall | T = 20 °C | 1.0 |
| Top wall | 3.0 | |
| Right wall | 1.0 | |
| Right wall (geotherm) | 1.0 | |
| Bottom wall | 3.0 | |
| Bottom wall | = − | 3.0 |
| Pressure anchor | 1.0 | |
| Pressure anchor | 1.0 |
| Residual | |
|---|---|
| Mass conservation | 5.0 |
| Energy conservation | 5.0 |
| Darcy (x-component) | 10.0 |
| Darcy (y-component) | 10.0 |
| Saturation sum, | 3.0 |
| Variable | Target | |
|---|---|---|
| Temperature | generate_initial_temps | 30.0 |
| 0.0 | 1.0 | |
| 0.0 | 1.0 | |
| 1.0 | 10.0 | |
| 0.0 | 10.0 | |
| 0.0 | 3.0 | |
| 0.0 | 3.0 |
| Constraint | Variable/Target | |
|---|---|---|
| Geological data | for | 5.0 |
| Constraint | Geometry | Sampling | Batch Size |
|---|---|---|---|
| Left wall () | Boundary line | Stochastic | 4000 |
| Top wall () | Boundary line | Stochastic | 4000 |
| Right wall () | Boundary line | Stochastic | 4000 |
| Right-wall geotherm | Pre-generated grid | Deterministic | 4000 |
| Bottom wall () | Boundary line | Stochastic | 4000 |
| Pressure anchor | Stochastic | 100 | |
| Interior PDE residuals | Stochastic | 8000 | |
| Initial-condition interior | Stochastic | 8000 | |
| Geological data | 28 fixed records | Deterministic | 28 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Eno, A.; Patton, D.; Alférez, G.H.; Clausen, B.L. Towards Physics-Informed Neural Networks for Magma-Chamber Cooling: A Case Study of the Rio Pisco Pluton. Modelling 2026, 7, 92. https://doi.org/10.3390/modelling7030092
Eno A, Patton D, Alférez GH, Clausen BL. Towards Physics-Informed Neural Networks for Magma-Chamber Cooling: A Case Study of the Rio Pisco Pluton. Modelling. 2026; 7(3):92. https://doi.org/10.3390/modelling7030092
Chicago/Turabian StyleEno, Andrew, Daniel Patton, Germán H. Alférez, and Benjamin L. Clausen. 2026. "Towards Physics-Informed Neural Networks for Magma-Chamber Cooling: A Case Study of the Rio Pisco Pluton" Modelling 7, no. 3: 92. https://doi.org/10.3390/modelling7030092
APA StyleEno, A., Patton, D., Alférez, G. H., & Clausen, B. L. (2026). Towards Physics-Informed Neural Networks for Magma-Chamber Cooling: A Case Study of the Rio Pisco Pluton. Modelling, 7(3), 92. https://doi.org/10.3390/modelling7030092

