CFD 3D ViewB

 

CFD-3D-ViewB is an Active Figure (software) designed to display mathematical solutions calculated using Computational Fluid Dynamics.  It does not compute CFD solutions, it only displays them.  This webpage explains how the software works so that you will be able to use it to explore CFD solutions.  The software is intended for educational purposes only.  The user accepts all responsibility for use of the software.

Download the CFD-3D-ViewB software NOW Note - This is an updated version of the original software which is very similar.  (Note: Memory leak bug fixed 3/2/13. Please download again if you have an outdated version.)  To actually display mathematical solutions, you will need to download two more files.  One is a grid file (*.grd) which is a collection of numerical information about the structure of the region of interest (the "domain").  The second is a file that contains numerical data (velocities and pressures for example) corresponding to the actual problem solution (*.cfd).  Some of the files are pretty large and so I've compressed them with both *.grd and corresponding *.cfd files bundled together into self extracting *.zip files.  Click HERE to see and download some of the solutions.  NOTE: you will need to place the *.grd and corresponding *.cfd files in the SAME directory for the software to work correctly.

Note: *.grd and *.cfd files are just text files with the extension changed. You can open these files with any text editor if you want to look at a bunch of numbers.  At the top of the *.cfd file,  there is a place to add a few lines of text which can be displayed on the figures.  However if you alter any of the guts of the file, there's a good chance that it won't work properly with the software and I have no idea what will happen.

When you download the software you will have a choice of location, i.e. what drive, directory, etc.  The software must be located where it can write to a drive.  It's recommended to save the software to your hard drive in a directory where you can keep any CFD solutions that you download, simply to consolidate the files.  The software is called "CFD 3DViewB.exe" and is an executable file.  You will need to give your permission to download and run the file since executable files can be designed to rip you off or trash your computer.  While I've done my best creating the software, I'm not a software engineer and I won't guarantee the outcomes.  I know it has some bugs in it, but it's never crashed my computer.  The software may exit unexpectedly from time to time.

The video will give you some impression as to how you might explore the solution of a fluid dynamics problem with the software.


 

Once you've downloaded the software, double-click on the executable file (CFD 3DViewB.exe) in whatever directory you placed it.  An initial screen is displayed that appears like this:

Not very interesting. There are actually 2 forms being displayed. The control screen (labeled "CFD3D View") floats over the top of a Display screen. Most of the controls on the control screen are inactivated to try to keep you from hurting yourself ( or your computer). In fact, there are only about two things you can do; close/exit the program by clicking on the "X" at the upper right corner of the control form or retrieve a file to explore by clicking on the "Get Data" button at the upper left corner of the control control screen.  Clicking the "X" on the Display Screen has no effect other than to wear out your mouse.

Here's a full-size figure of the Control Screen.


 

Before showing more about how the software works, I'm going to digress and show you a little bit about how the 2 screens work.  The Control Screen is actually transparent to whatever degree you choose.  You control the transparency using the horizontal slide bar in the upper left corner of the control screen.  When the software initiates, the control screen is only about 60% opaque. The next figure shows what it looks like with the opacity increased to maximum.

I introduced this "feature" (yuk) to try to take full advantage of the screen real estate so that you can access the controls while still viewing a display figure at full size.  Suppose have loaded a file to display a Computational Fluid Dynamics solution.  With the Control Screen fully opaque, your computer screen might like this:

You can turn down the opacity of the control screen so that you will be able to see both at the same time ( next figure).  Once you get things looking the way you want, you can always minimize the control screen so that the display screen fills your entire computer screen.  The software does not let you decrease the opacity of the Control Screen down to 0 – you would not be able to find the Control Screen.  However you might have to look pretty closely to see the Control Screen when the opacity is turned all the way down.

Other options are available this way for you to interact with both the controls and the image.  The Display Screen can be resized as desired. Simply use your mouse to grab hold of an edge or corner of the screen and drag it to change the size. Similarly, the Control Screen can be resized so that the two screens can sit side-by-side. You can scroll back and forth on the Control Screen to access different controls as needed. Minimize either screen as desired to suit the situation.  ( The Display Screen starts out "Maximized" and you can always Maximize it by clicking the appropriate button in the upper right.)  In the following (shown full-size), the Display Screen has been resized and the control screen has been reduced in size. Scrollbars appear on the Control Screen when they are needed.

 

There's more than one reason for reducing the size of the display screen.  When you want to save a file ( see below ) of the picture, it's What You See Is What You Get (WYSIWYG).  If you are going to paste the picture into a presentation or put it on a website, you would likely need to reduce the size of the image at some point in the process.  The place to do that is BEFORE actually saving the image, i.e. using the CFD3DViewB software. Otherwise lines that comprise the image can start to look funky as the line width starts to get smaller than 1 pixel.  (I'm working on allowing you to change the image resolution, i.e. dots per inch of the image using the software.)

 


Digression over.  From here on out the controls of the newer version (CFD-3DViewB) are very similar to the original version but arranged slightly differently; the figures below ( made using the original software) might not look exactly as they would in the new software but I'm sure you'll figure it out.

 

As noted above, you'll need to have downloaded and extracted some files (*.grd, *.cfd) to look at ahead of time.  You'll have to navigate your computer's directory to find where you have downloaded those files to. If you've done it correctly you'll see some *.cfd files to choose from (see below).  Double-click on one to start displaying the numerical solution.

 

Want to follow along?  Click HERE to download self-extracting compressed file LDC40_asym.exe (24.05 MB) containing the grid file (LDC40_asym.grd), Re = 500 solution (LDC40_asym_Re500_F.cfd), and Re = 1000 solution (LDC40_asym_Re1000_F.cfd); the "F" in these filenames is to indicate that the solutions have converged to a final equilibrium state (close enough).  These are both pretty similar to the solution being displayed in the examples below.  This particular problem is called a "Lid-Driven Cavity" where the fluid motion is produced by sliding one of the surfaces of the cube, parallel to the cube surface.  That's why the filenames have "LDC" in them.  Re1000 means the problem was solved at Reynolds number 1000 and this is something we'll want to delve into deeply -- elsewhere.

After you select the file it's going to take a few seconds for the computer to read the file(s) and work out how to display the information.  DON'T try to push buttons and make it go faster (it won't work)!  Just be patient.

 

Still a pretty boring picture.  However, now there are a number of controls that have become available for manipulation – certain controls are active whereas they were inactive previously.  No longer active is the "Get Data" button.  If you want to bring up a different file, you're going to have to exit the program (X in the upper right corner of the Control Screen) and start over.  Someday I'll tell you why.  By the way, any time you want to save  the display image to an electronic file, just click the "Save Image" button and select a file name and format.  Many of the images displayed on the website were created just this way in seconds.  I kind of like *.png format for putting images on the web, but suit yourself.

 

Click HERE for more details on the main controls.

Click HERE for details on the Background Checklist Box.


Some of the controls that are now active include an "Image Scale" scrollbar and another to change the "Grid Opacity".  If you can't guess what these do, give it a try.  For our next trick, however, we are going to move on to the "Figure Orientation" control group (see above).  These include scrollbars that allow you to rotate the figure in three-dimensional space ("Orientation") or slide the figure around in space ("Position").   In the next image, the Orientation of the domain has been rotated around the x and y axes a bit.

You will see a check list box called "Background" which allows you to choose some of the aspects of the solution to be displayed. You can see that the domain "Surface" is checked by default as is the "Orientation".  The latter determines whether the x, y, z orientation figure is displayed in the lower left.

 

 

The middle column of controls on the Control Screen includes a "Vectors" control box that contains a check list box.  By default, nothing is checked.  In the next figure, we check "Velocity" and wait a few seconds for the figure to be updated.

Crikey - that's not very informative!  The computer has displayed vectors indicating the fluid velocity at each cell (numerical solution point ) within the domain!  It so happens that this particular domain consists of a modest 40 x 40 x 40 cubic grid for a total of 64,000 data points!  A significant aspect of computational fluid dynamics is trying to figure out how to make good use (educational or quantitative) of massive amounts of information!  There are people who are really good at this, but my approach is to limit the amount of information displayed at any one time in a variety of ways.  The first thing we'll try is slicing through this three-dimensional domain and display only the velocity vectors where the object is being sliced (similar to a 2D echocardiogram).  To initiate this process, look at the third column of controls on the Control Screen.  Go to the "Slice Planes" control group and click on the "Activate" checkbox.

In the following figure, I've also unchecked "Velocity" in the "Vectors" check list box.  Now we can see the domain surface again and also a magenta outline where the slice plane intersects the surface thereby suggesting how the structure is being sliced.

And now we'll click on the Velocity Vector checkbox again and only velocities associated with the slice plane are displayed.

We want to be able to slice this domain at various locations and orientations and be able to display velocity vectors.

The "Index Selection" control allows you to set a value of either 1, 2, or 3 ( 3 comes up by default).  Change this value to slice the domain in different orientations (as suggested below).

 

 

 

 

 

 

 

 

 

 

 

For a particular Index Selection, you can slide the "Index Value" scrollbar (above) back and forth to select a location where the domain is sliced.  In the following figure, the "Scale" scrollbar in the "Vectors" control group box has been adjusted also to increase the relative size of the vectors in comparison with the previous figure.

Sometimes it's valuable to display more than one slice at a time to show how the solution varies across different parts of the domain.  In the following figure, the "Multislice" scrollbar (above) has been moved to the right until the desired effect is obtained. The original slice that was selected using the "Index Value" scrollbar has not moved anywhere; it's just that additional slices has been added at intervals that depend on the Multislice control.

Even though multiple slices are displayed in the above figure, this only counts as ONE slice.  The controls allow you to slice the domain in multiple ways and display them at the same time.  To add another slice plane, use the "Plane #" control to move to slice plane #2.  You will then have to Activate that slice plane by clicking the checkbox "Plane Active".  The Index Selection, Index Value, and Multislice controls are all SPECIFIC to the ACTIVE slice plane.  That is, each slice plane is controlled independently of the others.  BIG HINT: The outline of the active scan plane is displayed in magenta whereas all the others are displayed in gray.  If you try to manipulate slice plane controls for a plane that does not have its "Plane Active" checkbox clicked, nothing will happen.  The most likely place this will come up for you is right after you have deactivated a slice plane. You will have to use the "Plane #" control to move to an active  slice plane before the controls will do anything.

In the subsequent example, the Multislice scrollbar has been moved all the way back to the left and an additional slice plane (#2) has been activated. The second slice plane (active, in magenta) has been oriented and positioned as desired.  Note: you get up to 10 independent slice planes to work with. If you get up to that number, consider having your noggin examined.

 

It's a lot more interesting and informative to display some additional information using color.  In the following example, "|Velocity|" was clicked in the Color checklist box (above).  This assigns a color value to the range of velocities being displayed so that you can readily see where the high values ( red) and low values are ( blue).

In the above, the color range has been adjusted somewhat to present a more pleasing / informative image. When you first click on one of the color quantification schemes ( e.g. Velocity), blue is automatically assigned to the lowest velocity value in the solution and red to the highest with a linear color variation scheme in between.  It so happens for this example that there is a very narrow zone of high velocity next to the moving lid, but velocities are much lower elsewhere in the solution. This tends to make for minimal color variation over much of the domain where most of the fluid is moving relatively slowly.  You can click on the "Stat" button in the Color control group to assign colors based on the mean and standard deviation of the velocities. This tends to make for a more useful display in the example (below).

Immediately after selecting which physical quantity will be displayed in color, the Maximum and Minimum values present within the solution are displayed in the Max and Min numerical control boxes (above). From there, you can set the Max and Min values that will correspond to red and blue respectively, entering anything you like ( almost ) within the control boxes.  As suggested previously, this allows you to use color most advantageously to illustrate the solution. You might, for example, be interested in understanding how  pressure varies within a particular region of the solution.  You can concentrate all of the color variation over a small range of pressure values by entering appropriate numbers in these boxes.

In the following figures depicting velocity vectors and also velocity in color, the image scale has been adjusted to enlarge the images and the orientation and slice plane has been manipulated.  The figure on the right is the same as the left except that the "Sparse" checkbox has been clicked which reduces the number of vectors being displayed. Sometimes less is more.

 

 

 

 

 

 

 

 

 

 

 

After you have activated the slice planes, the "Contours" control group box also becomes active. Clicking on one of the physical quantities ( e.g. pressure, |velocity|, etc ) displays contour lines drawn in the slice planes that you have already determined.

 

Using either the "Spacing" control or the "Number" control, you can adjust the number of contour lines used to represent the numerical data.  Obviously, these controls are not independent of each other.

 

Add color to the contour lines simply by clicking on the desired physical quantity in the "Color" checklist box ( |Velocity| in this case). The color of the contour lines is determined independently of the physical quantity represented by the contours.  This is probably a bit of overkill in the flexibility department, but you have the option of displaying pressure contours that are colored according to velocity ( for example ).

When contours and colors are applied, they appear for each and every slice plane on the display; you can't have a separate choice for the different slice planes.

There's nothing wrong with displaying both vectors and contour lines at the same time.  Remember that contour lines can only represent scalar quantities.  In the following, color and contour lines represent the absolute value of velocity (|Velocity|), but velocity vectors are also displayed.  It's certainly possible to have a high velocity region in the solution where the vectors do not appear large; the vector is projected onto the figure in a way that depends on the orientation.  You may have to rotate the domain in space to be able to understand how the vectors are oriented.  (After all, you have to get your Doppler beam aligned with the flow direction to measure the speed of the fluid.)

 

Big Hint: The more information you attempt to display in the figure, the longer it will take the computer to redraw the image.  Don't try to reposition, reorient, or do anything that requires image redrawing with multiple slice planes,  vectors,  lots of contour lines, etc.


CFD-3D-View allows for a couple different kinds of animations.  Both animation types require an active slice plane which serves as the "starting gate" for fluid elements.  With the "Stream" animation clicked, clicking the "Animate" button begins to trace out fluid particle paths for elements initially located on the active slice plane.   Watching fluid particle paths in a three-dimensional space can be pretty mind-boggling.

The Stream animation adds a little bit more to the particle paths with each time step; you can't rotate the figure, change its size, change the colors, etc. in the middle of the animation. You can adjust the time step size with the "Rate" scrollbar.  There is a maximal limit to the rate that is imposed by a well-known constraint in computational fluid dynamics.  Basically the maximum time step cannot be so large as to allow  any of the fluid particles to advance any farther than an adjacent cell (the CFL condition).  If you are not in a hurry to watch things move fast, a slower rate is actually more accurate.  When the animation is running, the "Animate" button is replaced by a "Stop" button and a "Pause" button.

Note: For a steady flow solution ( not time varying ), streamlines also coincide with fluid particle paths lines.  This is not the case for an unsteady flow problem.  We'll explore that elsewhere.

 

The Animation Group Box contains a couple more controls.  There is a "Clear" button which deletes the streamlines that have been drawn up to that point in the animation.  There is also a "Reverse" checkbox which essentially runs the animation backwards in time.  It lets you see where fluid elements came from.

The second animation I've called a "Displacement" animation.  In this case, the slice plane identifies a surface in the fluid and the animation tracks the entire surface as the fluid distorts.  Most people don't think of fluids as behaving this way and that's the reason I wanted to include it.    Besides being mesmerizing, this animation will give you a great deal of insight as to what it is to be a fluid.

For this animation, the computer has to redraw the entire figure with each time step so it definitely runs slower than the previous animation. At the same time, the figure becomes more and more complicated with each time step so the rate of drawing actually slows down as the animation progresses.  However since the entire figure is being redrawn with each time step, you are allowed to rotate, rescale, recolor, etc. the animation while it is still running.   Showing the motion here as a video circumvents having to wait around for the computer to figure out what to draw, but interacting with the software live will give you more insights about the flow.  (I've put videos online in the hope of enticing you to give it a try.)  Make YOUR OWN videos to show what YOU want to (soon).

One little note about this; the software won't let you resize the Display Screen in the middle of an animation. You have to set the size of the image ( size of the display screen) before starting the animation.


There is an additional hidden column of the Control Screen. Click the "Data View" checkbox and the last column appears on the far right.  This consists largely of a data grid that shows numerical values for important physical  quantities at a specific location in the solution domain.  Hopefully it will be apparent from the grid what these physical quantities represent.

Below is a full size representation of the data grid which shows the numerical values at a specific point in the domain. What point?  If you look back at the Display Screen you'll see a specific cell highlighted in the domain by a magenta colored outline. You may have to clear away enough on the image to be able to spot the specific cell ( uncheck vectors and other extraneous parts of the image ).

 

How do you get to choose the cell for which data are displayed?  That's done using the slice plane controls in the "Indexed" mode.  For the "Active" slice plane, use the "Index Value" scrollbar to move the slice plane through the domain. You will see the selected cell change and data displayed in the grid change as you move through the domain.  Use the "Index Selection" drop-down to change the orientation of the slice which will allow you to move through the domain in a different direction.  It's difficult to explain just how this works so give it a try and see if it makes sense.

In the first figure below, a problem with a square domain is shown where the domain is being sliced by the magenta line. The cell whose data are shown in the data grid is outlined by a small magenta colored square.  In the subsequent figure, a different "Index Value" has been selected using the "Index Selection" drop-down.  The figure is sliced in a different direction, but the same cell is still outlined on the image grid; the same data displayed in the data grid.

In the final figure below, the "Index Value" has been changed using the horizontal scrollbar. This causes the domain to be sliced at a different location and also selects a different cell square for data display in the grid.  The system works similarly for a three-dimensional domain.

 

 


The lower part of this control column also contains a control group box for doing something called a "Dynamic Similarity Transformation".  I hope to explain about this in detail elsewhere, but here's the gist of an extremely important concept.  Computational Fluid Dynamics solutions are calculated using non-dimensionalized variables that are pure numbers -- no physical units.  Each of the variables (dependent and independent) is actually a ratio. So for example the non-dimensional velocity in a CFD solution is actually a velocity divided by a characteristic velocity that would be apparent from the original problem.  This part of the control panel allows you to impose values from your native problem ( e.g. your problem's characteristic velocity, U ) into the non-dimensional solution. Why do engineers do it that way?  Because it's the right way! What's missing from clinical medicine/cardiology is a concept that pervades the physical sciences. There is no such thing as small or large except in relationship to something else.

RocketTheme Joomla Templates