ParaView and CTH: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
No edit summary
No edit summary
Line 4: Line 4:
*This tutorial assumes that the user is already farmiliar with ParaView.  If necessary, see tutorials https://www.paraview.org/Wiki/Beginning_ParaView and https://www.paraview.org/Wiki/Beginning_Sources_and_Filters.   
*This tutorial assumes that the user is already farmiliar with ParaView.  If necessary, see tutorials https://www.paraview.org/Wiki/Beginning_ParaView and https://www.paraview.org/Wiki/Beginning_Sources_and_Filters.   


=A bit of background=
=ParaView and CTH=
Exodus datasets are often Lagrangian, or unstructured mesh.  CTH creates datasets that are Eulerian, or structured mesh.  Unstructured meshes move with the objectIf you have a bumper that hits a tree, the bumper and mesh will wrap around the tree.  Structured meshes remain fixed, and represent their data with variables that describe how much of a material is in each cell.  If a structured mesh has a bumper hit a tree, the bumper will move through the mesh, with variables changing from 0% bumper to 100% bumper, and back to 0% bumper.  This is called a Volume Fraction, generally running from 0 to 1 (0% to 100%).  Rectilinear meshes have all cells stacked side by side in a 3d cubeIf there is no refinement, this is called a flat meshStructured meshes can have areas of refinement, giving us a larger number of smaller cells where the action is.  This is called an AMR structured mesh (Adaptive Mesh Refinement).  
ParaView reads spcth files in an very efficient manorAll material volume arrays go from 0 (representing 0%) to 1 (representing 100%).  These are actually stored in the files as floats (4 bytes) or doubles (8 bytes)ParaView reads these into unsigned bytes, which range from 0 to 255Generally, you want a surface (contour or clip by scalar) at about 10%.


=A simple CTH AMR example=
=A CTH AMR example creating contours with the Extract CTH Parts filter=
Our goal is to create a contour where Material Volume Fractions go from under 10% to over 10%.
Our goal is to create a contour where Material Volume Fractions go from under 10% to over 10%.


*Start ParaView.   
*Start ParaView.   


*Open spcta_a.0.[0-3].  Turn all variables on.  Apply.
*Open '''spcta_a.0.[0-3]'''.  Turn all '''variables''' on.  '''Apply'''.
*Filters/ CTH/ Extract CTH Parts.  Turn off all Volume Arrays, except '''Material volume fraction - 1'''.  Apply.
**There are three types of data that have been read in.
**'''Volume data''' is the structured data from the CTH simuliation
**'''Tracers''' are alan
**'''Markers''' are alan
**Notice the '''Down Convert Volume Fraction''' has been checked.  This means that ParaView will store volume fractions as an unsigned byte.
 
[[Image:CTH-1.JPG]]
 
*'''Y-'''
*Note that since we will have two materials touching each other, our default '''Volume Fraction Value''' will have some cells visible on top of each other.  If this is not desired, change the value to '''0.5'''.
*Coloring by point will be smoother than color by cell.  Thus, we will convert variables to be point for anything we color.
*Filters/ CTH/ '''Extract CTH Parts'''.  Turn off all Volume Arrays, except '''Material volume fraction - 1'''.  '''Apply'''.
*Filters/ Alphabetical/ '''Cell Data to Point Data'''.  Apply.
*Paint by '''Pressure'''.
*In the Pipeline Browser, select Volume Data (i.e., the raw cth data again).   
*In the Pipeline Browser, select Volume Data (i.e., the raw cth data again).   
*Filters/ CTH/ Extract CTH Parts.  Turn off all Volume Arrays, except '''Material volume fraction - 2'''.  Apply.
*Filters/ CTH/ '''Extract CTH Parts'''.  Turn off all Volume Arrays, except '''Material volume fraction - 2'''.  '''Apply'''.
*Paint by Pressure.
*Change Representation to "Surface With Edges".
*Play forward.
 
[[Image:CTH-2.JPG]]
 
*With the '''left mousebutton''', grab the 3d view and drag down.  This will rotate the block face down.
*With the '''right mousebutton''', grab the 3d view and drag down.  This will move closer to the block face.
*'''Play''' forward to about the 8th timestep.
 
[[Image:CTH-3.JPG]]
 
*Go back to the '''First Frame'''.
*Change Representation to "Surface".
*'''Play''' forward to about the 8th timestep.
    
    


=Acknowledgements=
=Acknowledgements=
Sandia National Laboratories is a multi-mission laboratory managed and operated by National Technology and Engineering Solutions of Sandia, LLC., a wholly owned subsidiary of Honeywell International, Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA-0003525.
Sandia National Laboratories is a multi-mission laboratory managed and operated by National Technology and Engineering Solutions of Sandia, LLC., a wholly owned subsidiary of Honeywell International, Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA-0003525.

Revision as of 01:50, 10 October 2017

CTH datasets

This tutorial shows how to visualize CTH datasets (called spcth files). CTH is a multi-material, large deformation, strong shock wave, solid mechanics code developed at Sandia National Laboratories. A more complete writeup on CTH is here: http://www.sandia.gov/CTH/. CTH Spyplot files are Eulerian, or structured mesh datasets. They can be flat mesh or adaptive mesh refinement (i.e., AMR).

ParaView and CTH

ParaView reads spcth files in an very efficient manor. All material volume arrays go from 0 (representing 0%) to 1 (representing 100%). These are actually stored in the files as floats (4 bytes) or doubles (8 bytes). ParaView reads these into unsigned bytes, which range from 0 to 255. Generally, you want a surface (contour or clip by scalar) at about 10%.

A CTH AMR example creating contours with the Extract CTH Parts filter

Our goal is to create a contour where Material Volume Fractions go from under 10% to over 10%.

  • Start ParaView.
  • Open spcta_a.0.[0-3]. Turn all variables on. Apply.
    • There are three types of data that have been read in.
    • Volume data is the structured data from the CTH simuliation
    • Tracers are alan
    • Markers are alan
    • Notice the Down Convert Volume Fraction has been checked. This means that ParaView will store volume fractions as an unsigned byte.

CTH-1.JPG

  • Y-
  • Note that since we will have two materials touching each other, our default Volume Fraction Value will have some cells visible on top of each other. If this is not desired, change the value to 0.5.
  • Coloring by point will be smoother than color by cell. Thus, we will convert variables to be point for anything we color.
  • Filters/ CTH/ Extract CTH Parts. Turn off all Volume Arrays, except Material volume fraction - 1. Apply.
  • Filters/ Alphabetical/ Cell Data to Point Data. Apply.
  • Paint by Pressure.
  • In the Pipeline Browser, select Volume Data (i.e., the raw cth data again).
  • Filters/ CTH/ Extract CTH Parts. Turn off all Volume Arrays, except Material volume fraction - 2. Apply.
  • Change Representation to "Surface With Edges".

CTH-2.JPG

  • With the left mousebutton, grab the 3d view and drag down. This will rotate the block face down.
  • With the right mousebutton, grab the 3d view and drag down. This will move closer to the block face.
  • Play forward to about the 8th timestep.

CTH-3.JPG

  • Go back to the First Frame.
  • Change Representation to "Surface".
  • Play forward to about the 8th timestep.


Acknowledgements

Sandia National Laboratories is a multi-mission laboratory managed and operated by National Technology and Engineering Solutions of Sandia, LLC., a wholly owned subsidiary of Honeywell International, Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA-0003525.