Note that there are some explanatory texts on larger screens.

plurals
  1. POMaxStepSize, MaxSteps seem to have no effect on NDSolve in MATHEMATICA
    primarykey
    data
    text
    <p>I am a novice at mathematica so please bear with me!</p> <p>I am trying to solve a nonlinear PDE in mma using NDSolve. The solution process is cut short because of singularities occurring much before the time for the simulation runs out. I realize that stiff systems that possess such singularities can be dealt with (at least by brute force) by reducing step size.</p> <p>However "MaxSteps" or "MaxStepSize" doesn't seem to have a tangible effect on my code.</p> <p>What gives? Any other method that I might be missing?</p> <p>**</p> <h2>CODE:</h2> <p>**</p> <pre><code>Needs["VectorAnalysis`"] Needs["DifferentialEquations`InterpolatingFunctionAnatomy`"]; Clear[Eq4, EvapThickFilm, h, S, G, E1, K1, D1, VR, M, R] Eq4[h_, {S_, G_, E1_, K1_, D1_, VR_, M_, R_}] := \!\( \*SubscriptBox[\(\[PartialD]\), \(t\)]h\) + Div[-h^3 G Grad[h] + h^3 S Grad[Laplacian[h]] + (VR E1^2 h^3)/(D1 (h + K1)^3) Grad[h] + M (h/(1 + h))^2 Grad[h]] + E1/( h + K1) + (R/6) D[D[(h^2/(1 + h)), x] h^3, x] == 0; SetCoordinates[Cartesian[x, y, z]]; EvapThickFilm[S_, G_, E1_, K1_, D1_, VR_, M_, R_] := Eq4[h[x, y, t], {S, G, E1, K1, D1, VR, M, R}]; TraditionalForm[EvapThickFilm[S, G, E1, K1, D1, VR, M, R]]; L = 318; TMax = 7.0; Off[NDSolve::mxsst]; Clear[Kvar]; Kvar[t_] := Piecewise[{{0.01, t &lt;= 4}, {0.05, t &gt; 4}}] (*Ktemp = Array[0.001+0.001#^2&amp;,13]*) hSol = h /. NDSolve[{ (*S,G,E,K,D,VR,M*) EvapThickFilm[1, 3, 0.1, Kvar[t], 0.01, 0.1, 0, 160], h[0, y, t] == h[L, y, t], h[x, 0, t] == h[x, L, t], (*h[x,y,0] == 1.1+Cos[x] Sin[2y] *) h[x, y, 0] == 1 + (-0.25 Cos[2 \[Pi] x/L] - 0.25 Sin[2 \[Pi] x/L]) Cos[ 2 \[Pi] y/L] }, h, {x, 0, L}, {y, 0, L}, {t, 0, TMax} ][[1]] </code></pre> <h2>Error message:</h2> <p>NDSolve::ndsz: At t == 2.366570254802048`, step size is effectively zero; singularity or stiff system suspected. >></p> <p>NDSolve::eerr: Warning: Scaled local spatial error estimate of 571455.5042645375<code>at t = 2.366570254802048</code> in the direction of independent variable x is much greater than prescribed error tolerance. Grid spacing with 19 points may be too large to achieve the desired accuracy or precision. A singularity may have formed or you may want to specify a smaller grid spacing using the MaxStepSize or MinPoints method options. >></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload