Skip to content

Commit

Permalink
[1D] Prevent two-point control from finding solutions with reverse flow
Browse files Browse the repository at this point in the history
Fixes #1787
  • Loading branch information
speth committed Nov 16, 2024
1 parent 70521b7 commit a3755b5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/oneD/Flow1D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1258,6 +1258,9 @@ void Flow1D::enableTwoPointControl(bool twoPointControl)
{
if (isStrained()) {
m_twoPointControl = twoPointControl;
// Prevent finding spurious solutions with negative velocity (outflow) at either
// inlet.
setBounds(c_offset_V, -1e-5, 1e20);
} else {
throw CanteraError("Flow1D::enableTwoPointControl",
"Invalid operation: two-point control can only be used"
Expand Down

0 comments on commit a3755b5

Please sign in to comment.