WOLFRAM SYSTEMMODELER

PipeWithScalarField

Visualizing a pipe with a scalar field

Diagram

Wolfram Language

In[1]:=
SystemModel["Modelica.Mechanics.MultiBody.Visualizers.Advanced.PipeWithScalarField"]
Out[1]:=

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

Model PipeWithScalarField visualizes a pipe and a scalar field along the pipe axis. The latter is shown by mapping scalar field to color values with a color map and utilizing this color at the perimeter associated with the corresponding axis location. Typically the scalar field value is a temperature, but might be also another quantity. Predefined color maps are available from MultiBody.Visualizers.Colors.ColorMaps and can be selected via parameter "colorMap". A color map with the corresponding scalar field values can be exported as vector-graphics in svg-format with function MultiBody.Visualizers.Colors.colorMapToSvg. The position and orientation of the center of the circle at the left end of the pipe is defined via parameters "r_0" and "R", respectively. The pipe axis is oriented along the x-axis of the local coordinate system described by "R", see figure below:

The color coding is shown in the next figure. It was generated with MultiBody.Visualizers.Colors.colorMapToSvg using the following call:

colorMapToSvg(Modelica.Mechanics.MultiBody.Visualizers.Colors.ColorMaps.jet(),
              height=50, nScalars=6, T_max=100, caption="Temperature in C");

Parameters (10)

rOuter

Value:

Type: Radius (m)

Description: Outer radius of pipe

length

Value:

Type: Length (m)

Description: Length of pipe

n_rOuter

Value: 30

Type: Integer

Description: Number of points along outer radius

n_length

Value: 10

Type: Integer

Description: Number of points along length

specularCoefficient

Value: 0.7

Type: SpecularCoefficient

Description: Reflection of ambient light (= 0: light is completely absorbed)

transparency

Value: 0

Type: Real

Description: Transparency of shape: 0 (= opaque) ... 1 (= fully transparent)

xsi

Value: Modelica.Math.Vectors.relNodePositions(12)

Type: Real[:]

Description: [:] Relative position along the pipe with x[1] = 0, x[end] = 1

T_min

Value:

Type: Real

Description: Minimum value of T that corresponds to colorMap[1,:]

T_max

Value:

Type: Real

Description: Maximum value of T that corresponds to colorMap[end,:]

n_colors

Value: 64

Type: Integer

Description: Number of colors in the colorMap

Inputs (3)

R

Default Value: Frames.nullRotation()

Type: Orientation

Description: Orientation object to rotate the world frame into the surface frame

r_0

Default Value: {0, 0, 0}

Type: Position[3] (m)

Description: Position vector from origin of world frame to origin of surface frame, resolved in world frame

T

Type: Real[size(xsi, 1)]

Description: [:] Scalar values at position xsi*length (will be visualized by color)

Components (2)

R

Type: Orientation

Description: Orientation object to rotate the world frame into the surface frame

surface

Type: Surface

Used in Components (1)

PipeWithScalarField

Modelica.Mechanics.MultiBody.Visualizers

Visualizing a pipe with scalar field quantities along the pipe axis