wiki:u/madams/3DCDMVisualizationInstructions

Version 14 (modified by madams, 10 years ago) ( diff )

On this page is a series of instructions on how to visualize data from AstroBEAR in the software VisIt in particularly fancy ways. The instructions and examples are from the data concerning our CollidingFlows high resolution runs located on BlueHive2 through Erica and Marissa's accounts. These techniques may potentially be useful to observe other types of physics. Click any of the figures to enlarge them on a new tab.

Initial Steps

  1. Import the data sets you want to visualize.
  2. Create a new database correlation, so that when your movie plays, all of the data sets play together. Open Controls > Database correlations… > New …
    • Select the sources from step 0.
    • Select the arrow to indicate that you want them to be a correlated source.
    • Rename the correlation if you'd like. For instance in my correlation below (Active time slider), I've renamed it NoShear3DCDM.
    • Click create database correlation.
    • In the first window that popped up, click apply. Now you have your data base correlation.
  3. Input your pseudocolor plots: Add + > Pseudocolor. Now choose you corresponding data set. In my example, I have chosen mass1, mass2 and mass3 (see Figure 1).
  4. Your data sets should be green, indicating that they are ready to be drawn (see Figure 1). While VisIt is drawing, they will be yellow. If it cannot drawn them, they will be red.
  5. If you are already familiar with visualizing the data set you're attempting to make a new fancy simulation of, it might be worth your time to adjust the colorbar and switch it to a log plot. This way one doesn't forget after making a movie. In my examples I'll have the legends turned off, and the color bar will have a minimum of 60 and maximum of 2000 (as a log plot).

Figure 1. Initial set up on correlating the data sets in Visit. Note they are indicated as ready to draw by the green font. They are correlated as indicated by the active time slider. The specific source being dealt with can be manipulated by changing the active source (current is mass3_along_3_*.bov).

Hints and Suggestions: While doing these steps you may want to make heavy use of hiding and showing each dataset as you go. Depending on how big your data set is, it can be quite computationally intensive. Feel free to edit your window for your movie as you please at some point by going to Controls > Annotation, and Controls > View.

3D Column Density Map (CDM) Plots

Column density maps integrate the density over the time interval for which your run was produced along each axis. Essentially you see whatever you plan to simulate evolves with time as some sort of kinematic cross section down x, y or z axis. One can create a "corner" or 3D box figure of these cross sections that we call column density maps, as illustrated by Figures 6 and 7. The procedure is like so:

  1. Hide all but one data set. Go to operators ± > Transforms > Elevate. Ensure that you elevate with zero height as shown in Figure 2.

Figure 2. Prior to drawing mass1, we are going to elevate it with zero height.

Figure 3. The following result of elevating with zero height. You have a slice that you can manipulate and rotate with the mouse in your window.

  1. Now we can going to transform this plane: Operators ± > Transform > Transform. Now you are faced with a series of tabs, or options: Arbitrary, Coordinate and Linear. You may need to use Arbitrary later on to align the sink particles on your .bov file, however for select the linear tab.

Figure 4. When you initially open up the transform operator on your slice. Again, your data set reverts back to being "ready to draw" green. The linear tab provides a series of inputs for a rotation matrix. For mass1, simple let it be projected by the identity matrix. The other two masses will require a different transform.

  1. Now we are done with mass1. We will move onto mass2 (keeping mass3 hidden). Similarly see step 1 to elevate the .bov. Now we're going to transform it with the following matrix shown in Figure (as a series of row vectors): {(0, 0, 1, 0),(1, 0, 0, 0),(0, 1, 0, 0),(0, 0, 0, 1)}. Now draw mass2. It should align snug next to mass1 along the appropriate axis (see Figure 5).

Figure 5. Elevating and transforming the mass2 data set. How it is drawn can be seen in the Window.

  1. Now we are done with both mass1 and mass2, so we can finish up similarly with mass3. Use the same transformation matrix as for mass2, however click the invert linear transform tab. The matrix should specifically be: {{0, 1, 0, 0}, {0, 0, 1, 0}, {1, 0, 0, 0}, {0, 0, 0, 1}}

Figure 6. The box is now complete!

Figure 7. The final product at the 200th frame, where we can observe physical phenomena.

In Summary: We imported the data sets we want to visualize and made a database correlation for them. One at a time, we elevated each set with zero height, and then transformed with rotation matrices in order to displace them onto their appropriate axis. In the end we have a product that illustrates the column density maps down the barrel (parallel to the magnetic field) of two colliding flows, along with the two perpendicular CDM cases flanking its sides.

Projecting Sinks

Given that our data deals with colliding flows and how their interaction can induce star formation, it is pertinent to discuss the formation of sink particles. To learn more about sink particles, see Fedderath et al. in Erica's Library. Here we present two ways of projecting and aligning the sink particles onto a bov.

Using Chombos

Using a Script

The script used (okc_to_curve.sh) can be found in the attachments below, along with the original sink file for frame 0 and its three projections. To run the script, copy it into your run directory with the .okc files and execute it. Immediately new curve files should be produced. With this method we simply plot the sinks as a curve file instead of as a pseudocolor variable inherent in the chombo (pmass).

Attachments (28)

Note: See TracWiki for help on using the wiki.