Commit 16126c6
committed
Require the relaxation targets that grcbc_out and grcbc_vel_out read
m_cbc.fpp relaxes a GRCBC outflow toward a prescribed pressure:
L(adv%end) = c*(1 - Ma)*(pres - pres_out(dir))/Del_out(dir)
and grcbc_vel_out reads vel_out through dir_idx, so which component is the
normal one depends on the direction. Neither target was required. Setting
grcbc_out without pres_out validated cleanly, then relaxed the boundary
toward an undefined value.
The failure mode is silent and expensive to chase. On a uniform quiescent
2D field with no body and no disturbance, density in the last cell of the
outflow direction walked away linearly at 0.032 per step from step 1,
crossed zero near step 31, and the run aborted on ICFL at step 57 with
nothing in the output naming the boundary condition. ICFL sat at exactly
0.4000 for 56 steps and then jumped to 1.3e15 in one step, so it did not
read as a boundary problem either; only dumping the field every step and
finding every deviation pinned to cell i = m identified it.
check_grcbc now requires bc_<dir>%pres_out when grcbc_out is set, and
bc_<dir>%vel_out(1..num_dims) when grcbc_vel_out is set. Requiring every
component rather than guessing the normal one follows
check_synthetic_turbulence, and avoids the direction-blindness that #1854
corrects on the inflow side, where vel_in(1) is not the normal component
for a y or z boundary.
Verified it rejects nothing in tree: all 181 example cases generate and
validate, 9 of which use grcbc_out or grcbc_vel_out, and the full
validator suite passes (72 tests). Three regression tests cover the
rejection, the acceptance once targets are given, and that the third
velocity component is required only in 3D.
Made with Claude Code.1 parent ec783a8 commit 16126c6
2 files changed
Lines changed: 44 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1783 | 1783 | | |
1784 | 1784 | | |
1785 | 1785 | | |
| 1786 | + | |
1786 | 1787 | | |
1787 | 1788 | | |
1788 | 1789 | | |
| |||
1796 | 1797 | | |
1797 | 1798 | | |
1798 | 1799 | | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
1799 | 1808 | | |
1800 | 1809 | | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
1801 | 1817 | | |
1802 | 1818 | | |
1803 | 1819 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
529 | 529 | | |
530 | 530 | | |
531 | 531 | | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
0 commit comments