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.

elcconstr<br />

Purpose<br />

elcconstr<br />

Define coefficient or general form constraints.<br />

Syntax<br />

Description<br />

el.elem = 'elcconstr'<br />

el.g{ig} = geomnum<br />

el.form = 'coefficient' | 'general'<br />

el.geomdim{ig}{edim}.ind{eldomgrp} = domainlist<br />

el.geomdim{ig}{edim}.dim{idim} = dimvarname<br />

el.geomdim{ig}{edim}.r{eldomgrp} = rvec<br />

el.geomdim{ig}{edim}.h{eldomgrp} = hmat<br />

el.geomdim{ig}{edim}.cpoints{eldomgrp}{ic} = cpind<br />

The elcconstr element adds a set of constraints specified in coefficient or general<br />

form, as specified by the el.form field, to the FEM problem. For the syntax of the<br />

ind field, see elempty. The coefficient rvec has the same syntax as the fem.bnd.r<br />

field, while hmat corresponds to a fem.bnd.h entry. See further the section<br />

“Specifying a Model” in the <strong>COMSOL</strong> Multiphysics Scripting Guide. The<br />

cpoints field differs from fem.bnd.cporder in that it contains pattern indices<br />

instead of orders, see elepspec.<br />

Dirichlet boundary conditions are implemented using elcconstr elements if the<br />

solution form is Coefficient or General. When assembling in the Weak solution<br />

form, an elpconstr elements replaces the elcconstr.<br />

Examples<br />

In a 2D model, add a Dirichlet boundary condition on u at boundary 1 and 2 using<br />

constraint point pattern 1:<br />

el.elem = 'elcconstr';<br />

el.g = {'1'};<br />

el.form = 'coefficient';<br />

gd.ind = {{'1','2'}};<br />

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

gd.r = {{'0'}};<br />

gd.h = {{'1'}};<br />

gd.cpoints = {{'1'}};<br />

el.geomdim{1} = {{},gd,{}};<br />

fem.elem = [fem.elem {el}];<br />

See Also<br />

elempty, elpconstr, elcurlconstr, elepspec, eleqc<br />

53

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

Saved successfully!

Ooh no, something went wrong!