# Find x at a given t and f(x,t) == constant from a system of coupled PDE

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[
tim] == (1/(k2/(k2 + k1r)))*(D0/((length^2) e0*k1f))*
(*initial conditions*)
en[0, tim] == 1, sub[1, tim] == 1}, {sub, en}, {rad, 0, 1}, {tim,
0, 10}];
Plot[Evaluate[
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}]


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]}}]