21.01.2015 Views

COMSOL Multiphysics™

COMSOL Multiphysics™

COMSOL Multiphysics™

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

postsurf<br />

postsurf<br />

Purpose Shorthand command for surface plot in 2D and 3D.<br />

Syntax<br />

Description<br />

postsurf(fem,expr1,...)<br />

postsurf(fem,expr1,expr2...)<br />

h = postsurf(fem,...)<br />

postsurf(fem,expr1,expr2...) plots a surface plot on subdomains in 2D<br />

colored according to the expression expr1 and with height according to expr2. For<br />

a 3D model, it plots a colored surface plot on the boundaries, colored according to<br />

expr1. The function accepts all property/value pairs that postplot does. In 2D,<br />

this command is just shorthand for the call<br />

postplot(fem,'tridata',expr1,...<br />

'triz',expr2,...<br />

'tribar','on',...<br />

'axisequal','on',...)<br />

and in 3D, it is shorthand for<br />

postplot(fem,'tridata',expr1,...<br />

'tribar','on',...<br />

'geom','on',...<br />

'axisequal','on',...)<br />

h = postsurf(fem,...) additionally returns handles to the plotted handle<br />

graphics objects.<br />

If you want to have more control over your surface plot, use postplot instead of<br />

postsurf.<br />

Example<br />

Surface plot of the solution to the equation –∆u = 1 over the geometry defined by<br />

the L-shaped membrane. Use Dirichlet boundary conditions u = 0 on ∂ Ω .<br />

sq1 = square2(0,0,1);<br />

sq2 = move(sq1,0,-1);<br />

sq3 = move(sq1,-1,-1);<br />

clear fem<br />

fem.geom = sq1+sq2+sq3;<br />

fem.mesh = meshinit(fem);<br />

fem.equ.c = 1;<br />

fem.equ.f = 1;<br />

fem.bnd.h = 1;<br />

fem.xmesh = meshextend(fem);<br />

fem.sol = femstatic(fem);<br />

postsurf(fem,'u')<br />

See Also<br />

postplot, postanim, postcont, postlin, postarrow, postarrowbnd,<br />

postflow, postprinc, postprincbnd, postslice, postiso, posttet<br />

371

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!