|
Printest |
Top Previous Next |
|
{ PRINTTEST.PDE }
{ *******************************************************************
This sample demonstrates the use of PRINT selectors in PLOT output.
******************************************************************* }
title "Simple Heatflow"
select contourgrid=50
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 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) print as "Contour Print" contour(Temp) print(20) as "Contour Print(20)" contour(Temp) printonly as "contour Printonly"
vector(-dx(Temp),-dy(Temp)) as "Heat Flow" print
elevation(temp) from (-1,-1) to (1,1) print as "E-print" elevation(temp) from (-1,-1) to (1,1) print(300) as "E-print(300)" elevation(temp) on "BDRY" print as "Bdry-print"
end |