https://public.kitware.com/Wiki/api.php?action=feedcontributions&user=Wascott&feedformat=atomKitwarePublic - User contributions [en]2024-03-28T11:22:59ZUser contributionsMediaWiki 1.38.6https://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64705Computational Fluid Dynamics2021-12-17T03:29:44Z<p>Wascott: </p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V. Note that we will reset session (i.e., start from scratch) every section.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*With the mouse, rotate the slices around so you can see both surfaces.<br />
*'''Edit → Reset Session'''. There is also a shortcut icon just above where you have been changing colors. It looks like a green counterclockwise snake eating it's tail.<br />
<br />
<br />
[[Image:cfd_slices2.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
<br />
Lets save this really cool image as a screenshot.<br />
<br />
* '''File → Save Screenshot'''. Add a file name. '''OK'''. '''OK'''.<br />
<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_streamtracer1.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers with Custom Source==<br />
We want to create stream tracers from any arbitrary source. This can be a line, spline, circle, elipse or any other curving line. An extreme example would be a cylinder cut by a plane.<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*Change '''vtkBlockColors''' to '''Solid Color'''. Change '''Opacity''' to '''0.3'''.<br />
*'''Sources → Elipse'''. '''Center'''. '''0,0,7'''. '''Major Radius Vector''', '''3,0,0'''. '''Ratio''', '''0.3'''. '''Apply'''.<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
*Select '''disk_out_ref.exo''' in the '''Pipeline Browser'''.<br />
*'''Filters → Alphabetical → Stream Tracer with Custom Source'''. Use '''Elipse''' as the seed source. '''Apply'''. <br />
*Color by: '''Solid Color'''.<br />
<br />
The image below is a merging of Stream Tracers with lines and tubes, and Stream Tracer with Custom Source. I have also played with colors to make it look nicer. If interested, replicating is left to the user.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_streamtracer_with_custom_source.png|1000px]]<br />
<br />
<br />
<br />
==Glyphs perpendicular to a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
<br />
Lets create a half slice. This will be used as the seed plane for glyphs.<br />
<br />
*'''Filters → Common → Slice'''. '''Z Normal'''. Origin '''0, 0, 5'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
Now, apply glyphs.<br />
<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Color by: '''v'''. Change '''Magnitude''' to '''Z'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Representation: '''wireframe'''. In the '''pipeline browser''', click on the '''eyeball''' next to '''disk_out_ref.exo'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*Use the mouse to zoom into the glyph vectors.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_slice_glyph1.png|1000px]]<br />
<br />
<br />
<br />
==Flow in a fluid==<br />
To show a velocity profile we need to sample the dataset with a line, and then create glyphs off of this line. This can be done using a trick in ParaView, i.e., the Plot over Line filter. Note that a Resample to Line filter will be added in ParaView 5.11 or so. <br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
<br />
Lets sample over a line.<br />
<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of '''Point1''' and '''Point2''' to '''1'''. Change the '''Resolution''' to '''40'''. '''Apply'''. <br />
*Close the '''LineChartView'''.<br />
*In the '''Pipeline Browser''', turn visibility off for '''disk_out_ref.exo'''.<br />
<br />
We now have a line sampled through the fluid. Lets calculate the negative Z component of V (so it goes the opposite direction on the line from V). That way we can have two profiles, one with V, and one with Vz. <br />
<br />
*'''Filters → Common → Calculator'''. Change '''Result''' to '''Vz'''. Use '''0*iHat+0+jHat+-v_Z*kHat''' for the formula. '''Apply'''.<br />
<br />
Now we want to create two Glyphs - one from the '''Calculator''' filter, and one directly from the '''Plot over Line''' filter.<br />
<br />
*The '''Calculator''' filter should still be highlighted in the Pipeline Browser.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: Vz'''. '''Scale Array: Vz '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Click on the '''Color Editor''' icon. Change the color to Orange. '''Apply'''.<br />
*In the Pipeline Browser select the '''Plot over Line''' filter.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Click on the '''eyeball''' next to '''disk_out_ref.exo'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
<br />
Just to create a nice image, I'm going to split the views horizontally, and show this visualization also from the side.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile1.png|1000px]]<br />
<br />
<br />
<br />
You can write the data sampled down the line to a .csv file, where you can post process it with tools such as Excel. Here is how to do it.<br />
*Select '''PlotOverLine''' in the Pipeline Browser.<br />
*Split screen vertical. '''Spreadsheet view'''.<br />
*Now, click on the '''Export Scene''' icon, and write the '''Spreadsheet''' down to a '''.csv file'''.<br />
<br />
Lets save this really cool image as a screenshot.<br />
<br />
* '''File → Save Screenshot'''. Add a file name. '''OK'''. We want to save both views. Click '''Save All Views'''. '''OK'''.<br />
<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile_spreadsheet.png|1000px]]<br />
<br />
<br />
<br />
==2D plots through a fluid==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of '''Point1''' and '''Point2''' to '''4'''. '''Apply'''.<br />
*In the '''Properties Tab''', turn all variables off other than '''v_Z'''.<br />
*Click on the '''RenderView''', the left '''view'''. <br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_2d_plots.png|1000px]]<br />
<br />
<br />
<br />
==Contours on a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. Uncheck '''Show Plane'''. '''Apply'''.<br />
<br />
We need the magnitude for the Contour filter.<br />
<br />
*'''Filters → Common → Calculator'''. Result Array Name '''vMag'''. Formula '''mag(v)'''. '''Apply'''.<br />
<br />
Now, draw contours on the 2d slice.<br />
<br />
*'''Filters → Common → Contour'''. Contour by vMag. Delete the '''Value''', and create a new set using the '''Add a Range of Values''' icon. '''Apply'''.<br />
<br />
A nice visualization is to turn visibility on for '''Slice''' and paint by '''v''', and change '''Contour''' to be a '''Solid Color''', and make that color '''White'''. <br />
<br />
Here is an example with additional '''streamlines''', '''tubes''' and '''glyphs'''.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_contours_on_slices.png|1000px]]<br />
<br />
<br />
<br />
==Gradient, Divergence, Vorticity and and Q Criterion==<br />
The '''Gradient''' filter ('''Advanced''' Properties tab) provides Gradient, Divergence, Vorticity and and Q Criterion. Here is am example, using disk_out_ref.exo. <br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_gradient1.png|1000px]]<br />
<br />
<br />
<br />
==Probing a fluid==<br />
There are numerous ways to probe the cells and points of a fluid. One is with the '''Hover Points On''' and '''Hover Cells On''' icons just above the Renderview. Another is with Interactive Select Cells or Points On. Then, in the Find Data, turn on Cell or Point Labels. Yet another is with the Probe filter. Here is how to use the probe filter.<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. Uncheck '''Invert'''. '''Apply'''. <br />
<br />
The '''Probe''' filter works much better with '''Auto Apply''' turned on. This is the icon that looks like a tree growing out of a cube.<br />
<br />
*'''Auto Apply''' on<br />
<br />
*'''Filters → Data Analysis → Probe'''. If needed, select the '''RenderView''' window, giving it focus. Now, move over '''disk_out_ref.exo''', updating the probed location with the '''p''' key.<br />
<br />
The '''probed''' data will show in the Spreadsheet view.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_probe1.png|1000px]]<br />
<br />
<br />
<br />
==Animating a static vector field==<br />
*If you have a vector field in your data, you can animate a static dataset.<br />
*Our goal is to create a set of streamlines from a vector field, place points on this set of streamlines, and animate the point down the streamlines. We will also add glyphs to the streamline points. <br />
*Open disk_out_ref.exo. '''Apply'''.<br />
*Click the '''-X''' icon.<br />
*'''Stream tracer''' filter. (We are already streamtracing on V). Change Seed Type to '''Point Cloud'''. Optional - change the Opacity to 0.4. '''Apply'''.<br />
*'''Contour''' filter. Contour on '''IntegrationTime'''. '''Apply'''.<br />
*'''Glyph''' filter. Vectors '''V'''. No Scale Array. Scale 1. Glyph Mode ''' All Points'''. '''Apply'''.<br />
*View/ Animation View.<br />
*Mode '''Sequence''', No. Frames: '''100'''. <br />
*Change the pulldown box next to the blue '''+''' to be '''Contour'''.<br />
*Click the blue '''+'''. Note it works better if you use 0 for the start.<br />
*Now, click the play button. In the pipeline browser, I also turned off visibility for the Contour filter.<br />
<br />
Lets save this as a movie.<br />
<br />
* '''File → Save Animation'''. Add a file name. Save as a '''.avi'''. '''OK'''. '''OK'''.<br />
<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_animating_static_field.png|1000px]]<br />
<br />
<br />
<br />
==Volume Rendering==<br />
We are going to paint the fluid by volume rendered temperature. To give context, we are also going to extract the exterior surface, and clip the disk_out_ref in half. We will paint this exterior surface black.<br />
<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Extract Surface'''. '''Apply'''.<br />
*'''Filters → Clip'''. Deselect '''Invert'''. '''Apply'''.<br />
*'''Solid Color'''. Color the clipped surface '''black'''.<br />
*Select '''disk_out_ref.exo''' in the '''Pipeline Browser'''. Paint by '''temp'''. '''Volume Render'''. In the '''Color Editor''', change '''presets''' (looks like a folder with a heart) to be '''Black Body Radiation'''.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_volume_rendering.png|1000px]]</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64704Computational Fluid Dynamics2021-12-16T20:59:29Z<p>Wascott: </p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V. Note that we will reset session (i.e., start from scratch) every section.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*With the mouse, rotate the slices around so you can see both surfaces.<br />
*'''Edit → Reset Session'''. There is also a shortcut icon just above where you have been changing colors. It looks like a green counterclockwise snake eating it's tail.<br />
<br />
<br />
[[Image:cfd_slices2.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
<br />
Lets save this really cool image as a screenshot.<br />
<br />
* '''File → Save Screenshot'''. Add a file name. '''OK'''. '''OK'''.<br />
<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_streamtracer1.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers with Custom Source==<br />
We want to create stream tracers from any arbitrary source. This can be a line, spline, circle, elipse or any other curving line. An extreme example would be a cylinder cut by a plane.<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*Change '''vtkBlockColors''' to '''Solid Color'''. Change '''Opacity''' to '''0.3'''.<br />
*'''Sources → Elipse'''. '''Center'''. '''0,0,7'''. '''Major Radius Vector''', '''3,0,0'''. '''Ratio''', '''0.3'''. '''Apply'''.<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
*Select '''disk_out_ref.exo''' in the '''Pipeline Browser'''.<br />
*'''Filters → Alphabetical → Stream Tracer with Custom Source'''. Use '''Elipse''' as the seed source. '''Apply'''. <br />
*Color by: '''Solid Color'''.<br />
<br />
The image below is a merging of Stream Tracers with lines and tubes, and Stream Tracer with Custom Source. I have also played with colors to make it look nicer. If interested, replicating is left to the user.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_streamtracer_with_custom_source.png|1000px]]<br />
<br />
<br />
<br />
==Glyphs perpendicular to a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
<br />
Lets create a half slice. This will be used as the seed plane for glyphs.<br />
<br />
*'''Filters → Common → Slice'''. '''Z Normal'''. Origin '''0, 0, 5'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
Now, apply glyphs.<br />
<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Color by: '''v'''. Change '''Magnitude''' to '''Z'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Representation: '''wireframe'''. In the '''pipeline browser''', click on the '''eyeball''' next to '''disk_out_ref.exo'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*Use the mouse to zoom into the glyph vectors.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_slice_glyph1.png|1000px]]<br />
<br />
<br />
<br />
==Flow in a fluid==<br />
To show a velocity profile we need to sample the dataset with a line, and then create glyphs off of this line. This can be done using a trick in ParaView, i.e., the Plot over Line filter. Note that a Resample to Line filter will be added in ParaView 5.11 or so. <br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
<br />
Lets sample over a line.<br />
<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of '''Point1''' and '''Point2''' to '''1'''. Change the '''Resolution''' to '''40'''. '''Apply'''. <br />
*Close the '''LineChartView'''.<br />
*In the '''Pipeline Browser''', turn visibility off for '''disk_out_ref.exo'''.<br />
<br />
We now have a line sampled through the fluid. Lets calculate the negative Z component of V (so it goes the opposite direction on the line from V). That way we can have two profiles, one with V, and one with Vz. <br />
<br />
*'''Filters → Common → Calculator'''. Change '''Result''' to '''Vz'''. Use '''0*iHat+0+jHat+-v_Z*kHat''' for the formula. '''Apply'''.<br />
<br />
Now we want to create two Glyphs - one from the '''Calculator''' filter, and one directly from the '''Plot over Line''' filter.<br />
<br />
*The '''Calculator''' filter should still be highlighted in the Pipeline Browser.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: Vz'''. '''Scale Array: Vz '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Click on the '''Color Editor''' icon. Change the color to Orange. '''Apply'''.<br />
*In the Pipeline Browser select the '''Plot over Line''' filter.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Click on the '''eyeball''' next to '''disk_out_ref.exo'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
<br />
Just to create a nice image, I'm going to split the views horizontally, and show this visualization also from the side.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile1.png|1000px]]<br />
<br />
<br />
<br />
You can write the data sampled down the line to a .csv file, where you can post process it with tools such as Excel. Here is how to do it.<br />
*Select '''PlotOverLine''' in the Pipeline Browser.<br />
*Split screen vertical. '''Spreadsheet view'''.<br />
*Now, click on the '''Export Scene''' icon, and write the '''Spreadsheet''' down to a '''.csv file'''.<br />
<br />
Lets save this really cool image as a screenshot.<br />
<br />
* '''File → Save Screenshot'''. Add a file name. '''OK'''. We want to save both views. Click '''Save All Views'''. '''OK'''.<br />
<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile_spreadsheet.png|1000px]]<br />
<br />
<br />
<br />
==2D plots through a fluid==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of '''Point1''' and '''Point2''' to '''4'''. '''Apply'''.<br />
*In the '''Properties Tab''', turn all variables off other than '''v_Z'''.<br />
*Click on the '''RenderView''', the left '''view'''. <br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_2d_plots.png|1000px]]<br />
<br />
<br />
<br />
==Contours on a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. Uncheck '''Show Plane'''. '''Apply'''.<br />
<br />
We need the magnitude for the Contour filter.<br />
<br />
*'''Filters → Common → Calculator'''. Result Array Name '''vMag'''. Formula '''mag(v)'''. '''Apply'''.<br />
<br />
Now, draw contours on the 2d slice.<br />
<br />
*'''Filters → Common → Contour'''. Contour by vMag. Delete the '''Value''', and create a new set using the '''Add a Range of Values''' icon. '''Apply'''.<br />
<br />
A nice visualization is to turn visibility on for '''Slice''' and paint by '''v''', and change '''Contour''' to be a '''Solid Color''', and make that color '''White'''. <br />
<br />
Here is an example with additional '''streamlines''', '''tubes''' and '''glyphs'''.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_contours_on_slices.png|1000px]]<br />
<br />
<br />
<br />
==Gradient, Divergence, Vorticity and and Q Criterion==<br />
The '''Gradient''' filter ('''Advanced''' Properties tab) provides Gradient, Divergence, Vorticity and and Q Criterion. Here is am example, using disk_out_ref.exo. <br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_gradient1.png|1000px]]<br />
<br />
<br />
<br />
==Probing a fluid==<br />
There are numerous ways to probe the cells and points of a fluid. One is with the '''Hover Points On''' and '''Hover Cells On''' icons just above the Renderview. Another is with Interactive Select Cells or Points On. Then, in the Find Data, turn on Cell or Point Labels. Yet another is with the Probe filter. Here is how to use the probe filter.<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
The '''Probe''' filter works much better with '''Auto Apply''' turned on. This is the icon that looks like a tree growing out of a cube.<br />
<br />
*'''Auto Apply''' on<br />
<br />
*'''Filters → Data Analysis → Probe'''. Now, move over '''disk_out_ref.exo''', updating the probed location with the '''p''' key.<br />
<br />
The '''probed''' data will show in the Spreadsheet view.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_probe1.png|1000px]]<br />
<br />
<br />
<br />
==Animating a static vector field==<br />
*If you have a vector field in your data, you can animate a static dataset.<br />
*Our goal is to create a set of streamlines from a vector field, place points on this set of streamlines, and animate the point down the streamlines. We will also add glyphs to the streamline points. <br />
*Open disk_out_ref.exo. '''Apply'''.<br />
*Click the '''-X''' icon.<br />
*'''Stream tracer''' filter. (We are already streamtracing on V). Change Seed Type to '''Point Cloud'''. Optional - I changed the Opacity to 0.4. '''Apply'''.<br />
*'''Contour''' filter. Contour on '''IntegrationTime'''. '''Apply'''.<br />
*'''Glyph''' filter. Vectors '''V'''. No Scale Array. Scale 1. Glyph Mode ''' All Points'''. '''Apply'''.<br />
*View/ Animation View.<br />
*Mode '''Sequence''', No. Frames: '''100'''. <br />
*Change the pulldown box next to the blue '''+''' to be '''Contour'''.<br />
*Click the blue '''+'''. Note it works better if you use 0 for the start.<br />
*Now, click the play button. In the pipeline browser, I also turned off visibility for the Contour filter.<br />
<br />
Lets save this as a movie.<br />
<br />
* '''File → Save Animation'''. Add a file name. Save as a '''.avi'''. '''OK'''. '''OK'''.<br />
<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_animating_static_field.png|1000px]]<br />
<br />
<br />
<br />
==Volume Rendering==<br />
We are going to paint the fluid by volume rendered temperature. To give context, we are also going to extract the exterior surface, and clip the disk_out_ref in half. We will paint this exterior surface black.<br />
<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Extract Surface'''. '''Apply'''.<br />
*'''Filters → Clip'''. Deselect '''Invert'''. '''Apply'''.<br />
*'''Solid Color'''. Color the clipped surface '''black'''.<br />
*Select '''disk_out_ref.exo''' in the '''Pipeline Browser'''. Paint by '''temp'''. '''Volume Render'''. In the '''Color Editor''', change '''presets''' (looks like a folder with a heart) to be '''Black Body Radiation'''.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_volume_rendering.png|1000px]]</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64703Computational Fluid Dynamics2021-12-16T20:52:08Z<p>Wascott: </p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V. Note that we will reset session (i.e., start from scratch) every section.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*With the mouse, rotate the slices around so you can see both surfaces.<br />
*'''Edit → Reset Session'''. There is also a shortcut icon just above where you have been changing colors. It looks like a green counterclockwise snake eating it's tail.<br />
<br />
<br />
[[Image:cfd_slices2.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
<br />
Lets save this really cool image as a screenshot.<br />
<br />
* '''File → Save Screenshot'''. Add a file name. '''OK'''. '''OK'''.<br />
<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_streamtracer1.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers with Custom Source==<br />
We want to create stream tracers from any arbitrary source. This can be a line, spline, circle, elipse or any other curving line. An extreme example would be a cylinder cut by a plane.<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*Change '''vtkBlockColors''' to '''Solid Color'''. Change '''Opacity''' to '''0.3'''.<br />
*'''Sources → Elipse'''. '''Center'''. '''0,0,7'''. '''Major Radius Vector''', '''3,0,0'''. '''Ratio''', '''0.3'''. '''Apply'''.<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
*Select '''disk_out_ref.exo''' in the '''Pipeline Browser'''.<br />
*'''Filters → Alphabetical → Stream Tracer with Custom Source'''. Use '''Elipse''' as the seed source. '''Apply'''. <br />
*Color by: '''Solid Color'''.<br />
<br />
The image below is a merging of Stream Tracers with lines and tubes, and Stream Tracer with Custom Source. I have also played with colors to make it look nicer. If interested, replicating is left to the user.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_streamtracer_with_custom_source.png|1000px]]<br />
<br />
<br />
<br />
==Glyphs perpendicular to a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
<br />
Lets create a half slice. This will be used as the seed plane for glyphs.<br />
<br />
*'''Filters → Common → Slice'''. '''Z Normal'''. Origin '''0, 0, 5'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
Now, apply glyphs.<br />
<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Color by: '''v'''. Change '''Magnitude''' to '''Z'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Representation: '''wireframe'''. In the '''pipeline browser''', click on the '''eyeball''' next to '''disk_out_ref.exo'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*Use the mouse to zoom into the glyph vectors.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_slice_glyph1.png|1000px]]<br />
<br />
<br />
<br />
==Flow in a fluid==<br />
To show a velocity profile we need to sample the dataset with a line, and then create glyphs off of this line. This can be done using a trick in ParaView, i.e., the Plot over Line filter. Note that a Resample to Line filter will be added in ParaView 5.11 or so. <br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
<br />
Lets sample over a line.<br />
<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of '''Point1''' and '''Point2''' to '''1'''. Change the '''Resolution''' to '''40'''. '''Apply'''. <br />
*Close the '''LineChartView'''.<br />
*In the '''Pipeline Browser''', turn visibility off for '''disk_out_ref.exo'''.<br />
<br />
We now have a line sampled through the fluid. Lets calculate the negative Z component of V (so it goes the opposite direction on the line from V). That way we can have two profiles, one with V, and one with Vz. <br />
<br />
*'''Filters → Common → Calculator'''. Change '''Result''' to '''Vz'''. Use '''0*iHat+0+jHat+-v_Z*kHat''' for the formula. '''Apply'''.<br />
<br />
Now we want to create two Glyphs - one from the '''Calculator''' filter, and one directly from the '''Plot over Line''' filter.<br />
<br />
*The '''Calculator''' filter should still be highlighted in the Pipeline Browser.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: Vz'''. '''Scale Array: Vz '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Click on the '''Color Editor''' icon. Change the color to Orange. '''Apply'''.<br />
*In the Pipeline Browser select the '''Plot over Line''' filter.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Click on the '''eyeball''' next to '''disk_out_ref.exo'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
<br />
Just to create a nice image, I'm going to split the views horizontally, and show this visualization also from the side.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile1.png|1000px]]<br />
<br />
<br />
<br />
You can write the data sampled down the line to a .csv file, where you can post process it with tools such as Excel. Here is how to do it.<br />
*Select '''PlotOverLine''' in the Pipeline Browser.<br />
*Split screen vertical. '''Spreadsheet view'''.<br />
*Now, click on the '''Export Scene''' icon, and write the '''Spreadsheet''' down to a '''.csv file'''.<br />
<br />
Lets save this really cool image as a screenshot.<br />
<br />
* '''File → Save Screenshot'''. Add a file name. '''OK'''. We want to save both views. Click '''Save All Views'''. '''OK'''.<br />
<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile_spreadsheet.png|1000px]]<br />
<br />
<br />
<br />
==2D plots through a fluid==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of '''Point1''' and '''Point2''' to '''4'''. '''Apply'''.<br />
*In the '''Properties Tab''', turn all variables off other than '''v_Z'''.<br />
*Click on the '''RenderView''', the left '''view'''. <br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_2d_plots.png|1000px]]<br />
<br />
<br />
<br />
==Contours on a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''.<br />
<br />
We need the magnitude for the Contour filter.<br />
<br />
*'''Filters → Common → Calculator'''. Result Array Name '''vMag'''. Formula '''mag(v)'''. '''Apply'''.<br />
<br />
Now, draw contours on the 2d slice.<br />
<br />
*'''Filters → Common → Contour'''. Contour by vMag. Delete the '''Value''', and create a new set using the '''Add a Range of Values''' icon. '''Apply'''.<br />
<br />
A nice visualization is to turn visibility on for '''Slice''' and paint by '''v''', and change '''Contour''' to be a '''Solid Color''', and make that color '''White'''. <br />
<br />
Here is an example with additional '''streamlines''', '''tubes''' and '''glyphs'''.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_contours_on_slices.png|1000px]]<br />
<br />
<br />
<br />
==Gradient, Divergence, Vorticity and and Q Criterion==<br />
The '''Gradient''' filter ('''Advanced''' Properties tab) provides Gradient, Divergence, Vorticity and and Q Criterion. Here is am example, using disk_out_ref.exo. <br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_gradient1.png|1000px]]<br />
<br />
<br />
<br />
==Probing a fluid==<br />
There are numerous ways to probe the cells and points of a fluid. One is with the '''Hover Points On''' and '''Hover Cells On''' icons just above the Renderview. Another is with Interactive Select Cells or Points On. Then, in the Find Data, turn on Cell or Point Labels. Yet another is with the Probe filter. Here is how to use the probe filter.<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
The '''Probe''' filter works much better with '''Auto Apply''' turned on. This is the icon that looks like a tree growing out of a cube.<br />
<br />
*'''Auto Apply''' on<br />
<br />
*'''Filters → Data Analysis → Probe'''. Now, move over '''disk_out_ref.exo''', updating the probed location with the '''p''' key.<br />
<br />
The '''probed''' data will show in the Spreadsheet view.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_probe1.png|1000px]]<br />
<br />
<br />
<br />
==Animating a static vector field==<br />
*If you have a vector field in your data, you can animate a static dataset.<br />
*Our goal is to create a set of streamlines from a vector field, place points on this set of streamlines, and animate the point down the streamlines. We will also add glyphs to the streamline points. <br />
*Open disk_out_ref.exo. '''Apply'''.<br />
*Click the '''-X''' icon.<br />
*'''Stream tracer''' filter. (We are already streamtracing on V). Change Seed Type to '''Point Cloud'''. Optional - I changed the Opacity to 0.4. '''Apply'''.<br />
*'''Contour''' filter. Contour on '''IntegrationTime'''. '''Apply'''.<br />
*'''Glyph''' filter. Vectors '''V'''. No Scale Array. Scale 1. Glyph Mode ''' All Points'''. '''Apply'''.<br />
*View/ Animation View.<br />
*Mode '''Sequence''', No. Frames: '''100'''. <br />
*Change the pulldown box next to the blue '''+''' to be '''Contour'''.<br />
*Click the blue '''+'''. Note it works better if you use 0 for the start.<br />
*Now, click the play button. In the pipeline browser, I also turned off visibility for the Contour filter.<br />
<br />
Lets save this as a movie.<br />
<br />
* '''File → Save Animation'''. Add a file name. Save as a '''.avi'''. '''OK'''. '''OK'''.<br />
<br />
<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_animating_static_field.png|1000px]]<br />
<br />
<br />
<br />
==Volume Rendering==<br />
We are going to paint the fluid by volume rendered temperature. To give context, we are also going to extract the exterior surface, and clip the disk_out_ref in half. We will paint this exterior surface black.<br />
<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Extract Surface'''. '''Apply'''.<br />
*'''Filters → Clip'''. Deselect '''Invert'''. '''Apply'''.<br />
*'''Solid Color'''. Color the clipped surface '''black'''.<br />
*Select '''disk_out_ref.exo''' in the '''Pipeline Browser'''. Paint by '''temp'''. '''Volume Render'''. In the '''Color Editor''', change '''presets''' (looks like a folder with a heart) to be '''Black Body Radiation'''.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_volume_rendering.png|1000px]]</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64702Computational Fluid Dynamics2021-12-14T03:10:14Z<p>Wascott: </p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V. Note that we will reset session (i.e., start from scratch) every section.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*With the mouse, rotate the slices around so you can see both surfaces.<br />
*'''Edit → Reset Session'''. There is also a shortcut icon just above where you have been changing colors. It looks like a green counterclockwise snake eating it's tail.<br />
<br />
<br />
[[Image:cfd_slices2.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_streamtracer1.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers with Custom Source==<br />
We want to create stream tracers from any arbitrary source. This can be a line, spline, circle, elipse or any other curving line. An extreme example would be a cylinder cut by a plane.<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*Change '''vtkBlockColors''' to '''Solid Color'''. Change '''Opacity''' to '''0.3'''.<br />
*'''Sources → Elipse'''. '''Center'''. '''0,0,7'''. '''Major Radius Vector''', '''3,0,0'''. '''Ratio''', '''0.3'''. '''Apply'''.<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
*Select '''disk_out_ref.exo''' in the '''Pipeline Browser'''.<br />
*'''Filters → Alphabetical → Stream Tracer with Custom Source'''. Use '''Elipse''' as the seed source. '''Apply'''. <br />
*Color by: '''Solid Color'''.<br />
<br />
The image below is a merging of Stream Tracers with lines and tubes, and Stream Tracer with Custom Source. I have also played with colors to make it look nicer. If interested, replicating is left to the user.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_streamtracer_with_custom_source.png|1000px]]<br />
<br />
<br />
<br />
==Glyphs perpendicular to a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
<br />
Lets create a half slice. This will be used as the seed plane for glyphs.<br />
<br />
*'''Filters → Common → Slice'''. '''Z Normal'''. Origin '''0, 0, 5'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
Now, apply glyphs.<br />
<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Color by: '''v'''. Change '''Magnitude''' to '''Z'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Representation: '''wireframe'''. In the '''pipeline browser''', click on the '''eyeball''' next to '''disk_out_ref.exo'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*Use the mouse to zoom into the glyph vectors.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_slice_glyph1.png|1000px]]<br />
<br />
<br />
<br />
==Flow in a fluid==<br />
To show a velocity profile we need to sample the dataset with a line, and then create glyphs off of this line. This can be done using a trick in ParaView, i.e., the Plot over Line filter. Note that a Resample to Line filter will be added in ParaView 5.11 or so. <br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
<br />
Lets sample over a line.<br />
<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of '''Point1''' and '''Point2''' to '''1'''. Change the '''Resolution''' to '''40'''. '''Apply'''. <br />
*Close the '''LineChartView'''.<br />
*In the '''Pipeline Browser''', turn visibility off for '''disk_out_ref.exo'''.<br />
<br />
We now have a line sampled through the fluid. Lets calculate the negative Z component of V (so it goes the opposite direction on the line from V). That way we can have two profiles, one with V, and one with Vz. <br />
<br />
*'''Filters → Common → Calculator'''. Change '''Result''' to '''Vz'''. Use '''0*iHat+0+jHat+-v_Z*kHat''' for the formula. '''Apply'''.<br />
<br />
Now we want to create two Glyphs - one from the '''Calculator''' filter, and one directly from the '''Plot over Line''' filter.<br />
<br />
*The '''Calculator''' filter should still be highlighted in the Pipeline Browser.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: Vz'''. '''Scale Array: Vz '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Click on the '''Color Editor''' icon. Change the color to Orange. '''Apply'''.<br />
*In the Pipeline Browser select the '''Plot over Line''' filter.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Click on the '''eyeball''' next to '''disk_out_ref.exo'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
<br />
Just to create a nice image, I'm going to split the views horizontally, and show this visualization also from the side.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile1.png|1000px]]<br />
<br />
<br />
<br />
You can write the data sampled down the line to a .csv file, where you can post process it with tools such as Excel. Here is how to do it.<br />
*Select '''PlotOverLine''' in the Pipeline Browser.<br />
*Split screen vertical. '''Spreadsheet view'''.<br />
*Now, click on the '''Export Scene''' icon, and write the '''Spreadsheet''' down to a '''.csv file'''.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile_spreadsheet.png|1000px]]<br />
<br />
<br />
<br />
==2D plots through a fluid==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of '''Point1''' and '''Point2''' to '''4'''. '''Apply'''.<br />
*In the '''Properties Tab''', turn all variables off other than '''v_Z'''.<br />
*Click on the '''RenderView''', the left '''view'''. <br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_2d_plots.png|1000px]]<br />
<br />
<br />
<br />
==Contours on a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''.<br />
<br />
We need the magnitude for the Contour filter.<br />
<br />
*'''Filters → Common → Calculator'''. Result Array Name '''vMag'''. Formula '''mag(v)'''. '''Apply'''.<br />
<br />
Now, draw contours on the 2d slice.<br />
<br />
*'''Filters → Common → Contour'''. Contour by vMag. Delete the '''Value''', and create a new set using the '''Add a Range of Values''' icon. '''Apply'''.<br />
<br />
A nice visualization is to turn visibility on for '''Slice''' and paint by '''v''', and change '''Contour''' to be a '''Solid Color''', and make that color '''White'''. <br />
<br />
Here is an example with additional '''streamlines''', '''tubes''' and '''glyphs'''.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_contours_on_slices.png|1000px]]<br />
<br />
<br />
<br />
==Gradient, Divergence, Vorticity and and Q Criterion==<br />
The '''Gradient''' filter ('''Advanced''' Properties tab) provides Gradient, Divergence, Vorticity and and Q Criterion. Here is am example, using disk_out_ref.exo. <br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_gradient1.png|1000px]]<br />
<br />
<br />
<br />
==Probing a fluid==<br />
There are numerous ways to probe the cells and points of a fluid. One is with the '''Hover Points On''' and '''Hover Cells On''' icons just above the Renderview. Another is with Interactive Select Cells or Points On. Then, in the Find Data, turn on Cell or Point Labels. Yet another is with the Probe filter. Here is how to use the probe filter.<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
The '''Probe''' filter works much better with '''Auto Apply''' turned on. This is the icon that looks like a tree growing out of a cube.<br />
<br />
*'''Auto Apply''' on<br />
<br />
*'''Filters → Data Analysis → Probe'''. Now, move over '''disk_out_ref.exo''', updating the probed location with the '''p''' key.<br />
<br />
The '''probed''' data will show in the Spreadsheet view.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_probe1.png|1000px]]<br />
<br />
<br />
<br />
==Animating a static vector field==<br />
*If you have a vector field in your data, you can animate a static dataset.<br />
*Our goal is to create a set of streamlines from a vector field, place points on this set of streamlines, and animate the point down the streamlines. We will also add glyphs to the streamline points. <br />
*Open disk_out_ref.exo. '''Apply'''.<br />
*Click the '''-X''' icon.<br />
*'''Stream tracer''' filter. (We are already streamtracing on V). Change Seed Type to '''Point Cloud'''. Optional - I changed the Opacity to 0.4. '''Apply'''.<br />
*'''Contour''' filter. Contour on '''IntegrationTime'''. '''Apply'''.<br />
*'''Glyph''' filter. Vectors '''V'''. No Scale Array. Scale 1. Glyph Mode ''' All Points'''. '''Apply'''.<br />
*View/ Animation View.<br />
*Mode '''Sequence''', No. Frames: '''100'''. <br />
*Change the pulldown box next to the blue '''+''' to be '''Contour'''.<br />
*Click the blue '''+'''. Note it works better if you use 0 for the start.<br />
*Now, click the play button. In the pipeline browser, I also turned off visibility for the Contour filter.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_animating_static_field.png|1000px]]<br />
<br />
<br />
<br />
==Volume Rendering==<br />
We are going to paint the fluid by volume rendered temperature. To give context, we are also going to extract the exterior surface, and clip the disk_out_ref in half. We will paint this exterior surface black.<br />
<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Extract Surface'''. '''Apply'''.<br />
*'''Filters → Clip'''. Deselect '''Invert'''. '''Apply'''.<br />
*'''Solid Color'''. Color the clipped surface '''black'''.<br />
*Select '''disk_out_ref.exo''' in the '''Pipeline Browser'''. Paint by '''temp'''. '''Volume Render'''. In the '''Color Editor''', change '''presets''' (looks like a folder with a heart) to be '''Black Body Radiation'''.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_volume_rendering.png|1000px]]</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64701Computational Fluid Dynamics2021-12-14T02:56:36Z<p>Wascott: </p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V. Note that we will reset session (i.e., start from scratch) every section.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*With the mouse, rotate the slices around so you can see both surfaces.<br />
*'''Edit → Reset Session'''. There is also a shortcut icon just above where you have been changing colors. It looks like a green counterclockwise snake eating it's tail.<br />
<br />
<br />
[[Image:cfd_slices2.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_streamtracer1.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers with Custom Source==<br />
We want to create stream tracers from any arbitrary source. This can be a line, spline, circle, elipse or any other curving line. An extreme example would be a cylinder cut by a plane.<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*Change '''vtkBlockColors''' to '''Solid Color'''. Change '''Opacity''' to '''0.3'''.<br />
*'''Sources → Elipse'''. '''Center'''. '''0,0,7'''. '''Major Radius Vector''', '''3,0,0'''. '''Ratio''', '''0.3'''. '''Apply'''.<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
*Select '''disk_out_ref.exo''' in the '''Pipeline Browser'''.<br />
*'''Filters → Alphabetical → Stream Tracer with Custom Source'''. Use '''Elipse''' as the seed source. '''Apply'''. <br />
*Color by: '''Solid Color'''.<br />
<br />
The image below is a merging of Stream Tracers with lines and tubes, and Stream Tracer with Custom Source. I have also played with colors to make it look nicer. If interested, replicating is left to the user.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_streamtracer_with_custom_source.png|1000px]]<br />
<br />
<br />
<br />
==Glyphs perpendicular to a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
<br />
Lets create a half slice. This will be used as the seed plane for glyphs.<br />
<br />
*'''Filters → Common → Slice'''. '''Z Normal'''. Origin '''0, 0, 5'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
Now, apply glyphs.<br />
<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Color by: '''v'''. Change '''Magnitude''' to '''Z'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Representation: '''wireframe'''. In the '''pipeline browser''', click on the '''eyeball''' next to '''disk_out_ref.exo'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*Use the mouse to zoom into the glyph vectors.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_slice_glyph1.png|1000px]]<br />
<br />
<br />
<br />
==Flow in a fluid==<br />
To show a velocity profile we need to sample the dataset with a line, and then create glyphs off of this line. This can be done using a trick in ParaView, i.e., the Plot over Line filter. Note that a Resample to Line filter will be added in ParaView 5.11 or so. <br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
<br />
Lets sample over a line.<br />
<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of '''Point1''' and '''Point2''' to '''1'''. Change the '''Resolution''' to '''40'''. '''Apply'''. <br />
*Close the '''LineChartView'''.<br />
*In the '''Pipeline Browser''', turn visibility off for '''disk_out_ref.exo'''.<br />
<br />
We now have a line sampled through the fluid. Lets calculate the negative Z component of V (so it goes the opposite direction on the line from V). That way we can have two profiles, one with V, and one with Vz. <br />
<br />
*'''Filters → Common → Calculator'''. Change '''Result''' to '''Vz'''. Use '''0*iHat+0+jHat+-v_Z*kHat''' for the formula. '''Apply'''.<br />
<br />
Now we want to create two Glyphs - one from the '''Calculator''' filter, and one directly from the '''Plot over Line''' filter.<br />
<br />
*The '''Calculator''' filter should still be highlighted in the Pipeline Browser.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: Vz'''. '''Scale Array: Vz '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Click on the '''Color Editor''' icon. Change the color to Orange. '''Apply'''.<br />
*In the Pipeline Browser select the '''Plot over Line''' filter.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Click on the '''eyeball''' next to '''disk_out_ref.exo'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
<br />
Just to create a nice image, I'm going to split the views horizontally, and show this visualization also from the side.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile1.png|1000px]]<br />
<br />
<br />
<br />
You can write the data sampled down the line to a .csv file, where you can post process it with tools such as Excel. Here is how to do it.<br />
*Select '''PlotOverLine''' in the Pipeline Browser.<br />
*Split screen vertical. '''Spreadsheet view'''.<br />
*Now, click on the '''Export Scene''' icon, and write the '''Spreadsheet''' down to a '''.csv file'''.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile_spreadsheet.png|1000px]]<br />
<br />
<br />
<br />
==2D plots through a fluid==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of '''Point1''' and '''Point2''' to '''4'''. '''Apply'''.<br />
*In the '''Properties Tab''', turn all variables off other than '''v_Z'''.<br />
*Click on the '''RenderView''', the left '''view'''. <br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_2d_plots.png|1000px]]<br />
<br />
<br />
<br />
==Contours on a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Slice'''. '''Apply'''.<br />
<br />
We need the magnitude for the Contour filter.<br />
<br />
*'''Filters → Calculator'''. Result Array Name '''vMag'''. Formula '''mag(v)'''. '''Apply'''.<br />
<br />
Now, draw contours on the 2d slice.<br />
<br />
*'''Filters → Contour'''. Contour by vMag. Delete the '''Value''', and create a new on using the '''Add a Range of Values''' icon. '''Apply'''.<br />
<br />
Here is an example with additional '''streamlines''', '''tubes''' and '''glyphs'''.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_contours_on_slices.png|1000px]]<br />
<br />
<br />
<br />
==Gradient, Divergence, Vorticity and and Q Criterion==<br />
The '''Gradient''' filter ('''Advanced''' Properties tab) provides Gradient, Divergence, Vorticity and and Q Criterion. Here is am example, using disk_out_ref.exo. <br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_gradient1.png|1000px]]<br />
<br />
<br />
<br />
==Probing a fluid==<br />
There are numerous ways to probe the cells and points of a fluid. One is with the '''Hover Points On''' and '''Hover Cells On''' icons just above the Renderview. Another is with Interactive Select Cells or Points On. Then, in the Find Data, turn on Cell or Point Labels. Yet another is with the Probe filter. Here is how to use the probe filter.<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
The '''Probe''' filter works much better with '''Auto Apply''' turned on. This is the icon that looks like a tree growing out of a cube.<br />
<br />
*'''Auto Apply''' on<br />
<br />
*'''Filters → Data Analysis → Probe'''. Now, move over '''disk_out_ref.exo''', updating the probed location with the '''p''' key.<br />
<br />
The '''probed''' data will show in the Spreadsheet view.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_probe1.png|1000px]]<br />
<br />
<br />
<br />
==Animating a static vector field==<br />
*If you have a vector field in your data, you can animate a static dataset.<br />
*Our goal is to create a set of streamlines from a vector field, place points on this set of streamlines, and animate the point down the streamlines. We will also add glyphs to the streamline points. <br />
*Open disk_out_ref.exo. '''Apply'''.<br />
*Click the '''-X''' icon.<br />
*'''Stream tracer''' filter. (We are already streamtracing on V). Change Seed Type to '''Point Cloud'''. Optional - I changed the Opacity to 0.4. '''Apply'''.<br />
*'''Contour''' filter. Contour on '''IntegrationTime'''. '''Apply'''.<br />
*'''Glyph''' filter. Vectors '''V'''. No Scale Array. Scale 1. Glyph Mode ''' All Points'''. '''Apply'''.<br />
*View/ Animation View.<br />
*Mode '''Sequence''', No. Frames: '''100'''. <br />
*Change the pulldown box next to the blue '''+''' to be '''Contour'''.<br />
*Click the blue '''+'''. Note it works better if you use 0 for the start.<br />
*Now, click the play button. In the pipeline browser, I also turned off visibility for the Contour filter.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_animating_static_field.png|1000px]]<br />
<br />
<br />
<br />
==Volume Rendering==<br />
We are going to paint the fluid by volume rendered temperature. To give context, we are also going to extract the exterior surface, and clip the disk_out_ref in half. We will paint this exterior surface black.<br />
<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Extract Surface'''. '''Apply'''.<br />
*'''Filters → Clip'''. Deselect '''Invert'''. '''Apply'''.<br />
*'''Solid Color'''. Color the clipped surface '''black'''.<br />
*Select '''disk_out_ref.exo''' in the '''Pipeline Browser'''. Paint by '''temp'''. '''Volume Render'''. In the '''Color Editor''', change '''presets''' (looks like a folder with a heart) to be '''Black Body Radiation'''.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_volume_rendering.png|1000px]]</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64700Computational Fluid Dynamics2021-12-14T02:18:10Z<p>Wascott: </p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V. Note that we will reset session (i.e., start from scratch) every section.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*With the mouse, rotate the slices around so you can see both surfaces.<br />
*'''Edit → Reset Session'''. There is also a shortcut icon just above where you have been changing colors.<br />
<br />
<br />
[[Image:cfd_slices2.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_streamtracer1.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers with Custom Source==<br />
We want to create stream tracers from any arbitrary source. This can be a line, spline, circle, elipse or any other curving line. An extreme example would be a cylinder cut by a plane.<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*Change '''vtkBlockColors''' to '''Solid Color'''. Change '''Opacity''' to '''0.3'''.<br />
*'''Sources → Elipse'''. '''Center'''. '''0,0,7'''. '''Major Radius Vector''', '''3,0,0'''. '''Ratio''', '''0.3'''. '''Apply'''.<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
*Select '''disk_out_ref.exo''' in the '''Pipeline Browser'''.<br />
*'''Filters → Alphabetical → Stream Tracer with Custom Source'''. Use '''Elipse''' as the seed source. '''Apply'''. <br />
*Color by: '''Solid Color'''.<br />
<br />
The image below is a merging of Stream Tracers with lines and tubes, and Stream Tracer with Custom Source. I have also played with colors to make it look nicer. If interested, replicating is left to the user.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_streamtracer_with_custom_source.png|1000px]]<br />
<br />
<br />
<br />
==Glyphs perpendicular to a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
<br />
Lets create a half slice. This will be used as the seed plane for glyphs.<br />
<br />
*'''Filters → Common → Slice'''. Origin '''0, 0, 5'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
Now, apply glyphs.<br />
<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Color by: '''v'''. Change '''Magnitude''' to '''Z'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Representation: '''wireframe'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*Use the mouse to zoom into the glyph vectors.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_slice_glyph1.png|1000px]]<br />
<br />
<br />
<br />
==Flow in a fluid==<br />
To show a velocity profile we need to sample the dataset with a line, and then create glyphs off of this line. This can be done using a trick in ParaView, i.e., the Plot over Line filter. Note that a Resample to Line filter will be added in ParaView 5.11 or so. <br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
<br />
Lets sample over a line.<br />
<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of '''Point1''' and '''Point2''' to '''1'''. Change the '''Resolution''' to '''40'''. '''Apply'''. <br />
*Close the '''LineChartView'''.<br />
*In the '''Pipeline Browser''', turn visibility off for '''disk_out_ref.exo'''.<br />
<br />
We now have a line sampled through the fluid. Lets calculate the negative Z component of V (so it goes the opposite direction on the line from V). That way we can have two profiles, one with V, and one with Vz. <br />
<br />
*'''Filters → Common → Calculator'''. Change '''Result''' to '''Vz'''. Use '''0*iHat+0+jHat+-v_Z*kHat''' for the formula. '''Apply'''.<br />
<br />
Now we want to create two Glyphs - one from the '''Calculator''' filter, and one directly from the '''Plot over Line''' filter.<br />
<br />
*The '''Calculator''' filter should still be highlighted in the Pipeline Browser.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: Vz'''. '''Scale Array: Vz '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Click on the '''Color Editor''' icon. Change the color to Orange. '''Apply'''.<br />
*In the Pipeline Browser select the '''Plot over Line''' filter.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
<br />
Just to create a nice image, I'm going to split the views horizontally, and show this visualization also from the side.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile1.png|1000px]]<br />
<br />
<br />
<br />
You can write the data sampled down the line to a .csv file, where you can post process it with tools such as Excel. Here is how to do it.<br />
*Select '''PlotOverLine''' in the Pipeline Browser.<br />
*Split screen vertical. '''Spreadsheet view'''.<br />
*Now, click on the '''Export Scene''' icon, and write the '''Spreadsheet''' down to a '''.csv file'''.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile_spreadsheet.png|1000px]]<br />
<br />
<br />
<br />
==2D plots through a fluid==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of '''Point1''' and '''Point2''' to '''4'''. '''Apply'''.<br />
*In the '''Properties Tab''', turn all variables off other than '''v_Z'''.<br />
*Click on the '''RenderView''', the left '''view'''. <br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_2d_plots.png|1000px]]<br />
<br />
<br />
<br />
==Contours on a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Slice'''. '''Apply'''.<br />
<br />
We need the magnitude for the Contour filter.<br />
<br />
*'''Filters → Calculator'''. Result Array Name '''vMag'''. Formula '''mag(v)'''. '''Apply'''.<br />
<br />
Now, draw contours on the 2d slice.<br />
<br />
*'''Filters → Contour'''. Contour by vMag. Delete the '''Value''', and create a new on using the '''Add a Range of Values''' icon. '''Apply'''.<br />
<br />
Here is an example with additional '''streamlines''', '''tubes''' and '''glyphs'''.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_contours_on_slices.png|1000px]]<br />
<br />
<br />
<br />
==Gradient, Divergence, Vorticity and and Q Criterion==<br />
The '''Gradient''' filter ('''Advanced''' Properties tab) provides Gradient, Divergence, Vorticity and and Q Criterion. Here is am example, using disk_out_ref.exo. <br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_gradient1.png|1000px]]<br />
<br />
<br />
<br />
==Probing a fluid==<br />
There are numerous ways to probe the cells and points of a fluid. One is with the '''Hover Points On''' and '''Hover Cells On''' icons just above the Renderview. Another is with Interactive Select Cells or Points On. Then, in the Find Data, turn on Cell or Point Labels. Yet another is with the Probe filter. Here is how to use the probe filter.<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
The '''Probe''' filter works much better with '''Auto Apply''' turned on. This is the icon that looks like a tree growing out of a cube.<br />
<br />
*'''Auto Apply''' on<br />
<br />
*'''Filters → Data Analysis → Probe'''. Now, move over '''disk_out_ref.exo''', updating the probed location with the '''p''' key.<br />
<br />
The '''probed''' data will show in the Spreadsheet view.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_probe1.png|1000px]]<br />
<br />
<br />
<br />
==Animating a static vector field==<br />
*If you have a vector field in your data, you can animate a static dataset.<br />
*Our goal is to create a set of streamlines from a vector field, place points on this set of streamlines, and animate the point down the streamlines. We will also add glyphs to the streamline points. <br />
*Open disk_out_ref.exo. '''Apply'''.<br />
*Click the '''-X''' icon.<br />
*'''Stream tracer''' filter. (We are already streamtracing on V). Change Seed Type to '''Point Cloud'''. Optional - I changed the Opacity to 0.4. '''Apply'''.<br />
*'''Contour''' filter. Contour on '''IntegrationTime'''. '''Apply'''.<br />
*'''Glyph''' filter. Vectors '''V'''. No Scale Array. Scale 1. Glyph Mode ''' All Points'''. '''Apply'''.<br />
*View/ Animation View.<br />
*Mode '''Sequence''', No. Frames: '''100'''. <br />
*Change the pulldown box next to the blue '''+''' to be '''Contour'''.<br />
*Click the blue '''+'''. Note it works better if you use 0 for the start.<br />
*Now, click the play button. In the pipeline browser, I also turned off visibility for the Contour filter.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_animating_static_field.png|1000px]]<br />
<br />
<br />
<br />
==Volume Rendering==<br />
We are going to paint the fluid by volume rendered temperature. To give context, we are also going to extract the exterior surface, and clip the disk_out_ref in half. We will paint this exterior surface black.<br />
<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Extract Surface'''. '''Apply'''.<br />
*'''Filters → Clip'''. Deselect '''Invert'''. '''Apply'''.<br />
*'''Solid Color'''. Color the clipped surface '''black'''.<br />
*Select '''disk_out_ref.exo''' in the '''Pipeline Browser'''. Paint by '''temp'''. '''Volume Render'''. In the '''Color Editor''', change '''presets''' (looks like a folder with a heart) to be '''Black Body Radiation'''.<br />
*'''Edit → Reset Session'''.<br />
<br />
<br />
[[Image:cfd_volume_rendering.png|1000px]]</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64688Computational Fluid Dynamics2021-12-09T23:46:40Z<p>Wascott: /* Stream Tracers with Custom Source */</p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*With the mouse, rotate the slices around so you can see both surfaces.<br />
<br />
<br />
[[Image:cfd_slices2.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
*'''Reset'''<br />
<br />
<br />
[[Image:cfd_streamtracer1.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers with Custom Source==<br />
We want to create stream tracers from any arbitrary source. This can be a line, spline, circle, elipse or any other curving line. An extreme example would be a cylinder cut by a plane.<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*Change '''vtkBlockColors''' to '''Solid Color'''. Change '''Opacity''' to '''0.3'''.<br />
*'''Sources → Elipse'''. '''Center'''. '''0,0,7'''. '''Major Radius Vector''', '''3,0,0'''. '''Ratio''', '''0.3'''. '''Apply'''.<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
*Select '''disk_out_ref.exo''' in the '''Pipeline Browser'''.<br />
*'''Filters → Alphabetical → Stream Tracer with Custom Source'''. Use '''Elipse''' as the seed source. '''Apply'''. <br />
*Color by: '''Solid Color'''.<br />
<br />
The image below is a merging of Stream Tracers with lines and tubes, and Stream Tracer with Custom Source. I have also played with colors to make it look nicer. If interested, replicating is left to the user.<br />
<br />
<br />
[[Image:cfd_streamtracer_with_custom_source.png|1000px]]<br />
<br />
==Glyphs perpendicular to a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
<br />
Lets create a half slice. This will be used as the seed plane for glyphs.<br />
<br />
*'''Filters → Common → Slice'''. Origin '''0, 0, 5'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
Now, apply glyphs.<br />
<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Color by: '''v'''. Change '''Magnitude''' to '''Z'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Representation: '''wireframe'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*Use the mouse to zoom into the glyph vectors.<br />
<br />
<br />
[[Image:cfd_slice_glyph1.png|1000px]]<br />
<br />
<br />
<br />
==Flow in a fluid==<br />
To show a velocity profile we need to sample the dataset with a line, and then create glyphs off of this line. This can be done using a trick in ParaView, i.e., the Plot over Line filter. Note that a Resample to Line filter will be added in ParaView 5.11 or so. <br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
<br />
Lets sample over a line.<br />
<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of '''Point1''' and '''Point2''' to '''1'''. Change the '''Resolution''' to '''40'''. '''Apply'''. <br />
*Close the '''LineChartView'''.<br />
*In the '''Pipeline Browser''', turn visibility off for '''disk_out_ref.exo'''.<br />
<br />
We now have a line sampled through the fluid. Lets calculate the negative Z component of V (so it goes the opposite direction on the line from V). That way we can have two profiles, one with V, and one with Vz. <br />
<br />
*'''Filters → Common → Calculator'''. Change '''Result''' to '''Vz'''. Use '''0*iHat+0+jHat+-v_Z*kHat''' for the formula. '''Apply'''.<br />
<br />
Now we want to create two Glyphs - one from the '''Calculator''' filter, and one directly from the '''Plot over Line''' filter.<br />
<br />
*The '''Calculator''' filter should still be highlighted in the Pipeline Browser.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: Vz'''. '''Scale Array: Vz '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Click on the '''Color Editor''' icon. Change the color to Orange. '''Apply'''.<br />
*In the Pipeline Browser select the '''Plot over Line''' filter.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
<br />
Just to create a nice image, I'm going to split the views horizontally, and show this visualization also from the side.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile1.png|1000px]]<br />
<br />
<br />
<br />
You can write the data sampled down the line to a .csv file, where you can post process it with tools such as Excel. Here is how to do it.<br />
*Select '''PlotOverLine''' in the Pipeline Browser.<br />
*Split screen vertical. '''Spreadsheet view'''.<br />
*Now, click on the '''Export Scene''' icon, and write the '''Spreadsheet''' down to a '''.csv file'''.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile_spreadsheet.png|1000px]]<br />
<br />
<br />
<br />
==2D plots through a fluid==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of '''Point1''' and '''Point2''' to '''4'''. '''Apply'''.<br />
*In the '''Properties Tab''', turn all variables off other than '''v_Z'''.<br />
*Click on the '''RenderView''', the left '''view'''. <br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
<br />
<br />
[[Image:cfd_2d_plots.png|1000px]]<br />
<br />
<br />
<br />
==Contours on a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Slice'''. '''Apply'''.<br />
<br />
We need the magnitude for the Contour filter.<br />
<br />
*'''Filters → Calculator'''. Result Array Name '''vMag'''. Formula '''mag(v)'''. '''Apply'''.<br />
<br />
Now, draw contours on the 2d slice.<br />
<br />
*'''Filters → Contour'''. Contour by vMag. Delete the '''Value''', and create a new on using the '''Add a Range of Values''' icon. '''Apply'''.<br />
<br />
Here is an example with additional '''streamlines''', '''tubes''' and '''glyphs'''.<br />
<br />
<br />
[[Image:cfd_contours_on_slices.png|1000px]]<br />
<br />
<br />
<br />
==Gradient, Divergence, Vorticity and and Q Criterion==<br />
The '''Gradient''' filter ('''Advanced''' Properties tab) provides Gradient, Divergence, Vorticity and and Q Criterion. Here is am example, using disk_out_ref.exo. <br />
<br />
<br />
[[Image:cfd_gradient1.png|1000px]]<br />
<br />
<br />
<br />
==Probing a fluid==<br />
There are numerous ways to probe the cells and points of a fluid. One is with the '''Hover Points On''' and '''Hover Cells On''' icons just above the Renderview. Another is with Interactive Select Cells or Points On. Then, in the Find Data, turn on Cell or Point Labels. Yet another is with the Probe filter. Here is how to use the probe filter.<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
The '''Probe''' filter works much better with '''Auto Apply''' turned on. This is the icon that looks like a tree growing out of a cube.<br />
<br />
*'''Auto Apply''' on<br />
<br />
*'''Filters → Data Analysis → Probe'''. Now, move over '''disk_out_ref.exo''', updating the probed location with the '''p''' key.<br />
<br />
The '''probed''' data will show in the Spreadsheet view.<br />
<br />
<br />
[[Image:cfd_probe1.png|1000px]]<br />
<br />
<br />
<br />
==Animating a static vector field==<br />
*If you have a vector field in your data, you can animate a static dataset.<br />
*Our goal is to create a set of streamlines from a vector field, place points on this set of streamlines, and animate the point down the streamlines. We will also add glyphs to the streamline points. <br />
*Open disk_out_ref.exo. '''Apply'''.<br />
*Click the '''-X''' icon.<br />
*'''Stream tracer''' filter. (We are already streamtracing on V). Change Seed Type to '''Point Cloud'''. Optional - I changed the Opacity to 0.4. '''Apply'''.<br />
*'''Contour''' filter. Contour on '''IntegrationTime'''. '''Apply'''.<br />
*'''Glyph''' filter. Vectors '''V'''. No Scale Array. Scale 1. Glyph Mode ''' All Points'''. '''Apply'''.<br />
*View/ Animation View.<br />
*Mode '''Sequence''', No. Frames: '''100'''. <br />
*Change the pulldown box next to the blue '''+''' to be '''Contour'''.<br />
*Click the blue '''+'''. Note it works better if you use 0 for the start.<br />
*Now, click the play button. In the pipeline browser, I also turned off visibility for the Contour filter.<br />
<br />
<br />
[[Image:cfd_animating_static_field.png|1000px]]<br />
<br />
<br />
<br />
==Volume Rendering==<br />
We are going to paint the fluid by volume rendered temperature. To give context, we are also going to extract the exterior surface, and clip the disk_out_ref in half. We will paint this exterior surface black.<br />
<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Extract Surface'''. '''Apply'''.<br />
*'''Filters → Clip'''. Deselect '''Invert'''. '''Apply'''.<br />
*'''Solid Color'''. Color the clipped surface '''black'''.<br />
*Select '''disk_out_ref.exo''' in the '''Pipeline Browser'''. Paint by '''temp'''. '''Volume Render'''. In the '''Color Editor''', change '''presets''' (looks like a folder with a heart) to be '''Black Body Radiation'''.<br />
<br />
<br />
[[Image:cfd_volume_rendering.png|1000px]]</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64687Computational Fluid Dynamics2021-11-25T03:24:31Z<p>Wascott: </p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*With the mouse, rotate the slices around so you can see both surfaces.<br />
<br />
<br />
[[Image:cfd_slices2.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
*'''Reset'''<br />
<br />
<br />
[[Image:cfd_streamtracer1.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers with Custom Source==<br />
We want to create stream tracers from any arbitrary source. This can be a line, spline, circle, elipse or any other curving line. An extreme example would be a cylinder cut by a plane.<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*Change '''vtkBlockColors''' to '''Solid Color'''. Change '''Opacity''' to '''0.3'''.<br />
*'''Sources → Elipse'''. '''Center'''. '''0,0,7'''. '''Major Radius Vector''', '''0,0,3'''. '''Ratio''', '''0.3'''. '''Apply'''.<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
*Select the '''Elipse''' filter in the '''Pipeline Browser'''.<br />
*'''Filters → Common → Stream Tracer with Custom Source'''. Use '''Elipse''' as the seed source. '''Apply'''. <br />
*Color by: '''Solid Color'''.<br />
<br />
The image below is a merging of Stream Tracers with lines and tubes, and Stream Tracer with Custom Source. I have also played with colors to make it look nicer. If interested, replicating is left to the user.<br />
<br />
<br />
[[Image:cfd_streamtracer_with_custom_source.png|1000px]]<br />
<br />
<br />
<br />
==Glyphs perpendicular to a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
<br />
Lets create a half slice. This will be used as the seed plane for glyphs.<br />
<br />
*'''Filters → Common → Slice'''. Origin '''0, 0, 5'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
Now, apply glyphs.<br />
<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Color by: '''v'''. Change '''Magnitude''' to '''Z'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Representation: '''wireframe'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*Use the mouse to zoom into the glyph vectors.<br />
<br />
<br />
[[Image:cfd_slice_glyph1.png|1000px]]<br />
<br />
<br />
<br />
==Flow in a fluid==<br />
To show a velocity profile we need to sample the dataset with a line, and then create glyphs off of this line. This can be done using a trick in ParaView, i.e., the Plot over Line filter. Note that a Resample to Line filter will be added in ParaView 5.11 or so. <br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
<br />
Lets sample over a line.<br />
<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of '''Point1''' and '''Point2''' to '''1'''. Change the '''Resolution''' to '''40'''. '''Apply'''. <br />
*Close the '''LineChartView'''.<br />
*In the '''Pipeline Browser''', turn visibility off for '''disk_out_ref.exo'''.<br />
<br />
We now have a line sampled through the fluid. Lets calculate the negative Z component of V (so it goes the opposite direction on the line from V). That way we can have two profiles, one with V, and one with Vz. <br />
<br />
*'''Filters → Common → Calculator'''. Change '''Result''' to '''Vz'''. Use '''0*iHat+0+jHat+-v_Z*kHat''' for the formula. '''Apply'''.<br />
<br />
Now we want to create two Glyphs - one from the '''Calculator''' filter, and one directly from the '''Plot over Line''' filter.<br />
<br />
*The '''Calculator''' filter should still be highlighted in the Pipeline Browser.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: Vz'''. '''Scale Array: Vz '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Click on the '''Color Editor''' icon. Change the color to Orange. '''Apply'''.<br />
*In the Pipeline Browser select the '''Plot over Line''' filter.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
<br />
Just to create a nice image, I'm going to split the views horizontally, and show this visualization also from the side.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile1.png|1000px]]<br />
<br />
<br />
<br />
You can write the data sampled down the line to a .csv file, where you can post process it with tools such as Excel. Here is how to do it.<br />
*Select '''PlotOverLine''' in the Pipeline Browser.<br />
*Split screen vertical. '''Spreadsheet view'''.<br />
*Now, click on the '''Export Scene''' icon, and write the '''Spreadsheet''' down to a '''.csv file'''.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile_spreadsheet.png|1000px]]<br />
<br />
<br />
<br />
==2D plots through a fluid==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of '''Point1''' and '''Point2''' to '''4'''. '''Apply'''.<br />
*In the '''Properties Tab''', turn all variables off other than '''v_Z'''.<br />
*Click on the '''RenderView''', the left '''view'''. <br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
<br />
<br />
[[Image:cfd_2d_plots.png|1000px]]<br />
<br />
<br />
<br />
==Contours on a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Slice'''. '''Apply'''.<br />
<br />
We need the magnitude for the Contour filter.<br />
<br />
*'''Filters → Calculator'''. Result Array Name '''vMag'''. Formula '''mag(v)'''. '''Apply'''.<br />
<br />
Now, draw contours on the 2d slice.<br />
<br />
*'''Filters → Contour'''. Contour by vMag. Delete the '''Value''', and create a new on using the '''Add a Range of Values''' icon. '''Apply'''.<br />
<br />
Here is an example with additional '''streamlines''', '''tubes''' and '''glyphs'''.<br />
<br />
<br />
[[Image:cfd_contours_on_slices.png|1000px]]<br />
<br />
<br />
<br />
==Gradient, Divergence, Vorticity and and Q Criterion==<br />
The '''Gradient''' filter ('''Advanced''' Properties tab) provides Gradient, Divergence, Vorticity and and Q Criterion. Here is am example, using disk_out_ref.exo. <br />
<br />
<br />
[[Image:cfd_gradient1.png|1000px]]<br />
<br />
<br />
<br />
==Probing a fluid==<br />
There are numerous ways to probe the cells and points of a fluid. One is with the '''Hover Points On''' and '''Hover Cells On''' icons just above the Renderview. Another is with Interactive Select Cells or Points On. Then, in the Find Data, turn on Cell or Point Labels. Yet another is with the Probe filter. Here is how to use the probe filter.<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
The '''Probe''' filter works much better with '''Auto Apply''' turned on. This is the icon that looks like a tree growing out of a cube.<br />
<br />
*'''Auto Apply''' on<br />
<br />
*'''Filters → Data Analysis → Probe'''. Now, move over '''disk_out_ref.exo''', updating the probed location with the '''p''' key.<br />
<br />
The '''probed''' data will show in the Spreadsheet view.<br />
<br />
<br />
[[Image:cfd_probe1.png|1000px]]<br />
<br />
<br />
<br />
==Animating a static vector field==<br />
*If you have a vector field in your data, you can animate a static dataset.<br />
*Our goal is to create a set of streamlines from a vector field, place points on this set of streamlines, and animate the point down the streamlines. We will also add glyphs to the streamline points. <br />
*Open disk_out_ref.exo. '''Apply'''.<br />
*Click the '''-X''' icon.<br />
*'''Stream tracer''' filter. (We are already streamtracing on V). Change Seed Type to '''Point Cloud'''. Optional - I changed the Opacity to 0.4. '''Apply'''.<br />
*'''Contour''' filter. Contour on '''IntegrationTime'''. '''Apply'''.<br />
*'''Glyph''' filter. Vectors '''V'''. No Scale Array. Scale 1. Glyph Mode ''' All Points'''. '''Apply'''.<br />
*View/ Animation View.<br />
*Mode '''Sequence''', No. Frames: '''100'''. <br />
*Change the pulldown box next to the blue '''+''' to be '''Contour'''.<br />
*Click the blue '''+'''. Note it works better if you use 0 for the start.<br />
*Now, click the play button. In the pipeline browser, I also turned off visibility for the Contour filter.<br />
<br />
<br />
[[Image:cfd_animating_static_field.png|1000px]]<br />
<br />
<br />
<br />
==Volume Rendering==<br />
We are going to paint the fluid by volume rendered temperature. To give context, we are also going to extract the exterior surface, and clip the disk_out_ref in half. We will paint this exterior surface black.<br />
<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Extract Surface'''. '''Apply'''.<br />
*'''Filters → Clip'''. Deselect '''Invert'''. '''Apply'''.<br />
*'''Solid Color'''. Color the clipped surface '''black'''.<br />
*Select '''disk_out_ref.exo''' in the '''Pipeline Browser'''. Paint by '''temp'''. '''Volume Render'''. In the '''Color Editor''', change '''presets''' (looks like a folder with a heart) to be '''Black Body Radiation'''.<br />
<br />
<br />
[[Image:cfd_volume_rendering.png|1000px]]</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64686Computational Fluid Dynamics2021-11-25T03:23:03Z<p>Wascott: /* Stream Tracers with Custom Source */</p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*With the mouse, rotate the slices around so you can see both surfaces.<br />
<br />
<br />
[[Image:cfd_slices2.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
*'''Reset'''<br />
<br />
<br />
[[Image:cfd_streamtracer1.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers with Custom Source==<br />
We want to create stream tracers from any arbitrary source. This can be a line, spline, circle, elipse or any other curving line. An extreme example would be a cylinder cut by a plane.<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*Change '''vtkBlockColors''' to '''Solid Color'''. Change '''Opacity''' to '''0.3'''.<br />
*'''Sources → Elipse'''. '''Center'''. '''0,0,7'''. '''Major Radius Vector''', '''0,0,3'''. '''Ratio''', '''0.3'''. '''Apply'''.<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
*Select the '''Elipse''' filter in the '''Pipeline Browser'''.<br />
*'''Filters → Common → Stream Tracer with Custom Source'''. Use '''Elipse''' as the seed source. '''Apply'''. <br />
*Color by: '''Solid Color'''.<br />
<br />
The image below is a merging of Stream Tracers with lines and tubes, and Stream Tracer with Custom Source. I have also played with colors to make it look nicer. If interested, replicating is left to the user.<br />
<br />
<br />
[[Image:cfd_streamtracer_with_custom_source.png|1000px]]<br />
<br />
==Glyphs perpendicular to a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
<br />
Lets create a half slice. This will be used as the seed plane for glyphs.<br />
<br />
*'''Filters → Common → Slice'''. Origin '''0, 0, 5'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
Now, apply glyphs.<br />
<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Color by: '''v'''. Change '''Magnitude''' to '''Z'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Representation: '''wireframe'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*Use the mouse to zoom into the glyph vectors.<br />
<br />
<br />
[[Image:cfd_slice_glyph1.png|1000px]]<br />
<br />
<br />
<br />
==Flow in a fluid==<br />
To show a velocity profile we need to sample the dataset with a line, and then create glyphs off of this line. This can be done using a trick in ParaView, i.e., the Plot over Line filter. Note that a Resample to Line filter will be added in ParaView 5.11 or so. <br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
<br />
Lets sample over a line.<br />
<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of '''Point1''' and '''Point2''' to '''1'''. Change the '''Resolution''' to '''40'''. '''Apply'''. <br />
*Close the '''LineChartView'''.<br />
*In the '''Pipeline Browser''', turn visibility off for '''disk_out_ref.exo'''.<br />
<br />
We now have a line sampled through the fluid. Lets calculate the negative Z component of V (so it goes the opposite direction on the line from V). That way we can have two profiles, one with V, and one with Vz. <br />
<br />
*'''Filters → Common → Calculator'''. Change '''Result''' to '''Vz'''. Use '''0*iHat+0+jHat+-v_Z*kHat''' for the formula. '''Apply'''.<br />
<br />
Now we want to create two Glyphs - one from the '''Calculator''' filter, and one directly from the '''Plot over Line''' filter.<br />
<br />
*The '''Calculator''' filter should still be highlighted in the Pipeline Browser.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: Vz'''. '''Scale Array: Vz '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Click on the '''Color Editor''' icon. Change the color to Orange. '''Apply'''.<br />
*In the Pipeline Browser select the '''Plot over Line''' filter.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
<br />
Just to create a nice image, I'm going to split the views horizontally, and show this visualization also from the side.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile1.png|1000px]]<br />
<br />
<br />
<br />
You can write the data sampled down the line to a .csv file, where you can post process it with tools such as Excel. Here is how to do it.<br />
*Select '''PlotOverLine''' in the Pipeline Browser.<br />
*Split screen vertical. '''Spreadsheet view'''.<br />
*Now, click on the '''Export Scene''' icon, and write the '''Spreadsheet''' down to a '''.csv file'''.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile_spreadsheet.png|1000px]]<br />
<br />
<br />
<br />
<br />
==2D plots through a fluid==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of '''Point1''' and '''Point2''' to '''4'''. '''Apply'''.<br />
*In the '''Properties Tab''', turn all variables off other than '''v_Z'''.<br />
*Click on the '''RenderView''', the left '''view'''. <br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
<br />
<br />
[[Image:cfd_2d_plots.png|1000px]]<br />
<br />
<br />
<br />
==Contours on a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Slice'''. '''Apply'''.<br />
<br />
We need the magnitude for the Contour filter.<br />
<br />
*'''Filters → Calculator'''. Result Array Name '''vMag'''. Formula '''mag(v)'''. '''Apply'''.<br />
<br />
Now, draw contours on the 2d slice.<br />
<br />
*'''Filters → Contour'''. Contour by vMag. Delete the '''Value''', and create a new on using the '''Add a Range of Values''' icon. '''Apply'''.<br />
<br />
Here is an example with additional '''streamlines''', '''tubes''' and '''glyphs'''.<br />
<br />
<br />
[[Image:cfd_contours_on_slices.png|1000px]]<br />
<br />
<br />
<br />
==Gradient, Divergence, Vorticity and and Q Criterion==<br />
The '''Gradient''' filter ('''Advanced''' Properties tab) provides Gradient, Divergence, Vorticity and and Q Criterion. Here is am example, using disk_out_ref.exo. <br />
<br />
<br />
[[Image:cfd_gradient1.png|1000px]]<br />
<br />
<br />
<br />
<br />
==Probing a fluid==<br />
There are numerous ways to probe the cells and points of a fluid. One is with the '''Hover Points On''' and '''Hover Cells On''' icons just above the Renderview. Another is with Interactive Select Cells or Points On. Then, in the Find Data, turn on Cell or Point Labels. Yet another is with the Probe filter. Here is how to use the probe filter.<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
The '''Probe''' filter works much better with '''Auto Apply''' turned on. This is the icon that looks like a tree growing out of a cube.<br />
<br />
*'''Auto Apply''' on<br />
<br />
*'''Filters → Data Analysis → Probe'''. Now, move over '''disk_out_ref.exo''', updating the probed location with the '''p''' key.<br />
<br />
The '''probed''' data will show in the Spreadsheet view.<br />
<br />
<br />
[[Image:cfd_probe1.png|1000px]]<br />
<br />
==Animating a static vector field==<br />
*If you have a vector field in your data, you can animate a static dataset.<br />
*Our goal is to create a set of streamlines from a vector field, place points on this set of streamlines, and animate the point down the streamlines. We will also add glyphs to the streamline points. <br />
*Open disk_out_ref.exo. '''Apply'''.<br />
*Click the '''-X''' icon.<br />
*'''Stream tracer''' filter. (We are already streamtracing on V). Change Seed Type to '''Point Cloud'''. Optional - I changed the Opacity to 0.4. '''Apply'''.<br />
*'''Contour''' filter. Contour on '''IntegrationTime'''. '''Apply'''.<br />
*'''Glyph''' filter. Vectors '''V'''. No Scale Array. Scale 1. Glyph Mode ''' All Points'''. '''Apply'''.<br />
*View/ Animation View.<br />
*Mode '''Sequence''', No. Frames: '''100'''. <br />
*Change the pulldown box next to the blue '''+''' to be '''Contour'''.<br />
*Click the blue '''+'''. Note it works better if you use 0 for the start.<br />
*Now, click the play button. In the pipeline browser, I also turned off visibility for the Contour filter.<br />
<br />
<br />
[[Image:cfd_animating_static_field.png|1000px]]<br />
<br />
<br />
<br />
==Volume Rendering==<br />
We are going to paint the fluid by volume rendered temperature. To give context, we are also going to extract the exterior surface, and clip the disk_out_ref in half. We will paint this exterior surface black.<br />
<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Extract Surface'''. '''Apply'''.<br />
*'''Filters → Clip'''. Deselect '''Invert'''. '''Apply'''.<br />
*'''Solid Color'''. Color the clipped surface '''black'''.<br />
*Select '''disk_out_ref.exo''' in the '''Pipeline Browser'''. Paint by '''temp'''. '''Volume Render'''. In the '''Color Editor''', change '''presets''' (looks like a folder with a heart) to be '''Black Body Radiation'''.<br />
<br />
<br />
[[Image:cfd_volume_rendering.png|1000px]]</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=File:Cfd_streamtracer_with_custom_source.png&diff=64685File:Cfd streamtracer with custom source.png2021-11-25T03:21:25Z<p>Wascott: </p>
<hr />
<div></div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64684Computational Fluid Dynamics2021-11-25T03:20:17Z<p>Wascott: </p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*With the mouse, rotate the slices around so you can see both surfaces.<br />
<br />
<br />
[[Image:cfd_slices2.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
*'''Reset'''<br />
<br />
<br />
[[Image:cfd_streamtracer1.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers with Custom Source==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*Change '''vtkBlockColors''' to '''Solid Color'''. Change '''Opacity''' to '''0.3'''.<br />
*'''Sources → Elipse'''. '''Center'''. '''0,0,7'''. '''Major Radius Vector''', '''0,0,3'''. '''Ratio''', '''0.3'''. '''Apply'''.<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
*Select the '''Elipse''' filter in the '''Pipeline Browser'''.<br />
*'''Filters → Common → Stream Tracer with Custom Source'''. Use '''Elipse''' as the seed source. '''Apply'''. <br />
*Color by: '''Solid Color'''.<br />
<br />
The image below is a merging of Stream Tracers with lines and tubes, and Stream Tracer with Custom Source. I have also played with colors to make it look nicer. If interested, replicating is left to the user.<br />
<br />
<br />
[[Image:cfd_streamtracer_with_custom_source.png|1000px]]<br />
<br />
<br />
<br />
==Glyphs perpendicular to a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
<br />
Lets create a half slice. This will be used as the seed plane for glyphs.<br />
<br />
*'''Filters → Common → Slice'''. Origin '''0, 0, 5'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
Now, apply glyphs.<br />
<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Color by: '''v'''. Change '''Magnitude''' to '''Z'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Representation: '''wireframe'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*Use the mouse to zoom into the glyph vectors.<br />
<br />
<br />
[[Image:cfd_slice_glyph1.png|1000px]]<br />
<br />
<br />
<br />
==Flow in a fluid==<br />
To show a velocity profile we need to sample the dataset with a line, and then create glyphs off of this line. This can be done using a trick in ParaView, i.e., the Plot over Line filter. Note that a Resample to Line filter will be added in ParaView 5.11 or so. <br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
<br />
Lets sample over a line.<br />
<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of '''Point1''' and '''Point2''' to '''1'''. Change the '''Resolution''' to '''40'''. '''Apply'''. <br />
*Close the '''LineChartView'''.<br />
*In the '''Pipeline Browser''', turn visibility off for '''disk_out_ref.exo'''.<br />
<br />
We now have a line sampled through the fluid. Lets calculate the negative Z component of V (so it goes the opposite direction on the line from V). That way we can have two profiles, one with V, and one with Vz. <br />
<br />
*'''Filters → Common → Calculator'''. Change '''Result''' to '''Vz'''. Use '''0*iHat+0+jHat+-v_Z*kHat''' for the formula. '''Apply'''.<br />
<br />
Now we want to create two Glyphs - one from the '''Calculator''' filter, and one directly from the '''Plot over Line''' filter.<br />
<br />
*The '''Calculator''' filter should still be highlighted in the Pipeline Browser.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: Vz'''. '''Scale Array: Vz '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Click on the '''Color Editor''' icon. Change the color to Orange. '''Apply'''.<br />
*In the Pipeline Browser select the '''Plot over Line''' filter.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
<br />
Just to create a nice image, I'm going to split the views horizontally, and show this visualization also from the side.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile1.png|1000px]]<br />
<br />
<br />
<br />
You can write the data sampled down the line to a .csv file, where you can post process it with tools such as Excel. Here is how to do it.<br />
*Select '''PlotOverLine''' in the Pipeline Browser.<br />
*Split screen vertical. '''Spreadsheet view'''.<br />
*Now, click on the '''Export Scene''' icon, and write the '''Spreadsheet''' down to a '''.csv file'''.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile_spreadsheet.png|1000px]]<br />
<br />
<br />
<br />
<br />
==2D plots through a fluid==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of '''Point1''' and '''Point2''' to '''4'''. '''Apply'''.<br />
*In the '''Properties Tab''', turn all variables off other than '''v_Z'''.<br />
*Click on the '''RenderView''', the left '''view'''. <br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
<br />
<br />
[[Image:cfd_2d_plots.png|1000px]]<br />
<br />
<br />
<br />
==Contours on a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Slice'''. '''Apply'''.<br />
<br />
We need the magnitude for the Contour filter.<br />
<br />
*'''Filters → Calculator'''. Result Array Name '''vMag'''. Formula '''mag(v)'''. '''Apply'''.<br />
<br />
Now, draw contours on the 2d slice.<br />
<br />
*'''Filters → Contour'''. Contour by vMag. Delete the '''Value''', and create a new on using the '''Add a Range of Values''' icon. '''Apply'''.<br />
<br />
Here is an example with additional '''streamlines''', '''tubes''' and '''glyphs'''.<br />
<br />
<br />
[[Image:cfd_contours_on_slices.png|1000px]]<br />
<br />
<br />
<br />
==Gradient, Divergence, Vorticity and and Q Criterion==<br />
The '''Gradient''' filter ('''Advanced''' Properties tab) provides Gradient, Divergence, Vorticity and and Q Criterion. Here is am example, using disk_out_ref.exo. <br />
<br />
<br />
[[Image:cfd_gradient1.png|1000px]]<br />
<br />
<br />
<br />
<br />
==Probing a fluid==<br />
There are numerous ways to probe the cells and points of a fluid. One is with the '''Hover Points On''' and '''Hover Cells On''' icons just above the Renderview. Another is with Interactive Select Cells or Points On. Then, in the Find Data, turn on Cell or Point Labels. Yet another is with the Probe filter. Here is how to use the probe filter.<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
The '''Probe''' filter works much better with '''Auto Apply''' turned on. This is the icon that looks like a tree growing out of a cube.<br />
<br />
*'''Auto Apply''' on<br />
<br />
*'''Filters → Data Analysis → Probe'''. Now, move over '''disk_out_ref.exo''', updating the probed location with the '''p''' key.<br />
<br />
The '''probed''' data will show in the Spreadsheet view.<br />
<br />
<br />
[[Image:cfd_probe1.png|1000px]]<br />
<br />
==Animating a static vector field==<br />
*If you have a vector field in your data, you can animate a static dataset.<br />
*Our goal is to create a set of streamlines from a vector field, place points on this set of streamlines, and animate the point down the streamlines. We will also add glyphs to the streamline points. <br />
*Open disk_out_ref.exo. '''Apply'''.<br />
*Click the '''-X''' icon.<br />
*'''Stream tracer''' filter. (We are already streamtracing on V). Change Seed Type to '''Point Cloud'''. Optional - I changed the Opacity to 0.4. '''Apply'''.<br />
*'''Contour''' filter. Contour on '''IntegrationTime'''. '''Apply'''.<br />
*'''Glyph''' filter. Vectors '''V'''. No Scale Array. Scale 1. Glyph Mode ''' All Points'''. '''Apply'''.<br />
*View/ Animation View.<br />
*Mode '''Sequence''', No. Frames: '''100'''. <br />
*Change the pulldown box next to the blue '''+''' to be '''Contour'''.<br />
*Click the blue '''+'''. Note it works better if you use 0 for the start.<br />
*Now, click the play button. In the pipeline browser, I also turned off visibility for the Contour filter.<br />
<br />
<br />
[[Image:cfd_animating_static_field.png|1000px]]<br />
<br />
<br />
<br />
==Volume Rendering==<br />
We are going to paint the fluid by volume rendered temperature. To give context, we are also going to extract the exterior surface, and clip the disk_out_ref in half. We will paint this exterior surface black.<br />
<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Extract Surface'''. '''Apply'''.<br />
*'''Filters → Clip'''. Deselect '''Invert'''. '''Apply'''.<br />
*'''Solid Color'''. Color the clipped surface '''black'''.<br />
*Select '''disk_out_ref.exo''' in the '''Pipeline Browser'''. Paint by '''temp'''. '''Volume Render'''. In the '''Color Editor''', change '''presets''' (looks like a folder with a heart) to be '''Black Body Radiation'''.<br />
<br />
<br />
[[Image:cfd_volume_rendering.png|1000px]]</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=File:Cfd_volume_rendering.png&diff=64683File:Cfd volume rendering.png2021-11-25T02:37:03Z<p>Wascott: </p>
<hr />
<div></div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64682Computational Fluid Dynamics2021-11-25T02:35:36Z<p>Wascott: </p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*With the mouse, rotate the slices around so you can see both surfaces.<br />
<br />
<br />
[[Image:cfd_slices2.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
*'''Reset'''<br />
<br />
<br />
[[Image:cfd_streamtracer1.png|1000px]]<br />
<br />
<br />
<br />
==Glyphs perpendicular to a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
<br />
Lets create a half slice. This will be used as the seed plane for glyphs.<br />
<br />
*'''Filters → Common → Slice'''. Origin '''0, 0, 5'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
Now, apply glyphs.<br />
<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Color by: '''v'''. Change '''Magnitude''' to '''Z'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Representation: '''wireframe'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*Use the mouse to zoom into the glyph vectors.<br />
<br />
<br />
[[Image:cfd_slice_glyph1.png|1000px]]<br />
<br />
<br />
<br />
==Flow in a fluid==<br />
To show a velocity profile we need to sample the dataset with a line, and then create glyphs off of this line. This can be done using a trick in ParaView, i.e., the Plot over Line filter. Note that a Resample to Line filter will be added in ParaView 5.11 or so. <br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
<br />
Lets sample over a line.<br />
<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of '''Point1''' and '''Point2''' to '''1'''. Change the '''Resolution''' to '''40'''. '''Apply'''. <br />
*Close the '''LineChartView'''.<br />
*In the '''Pipeline Browser''', turn visibility off for '''disk_out_ref.exo'''.<br />
<br />
We now have a line sampled through the fluid. Lets calculate the negative Z component of V (so it goes the opposite direction on the line from V). That way we can have two profiles, one with V, and one with Vz. <br />
<br />
*'''Filters → Common → Calculator'''. Change '''Result''' to '''Vz'''. Use '''0*iHat+0+jHat+-v_Z*kHat''' for the formula. '''Apply'''.<br />
<br />
Now we want to create two Glyphs - one from the '''Calculator''' filter, and one directly from the '''Plot over Line''' filter.<br />
<br />
*The '''Calculator''' filter should still be highlighted in the Pipeline Browser.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: Vz'''. '''Scale Array: Vz '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Click on the '''Color Editor''' icon. Change the color to Orange. '''Apply'''.<br />
*In the Pipeline Browser select the '''Plot over Line''' filter.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
<br />
Just to create a nice image, I'm going to split the views horizontally, and show this visualization also from the side.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile1.png|1000px]]<br />
<br />
<br />
<br />
You can write the data sampled down the line to a .csv file, where you can post process it with tools such as Excel. Here is how to do it.<br />
*Select '''PlotOverLine''' in the Pipeline Browser.<br />
*Split screen vertical. '''Spreadsheet view'''.<br />
*Now, click on the '''Export Scene''' icon, and write the '''Spreadsheet''' down to a '''.csv file'''.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile_spreadsheet.png|1000px]]<br />
<br />
<br />
<br />
<br />
==2D plots through a fluid==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of '''Point1''' and '''Point2''' to '''4'''. '''Apply'''.<br />
*In the '''Properties Tab''', turn all variables off other than '''v_Z'''.<br />
*Click on the '''RenderView''', the left '''view'''. <br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
<br />
<br />
[[Image:cfd_2d_plots.png|1000px]]<br />
<br />
<br />
<br />
==Contours on a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Slice'''. '''Apply'''.<br />
<br />
We need the magnitude for the Contour filter.<br />
<br />
*'''Filters → Calculator'''. Result Array Name '''vMag'''. Formula '''mag(v)'''. '''Apply'''.<br />
<br />
Now, draw contours on the 2d slice.<br />
<br />
*'''Filters → Contour'''. Contour by vMag. Delete the '''Value''', and create a new on using the '''Add a Range of Values''' icon. '''Apply'''.<br />
<br />
Here is an example with additional '''streamlines''', '''tubes''' and '''glyphs'''.<br />
<br />
<br />
[[Image:cfd_contours_on_slices.png|1000px]]<br />
<br />
<br />
<br />
==Gradient, Divergence, Vorticity and and Q Criterion==<br />
The '''Gradient''' filter ('''Advanced''' Properties tab) provides Gradient, Divergence, Vorticity and and Q Criterion. Here is am example, using disk_out_ref.exo. <br />
<br />
<br />
[[Image:cfd_gradient1.png|1000px]]<br />
<br />
<br />
<br />
<br />
==Probing a fluid==<br />
There are numerous ways to probe the cells and points of a fluid. One is with the '''Hover Points On''' and '''Hover Cells On''' icons just above the Renderview. Another is with Interactive Select Cells or Points On. Then, in the Find Data, turn on Cell or Point Labels. Yet another is with the Probe filter. Here is how to use the probe filter.<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
The '''Probe''' filter works much better with '''Auto Apply''' turned on. This is the icon that looks like a tree growing out of a cube.<br />
<br />
*'''Auto Apply''' on<br />
<br />
*'''Filters → Data Analysis → Probe'''. Now, move over '''disk_out_ref.exo''', updating the probed location with the '''p''' key.<br />
<br />
The '''probed''' data will show in the Spreadsheet view.<br />
<br />
<br />
[[Image:cfd_probe1.png|1000px]]<br />
<br />
==Animating a static vector field==<br />
*If you have a vector field in your data, you can animate a static dataset.<br />
*Our goal is to create a set of streamlines from a vector field, place points on this set of streamlines, and animate the point down the streamlines. We will also add glyphs to the streamline points. <br />
*Open disk_out_ref.exo. '''Apply'''.<br />
*Click the '''-X''' icon.<br />
*'''Stream tracer''' filter. (We are already streamtracing on V). Change Seed Type to '''Point Cloud'''. Optional - I changed the Opacity to 0.4. '''Apply'''.<br />
*'''Contour''' filter. Contour on '''IntegrationTime'''. '''Apply'''.<br />
*'''Glyph''' filter. Vectors '''V'''. No Scale Array. Scale 1. Glyph Mode ''' All Points'''. '''Apply'''.<br />
*View/ Animation View.<br />
*Mode '''Sequence''', No. Frames: '''100'''. <br />
*Change the pulldown box next to the blue '''+''' to be '''Contour'''.<br />
*Click the blue '''+'''. Note it works better if you use 0 for the start.<br />
*Now, click the play button. In the pipeline browser, I also turned off visibility for the Contour filter.<br />
<br />
<br />
[[Image:cfd_animating_static_field.png|1000px]]<br />
<br />
<br />
<br />
==Volume Rendering==<br />
We are going to paint the fluid by volume rendered temperature. To give context, we are also going to extract the exterior surface, and clip the disk_out_ref in half. We will paint this exterior surface black.<br />
<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Extract Surface'''. '''Apply'''.<br />
*'''Filters → Clip'''. Deselect '''Invert'''. '''Apply'''.<br />
*'''Solid Color'''. Color the clipped surface '''black'''.<br />
*Select '''disk_out_ref.exo''' in the '''Pipeline Browser'''. Paint by '''temp'''. '''Volume Render'''. In the '''Color Editor''', change '''presets''' (looks like a folder with a heart) to be '''Black Body Radiation'''.<br />
<br />
<br />
[[Image:cfd_volume_rendering.png|1000px]]</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=File:Cfd_contours_on_slices.png&diff=64681File:Cfd contours on slices.png2021-11-16T03:21:55Z<p>Wascott: </p>
<hr />
<div></div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64680Computational Fluid Dynamics2021-11-16T03:20:26Z<p>Wascott: </p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*With the mouse, rotate the slices around so you can see both surfaces.<br />
<br />
<br />
[[Image:cfd_slices2.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
*'''Reset'''<br />
<br />
<br />
[[Image:cfd_streamtracer1.png|1000px]]<br />
<br />
<br />
<br />
==Glyphs perpendicular to a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
<br />
Lets create a half slice. This will be used as the seed plane for glyphs.<br />
<br />
*'''Filters → Common → Slice'''. Origin '''0, 0, 5'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
Now, apply glyphs.<br />
<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Color by: '''v'''. Change '''Magnitude''' to '''Z'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Representation: '''wireframe'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*Use the mouse to zoom into the glyph vectors.<br />
<br />
<br />
[[Image:cfd_slice_glyph1.png|1000px]]<br />
<br />
<br />
<br />
==Flow in a fluid==<br />
To show a velocity profile we need to sample the dataset with a line, and then create glyphs off of this line. This can be done using a trick in ParaView, i.e., the Plot over Line filter. Note that a Resample to Line filter will be added in ParaView 5.11 or so. <br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
<br />
Lets sample over a line.<br />
<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of '''Point1''' and '''Point2''' to '''1'''. Change the '''Resolution''' to '''40'''. '''Apply'''. <br />
*Close the '''LineChartView'''.<br />
*In the '''Pipeline Browser''', turn visibility off for '''disk_out_ref.exo'''.<br />
<br />
We now have a line sampled through the fluid. Lets calculate the negative Z component of V (so it goes the opposite direction on the line from V). That way we can have two profiles, one with V, and one with Vz. <br />
<br />
*'''Filters → Common → Calculator'''. Change '''Result''' to '''Vz'''. Use '''0*iHat+0+jHat+-v_Z*kHat''' for the formula. '''Apply'''.<br />
<br />
Now we want to create two Glyphs - one from the '''Calculator''' filter, and one directly from the '''Plot over Line''' filter.<br />
<br />
*The '''Calculator''' filter should still be highlighted in the Pipeline Browser.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: Vz'''. '''Scale Array: Vz '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Click on the '''Color Editor''' icon. Change the color to Orange. '''Apply'''.<br />
*In the Pipeline Browser select the '''Plot over Line''' filter.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
<br />
Just to create a nice image, I'm going to split the views horizontally, and show this visualization also from the side.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile1.png|1000px]]<br />
<br />
<br />
<br />
You can write the data sampled down the line to a .csv file, where you can post process it with tools such as Excel. Here is how to do it.<br />
*Select '''PlotOverLine''' in the Pipeline Browser.<br />
*Split screen vertical. '''Spreadsheet view'''.<br />
*Now, click on the '''Export Scene''' icon, and write the '''Spreadsheet''' down to a '''.csv file'''.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile_spreadsheet.png|1000px]]<br />
<br />
<br />
<br />
<br />
==2D plots through a fluid==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of '''Point1''' and '''Point2''' to '''4'''. '''Apply'''.<br />
*In the '''Properties Tab''', turn all variables off other than '''v_Z'''.<br />
*Click on the '''RenderView''', the left '''view'''. <br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
<br />
<br />
[[Image:cfd_2d_plots.png|1000px]]<br />
<br />
<br />
<br />
==Contours on a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Slice'''. '''Apply'''.<br />
<br />
We need the magnitude for the Contour filter.<br />
<br />
*'''Filters → Calculator'''. Result Array Name '''vMag'''. Formula '''mag(v)'''. '''Apply'''.<br />
<br />
Now, draw contours on the 2d slice.<br />
<br />
*'''Filters → Contour'''. Contour by vMag. Delete the '''Value''', and create a new on using the '''Add a Range of Values''' icon. '''Apply'''.<br />
<br />
Here is an example with additional '''streamlines''', '''tubes''' and '''glyphs'''.<br />
<br />
<br />
[[Image:cfd_contours_on_slices.png|1000px]]<br />
<br />
<br />
<br />
==Gradient, Divergence, Vorticity and and Q Criterion==<br />
The '''Gradient''' filter ('''Advanced''' Properties tab) provides Gradient, Divergence, Vorticity and and Q Criterion. Here is am example, using disk_out_ref.exo. <br />
<br />
<br />
[[Image:cfd_gradient1.png|1000px]]<br />
<br />
<br />
<br />
<br />
==Probing a fluid==<br />
There are numerous ways to probe the cells and points of a fluid. One is with the '''Hover Points On''' and '''Hover Cells On''' icons just above the Renderview. Another is with Interactive Select Cells or Points On. Then, in the Find Data, turn on Cell or Point Labels. Yet another is with the Probe filter. Here is how to use the probe filter.<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
The '''Probe''' filter works much better with '''Auto Apply''' turned on. This is the icon that looks like a tree growing out of a cube.<br />
<br />
*'''Auto Apply''' on<br />
<br />
*'''Filters → Data Analysis → Probe'''. Now, move over '''disk_out_ref.exo''', updating the probed location with the '''p''' key.<br />
<br />
The '''probed''' data will show in the Spreadsheet view.<br />
<br />
<br />
[[Image:cfd_probe1.png|1000px]]<br />
<br />
==Animating a static vector field==<br />
*If you have a vector field in your data, you can animate a static dataset.<br />
*Our goal is to create a set of streamlines from a vector field, place points on this set of streamlines, and animate the point down the streamlines. We will also add glyphs to the streamline points. <br />
*Open disk_out_ref.exo. '''Apply'''.<br />
*Click the '''-X''' icon.<br />
*'''Stream tracer''' filter. (We are already streamtracing on V). Change Seed Type to '''Point Cloud'''. Optional - I changed the Opacity to 0.4. '''Apply'''.<br />
*'''Contour''' filter. Contour on '''IntegrationTime'''. '''Apply'''.<br />
*'''Glyph''' filter. Vectors '''V'''. No Scale Array. Scale 1. Glyph Mode ''' All Points'''. '''Apply'''.<br />
*View/ Animation View.<br />
*Mode '''Sequence''', No. Frames: '''100'''. <br />
*Change the pulldown box next to the blue '''+''' to be '''Contour'''.<br />
*Click the blue '''+'''. Note it works better if you use 0 for the start.<br />
*Now, click the play button. In the pipeline browser, I also turned off visibility for the Contour filter.<br />
<br />
<br />
[[Image:cfd_animating_static_field.png|1000px]]<br />
<br />
<br />
<br />
==Volume Rendering==</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=File:Cfd_2d_plots.png&diff=64679File:Cfd 2d plots.png2021-11-16T02:53:33Z<p>Wascott: </p>
<hr />
<div></div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64678Computational Fluid Dynamics2021-11-16T02:52:19Z<p>Wascott: </p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*With the mouse, rotate the slices around so you can see both surfaces.<br />
<br />
<br />
[[Image:cfd_slices2.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
*'''Reset'''<br />
<br />
<br />
[[Image:cfd_streamtracer1.png|1000px]]<br />
<br />
<br />
<br />
==Glyphs perpendicular to a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
<br />
Lets create a half slice. This will be used as the seed plane for glyphs.<br />
<br />
*'''Filters → Common → Slice'''. Origin '''0, 0, 5'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
Now, apply glyphs.<br />
<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Color by: '''v'''. Change '''Magnitude''' to '''Z'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Representation: '''wireframe'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*Use the mouse to zoom into the glyph vectors.<br />
<br />
<br />
[[Image:cfd_slice_glyph1.png|1000px]]<br />
<br />
<br />
<br />
==Flow in a fluid==<br />
To show a velocity profile we need to sample the dataset with a line, and then create glyphs off of this line. This can be done using a trick in ParaView, i.e., the Plot over Line filter. Note that a Resample to Line filter will be added in ParaView 5.11 or so. <br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
<br />
Lets sample over a line.<br />
<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of '''Point1''' and '''Point2''' to '''1'''. Change the '''Resolution''' to '''40'''. '''Apply'''. <br />
*Close the '''LineChartView'''.<br />
*In the '''Pipeline Browser''', turn visibility off for '''disk_out_ref.exo'''.<br />
<br />
We now have a line sampled through the fluid. Lets calculate the negative Z component of V (so it goes the opposite direction on the line from V). That way we can have two profiles, one with V, and one with Vz. <br />
<br />
*'''Filters → Common → Calculator'''. Change '''Result''' to '''Vz'''. Use '''0*iHat+0+jHat+-v_Z*kHat''' for the formula. '''Apply'''.<br />
<br />
Now we want to create two Glyphs - one from the '''Calculator''' filter, and one directly from the '''Plot over Line''' filter.<br />
<br />
*The '''Calculator''' filter should still be highlighted in the Pipeline Browser.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: Vz'''. '''Scale Array: Vz '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Click on the '''Color Editor''' icon. Change the color to Orange. '''Apply'''.<br />
*In the Pipeline Browser select the '''Plot over Line''' filter.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
<br />
Just to create a nice image, I'm going to split the views horizontally, and show this visualization also from the side.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile1.png|1000px]]<br />
<br />
<br />
<br />
You can write the data sampled down the line to a .csv file, where you can post process it with tools such as Excel. Here is how to do it.<br />
*Select '''PlotOverLine''' in the Pipeline Browser.<br />
*Split screen vertical. '''Spreadsheet view'''.<br />
*Now, click on the '''Export Scene''' icon, and write the '''Spreadsheet''' down to a '''.csv file'''.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile_spreadsheet.png|1000px]]<br />
<br />
<br />
<br />
<br />
==2D plots through a fluid==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of '''Point1''' and '''Point2''' to '''4'''. '''Apply'''.<br />
*In the '''Properties Tab''', turn all variables off other than '''v_Z'''.<br />
*Click on the '''RenderView''', the left '''view'''. <br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
<br />
<br />
[[Image:cfd_2d_plots.png|1000px]]<br />
<br />
<br />
<br />
==Gradient, Divergence, Vorticity and and Q Criterion==<br />
The '''Gradient''' filter ('''Advanced''' Properties tab) provides Gradient, Divergence, Vorticity and and Q Criterion. Here is am example, using disk_out_ref.exo. <br />
<br />
<br />
[[Image:cfd_gradient1.png|1000px]]<br />
<br />
<br />
<br />
<br />
==Probing a fluid==<br />
There are numerous ways to probe the cells and points of a fluid. One is with the '''Hover Points On''' and '''Hover Cells On''' icons just above the Renderview. Another is with Interactive Select Cells or Points On. Then, in the Find Data, turn on Cell or Point Labels. Yet another is with the Probe filter. Here is how to use the probe filter.<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
The '''Probe''' filter works much better with '''Auto Apply''' turned on. This is the icon that looks like a tree growing out of a cube.<br />
<br />
*'''Auto Apply''' on<br />
<br />
*'''Filters → Data Analysis → Probe'''. Now, move over '''disk_out_ref.exo''', updating the probed location with the '''p''' key.<br />
<br />
The '''probed''' data will show in the Spreadsheet view.<br />
<br />
<br />
[[Image:cfd_probe1.png|1000px]]<br />
<br />
==Animating a static vector field==<br />
*If you have a vector field in your data, you can animate a static dataset.<br />
*Our goal is to create a set of streamlines from a vector field, place points on this set of streamlines, and animate the point down the streamlines. We will also add glyphs to the streamline points. <br />
*Open disk_out_ref.exo. '''Apply'''.<br />
*Click the '''-X''' icon.<br />
*'''Stream tracer''' filter. (We are already streamtracing on V). Change Seed Type to '''Point Cloud'''. Optional - I changed the Opacity to 0.4. '''Apply'''.<br />
*'''Contour''' filter. Contour on '''IntegrationTime'''. '''Apply'''.<br />
*'''Glyph''' filter. Vectors '''V'''. No Scale Array. Scale 1. Glyph Mode ''' All Points'''. '''Apply'''.<br />
*View/ Animation View.<br />
*Mode '''Sequence''', No. Frames: '''100'''. <br />
*Change the pulldown box next to the blue '''+''' to be '''Contour'''.<br />
*Click the blue '''+'''. Note it works better if you use 0 for the start.<br />
*Now, click the play button. In the pipeline browser, I also turned off visibility for the Contour filter.<br />
<br />
<br />
[[Image:cfd_animating_static_field.png|1000px]]<br />
<br />
<br />
<br />
==Volume Rendering==</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=File:Cfd_fluid_velocity_profile_spreadsheet.png&diff=64677File:Cfd fluid velocity profile spreadsheet.png2021-11-16T02:32:12Z<p>Wascott: </p>
<hr />
<div></div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64676Computational Fluid Dynamics2021-11-16T02:25:12Z<p>Wascott: </p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*With the mouse, rotate the slices around so you can see both surfaces.<br />
<br />
<br />
[[Image:cfd_slices2.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
*'''Reset'''<br />
<br />
<br />
[[Image:cfd_streamtracer1.png|1000px]]<br />
<br />
<br />
<br />
==Glyphs perpendicular to a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
<br />
Lets create a half slice. This will be used as the seed plane for glyphs.<br />
<br />
*'''Filters → Common → Slice'''. Origin '''0, 0, 5'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
Now, apply glyphs.<br />
<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Color by: '''v'''. Change '''Magnitude''' to '''Z'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Representation: '''wireframe'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*Use the mouse to zoom into the glyph vectors.<br />
<br />
<br />
[[Image:cfd_slice_glyph1.png|1000px]]<br />
<br />
<br />
<br />
==Flow in a fluid==<br />
To show a velocity profile we need to sample the dataset with a line, and then create glyphs off of this line. This can be done using a trick in ParaView, i.e., the Plot over Line filter. Note that a Resample to Line filter will be added in ParaView 5.11 or so. <br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
<br />
Lets sample over a line.<br />
<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of the line to '''1'''. Change the '''Resolution''' to '''40'''. '''Apply'''. <br />
*Close the '''LineChartView'''.<br />
*In the '''Pipeline Browser''', turn visibility off for '''disk_out_ref.exo'''.<br />
<br />
We now have a line sampled through the fluid. Lets calculate the negative Z component of V (so it goes the opposite direction on the line from V). That way we can have two profiles, one with V, and one with Vz. <br />
<br />
*'''Filters → Common → Calculator'''. Change '''Result''' to '''Vz'''. Use '''0*iHat+0+jHat+-v_Z*kHat''' for the formula. '''Apply'''.<br />
<br />
Now we want to create two Glyphs - one from the '''Calculator''' filter, and one directly from the '''Plot over Line''' filter.<br />
<br />
*The '''Calculator''' filter should still be highlighted in the Pipeline Browser.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: Vz'''. '''Scale Array: Vz '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Click on the '''Color Editor''' icon. Change the color to Orange. '''Apply'''.<br />
*In the Pipeline Browser select the '''Plot over Line''' filter.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
<br />
Just to create a nice image, I'm going to split the views horizontally, and show this visualization also from the side.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile1.png|1000px]]<br />
<br />
<br />
<br />
You can write the data sampled down the line to a .csv file, where you can post process it with tools such as Excel. Here is how to do it.<br />
*Select '''PlotOverLine''' in the Pipeline Browser.<br />
*Split screen vertical. '''Spreadsheet view'''.<br />
*Now, click on the '''Export Scene''' icon, and write the '''Spreadsheet''' down to a '''.csv file'''.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile_spreadsheet.png|1000px]]<br />
<br />
<br />
<br />
<br />
==Gradient, Divergence, Vorticity and and Q Criterion==<br />
The '''Gradient''' filter ('''Advanced''' Properties tab) provides Gradient, Divergence, Vorticity and and Q Criterion. Here is am example, using disk_out_ref.exo. <br />
<br />
<br />
[[Image:cfd_gradient1.png|1000px]]<br />
<br />
<br />
<br />
<br />
==Probing a fluid==<br />
There are numerous ways to probe the cells and points of a fluid. One is with the '''Hover Points On''' and '''Hover Cells On''' icons just above the Renderview. Another is with Interactive Select Cells or Points On. Then, in the Find Data, turn on Cell or Point Labels. Yet another is with the Probe filter. Here is how to use the probe filter.<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
The '''Probe''' filter works much better with '''Auto Apply''' turned on. This is the icon that looks like a tree growing out of a cube.<br />
<br />
*'''Auto Apply''' on<br />
<br />
*'''Filters → Data Analysis → Probe'''. Now, move over '''disk_out_ref.exo''', updating the probed location with the '''p''' key.<br />
<br />
The '''probed''' data will show in the Spreadsheet view.<br />
<br />
<br />
[[Image:cfd_probe1.png|1000px]]<br />
<br />
==Animating a static vector field==<br />
*If you have a vector field in your data, you can animate a static dataset.<br />
*Our goal is to create a set of streamlines from a vector field, place points on this set of streamlines, and animate the point down the streamlines. We will also add glyphs to the streamline points. <br />
*Open disk_out_ref.exo. '''Apply'''.<br />
*Click the '''-X''' icon.<br />
*'''Stream tracer''' filter. (We are already streamtracing on V). Change Seed Type to '''Point Cloud'''. Optional - I changed the Opacity to 0.4. '''Apply'''.<br />
*'''Contour''' filter. Contour on '''IntegrationTime'''. '''Apply'''.<br />
*'''Glyph''' filter. Vectors '''V'''. No Scale Array. Scale 1. Glyph Mode ''' All Points'''. '''Apply'''.<br />
*View/ Animation View.<br />
*Mode '''Sequence''', No. Frames: '''100'''. <br />
*Change the pulldown box next to the blue '''+''' to be '''Contour'''.<br />
*Click the blue '''+'''. Note it works better if you use 0 for the start.<br />
*Now, click the play button. In the pipeline browser, I also turned off visibility for the Contour filter.<br />
<br />
<br />
[[Image:cfd_animating_static_field.png|1000px]]<br />
<br />
<br />
<br />
==Volume Rendering==</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64675Computational Fluid Dynamics2021-11-13T03:25:36Z<p>Wascott: /* Probing a fluid */</p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*With the mouse, rotate the slices around so you can see both surfaces.<br />
<br />
<br />
[[Image:cfd_slices2.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
*'''Reset'''<br />
<br />
<br />
[[Image:cfd_streamtracer1.png|1000px]]<br />
<br />
<br />
<br />
==Glyphs perpendicular to a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
<br />
Lets create a half slice. This will be used as the seed plane for glyphs.<br />
<br />
*'''Filters → Common → Slice'''. Origin '''0, 0, 5'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
Now, apply glyphs.<br />
<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Color by: '''v'''. Change '''Magnitude''' to '''Z'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Representation: '''wireframe'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*Use the mouse to zoom into the glyph vectors.<br />
<br />
<br />
[[Image:cfd_slice_glyph1.png|1000px]]<br />
<br />
<br />
<br />
==Flow in a fluid==<br />
To show a velocity profile we need to sample the dataset with a line, and then create glyphs off of this line. This can be done using a trick in ParaView, i.e., the Plot over Line filter. Note that a Resample to Line filter will be added in ParaView 5.11 or so. <br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
<br />
Lets sample over a line.<br />
<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of the line to '''1'''. Change the '''Resolution''' to '''40'''. '''Apply'''. <br />
*Close the '''LineChartView'''.<br />
*In the '''Pipeline Browser''', turn visibility off for '''disk_out_ref.exo'''.<br />
<br />
We now have a line sampled through the fluid. Lets calculate the negative Z component of V (so it goes the opposite direction on the line from V). That way we can have two profiles, one with V, and one with Vz. <br />
<br />
*'''Filters → Common → Calculator'''. Change '''Result''' to '''Vz'''. Use '''0*iHat+0+jHat+-v_Z*kHat''' for the formula. '''Apply'''.<br />
<br />
Now we want to create two Glyphs - one from the '''Calculator''' filter, and one directly from the '''Plot over Line''' filter.<br />
<br />
*The '''Calculator''' filter should still be highlighted in the Pipeline Browser.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: Vz'''. '''Scale Array: Vz '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Click on the '''Color Editor''' icon. Change the color to Orange. '''Apply'''.<br />
*In the Pipeline Browser select the '''Plot over Line''' filter.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
<br />
Just to create a nice image, I'm going to split the views horizontally, and show this visualization also from the side.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile1.png|1000px]]<br />
<br />
<br />
<br />
==Gradient, Divergence, Vorticity and and Q Criterion==<br />
The '''Gradient''' filter ('''Advanced''' Properties tab) provides Gradient, Divergence, Vorticity and and Q Criterion. Here is am example, using disk_out_ref.exo. <br />
<br />
<br />
[[Image:cfd_gradient1.png|1000px]]<br />
<br />
<br />
<br />
<br />
==Probing a fluid==<br />
There are numerous ways to probe the cells and points of a fluid. One is with the '''Hover Points On''' and '''Hover Cells On''' icons just above the Renderview. Another is with Interactive Select Cells or Points On. Then, in the Find Data, turn on Cell or Point Labels. Yet another is with the Probe filter. Here is how to use the probe filter.<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
The '''Probe''' filter works much better with '''Auto Apply''' turned on. This is the icon that looks like a tree growing out of a cube.<br />
<br />
*'''Auto Apply''' on<br />
<br />
*'''Filters → Data Analysis → Probe'''. Now, move over '''disk_out_ref.exo''', updating the probed location with the '''p''' key.<br />
<br />
The '''probed''' data will show in the Spreadsheet view.<br />
<br />
<br />
[[Image:cfd_probe1.png|1000px]]<br />
<br />
==Animating a static vector field==<br />
*If you have a vector field in your data, you can animate a static dataset.<br />
*Our goal is to create a set of streamlines from a vector field, place points on this set of streamlines, and animate the point down the streamlines. We will also add glyphs to the streamline points. <br />
*Open disk_out_ref.exo. '''Apply'''.<br />
*Click the '''-X''' icon.<br />
*'''Stream tracer''' filter. (We are already streamtracing on V). Change Seed Type to '''Point Cloud'''. Optional - I changed the Opacity to 0.4. '''Apply'''.<br />
*'''Contour''' filter. Contour on '''IntegrationTime'''. '''Apply'''.<br />
*'''Glyph''' filter. Vectors '''V'''. No Scale Array. Scale 1. Glyph Mode ''' All Points'''. '''Apply'''.<br />
*View/ Animation View.<br />
*Mode '''Sequence''', No. Frames: '''100'''. <br />
*Change the pulldown box next to the blue '''+''' to be '''Contour'''.<br />
*Click the blue '''+'''. Note it works better if you use 0 for the start.<br />
*Now, click the play button. In the pipeline browser, I also turned off visibility for the Contour filter.<br />
<br />
<br />
[[Image:cfd_animating_static_field.png|1000px]]<br />
<br />
<br />
<br />
==Volume Rendering==</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=File:Cfd_animating_static_field.png&diff=64674File:Cfd animating static field.png2021-11-13T03:14:49Z<p>Wascott: </p>
<hr />
<div></div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64673Computational Fluid Dynamics2021-11-13T03:14:16Z<p>Wascott: </p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*With the mouse, rotate the slices around so you can see both surfaces.<br />
<br />
<br />
[[Image:cfd_slices2.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
*'''Reset'''<br />
<br />
<br />
[[Image:cfd_streamtracer1.png|1000px]]<br />
<br />
<br />
<br />
==Glyphs perpendicular to a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
<br />
Lets create a half slice. This will be used as the seed plane for glyphs.<br />
<br />
*'''Filters → Common → Slice'''. Origin '''0, 0, 5'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
Now, apply glyphs.<br />
<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Color by: '''v'''. Change '''Magnitude''' to '''Z'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Representation: '''wireframe'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*Use the mouse to zoom into the glyph vectors.<br />
<br />
<br />
[[Image:cfd_slice_glyph1.png|1000px]]<br />
<br />
<br />
<br />
==Flow in a fluid==<br />
To show a velocity profile we need to sample the dataset with a line, and then create glyphs off of this line. This can be done using a trick in ParaView, i.e., the Plot over Line filter. Note that a Resample to Line filter will be added in ParaView 5.11 or so. <br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
<br />
Lets sample over a line.<br />
<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of the line to '''1'''. Change the '''Resolution''' to '''40'''. '''Apply'''. <br />
*Close the '''LineChartView'''.<br />
*In the '''Pipeline Browser''', turn visibility off for '''disk_out_ref.exo'''.<br />
<br />
We now have a line sampled through the fluid. Lets calculate the negative Z component of V (so it goes the opposite direction on the line from V). That way we can have two profiles, one with V, and one with Vz. <br />
<br />
*'''Filters → Common → Calculator'''. Change '''Result''' to '''Vz'''. Use '''0*iHat+0+jHat+-v_Z*kHat''' for the formula. '''Apply'''.<br />
<br />
Now we want to create two Glyphs - one from the '''Calculator''' filter, and one directly from the '''Plot over Line''' filter.<br />
<br />
*The '''Calculator''' filter should still be highlighted in the Pipeline Browser.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: Vz'''. '''Scale Array: Vz '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Click on the '''Color Editor''' icon. Change the color to Orange. '''Apply'''.<br />
*In the Pipeline Browser select the '''Plot over Line''' filter.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
<br />
Just to create a nice image, I'm going to split the views horizontally, and show this visualization also from the side.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile1.png|1000px]]<br />
<br />
<br />
<br />
==Gradient, Divergence, Vorticity and and Q Criterion==<br />
The '''Gradient''' filter ('''Advanced''' Properties tab) provides Gradient, Divergence, Vorticity and and Q Criterion. Here is am example, using disk_out_ref.exo. <br />
<br />
<br />
[[Image:cfd_gradient1.png|1000px]]<br />
<br />
<br />
<br />
<br />
==Probing a fluid==<br />
There are numerous ways to probe the cells and points of a fluid. One is with the '''Hover Points On''' and '''Hover Cells On''' icons just above the Renderview. Another is with the Probe filter. Here is how to slice and probe a filter.<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
The '''Probe''' filter works much better with '''Auto Apply''' turned on. This is the icon that looks like a tree growing out of a cube.<br />
<br />
*'''Auto Apply''' on<br />
<br />
*'''Filters → Data Analysis → Probe'''. Now, move over '''disk_out_ref.exo''', updating the probed location with the '''p''' key.<br />
<br />
The '''probed''' data will show in the Spreadsheet view.<br />
<br />
<br />
[[Image:cfd_probe1.png|1000px]]<br />
<br />
<br />
==Animating a static vector field==<br />
*If you have a vector field in your data, you can animate a static dataset.<br />
*Our goal is to create a set of streamlines from a vector field, place points on this set of streamlines, and animate the point down the streamlines. We will also add glyphs to the streamline points. <br />
*Open disk_out_ref.exo. '''Apply'''.<br />
*Click the '''-X''' icon.<br />
*'''Stream tracer''' filter. (We are already streamtracing on V). Change Seed Type to '''Point Cloud'''. Optional - I changed the Opacity to 0.4. '''Apply'''.<br />
*'''Contour''' filter. Contour on '''IntegrationTime'''. '''Apply'''.<br />
*'''Glyph''' filter. Vectors '''V'''. No Scale Array. Scale 1. Glyph Mode ''' All Points'''. '''Apply'''.<br />
*View/ Animation View.<br />
*Mode '''Sequence''', No. Frames: '''100'''. <br />
*Change the pulldown box next to the blue '''+''' to be '''Contour'''.<br />
*Click the blue '''+'''. Note it works better if you use 0 for the start.<br />
*Now, click the play button. In the pipeline browser, I also turned off visibility for the Contour filter.<br />
<br />
<br />
[[Image:cfd_animating_static_field.png|1000px]]<br />
<br />
<br />
<br />
==Volume Rendering==</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64672Computational Fluid Dynamics2021-11-13T03:13:49Z<p>Wascott: </p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*With the mouse, rotate the slices around so you can see both surfaces.<br />
<br />
<br />
[[Image:cfd_slices2.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
*'''Reset'''<br />
<br />
<br />
[[Image:cfd_streamtracer1.png|1000px]]<br />
<br />
<br />
<br />
==Glyphs perpendicular to a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
<br />
Lets create a half slice. This will be used as the seed plane for glyphs.<br />
<br />
*'''Filters → Common → Slice'''. Origin '''0, 0, 5'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
Now, apply glyphs.<br />
<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Color by: '''v'''. Change '''Magnitude''' to '''Z'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Representation: '''wireframe'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*Use the mouse to zoom into the glyph vectors.<br />
<br />
<br />
[[Image:cfd_slice_glyph1.png|1000px]]<br />
<br />
<br />
<br />
==Flow in a fluid==<br />
To show a velocity profile we need to sample the dataset with a line, and then create glyphs off of this line. This can be done using a trick in ParaView, i.e., the Plot over Line filter. Note that a Resample to Line filter will be added in ParaView 5.11 or so. <br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
<br />
Lets sample over a line.<br />
<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of the line to '''1'''. Change the '''Resolution''' to '''40'''. '''Apply'''. <br />
*Close the '''LineChartView'''.<br />
*In the '''Pipeline Browser''', turn visibility off for '''disk_out_ref.exo'''.<br />
<br />
We now have a line sampled through the fluid. Lets calculate the negative Z component of V (so it goes the opposite direction on the line from V). That way we can have two profiles, one with V, and one with Vz. <br />
<br />
*'''Filters → Common → Calculator'''. Change '''Result''' to '''Vz'''. Use '''0*iHat+0+jHat+-v_Z*kHat''' for the formula. '''Apply'''.<br />
<br />
Now we want to create two Glyphs - one from the '''Calculator''' filter, and one directly from the '''Plot over Line''' filter.<br />
<br />
*The '''Calculator''' filter should still be highlighted in the Pipeline Browser.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: Vz'''. '''Scale Array: Vz '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Click on the '''Color Editor''' icon. Change the color to Orange. '''Apply'''.<br />
*In the Pipeline Browser select the '''Plot over Line''' filter.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
<br />
Just to create a nice image, I'm going to split the views horizontally, and show this visualization also from the side.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile1.png|1000px]]<br />
<br />
<br />
<br />
==Gradient, Divergence, Vorticity and and Q Criterion==<br />
The '''Gradient''' filter ('''Advanced''' Properties tab) provides Gradient, Divergence, Vorticity and and Q Criterion. Here is am example, using disk_out_ref.exo. <br />
<br />
<br />
[[Image:cfd_gradient1.png|1000px]]<br />
<br />
<br />
<br />
<br />
==Probing a fluid==<br />
There are numerous ways to probe the cells and points of a fluid. One is with the '''Hover Points On''' and '''Hover Cells On''' icons just above the Renderview. Another is with the Probe filter. Here is how to slice and probe a filter.<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
The '''Probe''' filter works much better with '''Auto Apply''' turned on. This is the icon that looks like a tree growing out of a cube.<br />
<br />
*'''Auto Apply''' on<br />
<br />
*'''Filters → Data Analysis → Probe'''. Now, move over '''disk_out_ref.exo''', updating the probed location with the '''p''' key.<br />
<br />
The '''probed''' data will show in the Spreadsheet view.<br />
<br />
<br />
[[Image:cfd_probe1.png|1000px]]<br />
<br />
<br />
==Animating a static vector field==<br />
*If you have a vector field in your data, you can animate a static dataset.<br />
*Our goal is to create a set of streamlines from a vector field, place points on this set of streamlines, and animate the point down the streamlines. We will also add glyphs to the streamline points. <br />
*Open disk_out_ref.exo. '''Apply'''.<br />
*Click the '''-X''' icon.<br />
*'''Stream tracer''' filter. (We are already streamtracing on V). Change Seed Type to '''Point Cloud'''. Optional - I changed the Opacity to 0.4. '''Apply'''.<br />
*'''Contour''' filter. Contour on '''IntegrationTime'''. '''Apply'''.<br />
*'''Glyph''' filter. Vectors '''V'''. No Scale Array. Scale 1. Glyph Mode ''' All Points'''. '''Apply'''.<br />
*View/ Animation View.<br />
*Mode '''Sequence''', No. Frames: '''100'''. <br />
*Change the pulldown box next to the blue '''+''' to be '''Contour'''.<br />
*Click the blue '''+'''. Note it works better if you use 0 for the start.<br />
*Now, click the play button. In the pipeline browser, I also turned off visibility for the Contour filter.<br />
<br />
<br />
[[Image:cfd_animating_static_field.png|00px]]<br />
<br />
<br />
<br />
==Volume Rendering==</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=File:Cfd_probe1.png&diff=64671File:Cfd probe1.png2021-11-13T02:48:57Z<p>Wascott: </p>
<hr />
<div></div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64670Computational Fluid Dynamics2021-11-13T02:47:19Z<p>Wascott: </p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*With the mouse, rotate the slices around so you can see both surfaces.<br />
<br />
<br />
[[Image:cfd_slices2.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
*'''Reset'''<br />
<br />
<br />
[[Image:cfd_streamtracer1.png|1000px]]<br />
<br />
<br />
<br />
==Glyphs perpendicular to a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
<br />
Lets create a half slice. This will be used as the seed plane for glyphs.<br />
<br />
*'''Filters → Common → Slice'''. Origin '''0, 0, 5'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
Now, apply glyphs.<br />
<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Color by: '''v'''. Change '''Magnitude''' to '''Z'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Representation: '''wireframe'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*Use the mouse to zoom into the glyph vectors.<br />
<br />
<br />
[[Image:cfd_slice_glyph1.png|1000px]]<br />
<br />
<br />
<br />
==Flow in a fluid==<br />
To show a velocity profile we need to sample the dataset with a line, and then create glyphs off of this line. This can be done using a trick in ParaView, i.e., the Plot over Line filter. Note that a Resample to Line filter will be added in ParaView 5.11 or so. <br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
<br />
Lets sample over a line.<br />
<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of the line to '''1'''. Change the '''Resolution''' to '''40'''. '''Apply'''. <br />
*Close the '''LineChartView'''.<br />
*In the '''Pipeline Browser''', turn visibility off for '''disk_out_ref.exo'''.<br />
<br />
We now have a line sampled through the fluid. Lets calculate the negative Z component of V (so it goes the opposite direction on the line from V). That way we can have two profiles, one with V, and one with Vz. <br />
<br />
*'''Filters → Common → Calculator'''. Change '''Result''' to '''Vz'''. Use '''0*iHat+0+jHat+-v_Z*kHat''' for the formula. '''Apply'''.<br />
<br />
Now we want to create two Glyphs - one from the '''Calculator''' filter, and one directly from the '''Plot over Line''' filter.<br />
<br />
*The '''Calculator''' filter should still be highlighted in the Pipeline Browser.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: Vz'''. '''Scale Array: Vz '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Click on the '''Color Editor''' icon. Change the color to Orange. '''Apply'''.<br />
*In the Pipeline Browser select the '''Plot over Line''' filter.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
<br />
Just to create a nice image, I'm going to split the views horizontally, and show this visualization also from the side.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile1.png|1000px]]<br />
<br />
<br />
<br />
==Gradient, Divergence, Vorticity and and Q Criterion==<br />
The '''Gradient''' filter ('''Advanced''' Properties tab) provides Gradient, Divergence, Vorticity and and Q Criterion. Here is am example, using disk_out_ref.exo. <br />
<br />
<br />
[[Image:cfd_gradient1.png|1000px]]<br />
<br />
<br />
<br />
<br />
==Probing a fluid==<br />
There are numerous ways to probe the cells and points of a fluid. One is with the '''Hover Points On''' and '''Hover Cells On''' icons just above the Renderview. Another is with the Probe filter. Here is how to slice and probe a filter.<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
The '''Probe''' filter works much better with '''Auto Apply''' turned on. This is the icon that looks like a tree growing out of a cube.<br />
<br />
*'''Auto Apply''' on<br />
<br />
*'''Filters → Data Analysis → Probe'''. Now, move over '''disk_out_ref.exo''', updating the probed location with the '''p''' key.<br />
<br />
The '''probed''' data will show in the Spreadsheet view.<br />
<br />
<br />
<br />
[[Image:cfd_probe1.png|1000px]]<br />
<br />
<br />
<br />
<br />
<br />
==Volume Rendering==</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=File:Cfd_gradient1.png&diff=64669File:Cfd gradient1.png2021-11-13T02:32:25Z<p>Wascott: </p>
<hr />
<div></div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64668Computational Fluid Dynamics2021-11-13T02:31:26Z<p>Wascott: </p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*With the mouse, rotate the slices around so you can see both surfaces.<br />
<br />
<br />
[[Image:cfd_slices2.png|1000px]]<br />
<br />
<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
*'''Reset'''<br />
<br />
<br />
[[Image:cfd_streamtracer1.png|1000px]]<br />
<br />
<br />
<br />
==Glyphs perpendicular to a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
<br />
Lets create a half slice. This will be used as the seed plane for glyphs.<br />
<br />
*'''Filters → Common → Slice'''. Origin '''0, 0, 5'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
Now, apply glyphs.<br />
<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Color by: '''v'''. Change '''Magnitude''' to '''Z'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Representation: '''wireframe'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*Use the mouse to zoom into the glyph vectors.<br />
<br />
<br />
[[Image:cfd_slice_glyph1.png|1000px]]<br />
<br />
<br />
<br />
==Flow in a fluid==<br />
To show a velocity profile we need to sample the dataset with a line, and then create glyphs off of this line. This can be done using a trick in ParaView, i.e., the Plot over Line filter. Note that a Resample to Line filter will be added in ParaView 5.11 or so. <br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
<br />
Lets sample over a line.<br />
<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of the line to '''1'''. Change the '''Resolution''' to '''40'''. '''Apply'''. <br />
*Close the '''LineChartView'''.<br />
*In the '''Pipeline Browser''', turn visibility off for '''disk_out_ref.exo'''.<br />
<br />
We now have a line sampled through the fluid. Lets calculate the negative Z component of V (so it goes the opposite direction on the line from V). That way we can have two profiles, one with V, and one with Vz. <br />
<br />
*'''Filters → Common → Calculator'''. Change '''Result''' to '''Vz'''. Use '''0*iHat+0+jHat+-v_Z*kHat''' for the formula. '''Apply'''.<br />
<br />
Now we want to create two Glyphs - one from the '''Calculator''' filter, and one directly from the '''Plot over Line''' filter.<br />
<br />
*The '''Calculator''' filter should still be highlighted in the Pipeline Browser.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: Vz'''. '''Scale Array: Vz '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Click on the '''Color Editor''' icon. Change the color to Orange. '''Apply'''.<br />
*In the Pipeline Browser select the '''Plot over Line''' filter.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
<br />
Just to create a nice image, I'm going to split the views horizontally, and show this visualization also from the side.<br />
<br />
<br />
[[Image:cfd_fluid_velocity_profile1.png|1000px]]<br />
<br />
<br />
<br />
==Gradient, Divergence, Vorticity and and Q Criterion==<br />
The '''Gradient''' filter ('''Advanced''' Properties tab) provides Gradient, Divergence, Vorticity and and Q Criterion. Here is am example, using disk_out_ref.exo. <br />
<br />
<br />
[[Image:cfd_gradient1.png|1000px]]<br />
<br />
<br />
<br />
<br />
==Probing a fluid==<br />
<br />
==Volume Rendering==</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64667Computational Fluid Dynamics2021-11-13T02:25:22Z<p>Wascott: /* Flow in a fluid */</p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*With the mouse, rotate the slices around so you can see both surfaces.<br />
<br />
[[Image:cfd_slices2.png|1000px]]<br />
<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
*'''Reset'''<br />
<br />
<br />
[[Image:cfd_streamtracer1.png|1000px]]<br />
<br />
<br />
<br />
==Glyphs perpendicular to a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
<br />
Lets create a half slice. This will be used as the seed plane for glyphs.<br />
<br />
*'''Filters → Common → Slice'''. Origin '''0, 0, 5'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
Now, apply glyphs.<br />
<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Color by: '''v'''. Change '''Magnitude''' to '''Z'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Representation: '''wireframe'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*Use the mouse to zoom into the glyph vectors.<br />
<br />
[[Image:cfd_slice_glyph1.png|1000px]]<br />
<br />
==Flow in a fluid==<br />
To show a velocity profile we need to sample the dataset with a line, and then create glyphs off of this line. This can be done using a trick in ParaView, i.e., the Plot over Line filter. Note that a Resample to Line filter will be added in ParaView 5.11 or so. <br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
<br />
Lets sample over a line.<br />
<br />
*'''Filters → Data Analysis → Plot over Line'''. '''Y Axis'''. Change the '''Z''' component of the line to '''1'''. Change the '''Resolution''' to '''40'''. '''Apply'''. <br />
*Close the '''LineChartView'''.<br />
*In the '''Pipeline Browser''', turn visibility off for '''disk_out_ref.exo'''.<br />
<br />
We now have a line sampled through the fluid. Lets calculate the negative Z component of V (so it goes the opposite direction on the line from V). That way we can have two profiles, one with V, and one with Vz. <br />
<br />
*'''Filters → Common → Calculator'''. Change '''Result''' to '''Vz'''. Use '''0*iHat+0+jHat+-v_Z*kHat''' for the formula. '''Apply'''.<br />
<br />
Now we want to create two Glyphs - one from the '''Calculator''' filter, and one directly from the '''Plot over Line''' filter.<br />
<br />
*The '''Calculator''' filter should still be highlighted in the Pipeline Browser.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: Vz'''. '''Scale Array: Vz '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Click on the '''Color Editor''' icon. Change the color to Orange. '''Apply'''.<br />
*In the Pipeline Browser select the '''Plot over Line''' filter.<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
<br />
Just to create a nice image, I'm going to split the views horizontally, and show this visualization also from the side.<br />
<br />
[[Image:cfd_fluid_velocity_profile1.png|1000px]]<br />
<br />
==Gradient and Curl==<br />
<br />
==Probing a fluid==<br />
<br />
==Volume Rendering==</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=ParaView_Classroom_Tutorials&diff=64666ParaView Classroom Tutorials2021-11-13T02:24:38Z<p>Wascott: /* Targeted lessons */</p>
<hr />
<div>This page contains beginning and advanced tutorial sets, each presented as 3 hour classes internally within Sandia National Laboratories.<br />
<br />
=ParaView training data=<br />
ParaView binaries are downloaded from here: http://www.paraview.org/paraview/resources/software.html<br />
<br />
Paraview data referenced in this tutorial is also located at the download site here: http://www.paraview.org/paraview/resources/software.html<br />
<br />
=Beginning training lessons=<br />
[[Beginning ParaView]]<br />
<br />
[[Beginning Sources and Filters]]<br />
<br />
[[Beginning GUI]]<br />
<br />
[[Beginning Color Maps and Palettes]]<br />
<br />
[[Beginning Plotting]]<br />
<br />
[[Beginning Pictures and Movies]]<br />
<br />
=Advanced training lessons=<br />
[[Advanced Multiblock]]<br />
<br />
[[Advanced Data Analysis]]<br />
<br />
<!--[[Advanced Client Server]]--><br />
[[Advanced Animations]]<br />
<br />
[[Advanced State Management]]<br />
<br />
[[Advanced Client Server]]<br />
<br />
[[Advanced Tips and Tricks]]<br />
=Python and batch training lessons=<br />
[[ParaView and Python]]<br />
<br />
[[Python calculator and programmable filter]]<br />
<br />
[[PvPython and PvBatch]]<br />
<br />
=Targeted lessons=<br />
[[ParaView and CTH]]<br />
<br />
[[Computational Fluid Dynamics]]<br />
<br />
[[Particle simulations]]<br />
<br />
[[Volume rendering - Fire]]<br />
<br />
[[Visualizing large data]]<br />
<br />
[[ParaView Web]]<br />
<br />
=Acknowledgements=<br />
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.</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=ParaView_and_Computational_Fluid_Dynamics&diff=64665ParaView and Computational Fluid Dynamics2021-11-13T02:24:00Z<p>Wascott: Wascott moved page ParaView and Computational Fluid Dynamics to Computational Fluid Dynamics: Original name was verbose. Fixig that.</p>
<hr />
<div>#REDIRECT [[Computational Fluid Dynamics]]</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64664Computational Fluid Dynamics2021-11-13T02:23:59Z<p>Wascott: Wascott moved page ParaView and Computational Fluid Dynamics to Computational Fluid Dynamics: Original name was verbose. Fixig that.</p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*With the mouse, rotate the slices around so you can see both surfaces.<br />
<br />
[[Image:cfd_slices2.png|1000px]]<br />
<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
*'''Reset'''<br />
<br />
<br />
[[Image:cfd_streamtracer1.png|1000px]]<br />
<br />
<br />
<br />
==Glyphs perpendicular to a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
<br />
Lets create a half slice. This will be used as the seed plane for glyphs.<br />
<br />
*'''Filters → Common → Slice'''. Origin '''0, 0, 5'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
Now, apply glyphs.<br />
<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Color by: '''v'''. Change '''Magnitude''' to '''Z'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Representation: '''wireframe'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*Use the mouse to zoom into the glyph vectors.<br />
<br />
[[Image:cfd_slice_glyph1.png|1000px]]<br />
<br />
==Flow in a fluid==<br />
<br />
==Gradient and Curl==<br />
<br />
==Probing a fluid==<br />
<br />
==Volume Rendering==</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=File:Cfd_fluid_velocity_profile1.png&diff=64663File:Cfd fluid velocity profile1.png2021-11-13T02:16:55Z<p>Wascott: </p>
<hr />
<div></div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64662Computational Fluid Dynamics2021-11-13T00:34:40Z<p>Wascott: /* Glyphs perpendicular to a slice */</p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*With the mouse, rotate the slices around so you can see both surfaces.<br />
<br />
[[Image:cfd_slices2.png|1000px]]<br />
<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
*'''Reset'''<br />
<br />
<br />
[[Image:cfd_streamtracer1.png|1000px]]<br />
<br />
<br />
<br />
==Glyphs perpendicular to a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
<br />
Lets create a half slice. This will be used as the seed plane for glyphs.<br />
<br />
*'''Filters → Common → Slice'''. Origin '''0, 0, 5'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
Now, apply glyphs.<br />
<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Color by: '''v'''. Change '''Magnitude''' to '''Z'''.<br />
<br />
Let's put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Representation: '''wireframe'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*Use the mouse to zoom into the glyph vectors.<br />
<br />
[[Image:cfd_slice_glyph1.png|1000px]]<br />
<br />
==Flow in a fluid==<br />
<br />
==Gradient and Curl==<br />
<br />
==Probing a fluid==<br />
<br />
==Volume Rendering==</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=File:Cfd_slice_glyph1.png&diff=64661File:Cfd slice glyph1.png2021-11-13T00:32:16Z<p>Wascott: </p>
<hr />
<div></div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64660Computational Fluid Dynamics2021-11-13T00:30:29Z<p>Wascott: </p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*With the mouse, rotate the slices around so you can see both surfaces.<br />
<br />
[[Image:cfd_slices2.png|1000px]]<br />
<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
*'''Reset'''<br />
<br />
<br />
[[Image:cfd_streamtracer1.png|1000px]]<br />
<br />
<br />
<br />
==Glyphs perpendicular to a slice==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
<br />
Lets create a half slice. This will be used as the seed plane for glyphs.<br />
<br />
*'''Filters → Common → Slice'''. Origin '''0, 0, 5'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
*'''Filters → Common → Clip'''. Uncheck '''Show Plane'''. '''Apply'''. <br />
<br />
Now, apply glyphs.<br />
<br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Arrow'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''.5X'''. '''.5X'''. '''Apply'''.<br />
*Color by: '''v'''. Change '''Magnitude''' to '''Z'''.<br />
<br />
Lets put these glyphs back into context by showing the original dataset.<br />
<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Representation: '''wireframe'''. On the Properties tab, change '''Opacity''' to '''0.3'''.<br />
*Use the mouse to zoom into the glyph vectors.<br />
<br />
[[Image:cfd_slice_glyph1.png|1000px]]<br />
<br />
<br />
==Flow in a fluid==<br />
<br />
==Gradient and Curl==<br />
<br />
==Probing a fluid==<br />
<br />
==Volume Rendering==</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=File:Cfd_streamtracer1.png&diff=64659File:Cfd streamtracer1.png2021-11-12T23:20:02Z<p>Wascott: </p>
<hr />
<div></div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64658Computational Fluid Dynamics2021-11-12T23:17:50Z<p>Wascott: </p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*With the mouse, rotate the slices around so you can see both surfaces.<br />
<br />
[[Image:cfd_slices2.png|1000px]]<br />
<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
*'''Reset'''<br />
<br />
<br />
[[Image:cfd_streamtracer1.png|1000px]]<br />
<br />
<br />
<br />
==Glyphs perpendicular to a slice==<br />
<br />
==Flow in a fluid==<br />
<br />
==Gradient and Curl==<br />
<br />
==Probing a fluid==<br />
<br />
==Volume Rendering==</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=File:Cfd_slices2.png&diff=64657File:Cfd slices2.png2021-11-12T23:11:11Z<p>Wascott: </p>
<hr />
<div></div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64656Computational Fluid Dynamics2021-11-12T23:10:41Z<p>Wascott: /* Slices */</p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*With the mouse, rotate the slices around so you can see both surfaces.<br />
<br />
[[Image:cfd_slices2.png|1000px]]<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
<br />
<br />
picture goes here<br />
<br />
<br />
==Glyphs perpendicular to a slice==<br />
<br />
==Flow in a fluid==<br />
<br />
==Gradient and Curl==<br />
<br />
==Probing a fluid==<br />
<br />
==Volume Rendering==</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64655Computational Fluid Dynamics2021-11-12T23:06:44Z<p>Wascott: </p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*With the mouse, rotate the slices around so you can see both surfaces.<br />
<br />
[[Image:cfd_slices1.png|1000px]]<br />
<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
<br />
<br />
picture goes here<br />
<br />
<br />
==Glyphs perpendicular to a slice==<br />
<br />
==Flow in a fluid==<br />
<br />
==Gradient and Curl==<br />
<br />
==Probing a fluid==<br />
<br />
==Volume Rendering==</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=File:Cfd_slices1.png&diff=64654File:Cfd slices1.png2021-11-12T23:04:45Z<p>Wascott: </p>
<hr />
<div></div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64653Computational Fluid Dynamics2021-11-12T23:04:10Z<p>Wascott: </p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''+X'''<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*With the mouse, rotate the slices around so you can see both surfaces.<br />
<br />
[[Image:cfd_slices1.png]]<br />
<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
<br />
<br />
picture goes here<br />
<br />
<br />
==Glyphs perpendicular to a slice==<br />
<br />
==Flow in a fluid==<br />
<br />
==Gradient and Curl==<br />
<br />
==Probing a fluid==<br />
<br />
==Volume Rendering==</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64652Computational Fluid Dynamics2021-10-29T02:48:28Z<p>Wascott: </p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Turn on visibility (click on the eyeball to the left).<br />
*In the Properties tab, (down a few pages), change '''Opacity''' to '''0.4'''.<br />
<br />
<br />
picture goes here<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
<br />
<br />
picture goes here<br />
<br />
<br />
==Glyphs perpendicular to a slice==<br />
<br />
==Flow in a fluid==<br />
<br />
==Gradient and Curl==<br />
<br />
==Probing a fluid==<br />
<br />
==Volume Rendering==</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64651Computational Fluid Dynamics2021-10-29T02:44:28Z<p>Wascott: </p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Turn on visibility (click on the eyeball to the left).<br />
*In the Properties tab, (down a few pages), change '''Opacity''' to '''0.4'''.<br />
<br />
<br />
file goes here<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
<br />
<br />
file goes here<br />
<br />
<br />
==Glyphs in 3d space==<br />
<br />
==Glyphs perpendicular to a slice==<br />
<br />
==Flow in a fluid==<br />
<br />
==Gradient and Curl==<br />
<br />
==Probing a fluid==<br />
<br />
==Volume Rendering==</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64650Computational Fluid Dynamics2021-10-29T02:43:43Z<p>Wascott: </p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Turbo'''.<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Turn on visibility (click on the eyeball to the left).<br />
*In the Properties tab, (down a few pages), change '''Opacity''' to '''0.4'''.<br />
<br />
<br />
file goes here<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''temp'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
<br />
<br />
==Glyphs in 3d space==<br />
<br />
==Glyphs perpendicular to a slice==<br />
<br />
==Flow in a fluid==<br />
<br />
==Gradient and Curl==<br />
<br />
==Probing a fluid==<br />
<br />
==Volume Rendering==</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Computational_Fluid_Dynamics&diff=64649Computational Fluid Dynamics2021-10-29T02:14:32Z<p>Wascott: Created page with "=Visualizing Computational Fluid Dynamics= This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Parav..."</p>
<hr />
<div>=Visualizing Computational Fluid Dynamics=<br />
This tutorial shows common visualization techniques for cfd datasets. We will be using the dataset disk_out_ref.exo, found in Paraview under File/ Open/ Examples. It has a vector field in it called V.<br />
<br />
==Slices==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Common → Slice'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''v'''.<br />
*In the pipeline browser, select '''disk_out_ref.exo'''<br />
*'''Filters → Common → Slice'''. '''Y Normal'''. '''Apply'''. Unselect the '''Show Plane'''.<br />
*Color by: '''pres'''.<br />
*'''View → Color Map Editor → Presets''' (the little envelope with a heart)''' → Black Body Radiation'''.<br />
*Select '''disk_out_ref.exo''' in the Pipeline Browser. Turn on visibility (click on the eyeball to the left).<br />
*In the Properties tab, (down a few pages), change '''Opacity''' to '''0.4'''.<br />
<br />
<br />
file goes here<br />
<br />
==Stream Tracers - lines and tubes==<br />
*'''File → Open → Examples → disk_out_ref.exo.'''. On the '''Properties''' tab, click '''Apply'''.<br />
*'''Filters → Common → Stream Tracer'''. '''v'''. Seed Type: '''Point Cloud'''. Uncheck '''Show Sphere'''. '''Apply'''. <br />
*Color by: '''v'''.<br />
<br />
Lines don't color as nicely as surfaces. Lets add a tube filter around each streamline.<br />
<br />
*'''Filters → Search'''. Type '''Tube'''. '''Apply'''. <br />
<br />
Now, we want to know which directions the particles are moving. We will use a glyph filter. Note we place the glyph filter on the streamline, not the tube.<br />
<br />
*Select '''StreamTracer''' in the Pipeline Browser. <br />
*'''Filters → Common → Glyph'''. '''Glyph Type: Cone'''. '''Orientation Array: v'''. '''Scale Array: v '''. '''Very Important - Scale Factor''' select the recycle button to the right. '''Apply'''.<br />
*Color by: '''pres'''.<br />
<br />
<br />
==Glyphs in 3d space==<br />
<br />
==Glyphs on a slice==<br />
<br />
==Flow in a fluid==<br />
<br />
==Gradient and Curl==<br />
<br />
==Probing a fluid==<br />
<br />
==Volume Rendering==</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=ParaView_Classroom_Tutorials&diff=64648ParaView Classroom Tutorials2021-10-28T23:27:10Z<p>Wascott: /* Targeted lessons */</p>
<hr />
<div>This page contains beginning and advanced tutorial sets, each presented as 3 hour classes internally within Sandia National Laboratories.<br />
<br />
=ParaView training data=<br />
ParaView binaries are downloaded from here: http://www.paraview.org/paraview/resources/software.html<br />
<br />
Paraview data referenced in this tutorial is also located at the download site here: http://www.paraview.org/paraview/resources/software.html<br />
<br />
=Beginning training lessons=<br />
[[Beginning ParaView]]<br />
<br />
[[Beginning Sources and Filters]]<br />
<br />
[[Beginning GUI]]<br />
<br />
[[Beginning Color Maps and Palettes]]<br />
<br />
[[Beginning Plotting]]<br />
<br />
[[Beginning Pictures and Movies]]<br />
<br />
=Advanced training lessons=<br />
[[Advanced Multiblock]]<br />
<br />
[[Advanced Data Analysis]]<br />
<br />
<!--[[Advanced Client Server]]--><br />
[[Advanced Animations]]<br />
<br />
[[Advanced State Management]]<br />
<br />
[[Advanced Client Server]]<br />
<br />
[[Advanced Tips and Tricks]]<br />
=Python and batch training lessons=<br />
[[ParaView and Python]]<br />
<br />
[[Python calculator and programmable filter]]<br />
<br />
[[PvPython and PvBatch]]<br />
<br />
=Targeted lessons=<br />
[[ParaView and CTH]]<br />
<br />
[[ParaView and Computational Fluid Dynamics]]<br />
<br />
[[Particle simulations]]<br />
<br />
[[Volume rendering - Fire]]<br />
<br />
[[Visualizing large data]]<br />
<br />
[[ParaView Web]]<br />
<br />
=Acknowledgements=<br />
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.</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=ParaView_and_Python&diff=64627ParaView and Python2021-06-25T17:01:56Z<p>Wascott: /* Control time */</p>
<hr />
<div>=Introduction=<br />
ParaView offers a rich and powerful Python interface. This allows users to automate processing of their data, and gives access to powerful tools in the Visualization Tool Kit (VTK). This tutorial will describe ParaView and Python. It shows a user how to drive ParaView using Python commands, and how to automate the creation and use of these commands.<br />
<br />
=Overview=<br />
ParaView is a client/ server architecture. The client includes the ParaView GUI and display. The server reads the user's data, processes the data, and passes these images to the client. We can use Python to control ParaView either in the GUI, at the client level, or directly on the server.<br />
<br />
<br />
=A simple Python toy example within ParaView=<br />
*Start '''ParaView'''.<br />
*Start the Python Interpreter '''Tools → Python Shell''' <br />
:Notes <br />
::You can copy commands from elsewhere and paste them into the Python Shell.<br />
::Python is case sensitive. Be sure to use correct capitalization as shown below.<br />
::Python is indent sensitive. Be sure to not indent, as shown below.<br />
<br />
<br />
:Lets create and display a sphere.<br />
::(Type the following into the Python Shell)<br />
:::'''sphere=Sphere()'''<br />
:::'''Show()'''<br />
:::'''Render()'''<br />
<br />
:We have now created a sphere in the pipeline, turned on it's visibility, and re-rendered.<br />
<br />
<br />
:Next, lets add a shrink filter. We hide the sphere, add the shrink filter, and re-render.<br />
:::'''Hide()'''<br />
:::'''Render()'''<br />
:::'''shrink=Shrink()'''<br />
:::'''Show()'''<br />
:::'''Render()'''<br />
<br />
<br />
:ParaView will allow us to use either the GUI controls or Python. For instance:<br />
::Select the Sphere in the pipeline browser.<br />
::In the Python Shell, type the following:<br />
:::'''clip=Clip()'''<br />
:::'''Show()'''<br />
:::'''Render()'''<br />
::Or, we could continue in the Python as follows:<br />
:::'''clip=Clip()'''<br />
:::'''Hide(shrink)'''<br />
:::'''Show(clip)'''<br />
:::'''Render()'''<br />
<br />
:Hide the Plane widget:<br />
:::'''Hide3DWidgets(proxy=clip)<br />
<br />
<br />
<br />
:Help! (How do we find out what commands are available?)<br />
::To see all commands available in ParaView:<br />
:::'''dir()'''<br />
::To see all of the options for the Clip creator:<br />
:::'''dir(Clip)'''<br />
::To see all of the options for the instance of the clip we created above:<br />
:::'''dir(clip)'''<br />
<br />
::A better tool to see the available commands for an item in the pipeline is ListProperties, such as:<br />
:::'''clip.ListProperties()'''<br />
::::Note that this doesn't work on instantiated controls, such as the camera. Use dir() for controls such as camera.<br />
::And, to see the different properties of the ClipType variable, use<br />
:::'''clip.ClipType.ListProperties()'''<br />
<br />
::To see lots of detail on an instance of a command, create the instance and ask for help on that instance..<br />
:::'''help(clip)'''<br />
<br />
<br />
:Change! (Lets look at, and change, something)<br />
::Print the Theta Resolution<br />
:::'''print(sphere.ThetaResolution)'''<br />
::Change it to 64<br />
:::'''sphere.ThetaResolution=64'''<br />
:::'''Show()'''<br />
:::'''Render()'''<br />
<br />
<br />
:Control input<br />
::Lets change the selected filter in the Pipeline Browser:<br />
:::'''SetActiveSource(sphere)'''<br />
::Lets delete the clip<br />
:::'''Delete(clip)'''<br />
::Lets add a filter to the sphere, without selecting it first<br />
:::'''wireframe=ExtractEdges(Input=sphere)'''<br />
:::'''Show()'''<br />
:::'''Render()'''<br />
<br />
=A simple Python example reading a datafile and writing a screenshot=<br />
*Within the ParaView GUI, '''Edit → Reset Session'''<br />
*Start the Python Interpreter '''Tools → Python Shell''' <br />
===Read in data, use a filter and save a screenshot===<br />
:Lets read in can.exo, clip can.exo, paint can.exo and save a screenshot.<br />
:We use this templagte.<br />
:::'''canex2=OpenDataFile('D:/directoryName/can.ex2')'''<br />
:Here is the current path. Be sure to update for version number<br />
:::'''canex2=OpenDataFile('C:/Program Files (x86)/ParaView 5.4.1/data/can.ex2')'''<br />
:::'''clip=Clip()'''<br />
:::'''Hide(canex2)'''<br />
:::'''Show(clip)'''<br />
:::'''ResetCamera()'''<br />
:::'''Render()'''<br />
:::'''SaveScreenshot('D:\\directoryName\\picture.jpg')'''<br />
<br />
Information on file readers is found in chapter 2.2 of The ParaView Guide http://www.paraview.org/paraview-guide/<br />
<br />
===Control time===<br />
::We want to move forward one timestep, so min and max are set correctly for a variable<br />
:::'''animationScene1 = GetAnimationScene()'''<br />
:::'''animationScene1.GoToNext()'''<br />
<br />
::Playing through all time is done with the following command. <br />
:::'''animationScene1.Play()'''<br />
<br />
::We need to acquire the available timesteps:<br />
:::'''tk = GetTimeKeeper()'''<br />
:::'''timesteps = tk.TimestepValues'''<br />
<br />
::First timestep is found using either of these methods:<br />
:::'''animationScene1.GoToFirst()'''<br />
:::'''animationScene1.AnimationTime = timesteps[0]'''<br />
<br />
::Last timestep is found using either of these methods: <br />
:::'''animationScene1.GoToLast()'''<br />
:::'''animationScene1.AnimationTime = timesteps[-1]'''<br />
<br />
::Moving to a specific timestep (such as timestep 10) is done as follows<br />
:::'''animationScene1.AnimationTime = timesteps[9]''' # index starts with 0<br />
<br />
::To find out how many timesteps we have, you use the len command. Continued on from above.<br />
:::'''numTimesteps = len(timesteps)'''<br />
<br />
<br />
::Available commands are found using:<br />
:::'''dir(animationScene1)''' (after you have created the animationScene1 variable)<br />
:::'''dir(GetAnimationScene())'''<br />
<br />
===Control the camera===<br />
::We want to move the camera.<br />
::First, get the camera and reset the camera to a known good position.<br />
:::'''camera=GetActiveCamera()'''<br />
:::'''camera.SetFocalPoint(0,0,0)'''<br />
:::'''camera.SetPosition(0,0,-10)'''<br />
:::'''camera.SetViewUp(0,1,0)'''<br />
<br />
::How to move the camera closer or further away<br />
:::'''camera.Dolly(10)'''<br />
:::'''Render()''' <br />
:::'''camera.Dolly(.1)'''<br />
:::'''Render()''' <br />
<br />
::How to rotate the camera around the view direction 45 degrees, centered on the dataset. After the reset above, rotate around the X axis.<br />
:::'''camera.Roll(45)'''<br />
:::'''Render()''' <br />
<br />
::How to rotate the camera around the vector up, centered on the Y axis. After the reset above, rotate around the Y axis.<br />
:::'''camera.Yaw(45)'''<br />
:::'''Render()''' <br />
<br />
::How to rotate the camera vertically around the camera point<br />
:::'''camera.Pitch(45)'''<br />
:::'''Render()''' <br />
<br />
::How to rotate the camera around the vector up, centered on the dataset. After the reset above, rotate around the Y axis.<br />
:::'''camera.Azimuth(45)'''<br />
:::'''Render()''' <br />
<br />
::How to rotate the camera around the X axis, centered on the dataset. After the reset above, rotate around the Y axis.<br />
:::'''camera.Elevation(45)'''<br />
:::'''Render()''' <br />
<br />
::How to reset the camera<br />
:::'''ResetCamera()'''<br />
<br />
<br />
::Available commands are found using:<br />
:::'''dir(camera)''' (after you have created the animationScene1 variable)<br />
:::'''dir(GetActiveCamera())'''<br />
<br />
===Paint by a variable===<br />
::We want to color by the variable.<br />
::Be sure to Show the Clip, and not the Can.<br />
::Steps are, move forward one timestep, get the renderview, get the display, get the variables, ColorBy.<br />
:::'''animationScene1 = GetAnimationScene()'''<br />
:::'''animationScene1.GoToNext()'''<br />
:::'''renderView1 = GetActiveViewOrCreate('RenderView')'''<br />
:::'''canex2Display = Show(clip, renderView1)'''<br />
:: Get point var names<br />
:::'''canexxxx =GetActiveSource()<br />
:::'''print ( canexxx.PointVariables.GetAvailable())'''<br />
:: Get Cell var names<br />
:::'''print ( canexxx.ElementPointVariables.GetAvailable())'''<br />
:: For point vars<br />
:::'''vars = canex2.PointVariables.GetAvailable()'''<br />
:::'''print (vars)<br />
:::'''ColorBy(canex2Display, ('POINTS', vars[0]))'''<br />
:: For cell vars<br />
:::'''vars = canex2.ElementVariables.GetAvailable()'''<br />
:::'''print (vars)<br />
:::'''ColorBy(canex2Display, ('CELLS', vars[0]))'''<br />
<br />
:::'''Render()''' (Actually not needed)<br />
<br />
<br />
Information on reading variable information is found in chapter 3.3 of The ParaView Guide http://www.paraview.org/paraview-guide/<br />
<br />
=Scale Around Dataset Center - A userful example=<br />
:We want to create a script that allows us to scale a dataset around it's center.<br />
::This example shows how to get the active source, get the bounds, and transform the camera.<br />
<br />
:::'''scale_factor = 2'''<br />
:::'''indata = GetActiveSource()'''<br />
<br />
:::'''bounds = indata.GetDataInformation().GetBounds()'''<br />
:::'''center = ((bounds[0] + bounds[1])/2, (bounds[2] + bounds[3])/2,(bounds[4] + bounds[5])/2)'''<br />
<br />
:::'''transform_to_center = Transform()'''<br />
:::'''transform_to_center.Transform.Translate = [-center[0], -center[1], -center[2]]'''<br />
:::'''Hide()'''<br />
<br />
:::'''scale = Transform()'''<br />
:::'''scale.Transform.Scale = [scale_factor, scale_factor, scale_factor]'''<br />
:::'''Hide()'''<br />
<br />
:::'''transform_from_center = Transform()'''<br />
:::'''transform_from_center.Transform.Translate = [center[0], center[1], center[2]]'''<br />
:::'''Show()'''<br />
<br />
:::'''Render()'''<br />
<br />
=Trace Recorder=<br />
ParaView includes a tool to automatically generate Python scripts for us. It is called the Trace Recorder. An example is as follows.<br />
:Read in can.exo, clip can, paint by EQPS, change the camera to +Y, write out a screenshot and write out a movie<br />
*'''Tools → Start Trace''' Select '''Show Incremental Trace'''.<br />
*'''File → Open'''. Open can.exo. OK.<br />
*Turn all variables on.<br />
*'''Apply'''.<br />
*'''+Y'''<br />
*Clip. Y Normal. Unselect Show Plane. Apply.<br />
*Color by EQPS.<br />
*Last timestep. <br />
*Rescale to Data Range<br />
*First timestep.<br />
*'''File → Save Screenshot'''. Save as .png.<br />
*'''File → Save Animation'''. Save as .avi.<br />
*'''Tools → Stop Trace''' <br />
*'''File → Save'''. Save to a known location.<br />
<br />
:Another way to find Python for ParaView is through Save State. This should be a last resort, but it may include commands that the Trace Recorder missed. '''File → Save State → Python State File.<br />
<br />
<br />
=Running Scripts=<br />
ParaView allows a user to run a script. This is done as follows:<br />
*'''Tools → Python Shell''' <br />
*'''Run Script'''<br />
Now, browse to your script, and select OK. <br />
<br />
<br />
=Macros=<br />
ParaView can save and use Python scripts that have been placed in a known location. When you create a trace, you have the option to '''File → Save As Macro'''. You also have the option on the Macros menu to '''Add new macro'''. Macros will be added to the Macro toolbar at the top of the ParaView GUI. You can edit and delete these Macros through the '''Macro menu'''.<br />
<br />
:As an example, lets add the python script that we created above.<br />
*'''Macros → Add new macro''', find your macro, and click '''OK'''.<br />
*Click on your '''Macro''' on the toolbar.<br />
<br />
<br />
<br />
=Python Help=<br />
Python documentation (out of date) http://www.paraview.org/Wiki/ParaView/Python_Scripting<br />
<br />
The ParaView Guide (Python scattered throughout the guide) http://www.paraview.org/paraview-guide/<br />
<br />
<!--[[Image:beginning_paraview_1.jpg|800px]] --> <br />
<!--[[Image:beginning_paraview_2.jpg|800px]] --><br />
<br />
=Where do you go next?=<br />
*ParaView Batch.<br />
<br />
=Acknowledgements=<br />
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.</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=ParaView_and_Python&diff=64626ParaView and Python2021-06-25T16:55:14Z<p>Wascott: /* Control time */</p>
<hr />
<div>=Introduction=<br />
ParaView offers a rich and powerful Python interface. This allows users to automate processing of their data, and gives access to powerful tools in the Visualization Tool Kit (VTK). This tutorial will describe ParaView and Python. It shows a user how to drive ParaView using Python commands, and how to automate the creation and use of these commands.<br />
<br />
=Overview=<br />
ParaView is a client/ server architecture. The client includes the ParaView GUI and display. The server reads the user's data, processes the data, and passes these images to the client. We can use Python to control ParaView either in the GUI, at the client level, or directly on the server.<br />
<br />
<br />
=A simple Python toy example within ParaView=<br />
*Start '''ParaView'''.<br />
*Start the Python Interpreter '''Tools → Python Shell''' <br />
:Notes <br />
::You can copy commands from elsewhere and paste them into the Python Shell.<br />
::Python is case sensitive. Be sure to use correct capitalization as shown below.<br />
::Python is indent sensitive. Be sure to not indent, as shown below.<br />
<br />
<br />
:Lets create and display a sphere.<br />
::(Type the following into the Python Shell)<br />
:::'''sphere=Sphere()'''<br />
:::'''Show()'''<br />
:::'''Render()'''<br />
<br />
:We have now created a sphere in the pipeline, turned on it's visibility, and re-rendered.<br />
<br />
<br />
:Next, lets add a shrink filter. We hide the sphere, add the shrink filter, and re-render.<br />
:::'''Hide()'''<br />
:::'''Render()'''<br />
:::'''shrink=Shrink()'''<br />
:::'''Show()'''<br />
:::'''Render()'''<br />
<br />
<br />
:ParaView will allow us to use either the GUI controls or Python. For instance:<br />
::Select the Sphere in the pipeline browser.<br />
::In the Python Shell, type the following:<br />
:::'''clip=Clip()'''<br />
:::'''Show()'''<br />
:::'''Render()'''<br />
::Or, we could continue in the Python as follows:<br />
:::'''clip=Clip()'''<br />
:::'''Hide(shrink)'''<br />
:::'''Show(clip)'''<br />
:::'''Render()'''<br />
<br />
:Hide the Plane widget:<br />
:::'''Hide3DWidgets(proxy=clip)<br />
<br />
<br />
<br />
:Help! (How do we find out what commands are available?)<br />
::To see all commands available in ParaView:<br />
:::'''dir()'''<br />
::To see all of the options for the Clip creator:<br />
:::'''dir(Clip)'''<br />
::To see all of the options for the instance of the clip we created above:<br />
:::'''dir(clip)'''<br />
<br />
::A better tool to see the available commands for an item in the pipeline is ListProperties, such as:<br />
:::'''clip.ListProperties()'''<br />
::::Note that this doesn't work on instantiated controls, such as the camera. Use dir() for controls such as camera.<br />
::And, to see the different properties of the ClipType variable, use<br />
:::'''clip.ClipType.ListProperties()'''<br />
<br />
::To see lots of detail on an instance of a command, create the instance and ask for help on that instance..<br />
:::'''help(clip)'''<br />
<br />
<br />
:Change! (Lets look at, and change, something)<br />
::Print the Theta Resolution<br />
:::'''print(sphere.ThetaResolution)'''<br />
::Change it to 64<br />
:::'''sphere.ThetaResolution=64'''<br />
:::'''Show()'''<br />
:::'''Render()'''<br />
<br />
<br />
:Control input<br />
::Lets change the selected filter in the Pipeline Browser:<br />
:::'''SetActiveSource(sphere)'''<br />
::Lets delete the clip<br />
:::'''Delete(clip)'''<br />
::Lets add a filter to the sphere, without selecting it first<br />
:::'''wireframe=ExtractEdges(Input=sphere)'''<br />
:::'''Show()'''<br />
:::'''Render()'''<br />
<br />
=A simple Python example reading a datafile and writing a screenshot=<br />
*Within the ParaView GUI, '''Edit → Reset Session'''<br />
*Start the Python Interpreter '''Tools → Python Shell''' <br />
===Read in data, use a filter and save a screenshot===<br />
:Lets read in can.exo, clip can.exo, paint can.exo and save a screenshot.<br />
:We use this templagte.<br />
:::'''canex2=OpenDataFile('D:/directoryName/can.ex2')'''<br />
:Here is the current path. Be sure to update for version number<br />
:::'''canex2=OpenDataFile('C:/Program Files (x86)/ParaView 5.4.1/data/can.ex2')'''<br />
:::'''clip=Clip()'''<br />
:::'''Hide(canex2)'''<br />
:::'''Show(clip)'''<br />
:::'''ResetCamera()'''<br />
:::'''Render()'''<br />
:::'''SaveScreenshot('D:\\directoryName\\picture.jpg')'''<br />
<br />
Information on file readers is found in chapter 2.2 of The ParaView Guide http://www.paraview.org/paraview-guide/<br />
<br />
===Control time===<br />
::We want to move forward one timestep, so min and max are set correctly for a variable<br />
:::'''animationScene1 = GetAnimationScene()'''<br />
:::'''animationScene1.GoToNext()'''<br />
<br />
::Playing through all time is done with the following command. <br />
:::'''animationScene1.Play()'''<br />
<br />
::First timestep is found using either of these methods:<br />
:::'''animationScene1.GoToFirst()'''<br />
:::'''animationScene1.AnimationTime = timesteps[0]'''<br />
<br />
::Last timestep is found using either of these methods: <br />
:::'''animationScene1.GoToLast()'''<br />
:::'''animationScene1.AnimationTime = timesteps[-1]'''<br />
<br />
::Moving to a specific timestep (such as timestep 10) is done in two steps<br />
<br />
:::We need to acquire the available timesteps:<br />
:::'''tk = GetTimeKeeper()'''<br />
:::'''timesteps = tk.TimestepValues'''<br />
<br />
:::And next, we set the time to one of the available timestps<br />
:::'''animationScene1.AnimationTime = timesteps[9]''' # index starts with 0<br />
<br />
::To find out how many timesteps we have, you use the len command. Continued on from above.<br />
:::'''numTimesteps = len(timesteps)'''<br />
<br />
<br />
::Available commands are found using:<br />
:::'''dir(animationScene1)''' (after you have created the animationScene1 variable)<br />
:::'''dir(GetAnimationScene())'''<br />
<br />
===Control the camera===<br />
::We want to move the camera.<br />
::First, get the camera and reset the camera to a known good position.<br />
:::'''camera=GetActiveCamera()'''<br />
:::'''camera.SetFocalPoint(0,0,0)'''<br />
:::'''camera.SetPosition(0,0,-10)'''<br />
:::'''camera.SetViewUp(0,1,0)'''<br />
<br />
::How to move the camera closer or further away<br />
:::'''camera.Dolly(10)'''<br />
:::'''Render()''' <br />
:::'''camera.Dolly(.1)'''<br />
:::'''Render()''' <br />
<br />
::How to rotate the camera around the view direction 45 degrees, centered on the dataset. After the reset above, rotate around the X axis.<br />
:::'''camera.Roll(45)'''<br />
:::'''Render()''' <br />
<br />
::How to rotate the camera around the vector up, centered on the Y axis. After the reset above, rotate around the Y axis.<br />
:::'''camera.Yaw(45)'''<br />
:::'''Render()''' <br />
<br />
::How to rotate the camera vertically around the camera point<br />
:::'''camera.Pitch(45)'''<br />
:::'''Render()''' <br />
<br />
::How to rotate the camera around the vector up, centered on the dataset. After the reset above, rotate around the Y axis.<br />
:::'''camera.Azimuth(45)'''<br />
:::'''Render()''' <br />
<br />
::How to rotate the camera around the X axis, centered on the dataset. After the reset above, rotate around the Y axis.<br />
:::'''camera.Elevation(45)'''<br />
:::'''Render()''' <br />
<br />
::How to reset the camera<br />
:::'''ResetCamera()'''<br />
<br />
<br />
::Available commands are found using:<br />
:::'''dir(camera)''' (after you have created the animationScene1 variable)<br />
:::'''dir(GetActiveCamera())'''<br />
<br />
===Paint by a variable===<br />
::We want to color by the variable.<br />
::Be sure to Show the Clip, and not the Can.<br />
::Steps are, move forward one timestep, get the renderview, get the display, get the variables, ColorBy.<br />
:::'''animationScene1 = GetAnimationScene()'''<br />
:::'''animationScene1.GoToNext()'''<br />
:::'''renderView1 = GetActiveViewOrCreate('RenderView')'''<br />
:::'''canex2Display = Show(clip, renderView1)'''<br />
:: Get point var names<br />
:::'''canexxxx =GetActiveSource()<br />
:::'''print ( canexxx.PointVariables.GetAvailable())'''<br />
:: Get Cell var names<br />
:::'''print ( canexxx.ElementPointVariables.GetAvailable())'''<br />
:: For point vars<br />
:::'''vars = canex2.PointVariables.GetAvailable()'''<br />
:::'''print (vars)<br />
:::'''ColorBy(canex2Display, ('POINTS', vars[0]))'''<br />
:: For cell vars<br />
:::'''vars = canex2.ElementVariables.GetAvailable()'''<br />
:::'''print (vars)<br />
:::'''ColorBy(canex2Display, ('CELLS', vars[0]))'''<br />
<br />
:::'''Render()''' (Actually not needed)<br />
<br />
<br />
Information on reading variable information is found in chapter 3.3 of The ParaView Guide http://www.paraview.org/paraview-guide/<br />
<br />
=Scale Around Dataset Center - A userful example=<br />
:We want to create a script that allows us to scale a dataset around it's center.<br />
::This example shows how to get the active source, get the bounds, and transform the camera.<br />
<br />
:::'''scale_factor = 2'''<br />
:::'''indata = GetActiveSource()'''<br />
<br />
:::'''bounds = indata.GetDataInformation().GetBounds()'''<br />
:::'''center = ((bounds[0] + bounds[1])/2, (bounds[2] + bounds[3])/2,(bounds[4] + bounds[5])/2)'''<br />
<br />
:::'''transform_to_center = Transform()'''<br />
:::'''transform_to_center.Transform.Translate = [-center[0], -center[1], -center[2]]'''<br />
:::'''Hide()'''<br />
<br />
:::'''scale = Transform()'''<br />
:::'''scale.Transform.Scale = [scale_factor, scale_factor, scale_factor]'''<br />
:::'''Hide()'''<br />
<br />
:::'''transform_from_center = Transform()'''<br />
:::'''transform_from_center.Transform.Translate = [center[0], center[1], center[2]]'''<br />
:::'''Show()'''<br />
<br />
:::'''Render()'''<br />
<br />
=Trace Recorder=<br />
ParaView includes a tool to automatically generate Python scripts for us. It is called the Trace Recorder. An example is as follows.<br />
:Read in can.exo, clip can, paint by EQPS, change the camera to +Y, write out a screenshot and write out a movie<br />
*'''Tools → Start Trace''' Select '''Show Incremental Trace'''.<br />
*'''File → Open'''. Open can.exo. OK.<br />
*Turn all variables on.<br />
*'''Apply'''.<br />
*'''+Y'''<br />
*Clip. Y Normal. Unselect Show Plane. Apply.<br />
*Color by EQPS.<br />
*Last timestep. <br />
*Rescale to Data Range<br />
*First timestep.<br />
*'''File → Save Screenshot'''. Save as .png.<br />
*'''File → Save Animation'''. Save as .avi.<br />
*'''Tools → Stop Trace''' <br />
*'''File → Save'''. Save to a known location.<br />
<br />
:Another way to find Python for ParaView is through Save State. This should be a last resort, but it may include commands that the Trace Recorder missed. '''File → Save State → Python State File.<br />
<br />
<br />
=Running Scripts=<br />
ParaView allows a user to run a script. This is done as follows:<br />
*'''Tools → Python Shell''' <br />
*'''Run Script'''<br />
Now, browse to your script, and select OK. <br />
<br />
<br />
=Macros=<br />
ParaView can save and use Python scripts that have been placed in a known location. When you create a trace, you have the option to '''File → Save As Macro'''. You also have the option on the Macros menu to '''Add new macro'''. Macros will be added to the Macro toolbar at the top of the ParaView GUI. You can edit and delete these Macros through the '''Macro menu'''.<br />
<br />
:As an example, lets add the python script that we created above.<br />
*'''Macros → Add new macro''', find your macro, and click '''OK'''.<br />
*Click on your '''Macro''' on the toolbar.<br />
<br />
<br />
<br />
=Python Help=<br />
Python documentation (out of date) http://www.paraview.org/Wiki/ParaView/Python_Scripting<br />
<br />
The ParaView Guide (Python scattered throughout the guide) http://www.paraview.org/paraview-guide/<br />
<br />
<!--[[Image:beginning_paraview_1.jpg|800px]] --> <br />
<!--[[Image:beginning_paraview_2.jpg|800px]] --><br />
<br />
=Where do you go next?=<br />
*ParaView Batch.<br />
<br />
=Acknowledgements=<br />
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.</div>Wascotthttps://public.kitware.com/Wiki/index.php?title=Visualizing_large_data&diff=64625Visualizing large data2021-06-08T01:43:55Z<p>Wascott: Created page with "=Introduction= ParaView has bee designed from the start to efficiently visualize large data. Here are some ideas on how to deal with large to huge datasets. =Memory Inspect..."</p>
<hr />
<div>=Introduction=<br />
ParaView has bee designed from the start to efficiently visualize large data. Here are some ideas on how to deal with large to huge datasets.<br />
<br />
<br />
=Memory Inspector=<br />
<br />
=Remote Server=<br />
<br />
=Surfaces vs Volumes=<br />
<br />
=Batch processing=<br />
<br />
=Catalyst=<br />
<br />
=Writing lighter weight datasets=</div>Wascott