Sine3D

Top  Previous  Next

title '3D Accuracy Test - Sine'

 

coordinates

   cartesian3

 

select

    ngrid = 5

    stages = 3

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

 

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

 

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)/integral(1)))

 

histories

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

 

end