Modelica.Mechanics.MultiBody.Visualizers.Advanced.SurfaceCharacteristics

Functions returning surface descriptions

Information

This package contains functions that are used to define parameterized surfaces for use with the Surface model.

Extends from Modelica.Icons.FunctionsPackage (Icon for packages containing functions).

Package Content

Name Description
Modelica.Mechanics.MultiBody.Visualizers.Advanced.SurfaceCharacteristics.torus torus Function defining the surface characteristic of a torus
Modelica.Mechanics.MultiBody.Visualizers.Advanced.SurfaceCharacteristics.pipeWithScalarField pipeWithScalarField Function defining the surface characteristic of a pipe where a scalar field value is displayed with color along the pipe axis
Modelica.Mechanics.MultiBody.Visualizers.Advanced.SurfaceCharacteristics.rectangle rectangle Function defining the surface characteristic of a planar rectangle

Modelica.Mechanics.MultiBody.Visualizers.Advanced.SurfaceCharacteristics.torus Modelica.Mechanics.MultiBody.Visualizers.Advanced.SurfaceCharacteristics.torus

Function defining the surface characteristic of a torus

Information

Function torus computes the X, Y and Z arrays to visualize a torus with model Torus. The left image below shows a torus with R = 0.5 m and r = 0.2 m. The right images below shows the torus with the additional parameter settings:

opening    =   45 degree
startAngle = -135 degree
stopAngle  =  135 degree

Extends from Modelica.Mechanics.MultiBody.Interfaces.partialSurfaceCharacteristic (Interface for a function returning surface characteristics).

Inputs

NameDescription
nuNumber of points in u-Dimension
nvNumber of points in v-Dimension
RMajor radius (distance from center of torus to center of tube) [m]
rMinor radius (radius of tube) [m]
openingOpening angle of torus [rad]
startAngleStart angle of torus slice [rad]
stopAngleEnd angle of torus slice [rad]
Custom Parameters
multiColoredSurface= true: Color is defined for each surface point

Outputs

NameDescription
X[nu, nv][nu,nv] positions of points in x-Direction resolved in surface frame [m]
Y[nu, nv][nu,nv] positions of points in y-Direction resolved in surface frame [m]
Z[nu, nv][nu,nv] positions of points in z-Direction resolved in surface frame [m]
C[if multiColoredSurface then nu else 0, if multiColoredSurface then nv else 0, 3][nu,nv,3] Color array, defining the color for each surface point

Modelica.Mechanics.MultiBody.Visualizers.Advanced.SurfaceCharacteristics.pipeWithScalarField Modelica.Mechanics.MultiBody.Visualizers.Advanced.SurfaceCharacteristics.pipeWithScalarField

Function defining the surface characteristic of a pipe where a scalar field value is displayed with color along the pipe axis

Information

Function pipeWithScalarField computes the X, Y, Z and C arrays in order to visualize a pipe and a scalar field along the pipe axis with model PipeWithScalarField. 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 input argument "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. An example is shown in the next figure:

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

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

Extends from Modelica.Mechanics.MultiBody.Interfaces.partialSurfaceCharacteristic (Interface for a function returning surface characteristics).

Inputs

NameDescription
nuNumber of points in u-Dimension
nvNumber of points in v-Dimension
rOuterOuter radius of cylinder [m]
lengthLength of cylinder [m]
xsi[:]Relative position along the pipe with x[1] = 0, x[end] = 1 [m]
T[size(xsi, 1)]Scalar field value at position xsi*length
T_minT <= T_min is mapped to colorMap[1,:]
T_maxT >= T_max is mapped to colorMap[end,:]
colorMap[:, 3]Color map to map scalar T to a corresponding color
Custom Parameters
multiColoredSurface= true: Color is defined for each surface point

Outputs

NameDescription
X[nu, nv][nu,nv] positions of points in x-Direction resolved in surface frame [m]
Y[nu, nv][nu,nv] positions of points in y-Direction resolved in surface frame [m]
Z[nu, nv][nu,nv] positions of points in z-Direction resolved in surface frame [m]
C[if multiColoredSurface then nu else 0, if multiColoredSurface then nv else 0, 3][nu,nv,3] Color array, defining the color for each surface point

Modelica.Mechanics.MultiBody.Visualizers.Advanced.SurfaceCharacteristics.rectangle Modelica.Mechanics.MultiBody.Visualizers.Advanced.SurfaceCharacteristics.rectangle

Function defining the surface characteristic of a planar rectangle

Information

Function rectangle computes the X, Y and Z arrays to visualize a rectangle with model Rectangle. The image below shows two rectangles of

nu = 8,
nv = 3,
lu = 3,
lv = 2.

Extends from Modelica.Mechanics.MultiBody.Interfaces.partialSurfaceCharacteristic (Interface for a function returning surface characteristics).

Inputs

NameDescription
nuNumber of points in u-Dimension
nvNumber of points in v-Dimension
luLength in direction u [m]
lvLength in direction v [m]
Custom Parameters
multiColoredSurface= true: Color is defined for each surface point

Outputs

NameDescription
X[nu, nv][nu,nv] positions of points in x-Direction resolved in surface frame [m]
Y[nu, nv][nu,nv] positions of points in y-Direction resolved in surface frame [m]
Z[nu, nv][nu,nv] positions of points in z-Direction resolved in surface frame [m]
C[if multiColoredSurface then nu else 0, if multiColoredSurface then nv else 0, 3][nu,nv,3] Color array, defining the color for each surface point
Automatically generated Thu Oct 1 16:07:54 2020.