Skip to content

Add periodic-vs-free validation test - #33

Merged
sergioald merged 1 commit into
mainfrom
test-periodic-vs-free-convergence
Jul 22, 2026
Merged

sergioald merged 1 commit into
mainfrom
test-periodic-vs-free-convergence

Conversation

@sergioald

Copy link
Copy Markdown
Owner

Summary

Adds a dedicated validation test comparing the periodic flow solver against the free-flow solver for a spatially periodic curvature field.

Changed

  • tests/test_periodic_vs_free_convergence.py
    • solves the same periodic curvature forcing with parall_u_periodic(...) and parall_u_free(...);
    • compares the interior free-flow response against the periodic response on long domains;
    • verifies that agreement improves as the free-flow domain length increases;
    • checks that both solvers agree in shape on adequate domains;
    • checks that the periodic solver returns zero velocity perturbation for zero curvature.

Why

The periodic boundary-condition path has been identified as needing dedicated validation against a trusted reference.

For a spatially periodic curvature field, the periodic solution should match the far-field/interior limit of the free-flow solution when the free-flow domain is sufficiently long. This PR adds that validation as a regression test rather than relying only on solver smoke tests.

The test deliberately checks convergence with increasing domain length, because shorter domains can still be dominated by inlet/outlet effects and are not a meaningful periodic-reference comparison.

Validation

python -m py_compile tests/test_periodic_vs_free_convergence.py
python -m pytest tests/test_periodic_vs_free_convergence.py
python -m pytest
python -m run_ldsfl --base-dir . --cases 1 --max-steps 100 --no-plots

Notes

This is a tests-only PR.

It does not change the morphodynamic update algorithm, flow solvers, curvature calculation, stability diagnostics, CLI interface, GUI interface, output naming, or generated output format.

@sergioald
sergioald merged commit cfb8cb3 into main Jul 22, 2026
3 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