wiki:u/madams/2DSinkCurves

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

Script Implementation

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).

To execute: Run the script (i.e. sh okc_to_curve.sh or bash okc_to_curve.sh, on a super computer that uses slurm one could even use sbatch okc_to_curve.sh and it will run instantaneously.) Now you'll have files for each sink_*.okc that are of the form sink_*.okc.xy.curve, .okc.yz.curve, and .okc.zx.curve. We will be visualizing these three curve files that are produced by the script.

.okc vs. .curve

.okc file, frame 200

Here is the sink_00200.okc file for the 200 frame of the colliding flow case of beta 10 shear 15. It gives the number of sinks created by that frame (1), along with the parameters one can visualize in visit with this file. From there it lists the size of the box to be visualized and the position of the sink, which is at (x, y, z) = (0.1677478283852131E+02, 0.3831239447159744E+02, 0.4289703099423755E+02).

    16     1    16
 x
 y
 z
 rho
 px
 py
 pz
 E
 Bx
 By
 Bz
 FlowTracer1
 FlowTracer2
 sink_Jx
 sink_Jy
 sink_Jz
    0.00000E+00    0.62500E+02
    0.00000E+00    0.75000E+02
    0.00000E+00    0.75000E+02
    0.95709E+03    0.95709E+03
   -0.58895E+01   -0.58895E+01
   -0.13320E+01   -0.13320E+01
    0.24222E-01    0.24222E-01
    0.56828E+05    0.56828E+05
   -0.42501E-16   -0.42501E-16
    0.53776E-16    0.53776E-16
   -0.52042E-16   -0.52042E-16
    0.55316E+03    0.55316E+03
    0.40280E+03    0.40280E+03
   -0.69243E+01   -0.69243E+01
    0.80238E+02    0.80238E+02
   -0.48288E+02   -0.48288E+02
  0.1677478283852131E+02  0.3831239447159744E+02  0.4289703099423755E+02  0.9570942871389985E+03 -0.5889543397286745E+01 -0.1332004063672573E+01  0.2422194\
259471584E-01  0.5682775173382842E+05 -0.4250072516143177E-16  0.5377642775528102E-16 -0.5204170427930421E-16  0.5531618475564211E+03  0.4027989874621065E+\
03 -0.6924307163071299E+01  0.8023758108922658E+02 -0.4828838972325478E+02

.curve files, frame 200

The script simply pulls the (x,y,z) coordinates from the .okc file and lists them in two columns. One can clearly see that these correspond to the values in the .okc file:

sink_00200.okc.yz.curve — projected onto the yz plane (mass1).

0.3831239447159744E+02 0.4289703099423755E+02

sink_00200.okc.zx.curve — projected onto the zx plane (mass2).

0.4289703099423755E+02 0.1677478283852131E+02

sink_00200.okc.xy.curve — projected onto the xy plane (mass3).

0.1677478283852131E+02 0.3831239447159744E+02

Visualizing Sink Curves

  1. Import and visualize the data you want to see your sinks projected on. In Figure 1 we are looking at a (Add + > Pseudocolor > mass1) a mass1 bov, which integrates the density over time down the barrel of a colliding flow problem (this particular problem is beta 10, shear 15). Thus we are going to want to project the sinks_*.okc.yz.curve as it corresponds to the same axis as mass1.

Figure 1. Imported our data set to VisIt that we want to use our sink curve on.

  1. Import your .curve files through Add + > Curve > curve. Note the new database correlation created in Figure 2. If you want to order them similarly to mass1, mass2 and mass3 — then proceed with yz (x-axis, i.e. mass1), zx (y-axis, i.e. mass2), and xy (z-axis, i.e. mass3).

Figure 2. Imported curve file. Note the new database correlation.

  1. Now we need to edit the attributes of our curve data in order to see it.

Figure 3. What one is confronted with when initially opening the attributes. Choose a color that does not conflict with the color bar of your data. Here we choose black. Feel free to tick off the legend and labels in order to make a neater window space.

Figure 4. Under geometry we tick off 'show lines' and tick on 'show points' given we are clearing with data in the form of x-y coordinates. We choose to denote the illustration of these points on the bov as small axes.

Summary

Execute okc_to_curve.sh script in your out directory. Visualize the data you want to project your sinks onto in VisIt. Use the curve data to visualize the corresponding sinks for the data your visualizing. Adjust the curve attributes in visit.

Please contact Marissa at madams@pas.rochester.edu if you encounter any issues or have suggestions for improvement of these instructions.

Attachments (9)

Note: See TracWiki for help on using the wiki.