Skip to content

[R-sig-dyn-mod] ReacTran package - unexpected results

2 messages · Julien Lavenus

#
Dear all,

I am trying to use the ReacTran package to solve a system of partial 
differential equations. To make sure I was using the package correctly, 
I first implemented two simple 1D models (see below and code attached). 
I took as initial conditions for the molecule concentration a centered 
normal distribution for  both models. Unexpectedly, none of the two 
test-models gave the expected results:

The first model had diffusion (D=1000) and no advection (v=0). I 
expected the distribution of the modeled entity to get more and more 
uniform as the time increased, and in the end to get perfectly flat. 
However for a reason, I do not understand, the system reaches a steady 
states showing a peak (The distribution at t=20 and t=20000 are strictly 
equal).

In the second test, I set the diffusion to 0 and I took a constant 
positive advection velocity, with zero-concentration boundary 
conditions. I was expecting the peak not to change shape and to move 
right until it gets absorbed by the boundary. Here again, I obtained a 
steady state. The peak moves right (and flattens a bit) and then stays 
where it is.

If you have any idea of what I could be doing wrong, I would be really 
grateful for your help,
Many thanks in advance,

Best regards,

Julien Lavenus
#
Dear all,

My sincere apologies, I realised I sent you a version of the code with 
mistakes. Please find attached a corrected R script.

Many thanks in advance for your help,
Best regards,

Julien Lavenus
On 02/11/15 15:20, Julien Lavenus wrote: