Skip to content

Feat/poiseuille 3d validation#175

Merged
shaia merged 4 commits into
masterfrom
feat/poiseuille-3d-validation
Mar 7, 2026
Merged

Feat/poiseuille 3d validation#175
shaia merged 4 commits into
masterfrom
feat/poiseuille-3d-validation

Conversation

@shaia
Copy link
Copy Markdown
Owner

@shaia shaia commented Mar 7, 2026

No description provided.

shaia added 4 commits March 7, 2026 14:32
…stones (#174)

Add periodic-in-z Poiseuille channel flow test validating 3D solver code
paths against the 2D analytical parabola u(y) = 4*U_max*(y/H)*(1-y/H).

Tests verify: velocity profile accuracy (RMS 0.081), transverse velocities,
mass conservation, pressure gradient (dp/dx = -1.235 vs expected -1.6),
inlet BC exactness, and z-uniformity across planes (6.5e-5).

Key finding: bc_apply_scalar_3d(BC_TYPE_PERIODIC) applies periodic BCs on
ALL 6 faces, destroying wall/inlet/outlet BCs. Fix: apply z-periodic
manually via memcpy of boundary z-planes only.

Also marks v0.2.0 3D milestones complete in ROADMAP and adds TaylorGreen3D,
Quiescent3D to validation test labels in CMake.
…iseuille test

The test only clamped w=0 on the y-walls (top/bottom) but left w
unconstrained on x-faces. The projection solver preserves caller-set
boundary values via copy_boundary_velocities_3d, so unset w values on
inlet/outlet faces could introduce spurious fixed BCs. Now explicitly
sets w=0 at the inlet and applies zero-gradient (w(nx-1)=w(nx-2)) at
the outlet for each z-plane.
…NX*NY

Avoids duplicating the assumption that stride_z == NX*NY, making this
code more robust if the memory layout ever changes.
Taylor-Green 3D and Poiseuille 3D validations are now implemented.
@shaia shaia self-assigned this Mar 7, 2026
@shaia shaia merged commit 991f7e2 into master Mar 7, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant