Visualization

From Fluids Wiki
Revision as of 17:28, 12 January 2018 by Ddeepwel (talk | contribs) (Created page with " == Visualization on Graham == All of what you need to know about running Paraview on Graham is presented in [https://docs.computecanada.ca/wiki/Visualization Graham Visualiza...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Visualization on Graham

All of what you need to know about running Paraview on Graham is presented in Graham Visualization. Unfortunately there is not much there on running Visit. For that, you need to talk to Ben.

Mapped netcdf SPINS file

Netcdf files need their data be represented on a rectilinear grid. Mapped (curvilinear) coordinates are accomplished by writing additional fields to which a visualization software can later designate as the correct grid. In the case of mapped SPINS files converted into a netcdf file (through spins2netcdf) this additional field is called zc (for the z-coordinate or curvilinear z). Below are the steps required to plot a field with the correct mapping.

ParaView

  • Read in netcdf file and select the Output Type: Structured
  • Unselect the checkbox for Spherical Coordinates (this seems to only sometimes be necessary)
  • Click Apply
  • In the Pipeline, select the file just opened and apply the calculator filter to it (either select the calculator icon, or under Tools->Common in menu bar)
  • In the Calculator Properties page:
    • Select Coordinate Result checkbox
    • Change Result Array Name to something useful (such as "grid". This is unnecessary, but helpful if multiple operations are done)
    • In the text box directly below this, input either
      • for 2D: iHat*coordsX+jHat*zc
      • for 3D: iHat*coordsX+jHat*coordsY+kHat*zc
    • Click Apply

VisIt

  • Read in netcdf file and add a plot
  • Add the displace operator to the plot (Operators->Transforms->Displace)
  • Click the arrow to the left of the plot in the Plot List to show the subitems
  • Double click the Displace subitem
    • Select Create new expression in the Displacement variable drop down menu
      • Give expression the name "grid" and Type "Vector Mesh Variable"
      • Input the definition as
        • for 2D: "{0*zc,zc - coord(meshN1xN2)[1]}" where meshN1xN2 must be replace with the mesh variable found under Insert Variable->Meshes
        • for 3D: "{0*zc,0*zc,zc - coord(meshN1xN2xN3)[2]}" where meshN1xN2xN3 must be replace with the mesh variable found under Insert Variable->Meshes
      • Click Apply in the Expressions window
    • Select grid in the Displacement variable drop down menu (under Vectors)
    • Click Apply in the Displace operator attributes window
  • Click Draw in the main menu