2
$\begingroup$

I have the following code:

    yscom = y /. Flatten[Solve[Y == (k4*θy)^(1/2)*y + (k4*θy)^(1/2)*y*a[r, t] + 
          2*((k4*θy)^(1/2)*y)^2*(a[r, t]^2/k4), y]][[2]] /. Y -> H[x]; 
heqncom = {D[a[r, t], t] == 100*(20*(D[a[r, t], {r, 2}] + D[a[r, t], r]/r) - a[r, t] + 
       (10/55)*H[x[t]]), 
    s == 50*α*((1/100 + (yscom*a[r, t])^2)/(1 + (yscom*a[r, t])^2)/(1 + 2*x^4 + 2*w^4*4.1)) - 
         δ*(H[x]/(75 + (1 + 2)*H[x])) /. x -> x[t] /. w -> x[t - 5.5] /. s -> D[x[t], t]}; 
iccom = {a[r, 0] == 125*UnitStep[1 - r], x[t /; t <= 0] == 0}; 
sol2 = NDSolve[Join[heqncom, iccom] /. α -> 20, {a[r, t], x[t]}, {r, 10^(-4), 100}, 
{t, 10^(-4), 100}, MaxSteps -> Infinity, 
Method -> {"MethodOfLines", "TemporalVariable" -> t, "SpatialDiscretization" -> 
   "FiniteElement"}]; 

Nevertheless, it gives an error:

MapThread::mptc: Incompatible dimensions of objects at positions {2, 1} and {2, 2} of MapThread[(NDSolve`IndexReductionDump`eq$24935[#1]=#2)&,{{-2},{}}]; dimensions are 1 and 0.

I have not found much information about this error, does somebody know how to solve?

$\endgroup$
  • $\begingroup$ This x[t /; t <= 0] == 0 is not valid syntax for NDSolve. You probably want to say x[0] == 0. However, you'd need to change that to x[r, 0] == 0 as you currently can not mix DEs with different spatial dimensional. $\endgroup$ – user21 Apr 17 at 12:31
  • $\begingroup$ Thanks but I obtain the same error plus other new: NDSolve The arguments should be ordered consistently, that can be solved by eliminating the variable r (mathematica.stackexchange.com/questions/148082/…). About the syntax x[t /; t <= 0] ==0, it is used for DDE (reference.wolfram.com/language/tutorial/…) $\endgroup$ – carlorop Apr 17 at 14:09
  • $\begingroup$ Sorry I should have been made is more clear that DDE and FEM do not work together currently. $\endgroup$ – user21 Apr 20 at 7:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.