PipeWithScalarField

Visualizing a pipe with a scalar field

    PipeWithScalarField

Library

Modelica/Mechanics/MultiBody/Visualizers/Advanced

Description

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

PipeWithScalarField_0

NameLabelDescriptionData TypeValid Values

mo_R

R

Orientation object to rotate the world frame into the surface frame

FromModelica('Modelica.Mechanics.MultiBody.Frames.Orientation')

mo_r_0

r_0

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

Vector of size 3

mo_rOuter

rOuter

Outer radius of pipe

Scalar

mo_length

length

Length of pipe

Scalar

mo_n_rOuter

n_rOuter

Number of points along outer radius

Scalar

mo_n_length

n_length

Number of points along length

Scalar

mo_specularCoefficient

specularCoefficient

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

Scalar

mo_transparency

transparency

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

Scalar

mo_xsi

xsi

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

Vector

mo_T

T

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

Vector

mo_T_min

T_min

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

Scalar

mo_T_max

T_max

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

Scalar

mo_n_colors

n_colors

Number of colors in the colorMap

Scalar

mo_colorMap

colorMap

Function defining the color map

FromModelica('Modelica.Mechanics.MultiBody.Visualizers.Colors.ColorMaps.gray')
FromModelica('Modelica.Mechanics.MultiBody.Visualizers.Colors.ColorMaps.hot')
FromModelica('Modelica.Mechanics.MultiBody.Visualizers.Colors.ColorMaps.jet')
FromModelica('Modelica.Mechanics.MultiBody.Visualizers.Colors.ColorMaps.autumn')
FromModelica('Modelica.Mechanics.MultiBody.Visualizers.Colors.ColorMaps.spring')
FromModelica('Modelica.Mechanics.MultiBody.Visualizers.Colors.ColorMaps.summer')
FromModelica('Modelica.Mechanics.MultiBody.Visualizers.Colors.ColorMaps.winter')

mo_colorMapData

colorMapData

Matrix of size Mx3