1 / 58

Particle Trace Analysis Script

Particle Trace Analysis Script. Computational Engineering International. Original slides based on Bill Dunn’s Streamline Analysis Training (April 2011). Particle Trace Types. Streamline - single time Pathline - transient Node Track - point parts Massed Particles - physics

ninon
Download Presentation

Particle Trace Analysis Script

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Particle Trace Analysis Script Computational Engineering International Original slides based on Bill Dunn’s Streamline Analysis Training (April 2011)

  2. Particle Trace Types • Streamline - single time • Pathline - transient • Node Track - point parts • Massed Particles - physics • Variable Track - transient data

  3. Particle Trace Location • On the EnSight Client • On the EnSight Server

  4. Part Location • On the EnSight Client • On the EnSight Server

  5. Particle TraceLimitations • Cannot do server operations on a particle trace • Cannot clip • Cannot count traces • Cannot fail traces • Cannot step through time • Cannot freeze it • Cannot measure it • Cannot do statistics • Cannot create plots

  6. Old Ways of Exporting • File -- > Command • test: trace_dump • Text file, tabular data.

  7. Limitations of the Old Way • Cannot analyze, communicate trace data • Limited analysis with 3rd party software (Excel) • Spreadsheet analysis? • We want to analyze this data using the fundamental capabilities already built into EnSight (calculator, coloring, viewing, filtering, etc.

  8. New way of Exploring Trace Data • An Integrated Python Script • Easy GUI • Flexible Options • Easily Customized • Bring Particle Traces back to Server

  9. Particle Trace Relocation • On the EnSight Client • On the EnSight Server • Case Gold File

  10. Moved Particle Trace Server Part(s) • CAN do server operations on a particle trace parts • CAN clip • CAN count traces • CAN fail traces • CAN step through time • CAN freeze trace parts • CAN measure trace parts • CAN do statistics • CAN create plots

  11. Let’s look at new Python Tool GUI

  12. The new script still has text file output Text File Output • Legacy Support • Full-featured browser • CSV Format

  13. .. And now outputs to Case Gold File Case Gold Output • Full-featured browser • Case Gold API • Permanence • Automatically auto-loads as second case • EnSight ‘deep’ server particle parts. • Can compare traces from other cases

  14. Sample Rate Control Flexibility • Choose your own re-sample rate • The second case will show these number of timesteps.

  15. Choosing your velocity variable Flexibility • Choose your velocity variable. • Note currently only works with nodal velocity variable • Use ElemToNode calc function to create nodal velocity var and then re-create your traces

  16. Choosing a scalar variable Flexibility • Choose your scalar variable for analysis along the streamline.

  17. Measured data file for other formats Flexibility • Write out additional point measured data • Can be read in later by adding the .mea filename into a .case file or putting the .mea filename into the measured field.

  18. An Optional Time Line Part Flexibility • Optional Time Line Part • Time Line part connects all points at each timestep with a line • Only toggle this on if you are releasing particles from line tool

  19. Let’s Look at how this will work

  20. First, you have a trace

  21. Now, run the script Second Case • Creates and loads a second case if you choose a case file prefix

  22. … can get up to 4 parts Parts • point parts and line parts if you enter case file name • Measured data - point parts, only toggle on if you wish to import measured data later • Time Line part - Only toggle on if emitted from the line tool

  23. The new parts : Point Part

  24. The new parts : Trace Line Part

  25. The new parts : Time Line Part

  26. Nine new variables for general Analysis • Per Node • Velocity • Distance • Time • Ones • Scalar Value • Per Element • Trace Number • Final Velocity • Final Distance • Final Time • Distance • Normalized Scalar Value • Max Scalar Value

  27. Particle variables are prefixed with ‘p’ • Per Node • pVelocity • pDistance • pTime • pOnes • p<Varname> • Per Element • pTrace_number • pFinal_velocity • pFinal_distance • pFinal_time • pDistanceE • p<Varname>_Normalized • p<Varname>_Max

  28. Using the new variables • Per element variables are useful for culling the traces using EnSight’s failed element capability (filtering) • Final variables are useful for seeing the end at the beginning • Nodal values are useful for seeing the variable value’s change spatially and temporally • Trace number is a useful aid in following a trace from beginning to end • pOnes is useful for counting points or clip intersections

  29. Analysis of a ‘server’ particle trace part • CAN do server operations on a particle trace parts • CAN clip • CAN count traces • CAN fail traces • CAN step through time • CAN freeze trace parts • CAN measure trace parts • CAN do statistics • CAN create plots

  30. Four Exercises 1. Visualize final values at release point 2. Variable statistics over time 3. Particle count over time 4. Particle count by spatial locations over time

  31. Sample Analysis One: Prob Statement • Where on Paddle 1 to release particles so that they travel the farthest or stay in the flow the longest?

  32. Analysis Questions • How to correlate release point with duration or distance traveled? • How to step through time? • How to cull the traces? • How to quantify data?

  33. Run the Trace Script • Enter the values as shown • Click OK • Notice a new transient Case • Notice two new parts • Notice 8 new variables (starting with ‘p’)

  34. Show Final Time at Release Point • Set time = 0 • Make Case 1 Client parts invisible • Color new Case 2 parts by pFinal_time • Make Only Paddle1 and Case 2 parts visible • Make Case 2 point part to be spheres

  35. Show Final Time at Release Point

  36. Show Final Time on Trace Lines • Set time = last time • Thicken up the case 2 lines • Notice pFinal_time is constant enabling you to visualize the longest duration traces • Step through time

  37. Cull the Traces by pFinal_time • pFinal_time is a per element variable. • Use it to Fail (filter) traces with Final Time less than 60. • Animate these long lasting traces to gain insight into their longevity • Now do the same analysis for Final distance

  38. Show Final Time at Release Point

  39. Show Final Time at Release Point

  40. Sample Analysis One : Prob Statement • Where on Paddle 1 to release particles so that they travel the farthest or stay in the flow the longest? • Qualitative Answer: On the top of the paddle along the outer radius.

  41. Sample Analysis Two : Prob Statement • What is the average particle velocity versus time?

  42. Calculate average point part velocity • Select the Case 2 particle point part • pV_mag = RMS(pVelocity) • pAvgVelocity = StatMoment(plist,pV_mag,1) • Selecting ‘1’ with StatMoment does the average (see User Manual ch 4.3) • Now plot the average velocity

  43. Average Velocity Exponential Decay • What is the average particle velocity vs. time? • Answer: Calculate average velocity of point part over time and plot it’s exponential decay.

  44. Sample Analysis Three : Prob Statement • Particle trace stops when particles reach nearly zero velocity or they hit a surface • How many particles are present over time?

  45. The pOnes variable • The Python Script creates a nodal pOnes variable that is 1.0 at every node. • Simply select the particle point part, and use StatMoment with the 0 option (sum) to sum up the pOnes for each point

  46. Number of particle traces vs. Time

  47. Number of particle traces vs. Time

  48. Sample Analysis Four : Prob Statement • Count the number of particles inside of radius 0.25 and plot that number over time

  49. Solution to Exercise 4 • Interior cylindrical clip of point part – spheres • pOnes = MakeScalNode of constant equal 1.0 • Sum pOnes variable

  50. Number of particles inside radius

More Related