Visualization in 3D

General

Additionally to visualizing simulation results in 2D, visualization in 3D can be useful to check the model setup and parameterization.

In order to see the visualization during simulation set the parameter visualization of the settings_FSL component to true. A 3D visualization window will become available after simulation. See Figure 1 and Figure 2 for examples.

Figure 1 - Exemplary 3D visualization

Image

Figure 2 - Exemplary 3D visualization


In the global Settings_FSL component, the user can switch on the visualization of a coordinate system with parameter visualizeWorld. Its length and color can be changed there, too. By default, the x-axis is red, the y-axis green, and the z-axis blue (following the usual RGB convention). See Figure 3 for an illustration.

Image

Figure 3 - Global coordinate system visualization

The visualization of most components follows the usual conventions and is therefore self-explanatory. In the following, only special visualization features are described in more detail.

Pipes

The package FuelSystem.Pipes includes components that supports such special visualization. This is used to indicate the consistency of the spatial parameterization. As described under Positioning, the positions of the ports can be either defined in the parameterization of a component, or read via the ports from a connected component. Additionally, the pipes are parameterized with a true pipe length length. This is required as the true pipe length may be longer than the geometrical distance between two flanges. However, this also creates a potential pitfall for inconsistent parameterization. To alleviate this, the 3D visualization provides visual feedback. If the true pipe length is configured to be shorted than the geometrical distance, then this is illustrated with a thin red line as shown in Figure 5 (as opposed to Figure 4).

Image

Figure 4 - Normal pipe visualization

Image

Figure 5 - Pipe visualization if the actual length parameter length is shorter than the geometrical distance (about 20% too short here)

Linear fuel probe

The probe start and end coordinate is specified in the Probe record within the tank. The colors makes it easy to identify the probe in the visualization.

Image

Figure 6 - Probe visualization

Fuel center of gravity (CG)

ConvectiveComplexTank supports computation of fuel center of gravity. CG is represented by red sphere in 3D visualization.

To extract each coordinate in the triangle, run the simulation for 0 seconds using ModelicaWithVisualization. Click on the triangle of interest in the animation to get it's index. The script FuelSystem.Utilities.Functions.getTriangleVertices can then be used to extract the coordinates for the given triangle.

FuelSystem.Utilities.Functions.getTriangleVertices(ModelicaServices.ExternalReferences.loadResource ("modelica://FuelSystem/Resources/Geometries/Tank1/Tank1.stl"), 1, 247);

=

[11.25, 0.48655641104, -2.360383434;

12.656513771, 0.41867083731, -2.147082291;

12.656513771, 3.2895497026E-17, -2.2480339204]

Image

Figure 7 - Fuel center of gravity visualization in tank