Tell me more ×
Computational Science Stack Exchange is a question and answer site for scientists using computers to solve scientific problems. It's 100% free, no registration required.

I made a strange observation while computing the solution to a simple 1D reaction diffusion equation:

$\frac{\partial}{\partial t}a=\frac{\partial^2}{\partial x^2}a-ab$

$\frac{\partial}{\partial t}b=-ab$

$\frac{\partial}{\partial t}c = a$

The initial value of $b$ is a constant ($b(0,x)=b_0$), and I'm only interested in the integral over $a$ from $0$ to $1$ ($\int_0^1a(t,x)dt$). The purpose of $c$ and the equation $\frac{\partial}{\partial t}c = a$ is just to evaluate this integral.

I used a Strang splitting scheme for the coupling between diffusion and reaction (a half step reaction, then a full step diffusion, and then again a half step reaction), a Crank Nicholson scheme for the diffusion, and an analytical solution for the reaction (including the equation $\frac{\partial}{\partial t}c = a$).

Because one step of the analytical solution was more than a factor 3 slower than one step of the Crank Nicholson scheme, I tried to make more than one Crank Nicholson step for each reaction step. I was hoping to get by with fewer step of the Strang splitting scheme, so that I would be faster overall.

However, the opposite effect can be observed, namely that much more steps for the Strang splitting scheme are required if more than one Crank Nicholson step is used. (I'm only concerned with the accuracy of the integral over $a$, which seems to converge faster than $a$ itself.) After wondering for some time, I noticed that the same effect also happens for $b(t,x)=b_0=0$, and that I even understand why for this case. The point is that if I make exactly one Crank Nicholson step, then the overall scheme turns into a trapezoid rule (if $b(t)=0$).

So if I would treat $\frac{\partial}{\partial t}c = a$ as part of the diffusion step, increasing the number of Crank Nicholson steps (probably) wouldn't lead to reduced overall accuracy (as observed). But that seems to defeat the purpose of using an analytical solution for the (non-linear and potentially very stiff) reaction part of the system.

So here is my question: Is there a better way to treat $\frac{\partial}{\partial t}c = a$ in the context of a Strang splitting, than to either treat it as part of the reaction step, or to treat it as part of the diffusion step. I want to avoid being "forced" to use exactly one Crank Nicholson step for the diffusion. (For example in 3D, I would prefer to solve the diffusion analytically by an FFT instead of using Crank Nicholson. Of course I can also combine FFT with Crank Nicholson, so it's not such a big deal.)

share|improve this question
In people.maths.ox.ac.uk/dellar/OperatorLB.html, a similar effect seems to be described. The conclusion is that it's crucial to use Crank Nicholson instead of the exact solution. So perhaps the answer to my question is a simple no. – Thomas Klimpel Apr 5 '12 at 15:21
Something seems wrong with your equations. $c$ doesn't appear in the first two making the coupling one-way and meaning that you could compute $c$ at any $t$ as a post-processing step. – Bill Barth Apr 5 '12 at 21:13
@BillBarth I changed the question to clarify the role of $c$. So $c$ is just a means to compute $\int_0^1a(t,x)dt$. Please let me know if you have any suggestion how to compute this integral more accurate (than what I get from the combination of Strang splitting and Crank Nicholson described above), potentially using a post-processing step. – Thomas Klimpel Apr 5 '12 at 23:36

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.