CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   EnSight (https://www.cfd-online.com/Forums/ensight/)
-   -   How to average field data over y-direction (https://www.cfd-online.com/Forums/ensight/106416-how-average-field-data-over-y-direction.html)

 zxj160 August 28, 2012 11:04

How to average field data over y-direction

Dear all,

I am new to ensight. I wonder that whether it is possible to average all the U field data over y direction and then plot it out.

Many thanks,
Jian

 kevincolburn August 30, 2012 15:25

How to average field data over y-direction

I am not sure I understand your question fully. Do you have 2D data (eg some elements in the X and Y direction)? Are you trying to survey the data at each Y station, and average all of the values over X for that Y location, and then graph that?

If you simply want to clip the domain at some Y location, you can graph the temperature as a function of X. You can then dynamically move the clip through various ranges of Y and the graph will automatically update.

Let me know a bit more about your inquiry, and I am sure that we can help point to the right way to do that.

-Kevin (kevin@ceisoftware.com)

 zxj160 August 30, 2012 18:08

Dear Kevin,

Many thanks. I got 3D data. I want to average all the y-direction data, getting 2D data (x-z plane). Then I want to plot the averaged 2-D data (e.g. contour). I do not know whether it is possible using ensight.

My best regards,
Jian

Quote:
 Originally Posted by kevincolburn (Post 379585) I am not sure I understand your question fully. Do you have 2D data (eg some elements in the X and Y direction)? Are you trying to survey the data at each Y station, and average all of the values over X for that Y location, and then graph that? If you simply want to clip the domain at some Y location, you can graph the temperature as a function of X. You can then dynamically move the clip through various ranges of Y and the graph will automatically update. Let me know a bit more about your inquiry, and I am sure that we can help point to the right way to do that. -Kevin (kevin@ceisoftware.com)

 kevincolburn September 1, 2012 14:49

How to average field data over y-direction

Jian,

Yes, that is fairly straight forward to do. Here are the steps:
a. select the volume part that you want to calculate the average and sweep over.
b. Create a Clip plane at a constant Y value. Place this clip near where you want to start.
c. On this clip, you can use the PreDefined calculator function to calculate the average field value. You can use either a Spatial Mean (SpaMean), or a Mass Flux Average (MassFluxAvg) function to calculate an average value (at this Y location).
d. You can then use the User Defined Tool called "Part Constant Query". This will allow you to sweep this Y-section cut in the Y-direction, and the tool will keep track of the average field value at each section location. A graph is then automatically created which shows the average field value as a function of Y location.

If you'd like detailed video instruction on that process, let me know, and I can generate a quick 2 minute tutorial on specifically to do that.

Regards,

Kevin (kevin@ceisoftware.com)

 zxj160 September 1, 2012 18:42

Dear Kevin,

Many thanks for you kind assistance. If possible, I really want your detailed video instruction.

My best regards,
Jian

Quote:
 Originally Posted by kevincolburn (Post 379849) Jian, Yes, that is fairly straight forward to do. Here are the steps: a. select the volume part that you want to calculate the average and sweep over. b. Create a Clip plane at a constant Y value. Place this clip near where you want to start. c. On this clip, you can use the PreDefined calculator function to calculate the average field value. You can use either a Spatial Mean (SpaMean), or a Mass Flux Average (MassFluxAvg) function to calculate an average value (at this Y location). d. You can then use the User Defined Tool called "Part Constant Query". This will allow you to sweep this Y-section cut in the Y-direction, and the tool will keep track of the average field value at each section location. A graph is then automatically created which shows the average field value as a function of Y location. If you'd like detailed video instruction on that process, let me know, and I can generate a quick 2 minute tutorial on specifically to do that. Regards, Kevin (kevin@ceisoftware.com)

 kevincolburn September 2, 2012 23:03

How to average field data over y-direction

Jian,

I've produced a short video on how to do this average, and the generate a graph of the average as a function of Y location. In addition, the video also illustrates how to graph a query along a distance (like a profile), or use multiple parts to further refine the query and its movement through the domain.

http://www.ceisoftware.com/wp-conten...ant_query.html

Let me know if you have any questions or need additional assistance.

Regards,

Kevin (kevin@ceisoftware.com)

 zxj160 September 5, 2012 07:18

Dear Kevin,

Many thanks for your wonderful video. The ensight version in our university cluster is a previous one v 9.1.1. So I can not find the tool, Part Constant Query......

My best regards,
Jian

Quote:
 Originally Posted by kevincolburn (Post 379937) Jian, I've produced a short video on how to do this average, and the generate a graph of the average as a function of Y location. In addition, the video also illustrates how to graph a query along a distance (like a profile), or use multiple parts to further refine the query and its movement through the domain. http://www.ceisoftware.com/wp-conten...ant_query.html Let me know if you have any questions or need additional assistance. Regards, Kevin (kevin@ceisoftware.com)

 kevincolburn September 5, 2012 07:50

How to average field data over y-direction

Which university? They may be able to upgrade to EnSight 10 to be able to capture all of the other benefits of the newer version.
I can send you the tool itself, but I am not positive that it will work in that version of EnSight (I haven't tried it, nor have access to a version that old).

-kevin

 zxj160 September 5, 2012 08:05

Dear Kevin,

I am in the university of Birmingham. I may turn to the university IT help desk for more information. Thanks for your advice.

My best regards,
Jian

Quote:
 Originally Posted by kevincolburn (Post 380339) Which university? They may be able to upgrade to EnSight 10 to be able to capture all of the other benefits of the newer version. I can send you the tool itself, but I am not positive that it will work in that version of EnSight (I haven't tried it, nor have access to a version that old). -kevin

 kevincolburn September 5, 2012 11:26

How to average field data over y-direction

You should be able to point your IT department to our website (www.ceisoftware.com/download/) to grab our latest version of EnSight 10. There is no fee or registration required to download EnSight. EnSight 10 will install right along side of the other versions of EnSight, so there is no conflict or overwriting of anything (so if other users need to still use EnSight 9, that is fine).
I assume you are with University of Birmingham in the UK, and are working from Hassan Hermida's key (His key is active and valid, so you should have no problem running the latest versions of EnSight).

-Kevin

 zxj160 November 28, 2012 12:25

Quote:
 Originally Posted by kevincolburn (Post 380395) You should be able to point your IT department to our website (www.ceisoftware.com/download/) to grab our latest version of EnSight 10. There is no fee or registration required to download EnSight. EnSight 10 will install right along side of the other versions of EnSight, so there is no conflict or overwriting of anything (so if other users need to still use EnSight 9, that is fine). I assume you are with University of Birmingham in the UK, and are working from Hassan Hermida's key (His key is active and valid, so you should have no problem running the latest versions of EnSight). -Kevin
Dear Kevin,

Is it possible to average the information of a few Clip_planes to one Clip_plane? More specifically, I cliped three Clip_planes by "Y" and color it for one variable. I want to get another Clip_pane by "Y", representing the average information of the three Clip_planes and color it for the same variable.

My best regards,
Jian

 kevincolburn November 28, 2012 16:52

Averaging multiple clip planes together.

Jian,

Unfortunately, probably not. There is no guarentee that there are the same elements in the first clip, as there are in the second (in a general way), and therefore is indeterminate when it comes to averaging (as there may or may not be a previous counterpart on the last/next clip plane to average with).

If your data is actually more restricted, and there is no change in the grid as the clip changes, then you could export out each clip as a separate EnSight Case gold file, then create a new .case file which references all of the different variable files as a "transient" dataset, with basically each clip being a different timestep. At this point, you could use the "TempMean" function which could calculate a mean value. This might take a few steps to do, and you'd have to ensure that each Clip had the same grid, number of elements and points, and was ordered in the same way... So, perhaps a way out if your data was constrained in that manner.

So, generally speaking no. This is a small subset of conditions, that if met, would lend itself to this slightly manual method to achieve this average.

-Kevin
(kevin@ceisoftware.com)

 zxj160 November 29, 2012 14:25

Dear Kevin,

My planes have the same grid, number of cells and points. So I think they met the requirement. I have tried following your suggestion: 1) I selected the clip_plane1 and save it to the gold file, and then the clip_plane2, clip_plane3 (File -> Export -> Geometric Entities -> Choose ' Case (gold). Are they right?). 2) Then I do not know how to achieve:
"then create a new .case file which references all of the different variable files as a "transient" dataset, with basically each clip being a different timestep."

I can only open the three saved clip_plane cases separately. I do not know how to change the three clip_planes into three timesteps.

My best regards,
Jian

 zxj160 November 29, 2012 15:23

Dear Kevin,

I found a vedio about this (it is in the website: http://gallery.ensight.com/keyword/e...4377&k=JcgKvDx) and followed the vedio, but I still met some problems.

My files are shown as the picture.
http://www.cfd-online.com/Forums/dat...BJRU5ErkJggg==
I then create the Clip_planeAll.case and modified it as follows:

# Thu Nov 29 18:55:01 2012
# EnSight Gold Model
# Produced with EnSight Ouput API, version 1.0.3

FORMAT
type: ensight gold

GEOMETRY
model: Clip_plane*.geo

VARIABLE
scalar per element: O3 Clip_plane*.O30000

TIME
time set: 1
number of steps: 3
filename start number: 1
filename increment: 1
time values:
0.0
1.0
2.0

When I opened the Clip_planeAll.case, three timesteps came out. But the value of the O3 variable is 0 in the 0 and 1 s, although for 2 s, the O3 values are right.

Could you help me solve the problem?

My best regards,
Jian

 kevincolburn November 29, 2012 16:44

How to average field data over the y-direction

Jian,

Have a look at the attached link here. It is a short 5 minute video on one method (using mulitple variables rather than timesteps) to obtain this result. A very similar technique can be used to "fake" the transient variable (editing the .case file to replicate a single transient variable). The transient method would work better if you had a lot of clips (>10).

The use of multiple variables is a slightly easier to edit, and conceptually slightly easier to convey.

http://www.ceisoftware.com/wp-conten...ple_parts.html

Let me know if that works for you or not.

-kevin

 zxj160 November 29, 2012 18:54

Dear Kevin,

Great. It works for me and that's what I want. Many thanks for your kind help.

My best regards,
Jian

 All times are GMT -4. The time now is 16:40.