ParaView and CTH: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
No edit summary
No edit summary
Line 8: Line 8:


=Creating contours with the Extract CTH Parts filter=
=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 is at 10%.


*Start ParaView.   
*Start ParaView.   
Line 15: Line 15:
**There are three types of data that have been read in.
**There are three types of data that have been read in.
**'''Volume data''' is the structured data from the CTH simuliation
**'''Volume data''' is the structured data from the CTH simuliation
**'''Tracers''' are alan
**'''Tracers''' are points in the mesh that move with a material, and can include variable information. 
**'''Markers''' are alan
**'''Markers''' are groups of points that move with a material.
**Notice the '''Down Convert Volume Fraction''' has been checked.  This means that ParaView will store volume fractions as an unsigned byte.
**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|1000px]]
[[Image:CTH-1.JPG|1000px]]


*'''Y-'''
*'''Y-'''
Line 30: Line 32:
*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'''.
*Change Representation to "Surface With Edges".
*Change Representation to "Surface With Edges".


[[Image:CTH-2.JPG|1000px]]
[[Image:CTH-2.JPG|1000px]]


*Change Representation back to "Surface".
*Change Representation back to "Surface".
Line 37: Line 41:
*With the '''right mousebutton''', grab the 3d view and drag down.  This will move closer to the block face.
*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.
*'''Play''' forward to about the 8th timestep.


[[Image:CTH-3.JPG|1000px]]
[[Image:CTH-3.JPG|1000px]]


=Creating a filled isovolume with the Clip by Scalar filter=
=Creating a filled isovolume with the Clip by Scalar filter=
Our goal is to create a solid 3d isovolume where Material Volume Fractions is at 10%.  We want to do this so we can then take slices through the object.
Lets start from scratch.
*Edit/ Reset Session.
*Open '''spcta_a.0.[0-3]'''.  Turn all '''variables''' on.  '''Apply'''.
We now want to move our data to point based, as opposed to cell based data.
*Filters/ Alphabetical/ '''Cell Data to Point Data'''.  '''Apply'''
We now extract one material volume.  ParaView has actually read in Material volume fraction data as an unsigned byte, running from 0 to 255.  10% full is about 25, 50% is 128.  Lets create an isovolume at 10%.
*Filters/ Common/ Clip.  Clip Type - Scalar.  Scalars - Material volume fraction - 1.  Value - 25.  Apply.
*Turn off visibility of the Cell Data to Point Data filter.
*Slice.  Y Normal.  Apply.  Unselect the Show Plane check box.
*Color by Pressure.
We now want to change the colormap. 
*View/ Color Map Editor.  (There is a shortcut icon below the Edit menu.)  Click the Preset icon (little folder with a heart).  Rainbow Desaturated.  Apply.  Close.
*Click Rescale to Custom Data Range (small icon below Sources).  Set range from 0 to 2e10.
[[Image:CTH-4.JPG|1000px]]
*Select the Volume Data in the pipeline browser.
*Filters/ CTH/ Extract CTH Parts.  Select only Material volume fraction - 2.  Apply.
*Cell Data to Point Data.  Apply.  (This will smooth out the colors on each cell.)
*Paint by Temperature (eV)
This image has three slices, and opacity turned to 0.5
[[Image:CTH-5.JPG|1000px]]


=Analyzing fragments with the Material Interface filter=
=Analyzing fragments with the Material Interface filter=

Revision as of 23:44, 11 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%.

Creating contours with the Extract CTH Parts filter

Our goal is to create a contour where Material Volume Fractions is at 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 points in the mesh that move with a material, and can include variable information.
    • Markers are groups of points that move with a material.
    • 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


  • Change Representation back to "Surface".
  • 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


Creating a filled isovolume with the Clip by Scalar filter

Our goal is to create a solid 3d isovolume where Material Volume Fractions is at 10%. We want to do this so we can then take slices through the object.

Lets start from scratch.

  • Edit/ Reset Session.
  • Open spcta_a.0.[0-3]. Turn all variables on. Apply.

We now want to move our data to point based, as opposed to cell based data.

  • Filters/ Alphabetical/ Cell Data to Point Data. Apply

We now extract one material volume. ParaView has actually read in Material volume fraction data as an unsigned byte, running from 0 to 255. 10% full is about 25, 50% is 128. Lets create an isovolume at 10%.

  • Filters/ Common/ Clip. Clip Type - Scalar. Scalars - Material volume fraction - 1. Value - 25. Apply.
  • Turn off visibility of the Cell Data to Point Data filter.
  • Slice. Y Normal. Apply. Unselect the Show Plane check box.
  • Color by Pressure.

We now want to change the colormap.

  • View/ Color Map Editor. (There is a shortcut icon below the Edit menu.) Click the Preset icon (little folder with a heart). Rainbow Desaturated. Apply. Close.
  • Click Rescale to Custom Data Range (small icon below Sources). Set range from 0 to 2e10.


CTH-4.JPG


  • Select the Volume Data in the pipeline browser.
  • Filters/ CTH/ Extract CTH Parts. Select only Material volume fraction - 2. Apply.
  • Cell Data to Point Data. Apply. (This will smooth out the colors on each cell.)
  • Paint by Temperature (eV)

This image has three slices, and opacity turned to 0.5

CTH-5.JPG




Analyzing fragments with the Material Interface filter

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.