21.01.2015 Views

COMSOL Multiphysics™

COMSOL Multiphysics™

COMSOL Multiphysics™

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

postint<br />

For time-dependent problems, the variable t can be used in the expressions ei. The<br />

value of t is the interpolation time when the property T is provided, and the time<br />

for the solution, when Solnum is used. Similarly, lambda and the parameter are<br />

available as eigenvalues for eigenvalue problems and as parameter value for<br />

parametric problems, respectively.<br />

Examples<br />

Compute the integral of the solution to Poisson’s equation on the unit disk using<br />

weak constraints. Use weak constraint to obtain accurate flux.<br />

clear fem<br />

fem.dim = {'u' 'lm'};<br />

fem.geom = circ2;<br />

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

fem.shape={'(2,''u'')' 'shlag(2,''lm'')'};<br />

fem.equ.c = {{1 0}};<br />

fem.equ.f = {{1 0}};<br />

% make shape function for u active on subdomain<br />

fem.equ.shape={1};<br />

fem.bnd.weak = {{'test(u)*lm' 'test(lm)*(-u)'}};<br />

% make shape functions for u and lm active on boundary<br />

fem.bnd.shape={[1 2]};<br />

fem.solform = 'general';<br />

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

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

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

Verify that the integral of the source term in Poisson’s equation on the unit disk<br />

cancels the integral of the flux over the boundary. To have access to the variables f1<br />

and ncu1, we need to use solution form<br />

postint(fem,'f1')<br />

postint(fem,'lm','edim',1)<br />

The variable ncu can also be used to compute the flux, but it is much less accurate.<br />

postint(fem,'-ncu1','edim',1)<br />

Compatibility The properties Context, Cont, and Contorder are obsolete from FEMLAB 3.0.<br />

The property Variables has been renamed to Const in FEMLAB 2.3.<br />

See Also<br />

posteval<br />

344 | CHAPTER 1: COMMAND REFERENCE

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

Saved successfully!

Ooh no, something went wrong!