EXAMPLES OF THE GENERAL EXTRUSION OPERATOR
Taxonomy? Taxonomy
Learn how to use the General Extrusion operator when modeling in {:comsolmph}.
Learn how to use the General Extrusion operator when modeling in {:comsolmph}.
Examples of the General Extrusion Operator
Introduction
The General Extrusion operator maps expressions defined on a source to an expression that can be evaluated on any destination geometry where the destination map expressions are valid. It can be used for a variety of different purposes, examples of which are presented here.
Extruding Data Along a Direction
Given an expression defined on a plane, e.g., the xyplane, it is desired to map this data along the z direction.
To implement, define a General Extrusion operator on a boundary parallel to the xyplane, with the zexpression blank for both the Source Map and a Destination Map. The General Extrusion operator will map data from the boundary into the volume, along the z direction, as shown in the following screenshots.
It is also possible to define the mapping in terms of coordinate systems. For example, to map data from a boundary around a centerline, introduce a cylindrical system, and use those coordinate system variables to define the source and destination map.
Transforms: Translate, Rotate, Mirror, Scale
Considering a variable defined on the xyplane within a unit square centered at the origin, as shown above, it is possible to implement a variety of transforms simply via different destination maps, and leaving the source map unchanged. Several cases are illustrated in the table below. The same transforms can be implemented in three dimensions.
Type of Transform  Destination Map  Result 

Translate  xexpression: x0.3 yexpression: y0.15 

Rotate  xexpression: x*cos(30[deg])y*sin(30[deg]) yexpression: x*sin(30[deg])+y*cos(30[deg]) 

Mirror  xexpression: x yexpression: y 

Scale  xexpression: x*2 yexpression: y*3 