CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Averaging field over a spatial direction

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 7, 2009, 09:14
Default Averaging field over a spatial direction
  #1
Senior Member
 
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18
fs82 is on a distinguished road
Hello,

I searched the forum but I didn't found a solution for my problem. I have a 3d cylinder case, with periodic boundaries in spanwise direction. For postprocessing, in detail for comparing my solution to a certain paper, I need some mean-velocity profiles of the wake. I use the sample utility to get horizontal lines (y-coordinate) at different downstream positions (x-coordinate), this works fine. But I want to average, or collapse the mean velocity field in spanwise direction (periodic z-coordinate) first, before I extract the profiles. Is there a tool available which averages a field for a given spatial direction? I have read something about patchAverage, but I dont want to average a patch. After averaging it would be great to use sample for getting the profiles. So may be somebody experienced the same problem and found a solution?

thx,
fabian
fs82 is offline   Reply With Quote

Old   August 7, 2009, 12:20
Default
  #2
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20
sega is on a distinguished road
When you are talking about a "3d cylinder case" and a "wake" you are doing an external flow simulation, right?
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   August 10, 2009, 03:36
Default
  #3
Senior Member
 
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18
fs82 is on a distinguished road
Yes it is a 3d case with a flow around a cylinder.
fs82 is offline   Reply With Quote

Old   August 10, 2009, 03:42
Default
  #4
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20
sega is on a distinguished road
Ok. I was asking because I haven't heard of averaging in external flow simulations so far. All I have dealt with was the averaging in internal channel flows.

So you are using a turbulent solver? Aren't some of them producing mean flow fields?!
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   August 10, 2009, 04:01
Default
  #5
Senior Member
 
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18
fs82 is on a distinguished road
The channel is similar to what I'am looking for. The postChannel averages over both periodic spatial directions in a channel case. But now I want to average not over two spatial directions, but just over one spatial direction. So I need a utility which averages a given field, e.g. UMean over z. I thought about rewriting the postChannel tool, but the amount of work to do this is for this one comparison a little bit to much. So my hope was, that anybody has done this allready.
I'am using the oodles solver and I allready have the UMean und UPrimeToMean fields. But I need the UMean field averaged in z direction, to get UMean(y) at different x locations in the wake of my cylinder :-D
fs82 is offline   Reply With Quote

Old   August 10, 2009, 04:55
Default
  #6
Member
 
Markus Weinmann
Join Date: Mar 2009
Location: Stuttgart, Germany
Posts: 77
Rep Power: 17
cfdmarkus is on a distinguished road
Hi Fabian,

have a look at this thread:

http://www.cfd-online.com/Forums/ope...tml#post221235

Markus
cfdmarkus is offline   Reply With Quote

Old   August 10, 2009, 07:46
Default
  #7
Senior Member
 
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18
fs82 is on a distinguished road
Yeah this looks good, but I get a Segmantation fault. I think the Problem is my geometry, in detail the cylinder. Do you have tried averaging with a similar case?
fs82 is offline   Reply With Quote

Old   August 10, 2009, 08:00
Default
  #8
Member
 
Markus Weinmann
Join Date: Mar 2009
Location: Stuttgart, Germany
Posts: 77
Rep Power: 17
cfdmarkus is on a distinguished road
Hi

I haven't had the time to test the tool yet, but I would hope that it works for all geometries. It probably does not work for unstructured grids.

I am actually quite interested in your findings since I am doing a two tandem cylinder case at the moment and I was going to use this tool as well.

Maybe you can try using it on the channelOodles tutorial case that comes with OF.

Let me know if you get it to work!
Markus
cfdmarkus is offline   Reply With Quote

Old   August 11, 2009, 05:15
Default
  #9
Senior Member
 
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18
fs82 is on a distinguished road
Hi Markus,

is tested the tool yesterday and it didn't work. It has a problem with my geomtry. The routine which extracts the mesh points along a straight line normal to the wall produces strange id values for the mesh points. I allready asked Frederic, the author of the tool, with this problem. He is very busy at the moment, but is working on the problem.
fs82 is offline   Reply With Quote

Old   August 11, 2009, 10:20
Default
  #10
Senior Member
 
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18
fs82 is on a distinguished road
Allright, after spending 2 days of work for this problem I decided to use Tecplot for calculating the average. The only usable way to get averaged profiles in z direction for my case is: use sample utility to extract the desired profile at different z positions, import the raw-files into tecplot and average over the zones. This is time-consuming but works.
fs82 is offline   Reply With Quote

Old   August 12, 2009, 11:44
Default
  #11
Member
 
Markus Weinmann
Join Date: Mar 2009
Location: Stuttgart, Germany
Posts: 77
Rep Power: 17
cfdmarkus is on a distinguished road
thanks for the update.
I also tested the tool and I get exactly the same error as you did.
I haven't had the time to look into the code in more detail but I guess, I will do this at some point and see whether I can modify it.

Markus
cfdmarkus is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
External magnetic field data Richard Lee FLUENT 7 January 11, 2019 05:43
[OpenFOAM] Time Averaging a Field suraj ParaView 11 August 10, 2015 06:02
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 07:20
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51
Help: averaging in one direction sarah_ron FLUENT 0 November 10, 2006 14:44


All times are GMT -4. The time now is 07:31.