Feat/poiseuille 3d validation#175
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.