# Neumann boundary conditions non-homogeneous for the diffusion equation

I'm new to Mathematica and I have a problem specifying the Neumann boundary conditions in the diffusion equation. The best result I achieved is this one.

``````n0 = 4 * 10 ^ 15; d = 0.005; diff = 17,647; d = 0.005;
Handle[
Module[{soln =
NDSolve[{ D[n[x, t], x, x]== 1 / diff D[n[x, t], t]+
NeumannValue[1.25*10^18, x == -d] -
NeumannValue[-5.2*10^17, x == d],
Condition of Dirichlet[n[x, t] == n0, t == 0]}
n, {x, -d, d}, {t, 0, 10 ^ -5}]}
Plot[n[x, t0] /. soln, {x, -d, d},
PlotRange -> {{-d, d}, {0, 5 10 ^ 15}}]], {t0, 0, 10 ^ -5,
Appearance -> "Labeling"}]
``````

Actually it's not that bad, but in the plot you can clearly see that Neumann's conditions are not met, since the divergence of n[x,t] at -d and d becomes dependent on time, although it should be constant. I have an analytical solution of this equation obtained by the Fourier method and it works well, but I also need a numerical solution. My problem seems to be due to the lack of understanding of how NeumannValue works, but the way it is explained in the manuals confuses me even more. The Dirichlet condition is much simpler, but with NeumannValue I really do not understand why and in what form I should summarize it with my equation. I suppose that in my case I need to multiply NeumannValue in something (presumably, it depends on time and it has an inverse length dimension), but I can not understand exactly what. I tried to look for this problem in Stack Exchange, but it did not help me understand what to do to get a result. I'm sorry for my non-native English and probably a silly question.