EcohydrologyTeam / ClearWater-riverine

A 2D water quality transporter model to calculate conservative advection and diffusion of constituents from an unstructured grid of flows
MIT License
6 stars 0 forks source link

Mass Flux Bug at Downstream Boundary #47

Closed jrutyna closed 10 months ago

jrutyna commented 11 months ago

@jrutyna noticed that there was a mass balance issue in plan 241. Upon investigating it was determined that the mass flux variables for the downstream boundary was only using the boundary condition of 25 mg/L for this calculation and not using the concentration values in the cells next to the boundary. @sjordan29 should investigate further to determine how to fix this issue.

sjordan29 commented 10 months ago

@jrutyna, I think this is fixed. I ran plan 241 again and got 0.04% error (see the comparison between the updated results on the left and the old results from your 30_Mass_Balance_JMR.ipynb notebook below):

cw-r-mass-balance-fix

Does this look good to you? I can merge into main if yes.

jrutyna commented 10 months ago

@sjordan29: Yes, this looks like a significant improvement in the accounting for the mass flux across the faces at the boundary cells. Yes, please merge these commits to main.