Branching river model

This model extends the semi-implicit scheme to include a branching river. It would be easy to extend it to multiple tributaries but I haven’t tried it yet.

In the animation above, the ocean tide enters at the left. The main river is blue and the branching river is cyan. The model is 50km long with a long wave tide (M2) and a smaller oscillation.

River modeling progress

I think I’ve worked out a lot of the planning errors. The code worked before but the result was not very accurate because I didn’t segment the river properly. The current version places height calculations at the center of the cell and the flow at the cell edges. This is using a semi-implicit method.

This video shows a run that includes a slope with inflow from upstream. There is also a tidal and faster oscillation from the ocean side (left boundary).