Message Boards Message Boards

0
|
4224 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

Nonlinear first order partial differential equations-NDSolve::conarg

POSTED BY: Thomas Winkler

a,b,c,f,k, tmin1 and tmax1 are just constants.

a is not a constant, it is a parameter.

The error message means (see ref/message/NDSolve/conarg in the help) that each function mentioned must always have the same variable ordering: always f[x,t] exclusive or f[t,x] but not both. That's correct in the example, so the error message can reference only to the intial condition for nn as you might have found already a long time ago, the following runs through

    In[8]:= With[{b = 2, c = 3, f = 4, k = 2, tmin1 = 0, tmax1 = 5},
     ParametricNDSolve[{
       D[Int[z, t], z] == -a*b*Int[z, t]^k,
       D[nn[z, t], t] == b*Int[z, t]^k,
       Int[0, t] == c*(Exp[-4 Log[2] (t/f)^2]),
       nn[z, tmin1(* t /; t\[LessEqual]tmin1 *)] == 0}, 
       {Int, nn}, {z, 0, 100*10^-9}, {t, tmin1, tmax1},
      {a}, 
      MaxSteps -> 100000, MaxStepSize -> Automatic,
      StartingStepSize -> Automatic, 
      Method -> {"StiffnessSwitching", 
        Method -> {"ExplicitRungeKutta", Automatic}}, AccuracyGoal -> 2, 
      PrecisionGoal -> 2,
      EvaluationMonitor -> Automatic]
     ]


Out[8]= {Int -> ParametricFunction[ <> ], nn -> ParametricFunction[ <> ]}

Interestingly one could set k to 2 as well as to 119 and always a result appears instantenously ... possibly the results are fake, are they?

POSTED BY: Udo Krause
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract