Follow

Easier Swirl Calculations in EnSight 10.1.6(b) and later

In this example we will think like a combustion engineer and have some fun with a Converge dataset and do some testing on the new calculator function in EnSight 10.1.6(b).

 
Suppose I have some sort of an engine with an inlet and a piston that moves up and down. See the simple, attached image.
 

 
 
My inlet number 2 sucks in some flow.
What I want to have is some metric see the swirl of the flow coming in to inlet #2.
 
The swirl of the flow is the component that is moving in the theta direction in an RTZ 
cylindrical coordinate system with the axis perpendicular to inlet #2, essentially “swirling” around the centerline of the inlet.
 
The problem is that the axis of inlet #2 doesn’t align with the global axes.
In the past, calculating the swirl about an arbitrary axis would require a handful of intermediate variables and a lot arduous vector math. 
 
Now, I can now easily calculate this swirl by creating a new Frame, Frame 1, which has frame z axis of the frame defined to be the centerline of inlet #2.
Then I can calculate the swirl using the new VectorCylProjection function which can calculate one of three vectors: R, Theta, or Z.
I choose Theta, and I request it to use frame 1.
Then I can create an RTZ clip and tell it to make an R clip about Frame 1’s Z and 
make vector arrows from the swirl and zoom in to see the swirling flow..
 
 

 
 
Now I can look at the swirl at any given radius.
Further, I can calculate the SpatialMean of the swirl on the R clip and then,
using the Part Constant Query Tool, plot averge swirl in the Inlet Frame coord system over a range of radii.
Basically it sweeps the R clip from a min to a max and colllects up the average swirl value, then plots it.
I checked the box on this tool to update with timechange so I can look at other timesteps.
 

 
 
 
Then I wrote a python to step through time, rescale the plot y axis to a constant value, and save an image.
 
Why not click the record button (Save animation)? Well in the past, the save image occured before the part constant query time callback, resulting in images with a part constant query from the previous timestep. Now, we’ve mucked it up even worse so that the time callback appears to not be called at all, so you get a static in all of th images.
However when I step through time in python by just using converted command language (update time, set time to current) and then save an image, it works fine.
The result of my stepping through time was a bunch of images, one for each timestep.
 
file_0.png
file_1.png
file_65.png
 
Then with two lines of python using ens_utils enve modules, I get all the filenames sorted in alphanumeric order, and make the images into a movie of format described in the suffix of the output file, e.g. here .mp4.  I changed this output filename to final.avi and final.evo and reran it a couple of times to get these formats as well. I’ve attached a couple of the movies for you to look at.
 
import ens_utils as eu
flist = eu.get_file_list(“/Users/wndunn/testdir/file_*” , sort_flag=eu.AN_SORT)
eu.images_to_mov(flist,”/Users/wndunn/testdir/final.mp4")
 
 
Who cares about this?
Those who use swirling flow to mix fluids such as air and gas.
Those who make vacuum cleaners and want to increase velocity in a confined space in order to increase the delta pressure and pick up more dirt.
Those who are worried about swirling flow in terms of measuring the energy of the flow might be interested in knowing if it can blow away a cow or blow down a house or tip over one airplane following another.
 
We have lots of Converge users that may want to study their swirl, and might like that it is easier now. 
Also folks who make turbines and have swirling flow in lots of different coordinate systems may use this.
 
 
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

  • Avatar
    Darin McKinnis

    This article was written by Bill Dunn. I just posted it. Darin McKinnis. Full credit to him.

  • Avatar
    Darin McKinnis

    Images were missing due to browser bug. They should be there now. Sorry.