Solving PDE Diffusion (using ODE solvers). Total mass increases towards infinity (should stay constant)

You have a PDE:
image

and you discretize the advection term and the diffusion term.

Question: in your discretized model…
image

where does the first RHS term u[i] come from in the original PDE?

1 Like