Skip to content

adjoint-poiseuille2d

English | Japanese

« Home · « Optimization, inverse problems and uncertainty

Discrete-adjoint LBM sensitivity on body-force-driven plane Poiseuille flow, validated cell-for-cell against central finite differences. A clean-room demonstrator of "differentiate the converged LBM fixed point" -- the building block of LBM-based gradient optimisation / topology / parameter design.

Plots

Time series and distributions of the QoI written by this computation. Where a reference value exists it is overlaid as a horizontal line.

adjoint-poiseuille2d grad-field

adjoint-poiseuille2d objective

adjoint-poiseuille2d profile-match

Build & run

cmake -S native -B native/build && cmake --build native/build -j
./native/build/orheo-adjoint-poiseuille2d

adjoint_poiseuille2d [N] [Re] [outdir]

Cost of the computation that made the figures on this page (Miyabi-G Grace CPU (72 cores, -stdpar=multicore)): 99.8 s wall.

Validation

Tier T0 — order of convergence verified
QoI gradient_error
Reference discrete adjoint gradient vs finite differences
Gate — no gate

Source & run details

View source

Item Value
Target orheo-adjoint-poiseuille2d
Source native/benchmarks/adjoint_poiseuille2d.cpp
Lattice D3Q19
GPU twin no
Modules lbm_d3q19.hpp
Gallery run 2026-07-27 @ 7628c0cf
Args 16 2 .
Wall time 99.82 s
CPU time 4991.82 s
Device Miyabi-G Grace CPU (72 cores, -stdpar=multicore)

Computation log

The actual output of this computation (head and tail).

adjoint_poiseuille2d  N=16 Re=2.0 nu=0.40000 Gref=6.2500e-04 (tau=1.7000)
[forward] target profile at Gtgt=8.1250e-04 ...
[forward] control profile at Gbase=6.2500e-04 ...
  target steps=2501 control steps=2501  J0=2.04797145e-03  umax_ctrl=0.05111
[adjoint] converged in 90000 iters. dJ/dG (scalar, sum of field) = -2.1845028750e+01
[FD-scalar] sweeping step h ...
  h=6.250e-05 (h/G=1.0e-01)  FD=-2.1845028750e+01  adj=-2.1845028750e+01  rel=4.456e-14
  h=3.125e-05 (h/G=5.0e-02)  FD=-2.1845028750e+01  adj=-2.1845028750e+01  rel=4.635e-14
  h=1.563e-05 (h/G=2.5e-02)  FD=-2.1845028750e+01  adj=-2.1845028750e+01  rel=2.347e-13
  h=7.813e-06 (h/G=1.3e-02)  FD=-2.1845028750e+01  adj=-2.1845028750e+01  rel=1.106e-12
  h=3.906e-06 (h/G=6.3e-03)  FD=-2.1845028750e+01  adj=-2.1845028750e+01  rel=5.676e-14
  h=1.953e-06 (h/G=3.1e-03)  FD=-2.1845028750e+01  adj=-2.1845028750e+01  rel=7.530e-14
  h=9.766e-07 (h/G=1.6e-03)  FD=-2.1845028750e+01  adj=-2.1845028750e+01  rel=2.517e-12
  h=4.883e-07 (h/G=7.8e-04)  FD=-2.1845028750e+01  adj=-2.1845028750e+01  rel=7.060e-12
...

  it=10  J=3.555710e-06  (grad_norm=6.692e-02 step=2.697e-04)
  it=15  J=2.506032e-06  (grad_norm=5.657e-02 step=2.560e-04)
[opt] J: 2.047971e-03 -> 1.967093e-06  (1041.12x reduction)

==== SUMMARY ====
scalar adjoint dJ/dG = -2.1845028750e+01 ; best FD = -2.1845028750e+01 ; rel-err = 4.456e-14 at h/G=1.0e-01
distributed field: max adjoint-vs-FD rel-err over 7 rows = 2.023e-12
optimisation: J 2.048e-03 -> 1.967e-06
PASS (discrete adjoint reproduces finite-difference gradient)