Skip to main content
Notice removed Improve details by CommunityBot
Bounty Ended with Steffen Jaeschke's answer chosen by CommunityBot
Notice added Improve details by Pillsy
Bounty Started worth 100 reputation by Pillsy
added 1199 characters in body
Source Link
Pillsy
  • 18.6k
  • 2
  • 48
  • 94

At this point, I feel like I've more or less run out of road, but was wondering if there was some way to force NDSolve to do what I want. UPDATE: I did try the model again with a different set of initial conditions, ones which allow for consistency between the boundary and initial conditions from $ t = 0 $ on, as shown below:

simpleLkInit = With[{m = 1/80},
   u0[a_] :> Piecewise[{{c - m*a, 0 <= a <= c/m}}, 0]];

simpleLkNormalization = First@Solve[
   {simpleLkIntegral2 /. t -> 0 /. u[a_, 0] :> u0[a] /. simpleLkInit, 
    c > 0}, c]
(* c -> 65/96 *)

Plugging this into NDSolve gives the same issue with overdetermination (so presumably the consistency of the boundary condition is never even checked):

NDSolve[{lkPDE /. \[Mu][_] -> 1/80 /. simpleLkInit /. 
   simpleLkNormalization, simpleLkIntegral2}, u, {a, 0, 100}, {t, 0, 
  100}]
(* Unevaluated, with NDSolve::overdet message *)

While the strategy of discretizing the system in age manually, as in Chris K's fine answer, is entirely viable, this essentially boils down to using the method of lines, which is the approach NDSolve itself uses. I would like to see if NDSolve itself can do the discretization, or at least if I can use it to drive move of the problem.

At this point, I feel like I've more or less run out of road, but was wondering if there was some way to force NDSolve to do what I want.

At this point, I feel like I've more or less run out of road, but was wondering if there was some way to force NDSolve to do what I want. UPDATE: I did try the model again with a different set of initial conditions, ones which allow for consistency between the boundary and initial conditions from $ t = 0 $ on, as shown below:

simpleLkInit = With[{m = 1/80},
   u0[a_] :> Piecewise[{{c - m*a, 0 <= a <= c/m}}, 0]];

simpleLkNormalization = First@Solve[
   {simpleLkIntegral2 /. t -> 0 /. u[a_, 0] :> u0[a] /. simpleLkInit, 
    c > 0}, c]
(* c -> 65/96 *)

Plugging this into NDSolve gives the same issue with overdetermination (so presumably the consistency of the boundary condition is never even checked):

NDSolve[{lkPDE /. \[Mu][_] -> 1/80 /. simpleLkInit /. 
   simpleLkNormalization, simpleLkIntegral2}, u, {a, 0, 100}, {t, 0, 
  100}]
(* Unevaluated, with NDSolve::overdet message *)

While the strategy of discretizing the system in age manually, as in Chris K's fine answer, is entirely viable, this essentially boils down to using the method of lines, which is the approach NDSolve itself uses. I would like to see if NDSolve itself can do the discretization, or at least if I can use it to drive move of the problem.

edited tags
Link
Chris K
  • 20.4k
  • 3
  • 39
  • 75
Tweeted twitter.com/StackMma/status/1307243038066999296
edited tags
Link
xzczd
  • 68.4k
  • 9
  • 174
  • 489
Source Link
Pillsy
  • 18.6k
  • 2
  • 48
  • 94
Loading