Tuesday, February 2, 2016

FlowSight Key Improvements, Part II

In my last post, I talked about the new developments in FlowSightTM that provide a better connection between simulation setup and post-processing in relation to visualizing geometry features. Continuing the theme, I will discuss the improvements to volume rendering and the new case linking features in FlowSight.

Volume rendering improvements

Volume rendering is a very powerful way of looking at simulation results. However, it is computationally intensive as it directly displays 3D volume data as a pixel map instead of drawing a surface by creating polygons or triangles.  This computational burden can be reduced in FlowSight using a new feature called Stencil. Another improvement, Filters, provide the ability to create a volume render that only shows a specified region. I will explain more about how you can use these features to improve your workflow in the following sections.


Stencils control the resolution of a volume render. The default value of the stencil is 1 in all the directions, which means that all mesh cells will be used. Increasing the stencil size coarsens the volume rendering, reducing the time to create the rendering and providing comparable visualization depending on the original mesh resolution. Stencils can only be set during their creation and cannot be modified later. A comparison of two volume renderings with different stencil sizes is shown below followed by a table that shows performance improvements as the stencil size varies.

Volume render stencil 1:1:1 (finer) vs. 2:2:1 (coarser)

Volume render time comparison showing performance improvement with increasing stencil size. Comparison has been done for mesh cell count of 15 million.


The Filters option allows the user to define the region where a volume render should be created. Using Filters, the user can specify to create a volume render only in Fluid 1 or only in the Solid region. There are seven predefined filter options shown below. The options include 6 surfaces: fluid 1, void, solid volume, open volume, liquid fluid, solidified fluid and auto. This last is the default option, and it selects the filter based on color by variable.

Volume render - predefined filters

In addition, FlowSight allows the user to create up to five custom filters (shown below) that work in combination of and /or logical operators.

Volume render - custom filters

Volume render comparison with(right) and without (left) filter. Fluid-1 has been chosen for filtering.

Case linking
Sometimes a simulation is intentionally (or unintentionally, for example, due to a computer crash), broken into a series of restart simulations. But, the user may still want to see several data sets in one continuous timeline/animation. The user can use Case Linking feature to create a single animation from a simulation and associated restart simulations so that the entire timeline/process can be seen from the start of the first simulation to the end of the last restart simulation.

The Case Linking feature controls the overall visibility of a case. Based on the link times, only the case valid at a current time will have its parts available in the display.  The user needs to correctly set the Viewport visibility. So, in the example below, we want to a create a single animation from three cases with the left viewport showing fluid isosurface colored by the velocity and the right viewport showing fluid isosurface colored by the temperature. So, to achieve this, “Isosurface-1” for all the three cases must be made visible only in the left viewport and similarly “Isosurface-2” for all the cases must be made visible only in the right viewport.

For new FlowSight users, I would like to briefly explain how viewports work. The FlowSight window can be divided into multiple sub-sections or viewports. Each viewport can have a different view, different iso-surface, etc. Multiple viewports provide flexibility to the user to study and perform an action on the same simulation in different ways while visualizing them simultaneously. For example, a velocity isosurface can be seen in one viewport, a temperature isosurface can be seen in another viewport, a volume render can be seen in the third viewport, and so on.

Setting part viewport visibility:
  • Isosurface-1 colored by velocity visible in the Left viewport
  • Isosurface-2 colored by temperature visible in the Right viewport
Once the viewport visibility is set correctly, an animation can be captured from the Create animation dialog. One such animation is shown below that uses the Case Linking feature. 

Video highlighting the new Case Linking feature of FlowSight where multiple simulations were sewn together to generate one seamless animation

This post focused on reducing the computational burden while creating volume renders and linking multiple simulations to create a single seamless animation. In my next post, I will talk about the improved Preferences option in FlowSight.

Tuesday, January 19, 2016

FlowSight Key Improvements, Part I

FlowSight™ is an advanced visualization and analysis tool powered by the world-leading EnSight® post-processor from CEI. FlowSight is included with all FLOW-3D products without any additional cost. FlowSight is a robust post-processor that provides enormous flexibility to the user for analyzing and presenting the simulation data generated from FLOW-3D products. Some of FlowSight’s key capabilities include volume rendering, volume/surface/point queries, case comparison, CFD calculators, and animated streamlines. Just as new developments are added to FLOW-3D products, FlowSight also continues to be extended and improved. With the release of FLOW-3D v11.1 and FLOW-3D Cast v4.1, FlowSight’s feature and functionality list has grown further. 

In this series of upcoming blog posts, I will be talking about the key improvements to the latest version of FlowSight. I will start with geometry list improvements, open volume and void isosurface visualization developments, and new 3D-clipping features.

Geometry List Improvements 

In addition to geometry components, geometry types like baffles, sampling volumes, and probes form an important part of many simulations. FlowSight can now display more geometry types allowing the user a more clear connection between geometry setup and results analysis. This connection is important as it helps the user understand how a certain geometry type, for instance a solid baffle, has affected the overall results in the simulation. Another example is a probe, which is passive in the sense that it does not the change the simulation results, and only collects data. But, it is informative to visualize a probe during post-processing to give the user a thorough insight about the location of the probe in the simulation.

The Geometry list now includes the following subtypes: 
  • Isosurface of open volume with and without cooling channels
  • Isosurface of all components
  • Geometry components (Isosurface and STL)
  • TSE - solidified fluid
  • FSI - deformable components
  • Marker particles / probes / mass momentum sources
  • Sampling volumes
  • Mooring lines
  • Cooling channels (STLs only)

A geometry subtype is only shown in the list, if geometry belonging to this subtype exists in the simulation. The screenshot below shows a geometry list of possible geometry types for an example case. Notice that baffles can be seen at the bottom of the list.

Geometry list of an example simulation in FlowSight

Open Volume and void isosurface without cooling channels 

For the benefit of our die casting customers, FlowSight now allows users to hide cooling channels with an option to draw Open volume without Cooling Channels. Open volume is basically any region in the computational domain without solid. This feature enables the user to view the casting geometry without having cooling channels in the way. 

Void isosurface with cooling channels Vs w/o cooling channels

3D clipping 

The 3D clipping tool allows users to slice an isosurface in all six directions simultaneously. This is very useful for finding areas of interest, such as porosity-related defects, or visualizing output such as temperature, pressure, or velocity profiles inside the domain.
3D clip showing temperature profile

3D clipping is currently allowed with a Cartesian mesh only. The image above shows a high pressure die casting (HPDC) simulation.

A 3D clip can be animated between the given extents in a particular direction. The user can swap 3D clips in one of the X, Y or Z directions at a time. Animations can be played forward/backward once or in a loop mode. These options can be accessed from the loop control combo box. 

A saved 3D clip animation is shown in the video below. The left half of the animation plots temperature isosurface and the right half plots entrained air fraction isosurface. The rates of animation in the two halves have been set differently, causing the left half animation to take longer to go through the geometry, compared to the right half. The rate is governed by the number of steps shown in the loop control combo box above. 
3D clip animation for a sample simulation of HPDC

The new developments in FlowSight described here provide users with a better connection between the simulation and post-processing, particularly in relation to visualizing the geometry features such as baffles, probes, and sampling volumes. In the upcoming blog posts, more new features of the latest version of FlowSight will be discussed. 

Tuesday, December 22, 2015

Cavitation model improvements

Cavitation is the evolution of vapor and/or gas bubbles within liquid in the regions of low pressure in the flow, or due to heating that raises the vapor saturation pressure. The sudden appearance and subsequent collapse of bubbles may cause large oscillations of pressure within incompressible fluid that in turn result in severe mechanical damage to the surrounding structures. 

Advantages and disadvantages

Cavitation can cause damage to turbines and pipes, erode concrete from the dam spillways, etc. Figure 1 shows the erosion of concrete near the bottom of the spillway in a dam. Concrete used in dams is typically high strength but cavitation can still erode it.
Figure 1. Eroded concrete due to cavitation on the spillway of a dam

In high pressure dies casting, die erosion can occur where fast movement of the molten alloy through constrictions and curves in the die results in rapid pressure drops and lead to cavitation. The resulting vapor bubbles can lead to porosity in the final casting, or worse, lead to damage of the die, contaminating the casting and leading to early die failure.  

Cavitation is sometimes intentionally induced for certain industrial applications like water purification by breaking down the pollutants and organic molecules, joining hydrophobic chemicals, destroying kidney stones through shock waves created due to implosion of cavitation bubbles, increasing turbulence for mixing, etc.

Therefore, it is critical to understand where cavitation is likely to occur, and how intense it is likely to become. Since initiating and visualizing cavitation experimentally is difficult and can be potentially damaging, it is important to be able to simulate the process.

Modeling cavitation in FLOW-3D v11.1 and FLOW-3D Cast v4.1

The Cavitation model has been successfully used to simulate cavitation in thermal bubble jets and MEMS devices. In the new version, the model has been upgraded for even better accuracy. FLOW-3D v11.1 and FLOW-3D Cast v4.1 provide a better estimate of the location and amount of cavitation in the computational domain.

Users have the choice to choose between Simplified model and Empirical model. The former is controlled by a user-defined characteristic time for nucleation of bubbles, while in the latter the nucleation of bubble is controlled by the by local turbulence. Opening of the actual cavitation voids can be controlled by selecting Passive model (voids are not opened) or Active model (voids are opened). Passive model is best for simulations where the brief appearance of small bubbles is expected, while the active model is best for cases where larger cavitation regions are expected that will significantly affect the flow field.

A new variable called Cavitation gas volume fraction has been added to the model and can be used to visualize cavitation.

Sample simulations

Simulation 1 shows a constricting nozzle. The animation shows the evolution of cavitation bubbles demonstrating a highly transient, oscillatory behavior. The cavitation volume fraction is plotted to visualize the onset of cavitation in the initially continuous liquid.

Simulation 1. Cavitation in a constricting nozzle

Simulation 2 shows cavitation within a venturi with an entry velocity of 8m/s, a convergent slope of 18°, and a divergent slope of 8°. Again, the transient behavior of cavitation is well modeled, with the model predicting a cavitation cycle period of 17.4ms compared with the experimental result of 22ms.

Simulation 2. Cavitation in a venturi

Tuesday, November 24, 2015

New Boundary Conditions for Water and Environmental Applications

For numerical modeling of river flows, typically water elevation is required at the upstream boundary. Yet water elevation in natural environmental systems is often unknown and has to be estimated. Improper elevation estimation, however, can generate nonphysical results. In FLOW-3D v11.1, which has just been released, users now have the option of having boundary water elevations dynamically adapt to the conditions inside the domain. This can be achieved through the use of rating curves provided by the user, or in the absence of rating curves; the solver can dynamically adjust the elevation to vary smoothly with the conditions inside the fluid domain. These variations may be further constrained to certain Froude regimes or absolute elevation bounds.
Figure 1. Rating curve for John Creek at Sycamore from USGS

Rating curves

Rating curves define elevation variations at a given location in a river reach according to inflow rates at that location. A relationship between elevation and volume flow rate is established by physical measurements at a particular cross section of the river. Rating curves for rivers in the United States are available from the USGS (U. S. Geological Survey). A typical rating curve will have volume flow rate on the X-axis and elevation on the Y-axis (Figure 1).

Natural inlets

In a case where inflow rate is known but a rating curve is unavailable, a natural boundary condition can be selected in the FLOW-3D model setup interface. At a given cross-section, for a certain specific energy, there can be two possible depths. This arises from the quadratic relationship between specific energy and the depth (see the equation below). The two mathematical depths manifest into supercritical and subcritical depths in reality. In the case of a perfect unique solution to the quadratic equation, the flow is critical. 

Here, E is the specific energy, q is the unit discharge, g is acceleration due to gravity and y is the height of fluid. Graphically, the specific energy and depth relationship can be seen in Figures 2-4. 

Figure 2. Changes to E-y curve, changing q

Figure 3. Possibility of two flow depths (supercritical and subcritical) for the same value of specific energy

Figure 4. Flow depth can be critical (yc) for a unique value of depth and specific energy. In this case, flow is neither subcritical nor supercritical.

Applying new boundary conditions

A rating curve can only be defined for volume flow rate and pressure boundary conditions in FLOW-3D v11.1. For volume flow rate type boundary conditions, instantaneous elevations are calculated using the rating curve to find the elevation corresponding to the flow rate. For a pressure type boundary condition, the volume flow rate is calculated by the solver and elevation is calculated using the rating curve. Rating curves can be applied at both upstream and downstream boundaries. It is important to note that an incorrect rating curve can result in nonphysical flow fluctuations.

Natural boundary conditions can only be defined at the inlet. Flow categories can be defined from one of the following:
  1. Supercritical flow (y<yc)
  2. Subcritical flow (y>yc)
  3. Critical flow (y=yc)
  4. Automatic flow regime (calculated by the solver)

The user can define maximum and minimum limits of elevation for any of these flows. If the depth for a particular flow regime violates the maximum and minimum limits of elevation, the latter will take precedence.

Sample simulation results

Simulation 1 shows the river reach with a natural inlet under volume flow rate boundary condition at the left boundary and a rating curve for the outlet is defined as a pressure boundary condition at the right boundary.  The evolution of water elevation is shown for both upstream and downstream boundaries simultaneously. The simulation shows smooth variation of elevations at the boundaries without any fluctuations or nonphysical behavior. Therefore, this new development in FLOW-3D v11.1 allows for more natural variations of the water level for environmental applications.

Simulation 1. Evolution of water elevation in a river reach with natural boundary condition at the inlet and a rating curve at the outlet.

Tuesday, November 3, 2015

Raster Data Interface and Subcomponent Specific Surface Roughness

FLOW-3D allows users to import solids in STL (StereoLithography) format to represent complex geometries, regardless of the application – micro fluids, metal casting, water and environmental, aerospace, etc. While for many industries, the STL format is a very natural and common way of representing and sharing 3D objects, in the water and environmental industries there is a preference towards surface-driven representations of the environment. After all, the earth’s terrain does look like a surface for most practical purposes.

Raster Data Interface

In the upcoming release of FLOW-3D v11.1, we have adopted an industry norm for terrain import: the file format known as the ESRI ASCII raster format. The details of the format are described here. All GIS software packages are able to export in this format. Such *.asc terrain files will now be able to be imported directly (Figure 1) into the FLOW-3D user interface.

Figure 1. Direct import of terrain in FLOW-3D v11.1 using ESRI ASCII raster terrain format

Subcomponent Specific Surface Roughness

Alongside terrain import, a critical modeling variable in modeling flood wave propagation, flooding area, etc., is surface roughness. In particular, the user needs to model local, spatially-varying surface roughness. In FLOW-3D v11.1, users will be able to import surface roughness coefficients in the same ASCII raster format.

More specifically, the user actually imports a raster file of the land coverage index and provides a simple text file palette conversion table. This table converts the type of land coverage (sand, vegetation, built-urban, etc.) defined in the raster file to surface roughness values that are required by the FLOW-3D solver. This gives the user a very effective way to fine tune the surface roughness coefficients without having to regenerate the entire raster file by simply altering the palette conversion table.  The ASCII raster format was chosen because it remains simple, yet lets the user easily control the surface coefficients that are mapped over the domain following the land coverage types.

Figure 2. Example of overlay of terrain in FLOW-3D v11.1 Model Setup Graphical User Interface

Figure 3. Example of overlay of terrain in FLOW-3D v11.1 Model Setup Graphic User Interface

In the same framework of modeling complex flood events, functionality to overlay actual pictures of the environment, such as river banks, built structures, and developed housing has been added.  FLOW-3D v11.1 allows users to directly texture their terrain with corresponding imagery, typically obtained from satellite imagery.

This operation can be conducted in two stages in FLOW-3D. The first stage is during model setup (Figures 2 and 3), so that the user can see the context of the model he or she is building, making it easier to be sure the simulation is properly set up. The second stage is during post-processing in FlowSight. This is where the overlay of the flooding event and the terrain imagery is used to reveal the extent of the flood zones and the interaction of the flood wave with the environment.

Example Simulations and Conclusion

Figures 4 and 5 show the results from flood routing of the streams in two different terrains. Upstream elevations have been plotted for the example cases. Note that the analysis has been done on a terrain overlaid with surface roughness data. The ability to import raster data and overlay it with surface roughness provides the user a single platform, i.e., FLOW-3D, to conduct the water and environmental studies on the terrain. Typical flood wave propagation through a stream can be seen in Simulation 1.

Figure 4. Flood event analysis of the example in Figure 2 with overlaid surface roughness data

Watch the YouTube video >

Simulation 1. Flood event analysis of a location on earth. Terrain raster data has been overlaid surface roughness data within FLOW-3D.

Tuesday, October 27, 2015

P-Q Squared Analysis

P-Q2 analysis is a standard procedure used to optimally match the target gate velocity to the capabilities of the HPDC (High Performance Die Casting) machine’s plunger hydraulic system. Desired fill time and an optimum gate design can be attained by performing P-Q2 analysis, which in turn, maximizes the efficiency of the HPDC system. 


The theoretical basis of the P-Q2 analysis is the conservation of energy for steady incompressible flow. According to Bernoulli's equation, the metal pressure at the gate is proportional to the flow rate squared:

The assumptions for this analysis are:
  • Constant discharge coefficient
  • Liquid metal has reached the gate
  • No air in metal stream at the gate
  • No solidification during the filling
  • Runner is the main resistance in the flow
As shown in a typical P-Q2 diagram below, the machine performance line shows how the die casting machine capabilities vary depending on the flow rate. A larger flow rate demands a larger pressure from the machine to move the plunger at desired velocity. This means that, the higher the pressure, smaller the plunger, and the higher the flow rate, the larger the plunger. The operational window is defined by the fill time, gate velocity, metal pressure, etc. It is important that both the die and machine operate within the operational window (Figure 1).

Figure 1. Plot showing the operational window

Setting up P-Q2 analysis

To perform P-Q2 analysis, the Geometry Type of the piston must be defined as Plunger. This can be done when you add the piston to your geometry (Geometry -> Add geometry).

Figure 2. Geometry tab

Enable P-Q2 analysis by selecting the Perform PQ^2 analysis option in the Details tab of the component,  Piston (Figure 2). Enter the machine parameters (Figure 3) to define the machine performance line.

Figure 3. Defining machine parameters

During the design stage, the user specified process parameters may not be optimal, for instance, the resulting pressure is beyond the machine capability. If so, toggle on the Adjust velocity option for the piston velocity to be automatically adjusted to match the machine capability. Now, the flow rate will be adjusted at each time step if the pressure at the piston head is beyond the machine capability. Once the pressure drops below the machine performance line, the piston will then accelerate towards the prescribed velocity. 

Viewing or Post-Processing The P-Q2 diagram

The P-Q2 analysis data such as pq2 pressure, and pq2 flow rate, are written out in the History Data. They can be accessed in FlowSight by pressing the History data button. In the History Data dialog, select Piston: pq2 diagram in the variable list and press the New plot button to create a plot of the P-Q2 diagram:

Figure 4. History data and the P-Q2 diagram

The P-Q2 diagram above indicates that adjustment may be needed to bring the pressure down below the machine performance line. You can either toggle on the Adjust velocity option and retry (see Figure 5), or modify your machine parameters.
Figure 5. Adjusted pq2 diagram


FLOW-3D Cast v4.1 allows you to perform P-Q2 analysis that helps achieve desired fill time and optimum gate design. The analysis data can be viewed and processed in FlowSight, an integrated post-processor that comes with the FLOW-3D Cast installation.

Tuesday, October 6, 2015

Batch Post-Processing and Report Generation

In the upcoming releases of FLOW-3D v11.1, FLOW-3D Cast v4.1, and FLOW-3D/MP v6.1, batch post-processing and report generation have been developed hand-in-hand to save users significant time when it comes to visualizing, analyzing and communicating the results of their simulations.

Batch post-processing allows you to define a set of post-processed results that are created in the background while a simulation is running or after it has been completed. So, when you come back to your workstation, your videos, images, and other output will be ready. This is particularly helpful when simulations are huge and post-processing can take a significant amount of time. Report generation can be run after batch post-processing is complete, which combines the results into an HTML file that can be viewed in a browser and easily shared.


Batch post-processing requests can be defined even if no results are available yet. Context files from other simulations or a previously run simulation can be used. Also, a user-defined template can be applied to a simulation doesn't have results yet. A Context File contains information about layout, views, orientation, variables loaded, etc. Results can be requested ahead of time to be written according to the context file.

Within batch post-processing, animations, scenario files or images can be ordered – any or all. Scenario Files are essentially “interactive animations” that are played in a special viewer that allows the results to be rotated and zoomed in/out providing much more flexibility for analyzing results.

The setup of batch post-processing requests is even more flexible when simulation results exist. Certain plots like isosurface, volume render, 2D-clip, line plot, etc. (Figure 1) can be requested ahead of time and generated automatically.

Figure 1. Batch Mode window showing the available types of plots that can be written

Figure 2. Sample results that are requested through Batch Mode.

An example of the batch post-processing is shown in Figure 2. Column 1 allows the user to select the type of plot. In 3D options, an iso-surface, volume render and 2D clip are requested for hydraulic head. In 2D options, another 2D clip is requested and so on. Column 3 allows the user to select the type of output, animation, scenario and image, respectively. In column 4, timelines can be chosen – Selected or Restart. In conclusion, setting up a batch process is very flexible.

Avoid Repetition

Analysis of many similar simulations (e.g., parametric studies) is much easier with batch post-processing as the repetition of requesting the same post-processing graphical results is eliminated. This can be achieved by simply choosing an already available template. Templates can either be process templates like metal casting and hydraulics or a user-created template. If you choose a process template for metal casting, certain default variables and plots relevant to the metal casting industry will be written. But, if you want to use a customized template that you have created, then choose one from the User Templates tab.

More Automation

Avoid the hassle of accessing your workstation at night using Run Batch Process. All you need to do is to choose Run Simulation and Batch Process. This way, the batch processing will start automatically once your simulation has completed. This higher level of automation can be opted for if one or more of the following cases applies:
  • The simulation is large and you don’t have time to interactively post-process results
  • You already know what you want to see from the results and would just like it to be done automatically
  • The results analysis is very complex and would take lots of time to recreate interactively

Report Generation

Once batch post-processing has completed, the user can assemble the myriad of animations, images and text results into an HTML report by right-clicking on the simulation in the Portfolio and selecting Generate Batch Report. The report will be generated in HTML5 format (sample report in Figure 3) and can be easily sent to your manager, associates, colleagues, and clients. Images and videos will be embedded in the report. You will still have control over the formatting of text, captions, and references.

In conclusion, you can now spend less time on post-processing and reporting and instead run more simulations.

Figure 3. HTML report for an energy dissipative tumbler simulation