Skip to main content
2 of 3
added 271 characters in body
Domen
  • 33.4k
  • 3
  • 47
  • 66

You can try with finer discretization by making MaxCellMeasure smaller:

usol = NDSolveValue[{\!\(
\*SubsuperscriptBox[\(\[Del]\), \({x, y}\), \(2\)]\(u[x, y]\)\) + 
          0.5 Exp[-u[x, y]] - 2. Exp[u[x, y]] == 0., 
      DirichletCondition[
     u[x, y] == 2. Log[1. - 0.5 Sin[2. ArcTan[x, y]]],
         True]}, u, {x, y} \[Element] Disk[], 
   Method -> {FiniteElement, 
     MeshOptions -> {MaxCellMeasure -> 0.0001, 
       MeshElementType -> TriangleElement}}];

Eqsol[x_, y_] := Derivative[2, 0][usol][x, y] + Derivative[0, 2][usol][x, y] +
   0.5 Exp[-usol[x, y]] - 2. Exp[usol[x, y]];

Plot3D[Evaluate@Eqsol[x, y], {x, y} \[Element] Disk[], PlotRange -> Full, AxesLabel -> Automatic]

Finer mesh Error

Furthermore, you can read in this Mathematica FEM Tutorial why this way of verifying the result of NDSolveValue results in an overestimated error.

Domen
  • 33.4k
  • 3
  • 47
  • 66