I read this post, "Conservation of a physical quantity when using Neumann boundary conditions applied to the advection-diffusion equation" and although it is the same type of equation it does not fit my problem.
I try to solve the following equation with a no flux boundary with the solver d03pf from NAG. Should not be difficult, but i do have troubles with a no flux boundary.
$ \frac{\partial(u)}{\partial(t)}+\frac{\partial(F(u))}{\partial(x)}=\frac{\partial}{\partial(x)}\left( D(u)\frac{\partial(u)}{\partial(x)}\right)$
I do have a closed vessel and particles are sedimenting towards the bottom. Before they touch each other it is of hyperbolic type. Otherwise the PDE is parabolic.
My flux function is something like $F=u\times\text{velocity}(1-u)^C$ So when i use the standard no flux function for the hyperbolic part, saying the flux at the boundary is zero. The solver sets the mass in the last cell to zero and i am loosing mass.
I can say $\text{flux}(\text{end}-1) = -\text{flux}(\text{end})$ and the solver raises the concentration in the last cell greater one (for e.g C=5). But that does not work for even C.
$F(u)$ as well as $D(u)$ are piecewise differentiable.
I do have the space vector, the time at this iteration and the solution of the last three cells given.
Does anybody know another way constructing a no flux boundary ?
Best wishes
Moritz