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.

geomfile<br />

clear fem<br />

fem.geom = 'cardg'<br />

geomplot(fem), axis equal<br />

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

meshplot(fem), axis equal<br />

Then solve the PDE problem –∆u = 1 on the geometry defined by the cardioid. Use<br />

Dirichlet boundary conditions u = 0 on ∂ Ω . Finally plot the solution.<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 />

Cautionary The Geometry M-file format is not supported in 3D.<br />

In 2D, each subdomain boundary must consist of at least two edge segments.<br />

See Also<br />

geom0, geom1, geom2, geom3, geominfo, meshinit, meshrefine<br />

217

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

Saved successfully!

Ooh no, something went wrong!