Mesh_Out

Top  Previous  Next

  {  MESH_OUT.PDE  }

{

This example uses a modification of the sample problem HEATBDRY.PDE

  to illustrate the use of the TRANSFERMESH output function.  Both the

  Temperatures calculated here and the final mesh structure are transferred

  as input to the stress calculation MESH_IN.PDE  }

 

 

title "Test TRANSFERMESH output"

 

Variables

    Temp

 

definitions

    K = 1

    source = 4

    Tzero = 0

    flux = -K*grad(Temp)

 

equations

    div(K*grad(Temp)) + source = 0

 

boundaries

    Region 1

       start "OUTER" (0,0)

       natural(Temp)=0        line to(1,0)

 

       natural(Temp)=0        arc (center=0,0) to (0,1)

 

       natural(Temp)=0        line to close

 

       start "INNER" (0.4,0.2)

       natural(Temp)=Tzero-Temp

         arc (center=0.4,0.4)

            to (0.6,0.4)

            to (0.4,0.6)

            to (0.2,0.4)

            to close

 

monitors

    contour(Temp)

 

plots

    grid(x,y)

    contour(Temp)

    surface(Temp)

    vector(-K*dx(Temp),-K*dy(Temp)) as "Heat Flow"

    contour(source)

    elevation(normal(flux)) on "outer" range(-0.08,0.08)

      report(bintegral(normal(flux),"outer")) as "bintegral"

    elevation(normal(flux)) on "inner" range(1.95,2.3)

      report(bintegral(normal(flux),"inner")) as "bintegral"

 

    { HERE IS THE MESH TRANSFER OUTPUT COMMAND: }

     transfer(Temp) file="transferm.dat"

 

end