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.

elconst<br />

Purpose<br />

elconst<br />

Define global expression variables.<br />

Syntax<br />

Description<br />

Examples<br />

el.elem = 'elconst'<br />

el.var{2*ivar-1} = varname<br />

el.var{2*ivar} = varexpr<br />

The elconst element declares expression variables varname to be accessible across<br />

all geometries and dimensions. The defining expressions, varexpr, can contain any<br />

variables, including variables that are only present on some domains. Expressions are<br />

expanded in the context where evaluation is requested.<br />

Add global expressions for the transformation between Cartesian and cylindrical<br />

polar coordinates.<br />

clear el;<br />

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

el.var = {'r','sqrt(x^2+y^2)','phi','atan2(y,x)'};<br />

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

See Also<br />

elempty<br />

54 | CHAPTER 1: COMMAND REFERENCE

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

Saved successfully!

Ooh no, something went wrong!