modelPipeWithScalarField

Visualizing a pipe with a scalar field

Information

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

TypeNameDefaultDescription
Surface properties
SI.RadiusrOuterOuter radius of pipe
SI.LengthlengthLength of pipe
Integern_rOuter30Number of points along outer radius
Integern_length10Number of points along length
Types.SpecularCoefficientspecularCoefficient0.7Reflection of ambient light (= 0: light is completely absorbed)
Realtransparency0Transparency of shape: 0 (= opaque) ... 1 (= fully transparent)
Color coding
Real[:]xsiModelica.Math.Vectors.relNodePositions(12)Vector of relative positions along the pipe with x[1] = 0, x[end] = 1
RealT_minMinimum value of T that corresponds to colorMap[1,:]
RealT_maxMaximum value of T that corresponds to colorMap[end,:]
Integern_colors64Number of colors in the colorMap

Components

TypeNameDefaultDescription
Frames.OrientationRFrames.nullRotation()Orientation object to rotate the world frame into the surface frame
SI.Position[3]r_0{0, 0, 0}Position vector from origin of world frame to origin of surface frame, resolved in world frame
Real[size(xsi, 1)]TVector of values at positions xsi*length (will be visualized by color)

Contents

NameDescription
colorMap