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

averaging selected field - multiphase

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 24, 2009, 07:51
Default averaging selected field - multiphase
  #1
RBJ
New Member
 
Robin Koldeweij
Join Date: Nov 2009
Posts: 19
Rep Power: 17
RBJ is on a distinguished road
Hello All,

I am using the interFoam solver to do some droplet analysis.

Say I have the simple case of a droplet flying in x-direction. To find secondary streamlines, I'd like to subtract the average of ux of the droplet.

So what I want to do is something like:

Code:
sum(ux)=0;
count=0;
 
for all i,j,t
  if alpha ==1
    sum(ux(i,j,t))+=ux(i,j,t)
    count+=1
  end
end
ux_average=ux/count.

And then subtract ux(i,j,t)-=ux_average.

So that the primary streamlines are subtracted and I can see the secondary ones (internal circulation?? etc.)

Can anybody shed some light on how to do this?

Happy holidays
RBJ is offline   Reply With Quote

Old   December 29, 2009, 07:50
Default How to call a specific mesh point?
  #2
RBJ
New Member
 
Robin Koldeweij
Join Date: Nov 2009
Posts: 19
Rep Power: 17
RBJ is on a distinguished road
The main problem by the way is to sum over a part of the mesh.

I can use the volumeAverageFunction extension as a starting point, but they calculate the volume average of the whole mesh at once. I only need the mesh points where alpha=1.

How do I call a specific mesh point? Unfortunately I'm no pro in c++.
RBJ 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
[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
Field averaging in a certain time interval misakagan OpenFOAM Running, Solving & CFD 1 December 11, 2009 06:39
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 18:06.