Problem
The current piecewise valve implementation allows the valve state to flip between 3D newton iterations, leading to Newton cycling and divergence. For GenBC, we fixed this by freezing the valve state at the beginning of each 3D timestep according to the previous timestep's pressure state. While this does lead to occasional pressure/flow spikes at transitions, this is avoidable with a sufficiently small time step and seems to be the simplest solution to the valve cycling problem.
Solution
I have been implementing the feature in this branch. Let me know your thoughts if there would be a better way to solve this problem.
Additional context
No response
Code of Conduct
Problem
The current piecewise valve implementation allows the valve state to flip between 3D newton iterations, leading to Newton cycling and divergence. For GenBC, we fixed this by freezing the valve state at the beginning of each 3D timestep according to the previous timestep's pressure state. While this does lead to occasional pressure/flow spikes at transitions, this is avoidable with a sufficiently small time step and seems to be the simplest solution to the valve cycling problem.
Solution
I have been implementing the feature in this branch. Let me know your thoughts if there would be a better way to solve this problem.
Additional context
No response
Code of Conduct