1. Introduction
In subsurface engineering and environmental applications, flow in porous media—interconnected pores in rocks or soils—occurs often. Both natural (soils, aquifers, oil, or gas reservoirs) and artificial (filters, ceramics) systems contain porous media. In many disciplines, precise flow modeling is essential because fluids (such as water, hydrocarbons, etc.) are propelled through the pore network by pressure gradients [
1]. For example, replicating oil or gas flow in reservoirs directs recovery tactics, while modeling groundwater flow and pollutant transport informs aquifer management and water supply planning [
1]. Since subsurface cavities or variations in pore pressure can result in subsidence or collapse of foundations, porous flow modeling is also essential in geotechnical engineering [
2]. Darcy flow models are also used to evaluate the long-term stability and efficiency of geothermal or carbon sequestration systems [
3,
4,
5,
6].
Numerous real-life decisions across energy, environmental, and infrastructure sectors involve porous flow models. To start with, Darcy flow simulations help engineers assess reservoir pressure responses to ensure that extraction activities remain safe and do not cause sudden instabilities in the reservoir. This is especially vital when considering the high financial stakes involved: offshore rig downtime can cost up to USD 1 million per day, while anchor-handling vessels may incur expenses of over USD 100,000 per day [
7]. Furthermore, the cost of drilling a single offshore well can vary from USD 30 million to more than USD 100 million, dependent on reservoir complexity and sea depth [
8]. Accurately modeling pressure fields and fluid behavior is thus not just a technical requirement but a critical economic safeguard that influences scheduling, risk mitigation, and regulatory compliance.
Hydrogeologists rely on Darcy flow models to manage aquifers by forecasting the effects of groundwater pumping, recharge strategies, and contaminant transport. These models are essential in designing sustainable water supply strategies and in remediation planning for polluted aquifers. For example, it has been demonstrated that doubling the recharge rate in some aquifers can accelerate pollutant flushing by up to three times, drastically reducing cleanup costs and timescales [
9]. On the other hand, incompetent pumping can cause soil subsidence, dry up wells, and drop water tables [
10]. Aquifer storage and recovery (ASR) systems, which enable temporary water storage during rainy seasons and its repurposing during dry spells, are also designed with the aid of modeling. Numerical models offer a mathematical foundation for investment planning, resource allocation, and environmental legislation.
The structural integrity of buildings, tunnels, and dams can be threatened by pressure-driven subsurface flow in civil engineering, especially in karst terrain and cracked soils. When evaluating geohazards including sinkhole formation, foundation collapse, and hydraulic structure leaks, modeling groundwater flow is essential. The economic ramifications are significant: losses from ground subsidence caused by sinkholes surpass USD 300 million per year in the United States alone [
11]. Engineers can create suitable mitigation techniques like grouting or dewatering by modeling pressure distribution and locating voids under the surface [
12]. Under the direction of Darcy-based simulations, these measures guarantee adherence to building safety regulations and avert expensive failures. The model is a fundamental part of geotechnical engineering and urban planning as its correctness directly affects the dependability of infrastructure.
Emerging energy technologies such as carbon capture and storage (CCS), geothermal energy extraction, and underground hydrogen storage heavily rely on porous-flow modeling to ensure both performance and safety. In CO
2 sequestration projects, Darcy-based simulations predict long-term plume migration, reservoir pressurization, and caprock integrity. In saline aquifers, for example, injection costs can be as low as USD 1.31 per ton of CO
2 if reservoir pressure is properly controlled [
13] and plume radii can reach up to 18 km over several decades [
14]. If appropriate geomechanical modeling is not used, reservoir pressures may exceed 80% of the rock’s fracture strength, which might lead to unintentional leaking [
15]. Comparably, modeling contributes to economic feasibility in CO
2 plume geothermal systems by calculating storage needs of 2–7 Mt CO
2 per MW
e, with injection prices ranging from USD 8 to USD 17 per ton [
16]. These applications demonstrate the importance of porous-media simulations in the development of safe and sustainable energy systems as well as in conventional resource exploitation.
Darcy Flow Equation Darcy’s law is the traditional model for one-phase flow in a saturated porous media. The basic equation that models this process is the continuity equation, which indicates mass conservation:
Here, is porous media’s porosity, is fluid’s density, is time variable, is fluid’s velocity, indicates source and sink terms. Source is the inflow, and sink is the outflow per volume at predetermined well places.
Darcy’s law, named after the French engineer Henri Darcy, is an empirical relation that models filtering through porous media at low flow velocities
. Through a series of studies, Darcy found in 1856 that the filtration velocity is proportional to both the fluid pressure gradient and gravity-induced effects [
13]. More specifically, the gradient law below relates pressure
and gravity forces to the volumetric flow density
(henceforth referred to as flow velocity):
Here,
is the permeability of the media,
is the viscosity of the media,
is the gravitational constant, and
is the spatial coordinate in the upward vertical direction. For this project, only two-dimensional flow was considered, thus dropping the term
. Furthermore, it is enforced that the fluid’s characteristics do not change over time as well as porosity, viscosity, and density parameters which remain constant. This simplifies Equations (1) and (2) to:
Adding Equation (4) into (3) and combining viscosity parameter into the permeability variable:
The derived equation is an elliptic partial differential equation (PDE) for pressure. Further in the work, homogeneous and heterogeneous permeability fields are considered. The goal is to solve Equation (5) for pressure. Afterwards, visualize the solution and use Equation (4) to model the flow of velocity directions.
Since there is typically no closed-form solution to the elliptic Darcy equation in actual heterogeneous media, numerical discretization is employed. Numerous traditional techniques have been used like finite difference method (FDM), finite volume method (FVM), two-point flux approximation (TPFA), multi-point flux approximation (MPFA), and mixed finite element method (MFEM) [
17,
18,
19,
20,
21,
22,
23]. Details of the discretization methods using FDM, TPFA, and MPFA methods are further elaborated next.
Finite difference method (FDM) approximates derivatives on a structured grid (e.g., regular Cartesian mesh). Each grid point pressure is related to neighbors via finite differences. FDM is straightforward and efficient for simple domains, but it is limited by grid geometry: handling complex boundaries or anisotropic permeability is difficult in standard FDM.
Two-point flux approximation (TPFA). A popular discretization technique in reservoir modeling, especially in cell-centered finite-volume frameworks. In its most basic version, TPFA uses a two-point stencil to calculate the flux across a cell face, and it is entirely dependent on the pressures in the two neighboring cells. This method is favored by many commercial simulators due to its simplicity, computational efficiency, and robustness [
17,
18,
19,
20,
21,
22,
23]. However, the accuracy of TPFA is conditional on the so-called K-orthogonality requirement: the method is only consistent when the computational grid is aligned with the principal directions of the permeability tensor and satisfies certain geometric constraints [
17,
18,
19,
20,
21,
22,
23]. On unstructured grids or in media with anisotropic and misaligned permeability, TPFA may introduce significant errors due to its inability to accurately capture the underlying physics [
17,
18,
19,
20].
Multi-point flux approximation (MPFA) schemes were developed to overcome TPFA’s limitations on general grids. MPFA incorporates more neighboring cell pressures to estimate flux, effectively using multiple points around a face [
20,
21,
22,
23]. For example, the MPFA-O variant includes diagonal neighbor contributions, enabling it to capture flux in the presence of a full-tensor permeability on arbitrary, non-orthogonal meshes. In short, MPFA addresses TPFA’s shortcomings by adding support points to handle off-diagonal diffusion terms [
20]. This comes at the cost of complexity: MPFA requires solving local linear systems for fluxes. Moreover, MPFA schemes can suffer numerical artifacts (spurious oscillations or loss of monotonicity) on highly anisotropic or skewed grids [
20,
21,
22,
23].
Other discretizations, like finite element methods (FEMs), are also common, especially with unstructured meshes, as in geological modeling. In practice, many simulators implement pressure velocity mixed FEM or weak formulations. Specialized mimetic or embedded methods exist as well. But TPFA/MPFA remain predominant in reservoir simulation due to mass conservation and locality. Accuracy, stability, and computational cost are trade-offs for each method (FDM, TPFA, MPFA, FEM, etc.). On structured grids, for instance, basic FDM/TPFA solvers can operate relatively quickly, whereas MPFA or mixed FEM handle heterogeneity better but require bigger stencils or system solutions [
17]. The resultant sparse linear systems are solved using conventional linear solvers (e.g., conjugate gradient, multi-grid).
There are several software tools available to numerically solve Darcy flow problems, ranging from basic scripts to sophisticated simulations, like DarcyLite (version 2.0.1 on 27 July 2023), MRST (version 2025a), COMSOL (website:
https://www.comsol.com/, accessed date: 20 June 2025), and OpenFOAM (version v2412) [
24,
25,
26,
27].
A computational toolkit called DarcyLite was created using MATLAB to make it easier to numerically simulate flow and transport events in two-dimensional porous media. A variety of finite element techniques, such as continuous Galerkin (CG), discontinuous Galerkin (DG), weak Galerkin (WG), and mixed finite element methods (MFEMs), are especially used to solve the Darcy equation. DarcyLite provides researchers, educators, and students with an approachable but potent platform by utilizing MATLAB’s versatile matrix operations and user-friendly programming environment. It is ideal for both applicable research and teaching in fields including biological transport processes, oil reservoir modeling, and groundwater flow because of its graphical user interface and modular architecture, which facilitate effective experimentation and visualization [
24].
MATLAB Reservoir Simulation Toolbox (MRST) is a comprehensive, open-source toolbox (developed by SINTEF) for research in reservoir engineering [
25]. MRST is written in MATLAB/Octave and includes modules for single- and multiphase flow, transport, wells, and more. It implements finite-volume schemes (TPFA, MPFA, mimetic, etc.) on general grids, upscaling tools, automatic differentiation, and linear solvers. The toolbox’s popularity is evidenced by hundreds of scientific papers using MRST. MRST is extensible and often used to develop or test new numerical methods (e.g., custom solvers or ML-based methods).
COMSOL Multiphysics is a commercial FEM-based simulation platform [
26]. Its Porous Media Flow Module provides physics interfaces to solve Darcy and related equations (including unsaturated flow, conjugate flow, etc.). COMSOL allows easy coupling with other physics (heat transfer, geomechanics) and has a user-friendly GUI. Many geoscience and engineering teams use COMSOL for prototyping and multiphysics studies involving porous flow.
OpenFOAM is an open-source [
27] CFD toolbox that can simulate porous-media flow by adding Darcy resistance terms in its Navier–Stokes solvers (or via specialized library modules). Users can configure a porous zone with given permeability and Forchheimer coefficients. OpenFOAM is widely used in research and industry (especially for fluid flow and thermal problems) and can handle complex 3D geometries.
Other tools include national or commercial reservoir simulators (e.g., CMG (website:
https://www.cmgl.ca/solutions/software/, accessed date: 20 June 2025), Eclipse (version 2025.1)) which implement TPFA/MPFA solvers with full well-modeling, as well as specialized codes (DuMux (website:
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux, accessed date: 20 June 2025), FEHM (website:
https://github.com/lanl/FEHM/tree/master, accessed date: 20 June 2025), etc.). The above tools (especially MRST, COMSOL, OpenFOAM) form a practical ecosystem for developing and testing new Darcy solvers and for real-world applications. The amount of already developed tools (even some commercialized ones) indicates the importance of finding the solution to Darcy flow equation.
In recent years, machine learning has been applied to porous media problems in two main directions: (i) modeling and prediction of physical properties or system responses (e.g., permeability changes, saturation levels, flow rates), and (ii) data-driven surrogate modeling of PDE solvers, where neural networks learn to approximate or solve governing flow equations. For the first category, artificial neural networks have been successfully used to capture complex physical behaviors based on experimental or simulation data. For example, the authors in [
28] used a multilayer perceptron artificial neural network to model permeability reduction in carbonate rocks due to calcium sulfate precipitation during waterflooding, achieving good agreement with core flooding experiments.
In the second category, neural network designs have been formulated as PDE solvers for the porous flow problem by several researchers [
23]. Convolutional neural networks (CNNs) can be trained to map between input and output fields (for example, mapping a permeability image to the pressure field). In a supervised setting, a CNN can learn the solution operator of the PDE from precomputed data. Some works have used physics constraints (making the CNN “physics-informed”) to improve generalization. For instance, in [
29] the authors used a convolutional PINN architecture for two-phase Darcy flows (pore pressure and saturation). Although purely CNN-based solvers for single-phase flow are still emerging, they represent a flexible surrogate approach (CNNs are naturally suited to Cartesian grids or image-like representations of the fields).
Physics-informed neural networks (PINNs) embed the PDE into the loss function of a neural network. A neural net is trained so that it simultaneously fits boundary data and minimizes the residual of Darcy’s equation at training points. In other words, the network’s loss includes terms like Equation (5). This idea allows for a “mesh-free” solution of PDEs with no labelled training data [
29]. PINNs have been applied to various flow problems. For single-phase flow, Almajid et al. [
30] and others have used PINNs to learn pressure fields in heterogeneous aquifers. PINNs can handle irregular domains and parameter estimation in principle, but they may suffer from training difficulties and slow convergence.
Fourier neural operators (FNOs)/neural operators. Neural operators aim to learn the mapping from input functions (e.g., permeability field
) to output functions (solution
) in a way that generalizes across different discretizations. The Fourier neural operator applies convolution in spectral (Fourier) space as a learnable operator. Critically, the authors in [
31] demonstrated the FNO on the 2D Darcy equation and achieved orders-of-magnitude speedups over traditional solvers: the FNO could predict the solution almost 1000 times faster while maintaining high accuracy. In their experiments, the FNO was more accurate and much faster than baseline CNNs or direct solvers. Thus, neural operators like FNOs provide a promising path to extremely fast surrogate PDE solvers once trained.
Generative/hybrid models (e.g., GANs). Researchers have also explored generative models to augment classical solvers. For example, the authors in [
32] proposed a Simulation Enhancement GAN (SE-GAN) for reservoir simulation. In their method, a coarse-grid finite-volume simulation is first run; the GAN then takes this coarse solution plus permeability data and generates a refined fine-grid solution. This deep network is trained to map coarse results to fine results, effectively “upscaling” the solution. In numerical tests, the SE-GAN achieved significant accuracy improvements and reduced computational time compared to running a full fine-scale solver [
32]. This exemplifies how deep learning can accelerate traditional simulations: instead of solving the full linear system on a fine mesh, one trains a network offline and then uses it to reconstruct fine details cheaply.
The philosophies behind these modern methods vary: GAN-type techniques enhance coarse simulations, PINNs solve the PDE directly through optimization, and CNNs and FNOs seek to substitute a learnt surrogate operator for the solver. They are all topics of ongoing study.
Overall, the accuracy and speed of Darcy solvers directly impact decisions in various application areas related to Darcy flow modeling. Faster or more accurate methods enable higher-resolution modeling and real-time risk assessment. For those reasons, the aim of this work is to create numerical solutions for the elliptic partial differential equation problem for single-phase flow in porous media and investigate their performance by comparing them with each other. The following objectives are addressed in this paper:
Analyze numerical discretization methods to solve the provided partial differential equation.
Analyze deep learning methods to solve the provided partial differential equation.
Comparison of results between numerical solution methods and deep learning methods.
2. Materials and Methods
For incompressible single-phase flow in porous media, Darcy’s law states that the volumetric flux
v is proportional to the pressure gradient via the permeability tensor, e.g.,
(with hydraulic head
). Combining Darcy’s law with mass conservation (
for steady flow) yields the elliptic PDE:
where
is the permeability,
is the hydraulic head, and
is any source term. In general, this is a second-order elliptic equation. Since only two-dimensional grid and variable permeability are considered, the equation simplifies the one provided in (5). When
varies in space (heterogeneous permeability), no closed-form (analytical) solution exists [
33]. Only in the special case of constant
(a homogeneous medium) does the equation reduce to the standard Laplace/Poisson equation, for which classical analytical solutions (e.g., via Green’s functions or separation of variables) are known for simple geometries. However, real subsurface fields have complex heterogeneity, with rapid changes in permeability and porosity along with multiscale nature of rock matrix, so analytic formulas are impractical. In practice, one must therefore solve the pressure equation numerically [
33]. To finalize, the equation used in this paper is equal to Equation (5), where viscosity, density, and porosity are considered constant over the whole domain.
2.1. Problem and Domain Definition for Solving Darcy Flow Elliptic PDE Equation
This paper’s aim is to solve the simplified Darcy flow equation provided in (5). The parameters, initial, and boundary conditions used in each numerical scheme are given in
Table 1. Domain was discretized into a uniform Cartesian grid. Discrete permeability grid was achieved by directly sampling grid cell permeability values from Gaussian distribution.
To handle potential sharp permeability contrasts in heterogeneous fields, smoothing during the generation of the Gaussian permeability field was incorporated. Specifically, a moving average filter with a window was applied twice to the Gaussian random field, reducing noise and ensuring spatial correlation.
Paper tasks are structured in the following order:
Domain description, permeability field generation.
Numerical method realizations.
Deep learning methods training.
Visualization and comparison between methods/models.
Methods and models are evaluated using the following:
Since an analytical solution was not derived, the FDM method is selected as the base for comparisons.
The used hardware and software to achieve the results presented in this paper are the following:
Hardware
- ⚬
Personal computer:
- ▪
Operating system—Windows 11 Home;
- ▪
Version—23H2;
- ▪
Processor (CPU)—Intel(R) Core(TM) i5-9300H CPU @ 2.40 GHz;
- ▪
System type—64-bit operating system, x64 base processor;
- ▪
Working memory (RAM)—32 GB;
- ▪
Video card (GPU)—NVIDIA GeForce GTX 1650.
- ⚬
KTU AI notebook platform:
- ▪
Operating system—Ubuntu Linux;
- ▪
Version—24.04.2 LTS;
- ▪
Processor (CPU)—Intel(R) Xeon(R) Gold 6438Y+ @ 4.00 GHz;
- ▪
System type—64-bit operating system, x64 base processor;
- ▪
Working memory (RAM)—1 TB;
- ▪
Video card (GPU)—NVIDIA H100 NVL (2 units).
Software
- ⚬
MATLAB R2023b for initial realization.
- ⚬
Python 3.11 for final realizations and deep learning. Main used packages:
- ▪
“NumPy”;
- ▪
“PyTorch”;
- ▪
“NeuralOperator”.
The mixed usage of several computers and programming languages provided flexibility and faster modeling. Initial realizations were made using MATLAB and personal computers. However, after delving into deep learning, a switch to Python was eventually made: all previous realizations were ported from MATLAB to Python and improved. This enabled seamless discretization and deep learning method comparison without additional need of result converting and moving.
The usage of the KTU AI notebook aided with deep learning training times. The use of powerful GPU units made training from 10,000 to 60,000 times faster than simple training on a personal computer’s CPU. For code sharing, the GitHub repository (
https://github.com/, accessed on 4 April 2025) was established.
2.2. Numerical Solution Methods of Darcy Flow Elliptic PDE Equation
Numerical approaches offer a useful and reliable substitute for analytical solutions to PDEs when they are unattainable or nonexistent, especially when dealing with spatially heterogeneous or anisotropic media. Numerical methods are becoming essential resources for resolving a variety of PDE issues in engineering and scientific settings, including fluid flow in porous media. The governing elliptic equation for single-phase flow is solved numerically by discretization techniques in this paper. In particular, the FDM, TPFA, and MPFA techniques are used.
FDM is a numerical discretization technique, which converts an ordinary differential equation (ODE) or PDE into a system of linear equations, which can then be solved utilizing matrix algebra [
34]. This is achieved by means of the problems domain discretization [
35]. Domain is discretized into a grid of rectangles. For elliptic PDEs, such as the Darcy flow problem, the FDM discretizes spatial derivatives at each grid point using central finite differences. In two-dimensional Cartesian coordinates with ∆
x—the distance between cell centers in x axis and ∆
y—the distance between cell centers in the
axis, the central finite difference approximation for the Laplacian operator at a grid point
is given by Equation (7) [
35].
Here,
is unknown pressure value. Thus, the discretized Equation (6) at each internal grid point becomes
where
and
represent the permeabilities at cell interfaces, often computed as harmonic means. However, to try to achieve better accuracy, other methods for permeabilities averaging can be used, such as linear average, geometric average, or k-means average [
36]. Interactions of grid cells, that Equation (8) encompasses, are visualized in
Figure 1. Edge grid cells have fewer neighboring cells; thus, some terms of Equation (8) are dropped.
Equation (8) can be formulated for every cell of the grid and the combination of such equations forms a linear algebraic system that can be expressed in matrix form (9) as:
where
is a sparse matrix, of size
, where
is the number of cells in
and
-directions, representing coefficients of pressures at neighboring points,
is the vector of unknown pressures, and
represents source terms. Matrix
sparsity [
37] is visualized in
Figure 2. Each row of matrix
represents a single grid cell. The resulting sparse linear system can be solved using standard linear algebra methods.
Considering TPFA or MPFA, problem domain can be discretized similarly as in the case of the FDM method. To obtain the numerical solution, the focus shifts to permeability at the interfaces of cells (see
Figure 3a).
Similarly to the FDM method,
and
permeabilities at the interfaces of cells are often calculated using the harmonic mean method [
17]. Permeabilities at the interfaces of cells in the case of the MPFA method can be calculated using the MFPA-O method. In such cases, not two grid cells’ permeability would contribute to the result as in the TPFA case, but six. This results in 9 grids cells’ permeability contribution to the pressure of a single grid cell (see
Figure 3b). Such an approach may encompass more realistic fluid flow compared to FDM or TPFA, where only 5 grid cells are used (see
Figure 3b) [
17]. Having permeabilities at grid cell interfaces, a mass conservation equation is assembled for every grid cell. These equations can then be expressed in same matrix form (9) as with FDM.
2.3. Deep Learning Methods for Solving Darcy Flow Elliptic PDE Equation
Deep learning techniques have become strong substitutes for traditional numerical PDE solvers, particularly for challenging issues such as single-phase flow in porous media. CNNs, PINNs, and neural operators are the three deep learning methods that were concentrated on. With different designs and trade-offs, each approach provides a different technique to approximate the solution of an elliptic PDE. Each approach is briefly described, its mathematical form and network structure are outlined, and its benefits and drawbacks are discussed.
CNNs are widely used as data-driven surrogates for spatially structured PDE problems. A CNN processes input grids (e.g., a permeability or source field) through layers of convolutional filters, enabling it to capture local spatial features and heterogeneities. For example, a U-Net–style architecture (an encoder–decoder with skip connections) is often used for image-to-image regression tasks [
38]. In porous-media flow, a CNN can learn the mapping from a discretized permeability field
to the pressure field
over the domain, acting as a parametric solution operator. CNNs can be trained purely on data (supervised regression against known solutions) or in a physics-guided way: in the “theory-guided” CNN (TgCNN) framework, the training loss includes the discretized PDE residual, improving accuracy compared to a plain CNN [
39]. Visualization of simple CNN’s working scheme [
40] is presented in
Figure 4.
The governing equation in single-phase flow is Darcy’s law and mass conservation, which for steady incompressible flow gives an elliptic PDE (5). A CNN surrogate parameterizes the solution as
via its trainable weights
. In purely data-driven training, one minimizes the mean squared error
against labeled solutions (
). In a physics-informed variant, one also enforces the PDE, e.g., by defining the residual
and adding
terms to the loss. Through convolutional filters (often of small spatial support, e.g.,
kernels), the CNN implicitly learns spatial derivatives and patterns; PICNN methods have shown that convolutional filters can approximate finite-difference derivatives to respect conservation laws [
38]. Training may use additional constraints (such as boundary conditions) as needed in the loss.
For this paper, the CNN developed for solving the elliptic PDE (5) has the following structure:
Input is discretized permeability fields on a regular grid . The dimension of input is a matrix of size ;
Output is a predicted discretized pressure field on a regular grid . The dimension of output is the same as the input: a matrix of size ;
A simple architecture was chosen with
encoder and
decoder layers all using simple
kernel sizes and ReLU activation function. The network structure is represented by
Figure A1 in
Appendix A.
One advantage of CNN models is that CNN surrogates automatically include heterogeneity on a pixel-by-pixel basis by utilizing spatial convolution [
38]. They scale well on large grids (with GPU acceleration) and provide quick inference once trained. CNNs can implicitly guarantee local continuity through convolutions and capture intricate nonlinear mappings with comparatively few parameters. To increase accuracy, they can use PDE data with physics guidance (TgCNN/PICNN) [
35,
39].
CNNs’ drawbacks include the fact that they frequently need huge training datasets of labeled solutions and that they might not generalize well beyond the training distribution. Since they are only data-driven models, conservation rules are not always guaranteed (until physics components are introduced). Additionally, CNN designs are restricted to a certain grid resolution and domain; retraining is necessary when the mesh or geometry is changed. Boundary circumstances can be more difficult to manage than in classical solutions since they must be handled either through the data or loss. Finally, it might be difficult to train CNNs with high precision and it is a frequent problem to adjust their depth/width to prevent over- or under-fitting.
PINNs use a neural network to represent the solution of the PDE and enforce the governing equations as part of the loss function [
41]. In this approach, a feed-forward (fully connected) network
approximates the pressure field over the spatial domain. The rationale is that embedding physical laws into training allows the network to learn solutions consistent with the PDE and boundary conditions, without requiring a mesh. PINNs are mesh-free and can easily incorporate complex boundary conditions or heterogeneous coefficients. They have been applied to many PDEs, including Darcy flow in porous media and coupled Stokes–Darcy systems [
17,
42]. Because the network is trained by minimizing the PDE residual, PINNs can also solve inverse problems (e.g., identifying
) by treating unknown parameters as trainable.
For single-phase Darcy flow, consider again the elliptic PDE (5) with appropriate boundary conditions (e.g., Dirichlet or Neumann). The PINN approximates
where
denotes network weights. The loss function is typically the sum of the PDE residual loss over interior collocation points and boundary loss over boundary points. For instance, define the residual:
Then, the loss might be as follows:
Here,
denotes number of collocation points,
denotes number of boundary points, and
enforces any Dirichlet boundary values. Automatic differentiation is used to compute the derivatives in
exactly from the network output. The network is trained (e.g., via Adam or L-BFGS) to minimize
[
41]. In practice, one chooses collocation points
(e.g., randomly or on a grid) to evaluate both parts of the loss.
For this paper, the PINN used has the following structure:
Pros of PINNs are that they strictly incorporate the PDE and boundary conditions into training, so the learned solution automatically satisfies physics constraints within the training tolerance [
41]. They do not require a mesh or explicit discretization and can handle irregular domains or coupled multiphysics problems. PINNs can also assimilate data (e.g., measurements) naturally by adding data loss terms. They are flexible for inverse problems (e.g., learning unknown parameters in
) because one can augment
with physical parameters.
Cons of PINNs are that training them is often computationally expensive and sensitive to network initialization and hyperparameters. PINNs can struggle with stiff or multi-scale PDEs: for example, when
varies by orders of magnitude or viscosity is very small, the network may have difficulty minimizing all loss terms simultaneously [
42]. Similarly, problems with sharp interfaces or discontinuities (e.g., a fracture) can cause convergence issues. The approach may converge slowly or become stuck in local minima, and it also necessitates careful selection of collocation sites and balancing of loss terms [
42]. To obtain high accuracy in practice, further training techniques (such domain decomposition or loss weighting) are sometimes required.
Neural operators aim to learn the mapping (operator) from input functions (e.g., permeability fields) to output functions (e.g., pressure fields) directly [
30]. Unlike a fixed CNN surrogate or a PINN solving a single PDE instance, a neural operator is trained to approximate the solution operator
enabling it to handle new input functions without retraining. Two prominent neural operator architectures are deep operator networks (DeepONet) and Fourier neural operators (FNOs). Both have been shown to be highly effective for parametric PDEs, including Darcy flow [
39,
43].
Mathematically, we consider a family of PDEs parameterized by a function (e.g.,
). DeepONet is based on the universal approximation theorem for operators. It consists of two subnetworks: a branch net that encodes the input function values at a fixed set of sensor points, and a trunk net that encodes the evaluation location. Concretely, if the input function
is sampled at points
, the branch net produces a feature vector
from these samples. The trunk net takes a coordinate
and outputs features
. The DeepONet prediction is then combined, for example, by:
This network is trained on pairs of input functions and solution fields to learn the operator [
43]. DeepONet can approximate nonlinear operators given relatively few training samples, but its accuracy depends on the choice of sensor points and the complexity of the function space [
43].
The Fourier neural operator (FNO) takes a different approach. It learns a global convolution kernel in Fourier space. Given an input function
(e.g.,
or initial condition) on a uniform grid, the FNO first applies a pointwise linear transform, then repeatedly applies Fourier layers. In each Fourier layer, the network computes the Fourier transform
of the current feature map
, multiplied by a learned filter
for a limited set of low-frequency modes, and transforms back to physical space. Symbolically, one layer gives
where
is the Fourier transform and
is a pointwise weight matrix [
26]. After several such layers, a final linear mapping produces the output
. Because of the spectral convolution, the FNO efficiently captures global information and can even generalize across resolutions. It has 20 demonstrated zero-shot super-resolution (evaluating at finer grids) and is much faster at inference than traditional solvers [
26].
For this paper, the FNO type operator was developed, and it has the following structure:
Input is discretized permeability fields on a regular grid . The dimension of input is a matrix of size ;
Output is a predicted discretized pressure fields on a regular grid . The dimension of output is the same as the input: a matrix of size ;
A simple FNO architecture was chosen with
input and output channels,
hidden channels, projection channel ratio set to
, and
n_modes parameter set to
. The FNO was initialized using “neuraloperator” package’s wrapper function
FNO(). The structure is represented by
Figure A3 in
Appendix A.
The ability of neural operators to generalize across input functions is one of its advantages. FNO exhibited zero-shot generalization to finer grid resolutions, enabling high-fidelity super-resolution inference without retraining. Similarly, DeepONet was applied to parametric PDEs and shown to learn nonlinear operators with relatively few training samples. The network successfully predicted solutions for a wide range of input functions, even when the training set was limited to sparse sensor-point evaluations. Neural operators can rapidly forecast the solution for novel permeability fields once they have been taught. Specifically, the FNO also can conduct zero-shot super-resolution outside of the training grid and attain great accuracy [
26]. These models can learn a whole solution manifold and capture intricate mappings in a single shot. Both the FNO and DeepONet have theoretical underpinnings: FNO’s global convolution performs very well in smooth PDEs, while DeepONet is supported by a universal operator approximation theorem [
43]. They can take advantage of GPU acceleration and are very parallelizable.
Cons of neural operators are that their training typically requires a large dataset of input–output function pairs covering the variability in the input space. The FNO is limited to uniform (often periodic) domains since it relies on FFTs; handling complex geometries or irregular grids may require workarounds (e.g., padding) [
44]. DeepONet’s performance depends on sensor placement and may require many sensors for overly complex inputs. Both methods have many hyperparameters (layers, modes, width) and can be memory-intensive. Like other deep models, they lack strict guarantees of physical constraints unless enforced by additional losses, and they may extrapolate poorly outside the training distribution.
4. Conclusions and Recommendations for Further Work
The literature review uncovered the relevance of numerical solutions for the elliptic partial differential equation problem for single-phase flow in porous media. With accurate simulation, real-life decisions could be made less costly and more efficient. For that reason, there are several pre-built simulation tools. Furthermore, nowadays deep learning methods are arising as a new potential numerical solver which could further improve traditional numerical solvers.
The Darcy flow equation for this paper was formulated and different permeability field types were generated. From strictly uniform, to strictly structured, to completely random fields. The generation of these fields is simple and only limited by the researcher’s imagination. For further tasks, one homogenous and heterogenous Gaussian permeability fields were chosen.
Classical numerical methods were realized and FDM/TPFA similarities emerged from visual and accuracy evaluation. All three analyzed methods provided with visually similar pressure fields for both chosen permeability field types. However, FDM and TPFA were remarkably similar with MAE values in the scale of –. The TPFA method was 6 milliseconds faster, meaning it could be used as replacement for FDM without any cost to accuracy for finer grids. The MPFA method differed from the latter methods more due to its different stencil formulation.
Deep learning methods were realized, but challenges regarding it and prediction interpretations were imposed. After many experiments, the PINN model was never fully realized, implying the difficulty of its implementation and the need for a better package with wrappers for simpler usage. The CNN model provided structural errors which correspond to its square convolutional kernels; thus, the provided pressure solution seems “blocky”. The FNO model produced the most promising results, but their comparison with regular numerical solvers was hard due to data standardization steps for numerical stability while training. While full training data standardization provided better accuracy metrics, it made comparison with traditional numerical methods harder due to scale differences.
From all analyzed methods, the TPFA gave the best results compared to the FDM, the MPFA was in the middle, and the CNN was the worst. However, the FNO was fast at inference, indicating it could be used as a faster alternative for the MPFA or other traditional methods due to its ability to learn mappings and no need of iteration over discretized grid. Different permeability field types (homogenous and heterogenous) only had an impact on each method’s accuracy, but not the computational time.
There is significant potential for further improvement in the research presented in this paper. One direction is to compare deep learning methods with established numerical solvers such as the finite volume method (FVM) or the mixed finite element method (MFEM). Additionally, improving the PINN realization and generating solutions for comparison with numerical methods would provide valuable insights.
Another possibility is to analyze the impact of different grid sizes on discretization methods, particularly in terms of accuracy and processing times. It is hypothesized that inference times for numerical methods increase exponentially with grid size, which may highlight the advantage of the FNO as a substitute for computationally heavy methods such as the MPFA. Similarly, operating memory usage, which was not addressed in this work, warrants further investigation to optimize efficiency across the methods.
Further research could also explore the limits of grid discretization size, identifying which of the proposed methods are most suitable for the largest grids. Likewise, while several heterogeneous permeability fields were generated, only one type was tested. Extending this analysis to include additional heterogeneities—such as faults, fractures, or vugs, would expand the scope and applicability of the findings.
The current results are presented for 2D cases, while Darcy flow problems in real-world scenarios are inherently 3D. Future work should extend to three-dimensional simulations, allowing parameters such as viscosity, porosity, and density to vary spatially or temporally rather than being held constant. In addition, testing the robustness of methods under different initial and boundary conditions, or with varying source and sink terms, would further strengthen the conclusions.
Finally, to apply these methods to practical problems, additional research is required to incorporate effects such as compressibility, multiphase flow, and flow through fractured media. These considerations would bring the methodology closer to real-world reservoir conditions and enhance its value for practical applications.