Solving the Falkner‑Skan Viscous Boundary Layer with Physics‑Informed Neural Networks (PINN)

This tutorial demonstrates how to solve the two‑dimensional steady incompressible Falkner‑Skan viscous boundary‑layer equations using a physics‑informed neural network implemented in JAX, detailing the network architecture, loss construction, two‑stage training strategy, and achieving sub‑0.01 % relative errors with only 1 % interior collocation points.

AI Agent Research Hub
AI Agent Research Hub
AI Agent Research Hub
Solving the Falkner‑Skan Viscous Boundary Layer with Physics‑Informed Neural Networks (PINN)

Problem Background and Application Scenario

The Falkner‑Skan boundary‑layer model describes the thin shear layer that forms near a wall in wedge‑shaped or compressible leading‑edge flows, such as wing leading edges, inlet wedges, nozzle expansions, and turbine blade surfaces. Before a full CFD mesh is built, engineers often need a quick estimate of the velocity‑pressure distribution near the wall to assess lift, drag, and separation risk.

Governing Equations and Reference Data

The case studies a two‑dimensional steady incompressible Navier‑Stokes system with kinematic viscosity NU = 0.01. The unknown fields are streamwise velocity U, normal velocity V, and pressure P. A reference solution for the Falkner‑Skan parameters is stored in FalknerSkan_n0.08.npz, shifted to a computational domain of (x, y) and sampled on a grid of 100 701 evaluation points.

PINN Architecture and Tensor‑Dimension Handling

A fully‑connected multilayer perceptron (MLP) with 8 hidden layers, each containing 20 tanh‑activated neurons, is used. The network has 3063 trainable parameters and maps the 2‑D scaled coordinates to three output fields ( out_dim=3). Coordinate scaling maps the physical domain to the unit square, preventing magnitude imbalance, while field normalization divides each field by the maximum absolute boundary velocity; pressure is left unscaled because its variation is already small.

def fit_scalex(bc_xy, cp):
    xmin = bc_xy.min(axis=0)
    xmax = np.abs(bc_xy).max(axis=0)
    bc_xy_s = (bc_xy - xmin) / (xmax - xmin)
    cp_s = (cp - xmin) / (xmax - xmin)
    return bc_xy_s, cp_s, xmin, xmax

Loss Construction

Three residual terms are built on the interior collocation points:

Momentum balance: f1 = U*U_x + V*U_y + P_x - nu*(U_xx + U_yy) Pressure constancy in the normal direction: f2 = P_y Mass conservation: f3 = U_x + V_y The total loss is the sum of the boundary loss (mean‑square error between predicted and reference wall velocities) and the PDE loss (mean‑square of f1, f2, f3) without additional weighting.

loss_bc = jnp.mean((pred_bc[:, :2] - bc_uv_s) ** 2)
loss_pde = jnp.mean(f1**2 + f2**2 + f3**2)
loss = loss_bc + loss_pde

Two‑Stage Training Strategy

The optimization is split into a coarse‑tuning phase (first 1000 steps, adaptive learning‑rate, 67.1 s) that reduces the global relative error from the percent level to a few percent, followed by a fine‑tuning phase (steps 1000–51001, quasi‑Newton, 1410.1 s) that drives the three‑component errors down to 0.0143 % (U), 0.0437 % (V) and 0.0031 % (P). The combined wall‑clock time is 1477.2 s.

Sampling Strategy and Computational Scale

Only 1 % of the interior grid (1035 random points) is used as collocation points, while all 1400 boundary grid points are enforced. The total number of training points is 2435, i.e., 2.42 % of the full evaluation set.

Key Code Components

class MLP(nn.Module):
    hidden_dims: Sequence[int]  # [20, 20, ..., 20]
    out_dim: int = 3

    @nn.compact
    def __call__(self, x):
        for w in self.hidden_dims:
            x = jnp.tanh(nn.Dense(w, kernel_init=glorot)(x))
        x = nn.Dense(self.out_dim, kernel_init=glorot)(x)
        return x

Experimental Results and Performance Analysis

During training, the boundary loss dominates early iterations, while the PDE loss catches up in the fine‑tuning stage, leading to synchronized convergence. Final relative errors are sub‑0.05 % for all fields, with the normal velocity showing the highest relative error due to its smaller magnitude. Pressure is post‑processed with a gauge shift to remove the constant offset before error evaluation.

Conclusions and Future Directions

The presented PINN pipeline solves a steady incompressible Falkner‑Skan boundary‑layer problem with only 1 % interior sampling, achieving ten‑thousand‑fold relative accuracy in under 25 minutes. Future work may include adaptive collocation refinement near steep gradients, uncertainty quantification of the predicted fields, and extension to turbulent closure models that introduce Reynolds‑stress terms.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

JAXfluid dynamicsphysics-informed neural networksPINNboundary layerFalkner‑Skan
AI Agent Research Hub
Written by

AI Agent Research Hub

Sharing AI, intelligent agents, and cutting-edge scientific computing

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.