2
$\begingroup$

Is it possible to find the speed of a moving front (produced by the below code) in which modulating beta changes the speed of the front?

Basically, I am trying to map the x-values of f(x,t)=0.5 against the corresponding t values, get the slope (velocity of the front), and then map those at various beta.

Manipulate[
 sol2 = NDSolve[{D[sub[rad, tim], 
      tim] == -(sub[rad, tim]) (en[rad, tim]), 
    D[en[rad, 
        tim] + ((sub[rad, tim]*en[rad, tim])/(k2 + k1f/(s0*k1r))), 
      tim] == (1/(k2/(k2 + k1r)))*(D0/((length^2) e0*k1f))*
      D[(Exp[beta (1 - sub[rad, tim])] D[en[rad, tim], rad]), rad],
    (*initial conditions*)
    sub[rad, 0] == s0, en[rad, 0] == 0,(*boundary conditions*)
    en[0, tim] == 1, sub[1, tim] == 1}, {sub, en}, {rad, 0, 1}, {tim, 
    0, 10}];
 Plot[Evaluate[
   Table[{sub[rad, tim], en[rad, tim]} /. sol2, {tim, 3, 10}]], {rad, 
   0, 1}, PlotRange -> All, 
  AxesLabel -> {"Front Position", "Concentration"}, 
  PlotLegends -> {"substrate", "enzyme"}],
 {{s0, 1}, 1, 10, 1},
 {{k2, .5}, 0.1, 1},
 {{k1r, 0.5}, 0.1, 1},
 {{k1f, 1}, 1, 10, 1},
 {{r0, 1}, 0, 1},
 {{e0, 1}, 0.1, 1},
 {{D0, .001}, 0.001, 1},
 {{length, 1}, 1, 10},
 {{beta, 6}, 0, 6}]

concentration of enzyme en(r,t) at t=3,4,5,6,7,8,9,10

$\endgroup$
2
$\begingroup$

Tracking the front position via the maximum of the derivative and borrowing code from: Plot 1D slice of 2D InterpolatingFunction, you can get what you want:

timePositionData = Table[
  (** get 1d interpolating function slice from 2d interpolating function **)
  if = en /. First@sol2;
  grid = if["Grid"];
  slice = 
    Interpolation@Transpose@{grid[[All, 1, {1}]], (** extract x-grid **)
     if[grid[[All, 1, 1]], t],                    (** extract n-values on x-grid at t **)
     Derivative[1, 0][if][grid[[All, 1, 1]], t]   (** derivative values **)};
   (** get global maximum of absolute front derivative for front position **)
   {t, x /. NMaximize[{Abs[slice'[x]], 0 < x < 1}, x][[2]]}
, {t, 3, 10, 0.1}]; 

With

Grid[{{
 ListPlot[timePositionData, Frame -> True, FrameLabel -> {"time", "position"}, 
  FrameStyle -> Directive[Black, 20], ImageSize -> 400]}, {
 Plot[Interpolation[timePositionData]'[t], {t, 3, 10}, 
  Frame -> True, FrameLabel -> {"time", "velocity"}, 
  FrameStyle -> Directive[Black, 20], ImageSize -> 400]}}]

your data leads to some nice plots:

enter image description here

If you want even more fine-grained control over your front position, you might be interested in: https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.112.148305

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.