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

Spanwise averaging of three-dimensional field

Register Blogs Community New Posts Updated Threads Search

Like Tree24Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 13, 2020, 22:57
Default
  #41
New Member
 
zein elserfy
Join Date: May 2018
Posts: 25
Rep Power: 8
zeinelserfy is on a distinguished road
how anyone tried to use columnAverage?as i tried to use it but it does not work properly
or may be i am not defining the function correctly
I used it in order to perform a spatial average in the span-wise direction (z-direction) but the results are not correct.
The function is added to controlDict

Code:
{

type         columnAverage;

libs        ("libfieldFunctionObjects.so");

writeControl  writeTime;

patches       (front);

fields        (p pPrime2Mean wallShearStressMean);

}
i have the front plane is normal to z-direction,so i choose the front plane as a patches in the columnAverage function
The result of pPrime2Mean wallShearStressMean are shown below
pPrime



The columnAverage results seems to be incorrect

zeinelserfy is offline   Reply With Quote

Old   February 14, 2020, 03:32
Default
  #42
Senior Member
 
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15
agustinvo is on a distinguished road
Hi,


where can we access to the source code of that functionObject? Otherwise it is a bit hard to understand how it works
agustinvo is offline   Reply With Quote

Old   February 14, 2020, 16:10
Default
  #43
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
You cant use columAverage for patch fields. wallShearStress is a patch field.

And also, the mesh in spanwise direction should be like blocks put side by side. For example, grid refinement is not allowed.

columnAverage is somewhat improved postChannel utility.

At least these are my understanding.
HPE is offline   Reply With Quote

Old   July 18, 2020, 12:15
Default
  #44
New Member
 
M. Nasr
Join Date: Jul 2020
Posts: 4
Rep Power: 6
M. Nasr is on a distinguished road
Quote:
Originally Posted by Bazinga View Post
Yes, thank you!

The other user-provided tools did not work for me (of6) but the columnAverage function executed by of1906 for of6 cases works like a charm.

edit: i realized that it does indeed work for U and p. However, if I try to average fields such as Q or vorticitiy I get an error saying the fields are not found. Any idea how to fix this issue?
Excuse me, how can you excute of1906 utilities for of6? I want to use columnAverage utility whic is in of2006 in of7.
M. Nasr is offline   Reply With Quote

Old   July 20, 2020, 04:12
Default
  #45
Senior Member
 
Join Date: Jun 2012
Location: Germany, Bochum
Posts: 230
Rep Power: 16
Bazinga is on a distinguished road
You can install both (or even more versions) simultaneously and apply alias in your bashrc file. Search for something like "install multiple versions of opefoam"
Bazinga is offline   Reply With Quote

Old   July 20, 2020, 06:26
Default
  #46
New Member
 
M. Nasr
Join Date: Jul 2020
Posts: 4
Rep Power: 6
M. Nasr is on a distinguished road
Quote:
Originally Posted by Bazinga View Post
You can install both (or even more versions) simultaneously and apply alias in your bashrc file. Search for something like "install multiple versions of opefoam"
I already installed 2 versions openfoam-v2006 and openfoam-v7, my question is how to use utility of one version in the other one?
because when I activate both versions in bashrc, openfoam uses only one of them "the one in the last line of the bashrc".

for example, I want to use "columnAverage" utility (which is available in v2006) in v7. Is that possible?
M. Nasr is offline   Reply With Quote

Old   July 20, 2020, 09:29
Default
  #47
Senior Member
 
Join Date: Jun 2012
Location: Germany, Bochum
Posts: 230
Rep Power: 16
Bazinga is on a distinguished road
Well, you just execute the utility of one version in a folder of a simulation that ran on a different version.

You need to create aliases in your bashrc to switch between versions. Again, just google. Here is the first link that I got when googling where aliases are explained

https://openfoamwiki.net/index.php/I...with_the_Shell
Bazinga is offline   Reply With Quote

Old   December 1, 2021, 09:59
Default Question about avgCyclicDir
  #48
New Member
 
Maryam
Join Date: Mar 2021
Posts: 3
Rep Power: 5
mary2021 is on a distinguished road
Quote:
Originally Posted by arnaupont View Post
Hi everybody,

I think that this tool can be useful for those who are interested in this post.
https://github.com/arnaupv/avgCyclicDir (version 0.9.0).

Main features:
* OpenFoam v1706.
* Cyclic direction is automatically detected.
* It averages all *Mean files (accepts any kind of field).
* A mesh with a unique control volume in the cyclic direction is created. So, sampling tools can be used without problems).
* Fields are saved in postPorcessing/avgCyclicDir/

Main shortcomings:
* Only one cyclic direction is currently allowed.
* Patches are not included (set to 0 by default).
* Sequential (not parallelized).
* The mesh must be structured in the cyclic direction.

As it can be seen in the GitHub repository, the tool is underdevelopment but the results are pretty good! I will highly appreciate your comments and help for addressing the current shortcomings.

I hope it helps!

Arnau
Hi Arnau,

I have compiled your tool on OF4.1, but unfortunately, it is not working for my pipe case. I have simulated a turbulent pipe and mapped the final results on a polar grid so that the mesh is easier for the tool to process. But as I use the command "avgCyclicDir cellPoint", I don't get the proper results. Only the values for U are halved, but no averaging happens. Could you please help me with it? Is there anything I am doing wrong?

Thanks in advance,

Maryam
mary2021 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
problems after decomposing for running alessio.nz OpenFOAM 7 March 5, 2021 05:49
Starting field averaging using libFunctionObject after certain time eelcovv OpenFOAM Programming & Development 25 December 7, 2015 23:28
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 07:20
Averaging field over a spatial direction fs82 OpenFOAM 10 August 12, 2009 11:44
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51


All times are GMT -4. The time now is 20:21.