View Issue Details

IDProjectCategoryView StatusLast Update
0000688OpenFOAMBugpublic2017-02-06 15:38
Reporterlinnemann Assigned Tohenry  
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Platform64BitOSCentOSOS Version5/6
Summary0000688: Add mass weighted average to the sample functionObject
DescriptionHi

The sample functionObject is a really nice tool.

A nice addition would be to have mass-weighted average.

Formula in picture
Tagssample

Relationships

related to 0001270 closedhenry faceSource can't combine weighting by field and area 
related to 0002452 resolvedhenry Weighted sum option for surfaceFieldValue and volFieldValue 

Activities

linnemann

2012-11-28 02:56

reporter  

mFlowAverage.png (1,547 bytes)   
mFlowAverage.png (1,547 bytes)   

user2

2012-12-04 09:52

  ~0001799

This feature is already available in the faceSource function object - the object makes use of an optional 'weight field', which you can set to 'phi' for your case. Take a look at the verticalChannel test case for example usage:

$FOAM_TUTORIALS/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel

linnemann

2012-12-05 07:29

reporter   ~0001813

Hi

Thx for the reply.

weightedAverage is what I was looking for.
The limitation is although that phi only exists on patches.

I have a sampledSurface that cuts through the domain.
I can get the massFlow (phi) by doing areaNormalIntegrate, but I cant combine both areaNormalIntegrate and weightedAverage.

This is very specific and can be rectified by using some AMI's in the mesh to get phi on a face, but it could be avoided if it was possible to combine the two.

Just an idea for extended usage of the sample tool.

Provided is a link to a small test case.

https://dl.dropbox.com/u/15968063/pipe.tar.gz

henry

2015-10-22 10:37

manager   ~0005473

Feature request requiring funding or code contribution.

Issue History

Date Modified Username Field Change
2012-11-28 02:56 linnemann New Issue
2012-11-28 02:56 linnemann File Added: mFlowAverage.png
2012-12-04 09:52 user2 Note Added: 0001799
2012-12-04 09:52 user2 Status new => resolved
2012-12-04 09:52 user2 Fixed in Version => 2.1.x
2012-12-04 09:52 user2 Resolution open => fixed
2012-12-04 09:52 user2 Assigned To => user2
2012-12-05 07:29 linnemann Note Added: 0001813
2012-12-05 07:29 linnemann Status resolved => feedback
2012-12-05 07:29 linnemann Resolution fixed => reopened
2014-02-21 10:03 user2 Assigned To user2 =>
2014-12-29 18:37 wyldckat Tag Attached: sample
2015-08-17 01:07 wyldckat Relationship added related to 0001270
2015-10-22 10:37 henry Note Added: 0005473
2015-10-22 10:37 henry Status feedback => closed
2015-10-22 10:37 henry Assigned To => henry
2015-10-22 10:37 henry Resolution reopened => fixed
2017-02-06 15:38 wyldckat Relationship added related to 0002452