I am trying to model/solve a specific instance of a 1D diffusion equation in which I have a nonlinear Neumann boundary condition at x=1 (length of unit 1). My equations that I have are:
D[u[x,t],t] == D[u[x,t], x, x] for the general diffusion equation;
D[u[1,t],x] == 10 - Log[u[1, t]+1] for a flux at boundary x=1 that begins at 10 and decreases as a function of Log of concentration at the boundary;
D[u[0,t],x] == 0 for a no flux boundary at x=0;
u[x,0] == 0 for an initial concentration of 0 everywhere in the rod.
What I am trying to see occur is a function where the heat spreads across the rod and smoothes out across the rod to a steady-state/equilibrium; additionally, the goal is to have the flux approach zero and remain at zero (which represents the difference in chemical potentials between the domain and an external source approaching zero).
Upon further reconsideration, I was able to use NDSolve to find a plot that looks somewhat like what my goal is. However, I want the diffusion to continue across the domain until it smoothes out. Here is my code:
This gives a decent solution as said but results in two errors.
NDSolve: Warning: boundary and initial conditions are inconsistent. NDSolve: Warning: an insufficient number of boundary conditions have been specified for the direction of independent variable x. Artificial boundary effects may be present in the solution.
My three questions are as follows:
- Should I address this warnings if it still gives a close enough solution?
- How do I get a curve where the concentration smoothes out over the domain (and as time moves forward)?
- Is there a way to get a 2D list line plot that shows the curves as lines where each line represents a different time?
Sorry if that is too much to ask. If you can help tackle any of these questions, that will be greatly appreciated. Thank you!