INTERACTIVE VISUALIZATION OF COMPUTATIONAL FLUID DYNAMICS USING MOSAIC
Jean Clucas
Software Specialist
Sterling Software, NASA Ames Research Center
Velvin (Val) Watson
Senior Staff Scientist
NASA Ames Research Center
July, 1994
Abstract
The Web provides new methods for accessing information world-wide,
but the current text-and-pictures approach neither utilizes all the
Web's possibilities nor provides for its limitations. While the
inclusion of pictures and animations in a paper communicates more
effectively than text alone, it is essentially an extension of the
concept of "publication." Also, as use of the Web increases, putting
images and movies online will quickly overload even the
"Information Superhighway." We need to find forms of communication
that take advantage of the special nature of the Web. This paper
presents one approach: the use of the Internet and the Mosaic interface
for data sharing and collaborative analysis. We will describe (and
in the presentation, demonstrate) our approach: using FAST
(Flow Analysis Software Toolkit), a scientific visualization package,
as a data viewer and interactive tool called from Mosaic. Our intent
is to stimulate the development of other tools that utilize the
unique nature of electronic communication.
A Scientific Expedition
Scientific Expedition is a termed coined by Val Watson to
describe an online, interactive exploration into data. Scientific
Expeditions transcend the "publication" paradigm for providing
information on the Web. Our goals for proposing the use of
Scientific Expeditions are:
- To make scientific data itself, rather than pixel image files,
available, along with tours through the data and the capability for further analysis
by the user.
- To provide this capability with easy-to-use, standardized tools.
- To do this with tools that use network bandwidth more intelligently.
- To propose that putting these tool in every high school before the end of 1996
be a national goal.
Our example of this approach uses the Flow Analysis Software Toolkit
(FAST).
The Visualization Tool: FAST (Flow Analysis Software Toolkit)
(1)
FAST is a software package for the visualization of
three-dimensional data, particularly Computational Fluid Dynamics
data. It provides a variety of methods for examining data, such
as plotting flow paths around an aircraft, color-mapping temperature
on the surface, locating areas of a specified pressure,
displaying vectors, and finding vortices. When a view or views are
found which reveal important features of the data, an image can
be generated, or an animation created.
FAST on HDTV Monitor.(2)
This image is from a visualization
created by FAST. Clicking on the image will link you to a file of
FAST-generated images (and one mpeg animation) on the NAS (Numerical
Aerodynamics Simulation Division) Web server at NASA Ames.
Each time FAST is used, the session is recorded to file as a
series of commands. This feature allows scientists to reexamine
data they have viewed previously in FAST, without repeating the
process of loading data and stepping through the commands previously
issued. This is also the feature which makes FAST easily adaptable
to use on the Web. Rather than putting an animation online, we are
proposing that scientists share the entire FAST session, and thus the
possibility for further analysis, with the scientific community.
Because FAST can be driven by a script, the minimum necessary to
do this is simply making the dataset and script available from
HTML documents. What we propose, however, is the integration of
Scientific Expeditions into Mosaic sessions, using visualization
tools like FAST as data "viewers," in the sense that xv is
an image viewer for Mosaic.
Using FAST for Scientific Expeditions
We have made some sample scientific expeditions available. They
can be run by anyone who has a Silicon Graphics workstation, and
the FAST software. Plans for making FAST available via Mosaic are being
developed. It may or may not be available by the Web conference date. At
present, it is available via COSMIC. The method for obtaining FAST
will be kept current on the FAST home page.
See
How to Get FAST or the FAST home page
(1) if you need to obtain the software.
This document provides links to the utilities
needed to integrate FAST Expeditions into Mosaic and takes the reader
through one expedition. Other Expeditions will be placed at FAST's
Expeditions URL (3)
as they are developed.
The expeditions integrate FAST into Mosaic by defining FAST-related
files as a mime type, x-fasttrek, which is returned for files with the
suffix .FASTtrek. .FASTtrek files are passed to a shell script (called
FASTtrek) which handles the details of sorting out datasets and scripts,
making security checks, and sending the data and scripts to FAST.
From the user's point of view, one simply clicks on a link, and
the viewer, FAST, pops up and displays an animation, just as any
other viewer displays its image or animation. But this viewer has
advantages over other viewers:
- More information is transmitted while using less bandwidth.
- The actual dataset is transmitted along with the guided expeditions,
which permits the scientist or student to do further analysis.
- The scripting feature also allows interactive sessions, in
which scientists at remote locations can view data simultaneously,
passing control of the display back and forth. We use the term
Remote Collaboration to describe this two-way interaction.
Scripting
In a later section, we will compare a set of 30 MPEG animations to using FAST
to view the same data. With that dataset, each MPEG animation is about
two megabytes, which is more than 60 megabytes for the 30 movies,
while the entire FAST Expedition is less than one megabyte, contains more
information than all 30 movies, and offers the user the ability to
interact with the data. The FAST script files used for animations are very small,
since they consist of a series of commands like the following:
file_IO: READ_FILE grid.bin
file_IO: FILE_TYPE FUNCTION
file_IO: READ_FILE scalar_field.bin
surfer: TYPE SCALAR
The above lines are sufficient to load a three dimensional grid of, for
example, an aircraft, and a file containing values for pressure on the surface
and in the surrounding space, and then display the surface of the aircraft
with pressure color-mapped onto it.
surfer: NEW_OBJECT
surfer: DIRECTION I
surfer: RENDER CONTOUR_LINES
surfer: LOOP FORWARD
This second set of commands creates a simple animation through
the pressure field surrounding the aircraft, similar to the animation
used to create the pictures from a FAST animation
shown below in the "FASTtrek Implementation Overview."
Developing the Implementation for
Ease-of-Use and Security
Our original experiments used a simple implementation: FAST was
invoked from a C shell script. The only thing a FAST user needed to
do to run FAST scripts via Mosaic was to add a line to his .mailcap
file to run csh when a .csh type was encountered. This approach
got us in trouble with our security staff. If we encouraged
people to run C shell scripts from Mosaic, they would be at risk of
clicking on a hyperlink to a shell script that contained mischievous
or harmful commands.
A second reason for deciding on a different approach was our goal
of creating an easy-to-use, full-featured standard tool as a data
"viewer" for Mosaic. This included providing a graphical user interface,
and allowing for Remote Collaboration, the simultaneous viewing
of a FAST session at multiple sites, with swapping of control.
Therefore, we created a set of executables to be installed on
each user's machine.
We continued development with an awareness of the security risks
inherent in a tool that permits users to bring groups of files
to their machines, and run them without inspecting them. We found
two risks specific to our implementation:
- The files sent in a FASTtrek could contain an executable with
an innocuous name, such as "fast," which could be invoked by users
who have their current directory in their path. We prevent this by
having FASTtrek check for the location of FAST before extracting the
files, and by using absolute path names.
- It is possible to send a system command from a FAST script. FASTtrek
searches and deletes any system commands from scripts it sends to FAST.
While this removes one feature from FAST, it seems an acceptable
sacrifice in the name of security.
FASTtrek Implementation Overview
Users wishing to add FASTtreks to the capability of Mosaic can
implement this in one of several ways:
- Load an archive file that can be run as a C shell script which
unloads its own contents, the FASTtrek executables. This script
also modifies the user's .mailcap and .mime.types files, and notifies
the user of any missing elements in the configuration (such as not
finding FAST in the executable path).
To do this, select Options/Load to Local Disk, and copy
FASTarchive.csh to a directory in your executable
path. Then, in a shell window, cd to the directory and type
csh FASTarchive.csh
When installation is complete, select Options/Reload Config files
and you will be ready to run FAST Expeditions.
- For those preferring to inspect and control any changes made to
their machine, several approaches exist:
- The C shell script that unpacks the archive is a short, simple set
of commands at the head of the file, which can be examined;
- The source files can be inspected or copied individually, or the
executables can be copied individually:
See
FASTtrek Executables. Users of this approach will need to modify
their own .mailcap and .mime.types files.
- One can simply copy the
FASTtrek
executable, a C shell script, by itself. It allows users to run
Scientific Expeditions, but Remote Collaboration and the GUI will
not be available. Users will need to modify their .mailcap and
.mime.types files.
Once the executables are online, FASTtreks can be run by clicking on
a link. Several types of files can have the FASTtrek suffix, and
FASTtrek will determine the file type and appropriate action.
Types include:
-
A tarred, gzipped file containing data and one or more FAST scripts.
When one of these files is read, FASTtrek unpacks the files, creates
a subdirectory in a standard location for storing the script files,
creates several other files in the subdirectory, and starts FAST with
the script designated as the startup script, which reads the data and
prepares for the Expeditions.
FASTtrek reads an archive containing data and scripts, and
starts FAST with a setup script, which loads the data and prepares
for the Expeditions.
- A single FAST script. In general, all the scripts associated with
a particular dataset are sent with the dataset, and placed in a
subdirectory of /tmp. The html document should contain links to
this location. Additional scripts for FASTtreks can be developed
and made available individually. Each script must contain the line:
#FASTtrekscript [scriptname].FASTtrek
in order to be recognized by FASTtrek. When using the utility for
assembling a dataset into a FAST Expedition, this line is added automatically.
If the script is created separately the line must be added by hand.
Scripts for viewing the dataset
(4), are a second FASTtrek type. The images
here are from a FAST script animation that sweeps a plane of pressure contours
through the data.
- Files containing a command to be performed. These include
exiting FAST, saving the data used in the FAST Expedition to a
permanent directory, cleaning up temporary files, and running a
Remote Collaboration session. These files are created under /tmp when
the dataset is read, and are used to control the FASTtrek with
hyperlinks. A hyperlink to /tmp/FASTexpeditions/FASTexit.FASTtrek,
for example, will send a file containing the single line "FASTexit" to
the FASTtrek executable, which will then terminate FAST.
When FASTtrek loads a dataset, it creates a third type of .FASTtrek
file: temporary files containing commands, which are stored in a standard location.
Links to these files on the HTML document provide an interface to FAST.
Comparison of Using Movies and FAST Expeditions
Movies of the Ocean Currents
The Acoustic Doppler Currents Profile
(5)MPEG movies in the
Example Movies of Scientific Data illustrate the
current trend to display animated data in compressed pixel
form. Each movie contains a currents profile, displaying the direction
and speed of currents at 30 depth levels in the ocean.
The direction of currents is represented by arrows, and the arrows' length and color
represent the speed of the current. Each MPEG animation represents one profile,
and each movie requires the transfer of approximately 2 MBytes of data for 89 frames of
movie.
FAST Expeditions into the Ocean Currents
To compare with the movies above, we have generated a similar dataset for
viewing with FAST. However, our dataset contains 30 days of velocity profiles
(the equivalent of 30 movies). This FAST Expedition begins by displaying
the velocity vectors
colored by the magnitude (as in the movie), but it is not limited
to this mode of display.
In addition to the guided expeditions below, you can elect to conduct your own
expedition into this data. For example, you could view the day-of-month
vs. time-of-day surfaces while sweeping through the depth direction,
or you could view the depth vs. time-of-day surfaces while sweeping
through the day-of-month direction.
(The time-of-day dimension has been compressed to make a close comparison
to movies. You may wish to re-expand it.)
You can sequence the guided expeditions in interesting ways.
We recommend the "Time sweeping on" followed by the "Stereo".
The "viewing as a surface that goes though the ends of the vectors" followed by the
"Initiate a flyby ..." is also interesting - it permits viewing the correlation
of velocity profiles from day to day.
The Stereo mode is for use with Crystal Eyes glasses.
Load the Data and Prepare for the Expeditions
Please wait for the prompt to "try an expedition" before
selecting each option
Guided Expeditions
Exit the FAST scientific visualization program
Save the data and expeditions in a local directory for later use
Remove all temporary files used by the FAST Expedition
Comparison of the Features
The FAST Expeditions to explore equivalent data illustrate
- The data to be transferred can be reduced dramatically: the entire
FAST Expedition, containing the equivalent of 30 movies, is less than
half the size of one MPEG movie. Therefore, the volume of data sent over
the net was reduced by nearly 2 orders of magnitude.
- The viewer can view the data in a much richer variety of ways.
- The data can be viewed in 3D to see the direction of the vectors.
One cannot tell the direction of 3D vectors in space with a
single view (as in the movies). With FAST, one can rotate the
viewing position to determine the direction of the 3D vectors.
(Running the Stereo script, for use with Crystal Eyes stereo glasses,
one can determine the direction of the vectors without rotating the view.)
- All of the data in the movies can be viewed at once to better
view correlations in the various dimensions (depth, day, and time
of day).
- In addition to "sweeping through time" as in a movie, the viewer
can sweep through the other dimensions.
- The viewer can interactively highlight features through color
selection and other techniques.
- The viewer can do his own "what if" analysis of the data.
Other Features
In addition to running FAST expeditions, FAST users can use the FASTtrek
tools to run Remote Collaboration sessions, and to create their own
Scientific Expeditions.
Remote Collaboration
(6)
When FASTtrek is passed a file containing the command FASTremote, it
creates a pipe from which FAST will read script commands. It also creates
files containing the commands FASTmaster, FASTconnecttomaster, and
FASTdisconnect, to control FASTtrek. When a user becomes master, and
other users connect, FASTtrek calls the utilities FASTtalkserver and
FASTlistento, to create socket connections between the machines.
FASTtalkserver reads FAST commands as they are generated by FAST, and sends
them to the slave machines, where FASTlistento handles receiving the
commands and piping them to FAST.
From the user's point of view, the only technical hurdle is inserting
a line in the /etc/services file (which requires root privileges):
fastd 5001/tcp
Once that is done, to run a collaborative session one simply clicks on
FAST remote, then on FASTmaster or FASTconnecttomaster. To switch, the
user clicks on the other choice. Clicking on FASTdisconnect severs
connections.
The simplicity of this interface makes using Mosaic desirable for
remote collaboration any time remote collaboration is done, and not
only for connecting with scientists supplying FAST Expeditions on the
Web. For local use, an html page linked to a FASTremote file and to
the /tmp location where FASTtrek will put FASTmaster and
FASTconnecttomaster is provided in the archive.
To try Remote Collaboration, you must have the entry in
/etc/services described above. Then, contact a colleague. Each
Collaborator should run FAST, load the same data, and then select
Initialize
FAST Remote. When remote setup is initialized, select from:
Creating Scientific Expeditions for use with FAST
For users running web servers, creating FAST expeditions is easy. A
nawk script, FASTtar.nawk, is provided. To create an expedition,
invoke FASTtar.nawk, passing it the names of the FAST scripts for
the expedition. The nawk script will create soft links to the datasets
read by the scripts, and assemble all the scripts and the data in
a gzipped tar file. If Remote Collaboration is desired, a FASTremote
file can be included. In addition to creating the FASTtrek file,
the nawk script makes a skeleton home page with hyperlinks to the
scripts already on it.
The National Goals
These FAST Expeditions were developed in support of a proposal to
the NSF, NCSA, and NCGA to define the Scientific Expeditions as a way
to improve use of the information superhighway, and to bring
Scientific Expeditions into the schools. Specifically, the goals are:
The Proposed Target
A capability as good or better than the FAST Expedition
approach outlined here.
- Proposed National Goals
- Goal 1
- The "scientific expedition" shall be available to
- Every high school and above by the end of 1996
- Every school by the end of 1998
- Goal 2
- NASA, EPA, and similar research facilities, shall have
information available on the Information Superhighway
in a format like the Scientific Expedition by the end of 1996.
To learn more about FAST Expeditions and the National Goals, see the
National Goals Home page.
Notes
-
Flow Analysis Software Toolkit (FAST) is currently under development by
members of the Numerical Aerodynamics Simulation (NAS) Division
at NASA Ames Research Center, Moffett Field, CA 94035-1000.
See the FAST home page
for information on FAST, including how to get FAST. The
URL is:
http://www.nas.nasa.gov/FAST/fast.html
-
FAST on HDTV Monitor. Visualization by John West,
FAST Development Team, Sterling Software, Inc. Grid and solution
courtesy of Dr. David Huddleston and Dr. Bharat Soni, NSF Engineering
Research Center for Computational Field Simulation, Mississippi
State University.
- The FAST
Expeditions, the Web location
where new Expeditions are being placed, is
http://www.nas.nasa.gov/FAST/Expeditions
- The animation shown is from Effect of a Canard on Vortex
Structure and Pressure by Eugene L. Tu, RFA/NASA Ames.
-
Acoustic Doppler Currents Profile (ADCP) MPEG movies are produced daily by Cheng Tang
for the REINAS project at University of California, Santa Cruz.
These movies display ocean currents profile data collected from MBARI's M1 buoy, data
courtesy of Dr. L. Rosenfeld.
-
The Remote Collaboration technology was developed by Val Watson and John West.
Jean Clucas
Jean Clucas has worked at NASA Ames Research Center since early 1991
in a variety of tasks related to presentation media. She is presently
employed there by Sterling Software as a Electronic Documentation
Specialist for the NAS (Numerical Aerodynamic Simulation) Division,
putting research papers, images and animations from computer visualization,
and experimental projects on line. She is also a member of the FAST
(Flow Analysis Software Toolkit) development team. FAST is a package
for visualization of computational fluid dynamics data.
Ms. Clucas has 10 years experience as an educator, most recently
as an instructor in computer graphics and animation for the
Computer Technology and Information System Division at Foothill
College, Los Altos California.
Mail Stop T27a-2
NASA Ames Research Center
Moffett Field, CA 94035-1000
Phone: (415) 286-5761
email: clucas@nas.nasa.gov
Val Watson
Dr. Val Watson is a Senior Staff Scientist in the Fluid Dynamics
Division of the NASA Ames Research Center. He has been
responsible for the application of high performance graphics
workstations in support of fluid dynamics research. His emphasis
has been on the development of visual analysis tools to aid in
understanding the computer simulations of complex three
dimensional flow fields. Several computer programs developed at
Ames for flow visualization are being widely used by the aerospace
industry.
Val has also been active in promoting the use of computers in
teaching and in professional society presentations. He has been
using computers for live illustrations in presentations and
classroom lectures since his 1979 pioneering use of computers for
live illustrations in computational fluid dynamics courses over
the Stanford Instructional Television.
Val has been chairman of the Interactive Computer Graphics
Technical Committee for the American Institute of Aeronautics and
Astronautics and is currently a member of the Board of Directors
of NCGA. He received a BS in Mechanical Engineering and MS in
Aeronautics from UC Berkeley, and a PhD in Aeronautics and
Astronautics from Stanford University.
Mail Stop 258-2
NASA Ames Research Center
Moffett Field, CA 94035-1000
Phone: (415) 604-6421
FAX: (415) 604-4377
email: watson@nas.nasa.gov
URL http://www.nas.nasa.gov/FAST/Nationalgoals/watson.html