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

cuttingPlane weightedAreaAverage

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

Like Tree1Likes
  • 1 Post By Bodo1993

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 25, 2020, 12:27
Default cuttingPlane weightedAreaAverage
  #1
New Member
 
Javier Vinuales
Join Date: May 2016
Posts: 25
Rep Power: 6
jvinuales is on a distinguished road
Hi everyone,

I am using OpenFOAM v2006. I need to calculate the mass flow average at different cross-sections of a duct. I was thinking to use a cuttingPlane to do so.

How can I do it? I tried to use the following but function object but I got an error:

Code:
tempX1Average
{
    type            surfaceFieldValue;
    libs            ("libfieldFunctionObjects.so");
	writeControl    writeTime;
    fields          (T);
    writeFields     no; // yes | no
    regionType      sampledSurface;
	name            test;
	sampledSurfaceDict
        {
            type            cuttingPlane; 
            planeType       pointAndNormal;
			pointAndNormalDict 
			{ 
				basePoint       (0 0 0);
				normalVector    (1 0 0); 
            } 
        }
	operation 		weightedAreaAverage;
	weightField     phi;

}
The error I got was:

--> FOAM FATAL IO ERROR:
Cannot use weighted operation 'weightedAreaAverage' for sampledSurface

Is there a way to calculate a mass flow average temparature at a cutting plane?
jvinuales is offline   Reply With Quote

Old   November 26, 2020, 04:17
Default
  #2
New Member
 
Javier Vinuales
Join Date: May 2016
Posts: 25
Rep Power: 6
jvinuales is on a distinguished road
Currently, I am using patch averages, but that means that I need to create separate bodies and create interface patches between them where I can take the readings. This adds a lot of complexity to my meshing process. It would be much easier if I could just take the readings from cutting planes...

This is the function object that I am currently using and works perfectly with patches... I just need this but with a cutting plane!

Code:
name    x_2;
fields  (T);

operation 		weightedAreaAverage;
weightField     phi;
#includeEtc "caseDicts/postProcessing/surfaceFieldValue/patch.cfg"
jvinuales is offline   Reply With Quote

Old   November 26, 2020, 13:20
Default
  #3
Senior Member
 
Join Date: Jul 2019
Posts: 139
Rep Power: 3
Bodo1993 is on a distinguished road
Hi,
I am not an expert, but you can do that with paraview. You can generate a macro that has a sequential order of the applied filters to calculate the weighted average. Check the below thread, post#7:
How to calculate depth averages in ParaView

Also, I am unsure if the below function object would assist you (I have not used it):
https://github.com/ZmengXu/conditionalAverage

Hope that helps.
jvinuales likes this.
Bodo1993 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Sampling air passing through multiple windows b.simpson OpenFOAM Post-Processing 3 September 4, 2020 09:07
Sampling fields values passing through multiple windows b.simpson OpenFOAM Post-Processing 0 May 1, 2020 12:14
cuttingPlane with cyclic BC Xulia OpenFOAM Post-Processing 1 April 26, 2016 08:27
export calculated variable with cuttingPlane Eloise OpenFOAM Post-Processing 0 June 16, 2014 11:59
How to plot variable (alpha1) on cuttingPlane (runtime postprocessing) pythag0ra5 OpenFOAM Post-Processing 1 September 26, 2013 09:46


All times are GMT -4. The time now is 05:13.