I have a system of coupled PDEs with five parameters that I only know ranges for rather than explicit values, and I was wondering if I could define a parametric equation with ParametricNDSolve and then use FindFit with some data to estimate these parameters? My problem is that I have some coupled equations.
Firstly I have a set up equation which seems to work fine, given by
(*Constants!*)
a = 10*10^-7; omega = 3.0138*10^7; Do2 = 2*10^-9; po = 106;
ro = 263*10^-6; micron =
1*10^-6; k = 1; (*eo = 100;*)(* qm = 10^-4;*)
mic = 1*10^-6; De = 5.5*10^-11;
(*First equation - set up eq!*)
s = Quiet[
NDSolve[{D[Ox[r, t], t] -
Do2*(D[Ox[r, t], r, r] + (2/r)*(D[Ox[r, t], r])) + (a*
omega)*((Ox[r, t])/(Ox[r, t] + k)) == 0, Ox[r, 0] == 0,
Ox[micron, t] == 0, Ox[ro, t] == po},
Ox, {r, micron, ro}, {t, 0, 14400}]];
p = Ox /. First[s];
Which gives me a function p[r,t] . I then use this in a parametric set up with parameters $eo,qm,kme,kmn$ and $j$ and initial / BC conditions to solve parametrically for $Ef1$;
(*Second equation*)
eqnDe = D[Ef1[r, t], t] -
De*(D[Ef1[r, t], r, r] + (2/r)*(D[Ef1[r, t], r])) +
qm*((kme)/(kme +
p[r, t])*((p[r, t])/(p[r, t] +
kmn)) + (1 - (p[r, t])/(p[r, t] + kmn))*j)*Ef1[r, t];
l = ParametricNDSolve[{eqnDe == 0, Ef1[r, 0] == 0,
Derivative[1, 0][Ef1][micron, t] == 0, Ef1[ro, t] == eo},
Ef1, {r, micron, ro}, {t, 0, 14400}, {kme, kmn, j, qm, eo}];
b = Ef1 /. l;
This seems to work so far (though Im unfamiliar with ParametricNDSolve) but my problem is that I want to use the output of this and the parameters to find a new value Eb1, related to the above solution by;
$\frac{dEb1}{dt} = qm\left(\frac{p}{p + kmn}\frac{kme}{p + kme} + (1 - \frac{p}{p + kmn})j \right)Ef1$
with the initial condition $Eb1[r, 0] == 0$ - the problem is I have tried coded this in and have had no luck. I tried
eqnBo = D[Eb1[r, t],
t] - (b[r,
t])*(((p[r, t])/(p[r, t] + kmn))*((kme)/(kme +
p[r, t])) + (1 - (p[r, t])/(kmn + p[r, t]))*j);
x = ParametricNDSolve[{eqnBo == 0, Eb1[r, 0] == 0},
Eb1, {r, micron, ro}, {t, 0, 14400}, {kme, kmn, j, qm, eo}];
And this produces an error;
ParametricNDSolve::fpct: "Too many parameters in {kme,kmn,j,qm,eo} to be filled from {r,t}"
Anyone have any idea if what I want to do is possible, and whether this error simply means there's too much to fit? The data I want to fit it to is here.
I'd be really grateful for any guidance I can get on this, or improved methods of finding the data I want!
Ox[r, 0] == 0
andOx[ro, t] == po
in your boundary conditions. $\endgroup$b
incorrectly; it takes on the formb[kme, kmn, j, qm, eo]
and you are usingb[r,t]
. $\endgroup$p
reaches a steady state around t = 10. Is there a reason why t -> 14400 is needed in the analysis? (2) Can you take another look at the data you posted? It is only one column and it's not clear to me what it is. $\endgroup$