Streamline Multislice
Use a Streamline Multislice plot in 3D () to visualize a vector quantity on slices. A streamline is a curve everywhere tangent to an instantaneous vector field. Add Color Expression, Deformation, Export Expressions, Filter, Material Appearance, Selection (Plot Attribute), Translation, or Transparency subnodes as needed. Right-click a 3D Plot Group to add these plots from the More Plots submenu.
Go to Common Results Node Settings for links to information about these sections: Data, Expression, Title, Quality, and Inherit Style.
To get the length of the streamlines, use an Export>Plot node. In its Settings window, select the Only export starting points and endpoints check box to include one row with the starting point, the endpoint, and the length of the streamline for each streamline.
Multiplane Data
Under Multiplane Data, select an Entry methodNumber of planes or Coordinates — for the x-planes, y-planes, and z-planes.
For Number of planes, enter the number of planes in the Planes field. For Coordinates, enter a range of coordinates in the Coordinates field.
Streamline Positioning
Select one of these options from the Positioning list: Starting-point controlled (the default), Uniform density, or Magnitude controlled. Then follow one of the methods described:
Coloring and Style
In this section you can control the style and color of the streamlines and add points or arrows to them, if desired.
Line Style
Under Line style, choose None, Line (the default), Ribbon, or Tube from the Type list to determine the type of streamlines. If you choose None, no streamlines appear, but you can plot arrows that are tangential to the streamlines. If you choose Ribbon, then enter an expression for the ribbon width in the Width expression field (SI unit: m). If desired, you can also adjust the width by selecting the Width scale factor check box and enter a scale factor in the corresponding text field.
Point Style
Under Point style, you can add points or arrows and control their appearance.
From the Type list, choose None (the default) for no points or arrows, Arrow for static arrows that are tangential to the streamlines, Interactive arrow for arrows that are tangential to the streamlines and that can move along the streamlines with the local integration time, or Interactive point for points that can move along the streamlines with the local integration time.
If you choose Arrow, these additional settings are available:
From the Arrow distribution list, choose Equal arc length (the default) to distribute the arrows uniformly over the streamlines’ arc length, Equal time to distribute the arrows using the weight function dt/darc, or Equal inverse time to distribute the arrows using the weight function darc/dt.
Select the Number of arrows check box to enter a number for the total number of arrows, on all streamlines, that are plotted. By default, the COMSOL Multiphysics software provides a reasonable number of arrows.
If you choose Interactive arrow, these additional settings are available:
Specify a value in the Local time field (default: 0) for the local integration time along the streamlines for which the arrows are plotted. It is possible for integration times to be negative: For a starting point in the interior of a domain, streamlines are integrated both forward and backward in time unless you clear the Allow backward time integration check box in the Advanced section.
In the Extra release times field, enter any additional times for releasing arrows, or click the Range button () to define the extra release times. By default, there are no extra times.
The following settings are available for both the Arrow and the Interactive arrow types:
From the Arrow type list, choose Arrowhead (the default), Arrow, or Cone.
From the Arrow length list, choose Normalized (the default), Logarithmic, or Proportional to make the arrows’ sizes depend on the magnitude of the plotted quantity, if desired. If you choose Logarithmic, the length of the arrows is proportional to the natural logarithm of the magnitude of the quantity they represent. This makes arrows representing small values relatively larger. The value in the Range quotient field (default: 100) determines the ratio between the smallest and largest values in the range of values for the logarithmic arrow length.
Use the slider, or select the Scale factor check box and enter a scale factor in the associated text field if you want to use another scaling than the one used by default.
If you choose Interactive point, these following settings are available:
Specify a value in the Local time field (default: 0) for the local integration time along the streamlines for which the points are plotted. It is possible for integration times to be negative: For a starting point in the interior of a domain, streamlines are integrated both forward and backward in time unless you clear the Allow backward time integration check box in the Advanced section.
In the Extra release times field, enter any additional times for releasing points, or click the Range button () to define the extra release times. By default, there are no extra times.
Select or enter an expression for the points’ radii in the Point radius expression field (SI unit: m). By default, the radius is scaled automatically. To enter a scale factor for the radius, select the Radius scale factor check box and enter a scale factor in the corresponding text field.
Select the Fixed size check box if you want to display the points with a fixed onscreen size.
From the Color list, choose a color for the streamlines and arrows. Choose Custom to add a custom color using a color palette. Choose From theme to use a background color that changes with the selected color theme. This list is not available if you use a Color Expression subnode to define the colors for the streamlines.
Advanced
Define the following advanced streamline settings as needed.
Advanced Settings for the Streamline Plot
Under Advanced, set these general settings. See also Advanced Section Setting Effects.
The Integration tolerance field default is 0.001. Edit to specify how accurately streamlines are computed.
The Maximum streamline length field makes it possible to control the length of streamlines. Edit the default (Inf) to control the streamlines’ length. Enter the value as a fraction of the mean bounding box’s size. When the Allow backward time integration check box is selected (the default), the maximum length refers to the sum of the lengths of the forward and backward parts.
The Maximum number of integration steps field makes sure that the integration does not continue indefinitely. Edit the default (5000) to control when the computation stops.
The Maximum integration time field sets an upper time limit for the integration. The default is infinity (Inf).
The Stationary point stop tolerance can be adjusted to make sure the integration stops near a stationary point in the field. The default is 0.01.
The Loop tolerance field default is 0.01. This is a fraction of the mean of the lengths of the bounding box of the geometry. If a streamline gets closer to its starting point than this distance, the streamline snaps to its starting point and is plotted as a connected loop.
The Maximum angle threshold field default value is 0.05 rad. This value, in degrees, is the maximum angle between the stream vector and the slice’s normal for its streamlines to be added to the slice. What is plotted in a streamline multislice plot is the projected component of the 3-dimensional streams that pass through the slice, onto the slice. Use this threshold to ignore the streams that are perpendicular to the slice. The value is the threshold angle that determines the perpendicularity.
Select the Allow backward time integration check box to integrate points from the starting points both in the direction of the vector field and in the opposite direction. This check box is selected by default.
Select the Normalize vector field check box if required. The vector field is normalized pointwise: For each point where the field was evaluated, the vector is replaced by a unit vector in the same direction. If you apply normalization, the speed along the streamline changes. This change means that the other settings in the Advanced section (for example, maximum number of integration steps and maximum integration time) are interpreted differently.
Streamline Positioning Section (Continued)
Method 1: Selecting the Specified Number of Starting Points in the Geometry
1
Under Streamline Positioning, from the Positioning list, select Starting-point controlled.
2
Enter the number of Points (the default is 20).
Method 2: Creating Streamlines with Uniform Density
The algorithm saturates the entire surface with evenly spaced streamlines.
1
Under Streamline Positioning, from the Positioning list, select Uniform density.
2
Enter the Separating distance between the streamlines (the default is 0.05).
The value for the separating distance is a fraction of the mean of the lengths of the bounding box of the geometry. In this case, a streamline stops whenever it gets too close to another streamline or itself (or if any of the general termination criteria specified in the Advanced section is fulfilled).
3
The Advanced parameters list defaults to Automatic. If required, select Manual to edit these parameters: Starting distance factor or Terminating distance factor.
-
The Starting distance factor is a factor multiplied with the distance specified in the Separating distance field (as a fraction of the mean of the lengths of the bounding box of the geometry). It sets the minimum distance between streamlines and the starting point for the next streamline.
When the surface is close to be saturated with streamlines, new starting points tend to be positioned where the streamline has nowhere to go before it gets too close other streamlines, resulting in short streamlines. The higher the value of this factor, the more it disqualifies the starting point and thus reduces the number of short streamlines.
-
The Terminating distance factor is a factor multiplied with the distance specified in the Separating distance field. It sets the minimum distance between any pair of streamlines. Thus, this distance is the minimal distance under which the integration of a streamline stops.
Method 3: Creating Streamlines with Variable Density and Magnitude Controlled
To create streamlines with a variable density according to the magnitude of the specified vector field:
1
Under Streamline Positioning, from the Positioning list, select Magnitude controlled.
The Magnitude controlled setting gives proper streamline plots only for incompressible flow fields. In this case, the algorithm places the streamlines so that the flow between each pair of adjacent streamlines is the same throughout the surface, giving streamlines that are more dense where the magnitude of the field is high.
2
Enter the Minimum distance and Maximum distance between streamlines (the default Minimum distance is 0.025, and the default Maximum distance is 0.05). These distances are specified as fractions of the mean of the lengths of the bounding box of the geometry and control what minimum and maximum distances correspond to the minimum and maximum values of the flow magnitude. The minimum velocity in the model is mapped to the minimum distance and the maximum velocity to the maximum distance. Thus every point on a streamline and on the boundary has a separating distance associated with it. Given a set of streamlines, the starting point for the next streamline is selected using these separating distances.
Advanced Section Setting Effects
The Advanced settings have the following effects:
This process stops if:
Finally, the software connects the calculated points for each streamline consecutively with straight lines.