Numerical simulation of the transport and speciation of nonconservative chemical reactants in rivers