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.

elpconstr<br />

Purpose<br />

elpconstr<br />

Define general pointwise constraints.<br />

Syntax<br />

Description<br />

el.elem = 'elpconstr'<br />

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

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

el.geomdim{ig}{edim}.constr{eldomgrp}{ic} = constrexpr<br />

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

The elpconstr element adds a set of pointwise constraints of type constrexpr=0.<br />

The constr field has the same syntax as the fem.bnd.constr field. See further the<br />

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

constraints are enforced at the same local coordinates in all elements in one domain<br />

group. The constraint point pattern is specified as a pattern index in the cpoints<br />

field. Indices refer to patterns defined by an elepspec element.<br />

Compared to the elcconstr element, the elpconstr can implement a wider range<br />

of constraints, as a correct constraint Jacobian is always calculated on the fly. This is<br />

in contrast to the user-specified Jacobian matrix h, used in fem.bnd.h and the<br />

elcconstr element. Constraints implemented using elpconstr elements are<br />

nevertheless always ideal, which essentially means that symmetric problems stay<br />

symmetric. Note that this can have unexpected effects for nonlinear constraints.<br />

Examples<br />

Solve a 1D biharmonic equation (related to Euler beams) with constraints on both<br />

value and normal derivative at the endpoints.<br />

clear fem;<br />

fem.geom = solid1([0,1]);<br />

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

fem.shape = {shherm(1,3,'u')};<br />

fem.form = 'weak';<br />

fem.equ.weak = 'uxx_test*uxx';<br />

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

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

fem.elem = {};<br />

clear el;<br />

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

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

clear gd;<br />

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

gd.constr = {{'-u','1-ux'},{'-u','1+ux'}};<br />

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

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

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

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

99

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

Saved successfully!

Ooh no, something went wrong!