Navigation:  Sample Problems > usage > accuracy >

sine3d

Print this Topic Previous pageReturn to chapter overviewNext page

{ SINE3D.PDE

 

 This problem compares the solution accuracy for three different levels of ERRLIM.

 

}

 

title '3D Accuracy Test - Sine'

 

coordinates

   cartesian3

 

select

   ngrid = 5

   stages = 3

   errlim = staged(1e-2, 5e-3, 1e-3)

 

variables

   u

 

definitions

   long = 1

   wide = 1

   z1 = -1

   z2 = 1

   w=0.1

   rs = r/w

   uex = sin(rs)/rs

   s = -(dxx(uex)+dyy(uex)+dzz(uex))

 

equations

   U:    div(grad(u)) + s = 0

 

extrusion z = z1,z2

 

boundaries

  surface 1 value(u)=uex     { fix bottom surface temp }

  surface 2 value(u)=uex     { fix top surface temp }

 

  Region 1               { define full domain boundary in base plane }

      start(-wide,-wide)

        value(u) = uex         { fix all side temps }

        line to (wide,-wide)   { walk outer boundary in base plane }

          to (wide,wide)

          to (-wide,wide)

          to close

 

monitors

  grid(x,z) on y=0

  contour(uex) on y=0

  contour(u) on y=0

  contour(u-uex) on y=0

 

plots

  grid(x,z) on y=0

  contour(uex) on y=0

  contour(u) on y=0

  contour(u-uex) on y=0

  summary

      report(errlim)

      report(sqrt(integral((u-uex)^2)/sqrt(integral(uex^2))))

 

histories

  history(sqrt(integral((u-uex)^2)/sqrt(integral(uex^2))), errlim) LOG

 

end

 


Page url: index.html?usage_accuracy_sine3d.html