1

I am trying to solve something like Fick's Law using NDSolve: $$\frac{\partial \varphi}{\partial t}=\frac{\partial^2 \varphi}{\partial r^2}+F(r,t)$$ Subject to a boundary condition which looks something like: $$\varphi (R,t)=\varphi_0-\int_0^R \varphi(r,t)dr$$ Which is an attempt to simulate the case where whatever is diffusing into the medium of interest is limited in quantity. I assume simply plugging a recursive boundary condition is going to go poorly (Edit: it did go poorly), is there any option here other than writing my own solver?

In specific one particular case could look like: $$\frac{\partial \varphi}{\partial t}=\frac{\partial^2 \varphi}{\partial r^2}+\frac{1}{r^2}\frac{\partial\varphi}{\partial r}(2r+r^3/3-\int\varphi r^2dr)-\varphi$$ In this case $\varphi_0=1$ and the initial condition is $\varphi(0\leq r<R,0)=0$, where $R=1$. The problem should have spherical symmetry so a bound at $r=0$ may result in trouble.

  • 1
    Welcome to Mathematica.SE! I suggest the following:
    1. As you receive help, try to give it too, by answering questions in your area of expertise.
    2. Take the [tour] and check the faqs!
    3. When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge.

    Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign

    – Dunlop Sep 22 '20 at 03:32
  • The method here may be helpful. – bbgodfrey Sep 22 '20 at 17:00
  • 2
    Readers are more likely to respond, if you provide all the necessary information to obtain a numerical solution, including the definitions of F, the values of R and phi0, and the initial condition and other boundary condition. – bbgodfrey Sep 22 '20 at 18:44
  • As it turns out the method of lines was a nudge in the right direction, I found a few more posts on the topic of integro-differential equations and their boundary conditions at it looks like there are a few other avenues to try (possibly replacing $\varphi$ with its x-partial-derivative to eliminate the integral terms?). – UranylTrioxide Sep 23 '20 at 14:07
  • @UranylTrioxide What was the outcome of your effort? – bbgodfrey Nov 16 '20 at 04:16
  • Ultimately the problem turned out to be poorly formulated on my part, some more careful work revealed that the system that I wanted to solve wasn't this one at all – UranylTrioxide Nov 21 '20 at 20:30

0 Answers0