# Weak adversarial networks for solving 2D incompressible Navier-Stokes-Brinkman equations

Wenran Li, Xavier Cadet, Miloud Bessafi, Cédric Damour, Yu Li, Peter Chin, Alain Miranville, Rong Yang, Xinguang Yang, Frederic Cadet

## ► To cite this version:

Wenran Li, Xavier Cadet, Miloud Bessafi, Cédric Damour, Yu Li, et al. Weak adversarial networks for solving 2D incompressible Navier-Stokes-Brinkman equations. 2026. [hal-05472857](https://hal.science/hal-05472857v1)

HAL Id: hal-05472857

https://hal.science/hal-05472857v1

Preprint submitted on 23 Jan 2026

HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
# Weak adversarial networks for solving 2D incompressible Navier-Stokes-Brinkman equations

**Wenran Li**

Inserm, BIGR, DSIMB, University Paris City & University of Reunion

**Xavier Cadet**

Dartmouth College

**Miloud Bessafi**

University of Reunion

**Cédric Damour**

University of Reunion

**Yu Li**

Beijing University of Technology

**Peter Chin**

Dartmouth College

**Alain Miranville**

Université Le Havre Noemandie

**Rong Yang**

Beijing University of Technology

**Xinguang Yang**

Henan Normal University

**Frederic Cadet**

frederic.cadet.run@gmail.com

Inserm, BIGR, DSIMB, University Paris City & University of Reunion

## Research Article

**Keywords:** Weak adversarial networks; Navier-Stokes-Brinkman equations; porous media

**Posted Date:** January 16th, 2026

**DOI:** https://doi.org/10.21203/rs.3.rs-8437189/v1

**License:** © This work is licensed under a Creative Commons Attribution 4.0 International License.

Read Full License
Weak adversarial networks for solving 2D
incompressible Navier-Stokes-Brinkman equations

Wenran Li¹†, Xavier Cadet²†, Miloud Bessafi³, Cédric Damour³,
Yu Li⁴, Peter Chin², Alain Miranville⁵, Rong Yang⁶,
Xinguang Yang⁷, Frederic Cadet¹,⁸*

¹Inserm, BIGR, DSIMB, University Paris City & University of Reunion, Paris, 75015, France.

²Dartmouth College, Hanover, NH 03755, USA.

³EnergyLab, University of Reunion, Saint-Denis, CS 92003, France.

⁴School of Information Science and Technology and Beijing Institute of Artificial Intelligence, China.

⁵Laboratoire de Mathématiques Appliquées du Havre (LMAH), Université Le Havre Noemandie, Le Havre, France.

⁶School of Mathematics, Statics, and Mechanics, Beijing University of Technology, Beijing, 100124, China.

⁷Department of Mathematics and Information Science, Henan Normal University, Xinxiang, 453007, China.

⁸AI for Biologics, PEACCEL, Paris, France.

*Corresponding author(s). E-mail(s): frederic.cadet.run@gmail.com;
Contributing authors: li.wenran@reunion-univ.fr;
xavier.cadet.fjf@gmail.com;
†These authors contributed equally to this work.

Abstract

The use of neural networks has shown significant potential to reduce the compu-
tational costs associated with the dynamics of industrial computational fluids.
Weak adversarial networks (WAN) leverage weak solution theory to transform
the problem of solving PDEs into a Min-Max optimization problem, which is then
solved by training a generative adversarial network. Although this method has
been successfully applied to two-dimensional (2D) Navier-Stokes (NS) equations,
previous work says nothing about the Navier-Stokes-Brinkman (NSB) equations.
In this study, we first leverage the stream function to introduce the biharmonic
formulation of NSB equations. Then, we extend the WAN framework to solve NS equations in porous media (WAN2DNSB) and provide free surface flow as a numerical experiment. Our results demonstrate the stability and accuracy of the proposed method, highlighting its advantages over the traditional Physic-Informed Neural Networks (PINNs) algorithm, particularly for problems lacking strong solutions. This work contributes to the growing research on AI-driven numerical methods for complex fluid dynamics problems, offering a promising approach for industrial applications.

**Keywords:** Weak adversarial networks; Navier-Stokes-Brinkman equations; porous media.

# 1 Introduction

Navier-Stokes-Brinkman equations are a mathematical model in fluid mechanics that describe the flow of fluids through regions containing porous media or densely packed permeable solid structures. They serve as a unified framework to seamlessly simulate fluid behavior across both free-flow zones and porous-medium zones. This system includes:

* Navier-Stokes (NS) equations: Govern the motion of Newtonian fluids (e.g., air, water) in open domains, accounting for inertia, pressure, and viscous stresses.

* Darcy's law: Describes slow, creeping flow in porous materials (e.g., soil, rock) where resistance dominates due to fluid-solid interactions at the pore scale.

* Brinkman's extension: Darcy's law fails near interfaces or in high-porosity media where shear effects matter. Brinkman added an effective viscous diffusion term (a Laplacian term as in NS) to Darcy's equation, enabling smooth transitions between free and porous regions.

The flow of an incompressible fluid through a porous media is governed by the Navier-Stokes-Brinkman equations [1]. Consider the domain $\Omega \times [0, T]$, for $(x, y) \in \Omega, t \in [0, T]$, NS in porous media can be described as

$$ 
\left\{ 
\begin{array}{ll} 
\nabla \cdot \mathbf{V} = 0, & (x, y, t) \in \Omega \times [0, T], \\ 
\rho \frac{\partial \mathbf{V}}{\partial t} + \rho(\mathbf{V} \cdot \nabla)\mathbf{V} = -\epsilon \nabla P + \mu \nabla^2 \mathbf{V} - \frac{\mu}{k} \mathbf{V} + \mathbf{f}, & (x, y, t) \in \Omega \times [0, T], \\ 
\mathbf{V} = \mathbf{V}_b(x, y, t) & (x, y) \in \partial\Omega, t \in [0, T], \\ 
\mathbf{V} = \mathbf{V}_0(x, y) & (x, y) \in \Omega \cup \partial\Omega, t = 0. 
\end{array} 
\right. 
\quad (1) 
$$

where $\nabla \cdot$ denotes the divergence operator, $\mathbf{V}$ is the Darcy velocity vector, $t$ represents time, $\epsilon$ the porosity, $\rho$ the constant fluid density, $\mu$ the dynamic viscosity, $P$ the pressure field, $k$ the permeability tensor, $\mathbf{f}$ the body force vector, and $\nabla^2$ the Laplacian operator. Letting $u$ and $v$ denote the Cartesian components of $\mathbf{V}$, the incompressible
Navier-Stokes equations for porous media flow are expressed as:

$$ 
\begin{gathered}
\frac{\partial u}{\partial x} + \frac{\partial v}{\partial y} = 0 \\
\rho \frac{\partial u}{\partial t} + \rho(u \frac{\partial u}{\partial x} + v \frac{\partial u}{\partial y}) = -\epsilon \frac{\partial P}{\partial x} + \mu(\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2}) - \frac{\mu}{k} u + f_1 \quad (2) \\
\rho \frac{\partial v}{\partial t} + \rho(u \frac{\partial v}{\partial x} + v \frac{\partial v}{\partial y}) = -\epsilon \frac{\partial P}{\partial y} + \mu(\frac{\partial^2 v}{\partial x^2} + \frac{\partial^2 v}{\partial y^2}) - \frac{\mu}{k} v + f_2
\end{gathered}
$$

Neural networks impact the numerical solution of partial differential equations (PDE) [2, 3]. Using Sobolev space theory [4] and the architecture of Generative adversarial networks (GAN) [5], Zang et al. [6] established the Weak Adversarial Network (WAN), transforming the problem of solving partial differential equations into a Min-Max problem. Their team also applied WAN to inverse problems [7] and constrained optimization problems [8]. Jiao et al. [9] conducted a WAN convergence analysis and renamed this model the deep Galerkin method for weak solutions (DGMW). Building on WAN, Oliva et al. developed a new network called XNODE-WAN [10] and used it to solve high-dimensional parabolic equations. Dian et al. proposed the fractional Weak Adversarial Network (f-WAN) [11], specifically designed to solve fractional order advection-diffusion equations based on weak solution theory. Li et al. [12] applied WAN to solve 2D NS equations but did not mention the 2D NS equation in porous media [13], whose governing equations incorporate the Darcy drag term in addition to the standard NS terms.

The main aim of this paper is to solve the NS equations in porous media. The main contribution can be summarized as follows:

* We give the stream function form of the NS equations in porous media and their weak form; furthermore, we adapt this weak form to the WAN architecture and build a new algorithm to solve 2D NS in porous media.

* We present free surface flow as an example and compare the results with PINNs [14] to show that WAN for NS in porous media can achieve higher accuracy.

# 2 Formulation of the problem

We leverage the stream function to give a biharmonic form of the NS equation (see [15], also called the stream function form), and then define its weak solution. We built an adversarial neural network to solve this equation according to their definition of a weak solution.

## 2.1 Weak solution for the Governing equations

Let $T > 0$, $\Omega = \{(x, y) | |x| < 1, |y| < 1\}$, and $\partial\Omega$ be its boundary. $\psi(x, y, t)$ is the stream function given by $u = \partial\psi/\partial y, v = -\partial\psi/\partial x$. For simplicity, let $\psi_t = \partial\psi/\partial t$, $\psi_x = \partial\psi/\partial x, \psi_y = \partial\psi/\partial y$, and define $G(\psi, \phi) = \psi_y(\Delta\phi)_x - \psi_x(\Delta\phi)_y$. By taking the curl of Eq. (1), the NS equation about the velocity can be transformed into the equation about the stream function, and the pressure $P$ can be eliminated. Neglecting
the external force term $f$, the stream function form of Eq. (1) with initial and boundary conditions can be written as,

$$ egin{cases} 
\rho \frac{\partial}{\partial t} \Delta \psi + \rho G(\psi, \psi) - \mu \Delta^2 \psi - \frac{\mu}{k} \nabla^2 \psi = 0, & \text{in } \Omega \times [0, T], \\
\psi(x, y, t) = \psi_b(x, y, t), & \text{on } \partial \Omega \times (0, T], \\
\psi(x, y, 0) = \psi_0(x, y), & \text{in } \Omega \cup \partial \Omega.
\end{cases} 
\quad (3) $$

For $\psi \in H^2(\Omega)$ and $\phi, \omega \in H_0^2(\Omega)$, we define the trilinear form $J(\psi, \phi, \omega) = (\Delta\phi, \psi_y\omega_x - \psi_x\omega_y)$. By integrating by parts, we obtain the relation of $G(\psi, \phi)$ and $J(\psi, \phi, \omega): J(\psi, \phi, \omega) = -(G(\psi, \phi), \omega)$.

**Theorem 1** (Equivalence with porous term) Assume $\Omega \subset \mathbb{R}^2$ is simply connected and $T > 0$. Let $\nu > 0$ and $\kappa \ge 0$ be constants. Then the stream-function (biharmonic) formulation (3) is equivalent to the primitive-variable incompressible Navier-Stokes-Brinkman system (1) in two dimensions, under suitable regularity and compatible initial/boundary data.

*Proof* We prove both directions.

(Primitive $\Rightarrow$ biharmonic). Let $(u, P)$ be a sufficiently regular solution of

$$ \partial_t u + (u \cdot \nabla)u + \frac{\epsilon}{\rho} \nabla P - \nu \Delta u + \kappa u = 0, \quad \nabla \cdot u = 0 \quad \text{in } \Omega \times (0, T). \quad (4) $$

$\kappa = \frac{k}{\mu} > 0$ is the permeability constant. Since $\Omega$ is simply connected and $\nabla \cdot u = 0$, there exists a stream function $\psi$ such that

$$ u = \nabla^{\perp} \psi := (\partial_y \psi, -\partial_x \psi). $$

Define the scalar vorticity $\omega := \partial_x u_2 - \partial_y u_1$. Then $\omega = -\Delta\psi$. Taking the scalar curl of (4) eliminates the pressure term because $\nabla \times \nabla P = 0$, and yields

$$ \partial_t \omega + (u \cdot \nabla)\omega - \nu \Delta \omega + \kappa \omega = 0. $$

Substituting $\omega = -\Delta\psi$ and $u = \nabla^{\perp}\psi$ gives

$$ -\partial_t \Delta \psi + (u \cdot \nabla)(-\Delta \psi) - \nu \Delta(-\Delta \psi) + \kappa(-\Delta \psi) = 0, $$

i.e.

$$ \partial_t \Delta \psi + J(\Delta \psi, \psi) - \nu \Delta^2 \psi + \kappa \Delta \psi = 0, $$

where $J(a, b) = a_x b_y - a_y b_x$ is the Jacobian determinant. Together with boundary/initial conditions translated via $u = \nabla^{\perp}\psi$ (and a gauge choice for $\psi$), this is exactly (3).

(Biharmonic $\Rightarrow$ primitive). Conversely, let $\psi$ satisfy (3). Define

$$ u := \nabla^{\perp} \psi, \quad \omega := -\Delta \psi. $$

Then $\nabla \cdot u = 0$ holds identically, and (3) implies the vorticity equation

$$ \partial_t \omega + (u \cdot \nabla)\omega - \nu \Delta \omega + \kappa \omega = 0. $$

Set

$$ F := \partial_t u + (u \cdot \nabla)u - \nu \Delta u + \kappa u. $$
Taking the curl of $F$ and using the above vorticity equation yields $\nabla \times F = 0$. On a simply connected domain, any sufficiently regular vector field with zero curl is a gradient, hence there exists a scalar $P$ such that $F + \frac{1}{\rho}\nabla P = 0$, i.e.

$$ \partial_t u + (u \cdot \nabla)u + \nabla P - \nu \Delta u + \kappa u = 0. $$

The initial and boundary conditions for $u$ follow from those of $\psi$ by construction. Therefore, $(u, P)$ solves (1). This proves the equivalence. $\square$

For given initial and boundary data

$$ \psi_b \in L^2(0, T; H^{\frac{1}{2}}(\partial\Omega)), \quad \psi_0 \in H^1(\Omega), $$

a weak solution of (3) is a function

$$ \psi \in L^2(0, T; H^2(\Omega)), \quad \partial_t \psi \in L^2(0, T; L^2(\Omega)), $$

such that for all test functions $\phi \in H_0^2(\Omega)$,

$$ \left\{ \begin{array}{l} (\partial_t \nabla^\perp \psi, \nabla^\perp \phi) + \mu(\Delta \psi, \Delta \phi) + \rho J(\psi, \psi, \phi) + \kappa(\nabla^\perp \psi, \nabla^\perp \phi) = 0, \\ \psi(x, y, 0) = \psi_0(x, y), \\ \psi(x, y, t) = \psi_b(x, y, t) \quad \text{on } \partial\Omega \times (0, T). \end{array} \right. \qquad (5) $$

## 2.2 WAN algorithm

Define a special operator

$$ \mathcal{A}_t[\psi] := -\rho \frac{\partial}{\partial t} \Delta \psi - \rho G(\psi, \psi) + \mu \Delta^2 \psi - \frac{\mu}{k} \nabla^2 \psi, \quad \psi \in L^2(0, T; H^2(\Omega)) $$

and regard $\mathcal{A}_t[\psi] \in H^{-2}(\Omega)$ as a linear functional on $H_0^2(\Omega)$ for almost every $t \in [0, T]$. The dual product $\langle \mathcal{A}_t[\psi], \phi \rangle$ can be calculated as follows:

$$ \langle \mathcal{A}_t[\psi], \phi \rangle = \left( \rho \frac{\partial}{\partial t} \nabla \psi, \nabla \phi \right) + \mu(\Delta \psi, \Delta \phi) + \rho J(\psi, \psi, \phi) + \frac{\mu}{k}(\nabla \psi, \nabla \phi). $$

The norm of $\mathcal{A}_t[\psi]$ is non-negative.

$$ \| \mathcal{A}_t[\psi] \|_{op} := \sup_{\phi \in H_0^2(\Omega)} \frac{\langle \mathcal{A}_t[\psi], \phi \rangle}{\|\phi\|_{H_0^2}}, \quad \text{for } t \in [0, T], \qquad (6) $$

so the governing equation in Eq. (5) is equal to

$$ \min_{\psi \in H^2} \| \mathcal{A}_t[\psi] \|_{op}^2 = \min_{\psi \in H^2} \max_{\phi \in H_0^2} \frac{\langle \mathcal{A}_t[\psi], \phi \rangle^2}{\|\phi\|_{H_0^2}^2}. \qquad (7) $$
<figure><img src="image_2.png" /><figcaption>Fig. 1: WAN workflow for the stream function form of Navier Stokes in porous media.</figcaption></figure>

So we can build a network as in Fig. 1 and train this network by setting their loss function for generator network as:

$$L_{\psi}(\theta, \eta) = L_{e}(\theta, \eta) + \alpha L_{i}(\theta) + \beta L_{b}(\theta), \qquad (8)$$

where

$$L_{e}(\theta, \eta) = \frac{1}{N_{e}} \sum_{j=1}^{N_{e}} |\langle A_{t}[\psi_{\theta}](x_{j}, y_{j}), \phi_{\eta}(x_{j}, y_{j}) \rangle|^{2},$$

$$L_{i}(\theta) = \frac{1}{N_{I}} \sum_{j=1}^{N_{I}} |\psi_{\theta}(x_{j}, y_{j}) - \psi_{0}(x_{j}, y_{j})|^{2},$$

$$L_{b}(\theta) = \frac{1}{N_{b}} \sum_{j=1}^{N_{b}} |\psi_{\theta}(x_{j}, y_{j}) - \psi_{b}(x_{j}, y_{j})|^{2}.$$

Set the loss function for the adversarial network as

$$L_{\phi}(\theta, \eta) = -L_{e}(\theta, \eta) + L_{b}(\eta), \qquad (9)$$

where $L_b(\eta) = \frac{1}{N_b} \sum_{j=1}^{N_b} |\phi_{\eta}(x_j, y_j) - 0|^2$. Here, $\theta, \eta$ denote the hyperparameter of the network simulating $\psi$ ans $\phi$, $L_e, L_i$ and $L_b$ represent the residuals corresponding to the equation, the initial condition, and the boundary condition, respectively. $N_e, N_I$, and $N_b$ denote the number of sampling points used to calculate different terms, respectively. $\alpha$ and $\beta$ are hyperparameters used to balance the weights of different terms.

All the above methods can be summarized as Algorithm 1.
**Algorithm 1** WAN for Solving 2D Navier-Stokes-Brinkman Equations

**Input:** Domain $\Omega \times [0, T]$; number of interior samples $N_r$, boundary samples $N_b$, initial samples $N_I$; number of iterations $K$; inner loop steps $k_\psi, k_\phi$; learning rates $\tau_\theta, \tau_\eta$.

**Initialization:**

* Initialize the neural network $\psi_\theta: \Omega \times [0, T] \to \mathbb{R}$ to approximate the stream function;

* Initialize the adversarial test function network $\phi_\eta: \Omega \to \mathbb{R}$;

* Initialize parameters $\theta$ and $\eta$.

**Repeat** (for $i = 1, \dots, K$):

1. Sampling

* Sample interior points $S_r \subset \Omega$;

* Sample boundary points $S_b \subset \partial\Omega$;

* Sample initial points $S_I \subset \Omega$ at $t = 0$.

2. Loss evaluation

* Evaluate the weak residual loss $L_\psi$ using $(\psi_\theta, \phi_\eta)$;

* Evaluate the initial and boundary condition losses.

3. Primal update (minimization)

Repeat $k_\psi$ times:

$$ \theta \leftarrow \theta - \tau_{\theta} \nabla_{\theta} L_{\psi}. $$

4. Adversarial update (maximization)

Repeat $k_\phi$ times:

$$ \eta \leftarrow \eta - \tau_{\eta} \nabla_{\eta} L_{\phi}. $$

**Output:** Approximate stream function $\psi_\theta(x, y, t)$ and velocity field

$$ u^{\theta} = \frac{\partial \psi_{\theta}}{\partial y}, \qquad v^{\theta} = -\frac{\partial \psi_{\theta}}{\partial x}. $$

3 Numerical experiments: inclined channel flow

In this experiment, we consider a steady incompressible flow between two parallel plane boundaries inclined at an angle $\alpha = 30^\circ$. The flow is driven by the combined effects of gravity and a constant pressure gradient along the $x$-direction. Under the fully developed flow assumption, the velocity field is uniform in the $x$-direction and depends only on the transverse coordinate, i.e., $u = u(y)$, while the transverse velocity vanishes, $v \equiv 0$. The boundary conditions are prescribed as

$$ u(x, 0) = u_0, \qquad u(x, h) = u_1. $$
<figure><img src="image_3.png" /><figcaption>Fig. 2: Schematic illustration of a two-dimensional inclined channel flow. The flow is confined between two parallel plates separated by a distance h and inclined at an angle θ = 30°. Gravity acts along the inclined direction. To approximate the motion of a free-surface flow, the upper boundary is modeled as a fictitious moving plate with constant velocity u₁, while the lower plate moves with velocity u₀.</figcaption></figure>

In the limiting case where the Darcy resistance is neglected (i.e., the permeability $k \to \infty$), the Navier–Stokes–Brinkman equations reduce to the classical Stokes equation, for which an analytical parabolic solution exists. Setting $u_0 = 0$, $h = 1$, and $\epsilon = 1$, the analytical solution is given by

$$u^*(y) = \frac{\rho g h^2 \sin \theta}{2\mu} \left( 2\frac{y}{h} - \left(\frac{y}{h}\right)^2 \right).$$

This velocity profile coincides with the classical free-surface solution of a viscous film flowing down an inclined plane. In the present channel-flow setting, it is interpreted as a Couette–Poiseuille flow, where the upper plate moves with velocity

$$u_1 = u^*(h) = \frac{\rho g h^2 \sin \theta}{2\mu},$$

and the no-slip condition enforces $u(y = h) = u_1$. The above solution is therefore used as a reference solution. In the presence of Darcy resistance (finite permeability k), the steady Navier–Stokes–Brinkman equation admits an analytical solution of hyperbolic type,

$$u(y) = U_p + (u_0 - U_p) \cosh\left(\frac{y}{\sqrt{k}}\right) + \frac{u_1 - U_p - (u_0 - U_p) \cosh\left(\frac{h}{\sqrt{k}}\right)}{\sinh\left(\frac{h}{\sqrt{k}}\right)} \sinh\left(\frac{y}{\sqrt{k}}\right),$$
where $U_p = \frac{k\rho g \sin \theta}{\mu}$.

<figure><img src="image_4.png" /><figcaption>(a) $u_{WAN}$ (left), $u_{PINN}$ (middle) and $u^*$ (right).</figcaption></figure>

<figure><img src="image_5.png" /><figcaption>(b) The $L^2$ error varies with the number of training iterations in WAN.</figcaption></figure>

<caption>(c) Absolute error: $|u_{WAN} - u^*|$ (left) and $|u_{PINN} - u^*|$ (right).</caption>

**Fig. 3: The results of inclined channel flow.** (a) Solutions visualized using a unified color bar, demonstrating that both WAN and PINN achieve satisfactory agreement with the exact solution. (b): Evolution of $L^2$ error in WAN throughout training iterations, showing error stabilization at $10^{-2}$ magnitude. (c): Absolute error distributions under identical color mapping. Notably, WAN exhibits darker hues (lower errors) compared to PINNs lighter tones (higher errors), particularly pronounced in boundary regions. This contrast quantitatively confirms WAN superior accuracy over PINN.

We consider the steady fully developed inclined channel flow, where $u = u(y)$ and $v \equiv 0$. For $k \to \infty$, the NSB system reduces to the classical Stokes equation, yielding the parabolic reference solution $u^*(y)$. For finite permeability $l$, the NSB admits a closed-form solution of hyperbolic/exponential type; the derivation is provided in Appendix A.

There are 100 randomly selected points on each side of the square boundary, and 20,000 randomly selected points inside the domain to train the network. We apply Algorithm 1 to Eq. (8) and Eq. (9) with $K = 1$, $k_\psi = 2$, $k_\phi = 1$, $\tau_\theta = 0.015$, $\tau_\eta = 0.04$.
The generative network is built as a fully connected neural network with 6 layers, 20 units per layer, and the adversarial network has 6 layers, 50 units per layer.

Setting the same hyperparameters with WAN, we use the Python package DeepXDE [16] to train the PINNs for the NSB equation. We illustrate our results in Fig. 3, The $L^2$ error trajectory of PINNs (implemented via the DeepXDE framework) is unavailable due to inherent package constraints. We can see that although PINNs achieve high accuracy, the WAN performs better and more accurately in the boundary area.

# 4 Conclusion

This paper leverages the WAN algorithm into the NSB equation. WAN is more accurate than traditional PINNs. For equations which do not have a strong solution, WAN provides a new way to solve them. However, this algorithm is more time-consuming than PINNs. We believe that the 3D equation will be closer to the real-world subject for future work.

**Acknowledgements.** W. Li is supported by a Ph.D. grant from the Region Reunion and the European Union (FEDER-FSE 2021/2027). PEACCEL was supported through a research program partially co-funded by the European Union (UE) and the Region Reunion (FEDER). We gratefully acknowledge Google Cloud for providing supportive access to their computational clusters.

# References

[1] Cebeci, T., Shao, J.P., Kafyeke, F., Laurendeau, E.: Computational Fluid Dynamics for Engineers: From Panel to Navier-Stokes Methods with Computer Programs. Springer, Heidelberg (2005). https://doi.org/10.1007/978-3-540-26379-6

[2] Dissanayake, M.W.M.G., Phan-Thien, N.: Neural-network-based approximations for solving partial differential equations. In: Proceedings of the 12th International Conference on Numerical Methods in Engineering, pp. 195–201. John Wiley & Sons, Sydney (1994)

[3] Weinan, E., Han, J., Jentzen, A.: Algorithms for solving high dimensional pdes: From nonlinear monte carlo to machine learning. Nonlinearity 35(1), 278 (2021) https://doi.org/10.1088/1361-6544/ac3f0a

[4] Evans, L.C.: Partial Differential Equations vol. 19, 2nd edn. American Mathematical Society, Providence, RI (2010)

[5] Goodfellow, I., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., Bengio, Y.: Generative adversarial networks. Communications of the ACM 63(11), 139–144 (2020)
[6] Zang, Y., Bao, G., Ye, X., Zhou, H.: Weak adversarial networks for high-dimensional partial differential equations. Journal of Computational Physics **411**, 109409 (2020) https://doi.org/10.1016/j.jcp.2020.109409

[7] Bao, G., Ye, X., Zang, Y., Zhou, H.: Numerical solution of inverse problems by weak adversarial networks. Inverse Problems **36**(11), 115003 (2020) https://doi.org/10.1088/1361-6420/abb6e7

[8] Bao, G., Wang, D., Zou, B.: Wanco: Weak adversarial networks for constrained optimization problems. arXiv preprint arXiv:2407.03647 (2024)

[9] Jiao, Y., Lai, Y., Wang, Y., Yang, H., Yang, Y.: Convergence analysis of the deep galerkin method for weak solutions. arXiv preprint arXiv:2302.02405 (2023)

[10] Oliva, P.V., Wu, Y., He, C., Ni, H.: Towards fast weak adversarial training to solve high dimensional parabolic partial differential equations using xnode-wan. Journal of Computational Physics **463**, 111233 (2022) https://doi.org/10.1016/j.jcp.2022.111233

[11] Feng, D., Yang, Z., Zou, S.: Fractional weak adversarial networks for the stationary fractional advection dispersion equations. arXiv preprint arXiv:2305.19571 (2023)

[12] Li, W.-R., Yang, R., Yang, X.-G.: Weak adversarial networks for solving forward and inverse problems involving 2d incompressible navier–stokes equations. Computational and Applied Mathematics **43**, 61 (2024) https://doi.org/10.1007/s40314-023-02574-6

[13] Khan, W., Yousafzai, F., Chohan, M.I., Zeb, A., Zaman, G., Jung, I.H.: Exact solutions of navier–stokes equations in porous media. International Journal of Pure and Applied Mathematics **96**, 235–247 (2014) https://doi.org/10.12732/ijpam.v96i2.7

[14] 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. Journal of Computational Physics **378**, 686–707 (2019) https://doi.org/10.1016/j.jcp.2018.10.045

[15] Guo, B.-Y., He, L.-P., Mao, D.-K.: On the two-dimensional navier–stokes equations in stream function form. Journal of Mathematical Analysis and Applications **205**, 1–31 (1997) https://doi.org/10.1006/jmaa.1996.5174

[16] Lu, L., Meng, X., Mao, Z., Karniadakis, G.E.: Deepxde: A deep learning library for solving differential equations. SIAM Review **63**(1), 208–228 (2021) https://doi.org/10.1137/19M1274067
# Appendix

This appendix provides the analytical derivation of the steady fully developed inclined channel flow governed by the Navier-Stokes-Brinkman equations. The appendix is organized as follows:

* **Appendix A.1** introduces the Navier-Stokes-Brinkman model with gravity forcing for an inclined porous channel.

* **Appendix A.2** presents the steady and fully developed assumptions, together with the imposed boundary conditions.

* **Appendix A.3** derives the reduced ordinary differential equations for the velocity and pressure profiles.

* **Appendix A.4** provides the closed-form analytical solution of the velocity profile in the presence of Darcy resistance.

* **Appendix A.5** applies the boundary conditions and discusses the influence of permeability on the flow structure.

## Appendix A Steady inclined porous-channel solution with cross-flow

### A.1 Model and gravity forcing

We start from the 2D incompressible Navier-Stokes-Brinkman system (Eq. (2) in the manuscript) with $f_1 = f_2 = 0$ and include gravity for an inclined channel at angle $\theta$. Using coordinates

$x$: along the channel (downslope), $y$: normal to the plates (away from the lower plate),

the gravity components are $\rho g \sin \theta$ along $x$ and $-\rho g \cos \theta$ along $y$. With the manuscript convention (pressure multiplied by $\varepsilon$), the equations read

$$u_x + v_y = 0, \qquad (A1)$$

$$\rho(u_t + u u_x + v u_y) = -\varepsilon P_x + \mu(u_{xx} + u_{yy}) - \frac{\mu}{k} u + \rho g \sin \theta, \qquad (A2)$$

$$\rho(v_t + u v_x + v v_y) = -\varepsilon P_y + \mu(v_{xx} + v_{yy}) - \frac{\mu}{k} v - \rho g \cos \theta. \qquad (A3)$$

### A.2 Assumptions (steady, 1D in $y$)

We impose the steady, fully-developed ansatz

$$u = u(y), \quad v = v_0 \quad (\text{constant}), \quad P = P(y),$$

so that $u_t = v_t = 0$ and $P_x = 0$. We also prescribe the moving-plate boundary data

$$u(0) = 0, \quad u(h) = U_1, \quad U_1 := \frac{\rho g h^2 \sin \theta}{2\mu}. \qquad (A4)$$
Under $u = u(y)$ and $v = v_0$, incompressibility (A1) is automatically satisfied: $u_x + v_y = 0 + 0 = 0$.

### A.3 Reduced ODEs for $u(y)$ and $P(y)$

Using $u_x = 0$, $u_y = u'(y)$, $u_{xx} = 0$, $u_{yy} = u''(y)$, and $P_x = 0$, the x-momentum equation (A2) reduces to

$$ \rho v_0 u'(y) = \mu u''(y) - \frac{\mu}{k} u(y) + \rho g \sin \theta, \quad (A5) $$

equivalently

$$ \mu u''(y) - \rho v_0 u'(y) - \frac{\mu}{k} u(y) + \rho g \sin \theta = 0. \quad (A6) $$

Since $v = v_0$ is constant, the y-momentum equation (A3) becomes

$$ 0 = -\varepsilon P'(y) - \frac{\mu}{k} v_0 - \rho g \cos \theta, \quad (A7) $$

hence

$$ P'(y) = -\frac{1}{\varepsilon} \left( \frac{\mu}{k} v_0 + \rho g \cos \theta \right), \quad P(y) = -\frac{1}{\varepsilon} \left( \frac{\mu}{k} v_0 + \rho g \cos \theta \right) y + P_0, \quad (A8) $$

for an integration constant $P_0$.

### A.4 Closed-form solution for $u(y)$

A constant particular solution of (A6) is

$$ u_p = \frac{\rho g \sin \theta}{\mu} k. \quad (A9) $$

The homogeneous equation $\mu u'' - \rho v_0 u' - (\mu/k)u = 0$ has characteristic equation $\mu r^2 - \rho v_0 r - \mu/k = 0$, with roots

$$ r_{1,2} = \frac{\rho v_0 \pm \sqrt{(\rho v_0)^2 + \frac{4\mu^2}{k}}}{2\mu}. \quad (A10) $$

Therefore,

$$ u(y) = u_p + C_1 e^{r_1 y} + C_2 e^{r_2 y}. \quad (A11) $$

### A.5 Imposing $u(0) = 0$ and $u(h) = U_1$

Let $\Delta := e^{r_1 h} - e^{r_2 h}$. A convenient boundary-satisfying representation is

$$ u(y) = u_p + \frac{(0 - u_p)(e^{r_1(h-y)} - e^{r_2(h-y)})}{\Delta} + \frac{(U_1 - u_p)(e^{r_1 y} - e^{r_2 y})}{\Delta}, \quad U_1 = \frac{\rho g h^2 \sin \theta}{2\mu}. \quad (A12) $$
It is immediate that $u(0) = 0$ and $u(h) = U_1$. Equivalently, one may write (A11) with

$$C_1 = \frac{(U_1 - u_p) + u_p e^{r_2h}}{e^{r_1h} - e^{r_2h}}, \qquad (A13)$$

$$C_2 = \frac{-u_p e^{r_1h} - (U_1 - u_p)}{e^{r_1h} - e^{r_2h}}. \qquad (A14)$$

### Remark.

For finite permeability $k$, the Darcy/Brinkman resistance term modifies the channel profile; the classical non-porous Poiseuille/Couette reference is recovered only when porous resistance is negligible (e.g. large $k$) and assumptions are chosen consistently.

## List of Abbreviations

NS Navier-Stokes equations

NSB Navier-Stokes-Brinkman equations

WAN Weak Adversarial Network

PINN Physics-Informed Neural Network

DGMW Deep Galerkin Method for Weak solutions

ODE Ordinary Differential Equation

PDE Partial Differential Equation

GAN Generative Adversarial Network

Re Reynolds number

BC Boundary Condition

IC Initial Condition