Reputation
9,630
Next privilege 10,000 Rep.
Access moderator tools
Badges
2 21 86
Newest
 Necromancer
Impact
~108k people reached

Jan
21
comment Problems when solving a nonlinear PDE system with NDSolve
You can consider uploading it to a net-disk.
Jan
21
comment Problems when solving a nonlinear PDE system with NDSolve
I suggest you to place those parameters and equations in the order they appeared in the paper, currently it's really frustrating to check if there's any simple mistake.
Jan
20
comment Trouble with shooting method for a 4th-order stiff ODE
@W.Robin You got it :)
Jan
20
comment Trouble with shooting method for a 4th-order stiff ODE
@W.Robin …No, it's resolved, the improper $(a,b)$ will be filter out after the warning appears. If you still have difficulty in understanding it, try this: With[{a = 0.6, b = 0.6}, If[y["Domain"][[1, -1]] < xMax, 1, #] == 0 & /@ Subtract @@@ {bc1, bc2} /. x -> xMax /. y -> sol[a, b]] . BTW, bc1 and bc2 will also lead to ParametricNDSolveValue::ndsz
Jan
18
comment Solving Coupled Differential Equation to Get Smooth Asymptotic Solution
Maybe you can talk a little about the background information of the equation?
Jan
17
comment Solving Coupled Differential Equation to Get Smooth Asymptotic Solution
And it's smooth, the resulting graph looks "steep" just because the solution becomes 0 very fast as r increases. You can change the interval of Plot to something like {r, 0.01, R/100} and observe.
Jan
17
comment Trouble with shooting method for a 4th-order stiff ODE
@W.Robin The warning isn't a big deal, it's simply because when y["Domain"][[1, -1]] execute for the first time, y["Domain"] isn't yet a list, in v10 a new function Indexed is introduced to handle this problem more properly, but since I (and you) are still in v9, so I simply used Quiet. This doesn't influence the result at all.
Jan
17
comment Trouble with shooting method for a 4th-order stiff ODE
@W.Robin You got it :)
Jan
17
comment Trouble with shooting method for a 4th-order stiff ODE
@W.Robin 1. c = 1; xMax = 6; 2. Observe Subtract @@@ {xx == yy, zz == ww} 3. Yeah, # owns no other meaning, it's the argument of pure function. If you still have trouble in understanding its usage here, just execute If[y["Domain"][[1, -1]] < xMax, 1, #] == 0 & /@ Subtract @@@ {bc1, bc2} outside of ContourPlot and observe the result.
Jan
16
comment Heat convection differential equations from 1952 - Mathematica “fails to converge”
It's never asked in this site before, so I wrote a self-answered question just now :)
Jan
16
comment How do I solve a PDE with a strange boundary condition?
@drN Feel free to use it :D
Jan
16
comment How to do this Function with compile
Is the length of sublists of l1 and l2 always 2?
Jan
16
comment Solving Coupled Differential Equation to Get Smooth Asymptotic Solution
What do you mean by saying "I have tried to get the solution to be smoothly asymptotic to zero at infinity, but I can't get that", in my view the resulting graph already meets this standard.
Jan
16
comment Trouble with shooting method for a 4th-order stiff ODE
I think it's just the nature of your equation: Some choices of {a, b} can't lead to a solution extending to infinity. Just observe this: mid = sol[0.6, 0.6]; {{lb, rb}} = mid["Domain"]; Plot[mid[t], {t, lb, rb}, PlotRange -> All]
Jan
16
comment Heat convection differential equations from 1952 - Mathematica “fails to converge”
Approximating max with 50 seems to be too large for Pr = 0.6 (and Pr = 0.72 in v9), max = 20 solves the problem. I guess max = 50 can also be used if one manually sets the initial guess of "Shooting" method carefully. BTW, I observed similar problem when solving Young-Laplace equation and found using the asymptotic solution at far field as the boundary a good solution. Does this set of equation owns a analytic asymptotic solution at far field?
Jan
15
comment Superscript standalone text
For your specific example, you can simply use \[Degree]C
Jan
14
comment Why does Outer sometimes return a packed array, and sometimes not?
Er… personally I think this question is a little scattered, maybe you can consider divide it into 2 or 3 questions?
Jan
14
comment What is the default ColorFunction for MatrixPlot?
@JasonB Can this be related to the version? I'm in v9.0.1. What if you try pattern Blend[__] & instead?
Jan
14
comment What is the default ColorFunction for MatrixPlot?
@Sayakiss See my edit.
Jan
14
comment Manipulating Some Lists in Compile
If I understand the pseudo code correctly, it's just creating t described above? Then how about func[z_, nei_] := Module[{t = ConstantArray[0, Length@Flatten@z]}, t[[Rest@nei]] = 1; Partition[t, Length@z]]; func[Z, Neighbors[[2]]]