export_test

<< Click to Display Table of Contents >>

Navigation:  Sample Problems > Usage > Plotting >

export_test

Previous pageReturn to chapter overviewNext page

{ EXPORT_TEST.PDE  

 

   This sample demonstrates the use of EXPORT selectors in PLOT output.

}  

 

 

title "Simple Heatflow"

 

Variables

   Temp                       { Identify "Temp" as the system variable }

 

definitions

   K = 1                       { declare and define the conductivity }

   source = 4                 { declare and define the source }

   Texact = 1-x^2-y^2         { for convenience, define the exact solution }

 

initial values

   Temp = 0                   { unimportant in linear steady-state problems }

 

equations

   Temp:   div(K*grad(Temp)) + source = 0   { define the heatflow equation }

 

boundaries                     { define the problem domain }

  Region 1                   { ... only one region }

      start "BDRY" (-1,-1)   { specify the starting point }

      value(Temp)=Texact     { specify Dirichlet boundary at exact solution }

      line to (1,-1)         { walk the boundary }

            to (1,1)

            to (-1,1)

            to close           { bring boundary back to starting point }

 

monitors

  contour(Temp)               { show the Temperature during solution }

 

plots                           { write these hardcopy files at completion }

  contour(Temp)     export   as "Contour Export"

  contour(Temp)     export(20)   as "Contour Export(20)"

  contour(Temp)     export traces   as "Trace Print"

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

  elevation(temp) from (-1,-1) to (1,1) export as "Elevation-export"

  elevation(temp) from (-1,-1) to (1,1) export(300) as "Elevation-export(300)"

  elevation(temp) on "BDRY" export as "Bdry-export"

 

end