I am trying to simulate 1D simple diffusion problems with diffusion coefficient/mobility values a function of concentration. For example, for homogenization of A-B system, I am going to use mobility values of B, corresponding to the concentration of B at that point in A-B system. I presume this must be the case for CALPHAD diffusional simulations. However, I observed that mass conservation is not maintained after simulated diffusion, as a result of varying mobility parameter across the simulation distance. I mean, the total B content after simulation is different from the initial value. Should I consider any boundary condition to fix this?
Thanks in advance.