# How to average field data over y-direction

 Register Blogs Members List Search Today's Posts Mark Forums Read

 August 28, 2012, 11:04 How to average field data over y-direction #1 Senior Member   Jian Zhong Join Date: Feb 2012 Location: Birmingham Posts: 109 Rep Power: 6 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

 August 30, 2012, 15:25 How to average field data over y-direction #2 Member     Kevin Colburn Join Date: Mar 2009 Posts: 90 Rep Power: 9 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)

August 30, 2012, 18:08
#3
Senior Member

Jian Zhong
Join Date: Feb 2012
Location: Birmingham
Posts: 109
Rep Power: 6
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 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)

 September 1, 2012, 14:49 How to average field data over y-direction #4 Member     Kevin Colburn Join Date: Mar 2009 Posts: 90 Rep Power: 9 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)

September 1, 2012, 18:42
#5
Senior Member

Jian Zhong
Join Date: Feb 2012
Location: Birmingham
Posts: 109
Rep Power: 6
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 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)

 September 2, 2012, 23:03 How to average field data over y-direction #6 Member     Kevin Colburn Join Date: Mar 2009 Posts: 90 Rep Power: 9 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)

September 5, 2012, 07:18
#7
Senior Member

Jian Zhong
Join Date: Feb 2012
Location: Birmingham
Posts: 109
Rep Power: 6
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 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)

 September 5, 2012, 07:50 How to average field data over y-direction #8 Member     Kevin Colburn Join Date: Mar 2009 Posts: 90 Rep Power: 9 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

September 5, 2012, 08:05
#9
Senior Member

Jian Zhong
Join Date: Feb 2012
Location: Birmingham
Posts: 109
Rep Power: 6
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 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

 September 5, 2012, 11:26 How to average field data over y-direction #10 Member     Kevin Colburn Join Date: Mar 2009 Posts: 90 Rep Power: 9 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

November 28, 2012, 12:25
#11
Senior Member

Jian Zhong
Join Date: Feb 2012
Location: Birmingham
Posts: 109
Rep Power: 6
Quote:
 Originally Posted by kevincolburn 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

 November 28, 2012, 16:52 Averaging multiple clip planes together. #12 Member     Kevin Colburn Join Date: Mar 2009 Posts: 90 Rep Power: 9 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) __________________ Kevin Colburn Computational Engineering International, Inc. www.ceisoftware.com kevin@ceisoftware.com

 November 29, 2012, 14:25 #13 Senior Member   Jian Zhong Join Date: Feb 2012 Location: Birmingham Posts: 109 Rep Power: 6 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

 November 29, 2012, 15:23 #14 Senior Member   Jian Zhong Join Date: Feb 2012 Location: Birmingham Posts: 109 Rep Power: 6 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. 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

 November 29, 2012, 16:44 How to average field data over the y-direction #15 Member     Kevin Colburn Join Date: Mar 2009 Posts: 90 Rep Power: 9 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 __________________ Kevin Colburn Computational Engineering International, Inc. www.ceisoftware.com kevin@ceisoftware.com

 November 29, 2012, 18:54 #16 Senior Member   Jian Zhong Join Date: Feb 2012 Location: Birmingham Posts: 109 Rep Power: 6 Dear Kevin, Great. It works for me and that's what I want. Many thanks for your kind help. My best regards, Jian

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post zxj160 OpenFOAM Programming & Development 6 May 21, 2015 05:35 Tarak OpenFOAM 6 September 9, 2011 17:51 LWhitson2 Main CFD Forum 3 July 1, 2011 13:50 bastil OpenFOAM Running, Solving & CFD 0 May 17, 2010 10:41 lin123 STAR-CCM+ 1 April 14, 2010 03:32

All times are GMT -4. The time now is 22:28.