Hi folks - this is my first post here so I hope I'm putting question in the right place! I'm using ParametricNDSolve to evaluate a function (Eb1r,t]) with four free parameters and two dependent variables between two boundaries rn and ro. However, the function also needs to be defined between 0 and rn - in this case it's just a constant that takes on the values at the boundary rn, given by Eb1[rn,t]. I've outlined the problem on [Stack Exchange here , and in essence I'm unable to use the output of ParametricNDSolve in the same way I'd use output of NDsolve; for example, I try to feed it into piecewise like this;
(*Parametric solution for unknowns kme, kmn, j and eo, for functions Ef1 and Eb1*)
x = ParametricNDSolve[{eqnBo == 0, Eb1[r, 0] == 0, eqnDe == 0, Ef1[r, 0] == 0, Derivative[1, 0][Ef1][rn, t] == 0, Ef1[ro, t] == eo}, Eb1, {r, rn, ro}, {t, 0, 14400}, {kme, kmn, j, eo}];
which works fine, but my attempts to manipulate output fail miserablely - for example, when I try to define a piecewise function at t = 14400 -
Ebound[r_] = Piecewise[{{Eb1[rn, 14400] /. x, r < rn}, {Eb1[r, 14400] /. x, r >= rn}}];
I keep getting the error ParametricNDSolve::fpct: "Too many parameters in {kme,kmn,j,eo} to be filled from {r,14400}."
I can't work out if this is just some syntax error, or whether there is a deeper reason why I cannot manipulate the parametric equation. Does anyone have any ideas whether this is possible, or what I'm doing wrong? Thanks! A MWE of the problem is appended to this post for anyone who might be interested.
Attachments: