Computational Engineering International Original slides based on Bill Dunn’s Streamline Analysis Training (April 2011) • • • • • Streamline - single time Pathline - transient Node Track - point parts Massed Particles - physics Variable Track - transient data • On the EnSight Server • On the EnSight Client • On the EnSight Server • On the EnSight Client • 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 • File -- > Command – test: trace_dump • Text file, tabular data. • 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. • • • • • An Integrated Python Script Easy GUI Flexible Options Easily Customized Bring Particle Traces back to Server • On the EnSight Server • On the EnSight Client Case Gold File • 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 Text File Output • Legacy Support • Full-featured browser • CSV Format 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 Flexibility • Choose your own re-sample rate • The second case will show these number of timesteps. 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 Flexibility • Choose your scalar variable for analysis along the streamline. • This variable must have been active at the time of the creation of the trace. – Activate the variable, create the trace, export the trace: success. – Create the trace, activate the variable, export the trace: fail 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. 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 Warning • This script has only been tested with one case loaded. • It then creates a second case using your trace geometry. Second Case • Creates and loads a second case if you choose a case file prefix 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 • Per Element – – – – – – – Trace Number Final Velocity Final Distance Final Time Distance Normalized Scalar Value Max Scalar Value • Per Node – – – – – Velocity Distance Time Ones Scalar Value • Per Element – – – – – – – pTrace_number pFinal_velocity pFinal_distance pFinal_time pDistanceE p<Varname>_Normalized p<Varname>_Max • Per Node – – – – – pVelocity pDistance pTime pOnes p<Varname> • 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 • 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 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 • Where on Paddle 1 to release particles so that they travel the farthest or stay in the flow the longest? • How to correlate release point with duration or distance traveled? • How to step through time? • How to cull the traces? • How to quantify data? • • • • • Enter the values as shown Click OK Notice a new transient Case Notice two new parts Notice 8 new variables (starting with ‘p’) • 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 • 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 • 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 • 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. • What is the average particle velocity versus time? • • • • 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 • What is the average particle velocity vs. time? • Answer: Calculate average velocity of point part over time and plot it’s exponential decay. • Particle trace stops when particles reach nearly zero velocity or they hit a surface • How many particles are present over time? • 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 • Count the number of particles inside of radius 0.25 and plot that number over time • Interior cylindrical clip of point part – spheres • pOnes = MakeScalNode of constant equal 1.0 • Sum pOnes variable • Count traces in space and time • Cull traces using Fail (filter) by Elem Variable • Trace statistics over time (max, min, mean, etc) of velocity, distance, time • Resampled time rate controlled by user • • • • • • • • • Show traces in space and time Step by step through time Freeze time for one part Color entire part by Final distance, velocity or time Plot variables over time Track traces by number from beginning to end Show a rake time-line Show final variable value at the release point Read in several particle case files from different flow • • • • • • • • Step by step through time Plots Clips of new particle parts Color by new variables Show Final distance, velocity, or time Output measured data to be used with other datasets Output text csv data to be used in other analysis packages Output a case gold file with new particle trace parts • What is the highest temperature seen along a particular distance? • Correlation to a thermal imaging camera which records the maximum temperature seen along a given ray, for a particular distance. • Utilize Streamline Analyzer with a fixed vector field (1,0,0), and return back maximum temperature seen by each streamline (ray) cast. • Maximum temperature seen along a particular direction vector. • Correlation to thermal imaging camera. • If elemental data, use ElemToNode to obtain nodal data first. • Slooow for large number of traces • Expects that you have only one case, and then loads a second case as case 2. • A new particle trace tool which moves a particle trace from the client to case files then imports the case file has been demonstrated • The new particle trace tool optionally outputs a text, csv file and measured data files • A new way of Analyzing, Visualizing and Communicating particle trace data using the new particle trace parts has been demonstrated