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

Extract average values of faceZone

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

Like Tree6Likes
  • 2 Post By student666
  • 4 Post By Iose

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 4, 2018, 13:50
Default Extract average values of faceZone
  #1
New Member
 
Dan Vidal
Join Date: Dec 2017
Posts: 7
Rep Power: 8
Aurelius is on a distinguished road
Dear all,

I usually monitor area average quantities (p, U) from patches with function objects in “controlDict” like for example:

Code:
functions
{
outletSFV
{
type surfaceFieldValue;
libs ("libfieldFunctionObjects.so");
enabled yes;
log yes;
writeFields no;
regionType patch;
name outlet;
operation areaAverage;
// operation weightedAverage;
// weightField phi;
fields
(
U
p
);
}
}
My problem is that I need the same for a “faceZone” (which stands for an internal surface in the domain). The original model is a msh file that it has been converted to openFoam . It does not work using the same function object by changing the “regionType” from “patch” to “faceZone”.

The Foam Error I get:

[5] --> FOAM FATAL ERROR:
[5] surfaceFieldValue rs1SFVs: faceZone(interior_rotorstator_1):
Unable to process internal faces for volume field U

How can I get te internal volume field U automatically interpolated on the faceZone or if there is other way to extract on fly average values from an faceZone?

I am using OpenFoam v5.


Thanks for any help!
Aurelius

Last edited by Aurelius; July 6, 2018 at 13:36.
Aurelius is offline   Reply With Quote

Old   July 4, 2018, 15:52
Default
  #2
Senior Member
 
M. C.
Join Date: May 2013
Location: Italy
Posts: 286
Blog Entries: 6
Rep Power: 17
student666 is on a distinguished road
Hi, don't know how to help, but if you set e.g.
Code:
regionType banana
Openfoam should gives you an error that it doesn't recognize banana and should print a list of available region types it can handle.
Eg:
If code has faceSet implemented, maybe you can use topoSet to define one...
Just a hint...
Cheers

Last edited by student666; July 4, 2018 at 23:11.
student666 is offline   Reply With Quote

Old   July 4, 2018, 23:11
Default
  #3
Senior Member
 
M. C.
Join Date: May 2013
Location: Italy
Posts: 286
Blog Entries: 6
Rep Power: 17
student666 is on a distinguished road
Just checked my personal notes...

https://www.cfd-online.com/Forums/bl...rocessing.html


As you may see, I largely use "banana method" and strangely if I put:

Code:
regionType banana
I get faceZones too.


Code:
--> FOAM FATAL IO ERROR: 
banana is not in enumeration: 
3
(
faceZone
patch
sampledSurface
)
Regards.
jherb and Aurelius like this.
student666 is offline   Reply With Quote

Old   July 5, 2018, 05:18
Default
  #4
New Member
 
Dan Vidal
Join Date: Dec 2017
Posts: 7
Rep Power: 8
Aurelius is on a distinguished road
Thanks for your answer.

If I put "surfaceInterpolate" instead of "surfaceFieldValue" in "type" field OF does not crash (remember I've got foam fatal error "Unable to process internal faces for volume field p"), but now OF reports:


...

surfaceInterpolate rs1SFVs write:
surface field p already exists

surfaceInterpolate rs1SFVs write:
Writing interpolated surface fields to 410
...



or in other words I cannot monitor "p" on fly as I do when "regionType" is a patch.


Regards.
Aurelius is offline   Reply With Quote

Old   July 5, 2018, 13:45
Default
  #5
Senior Member
 
M. C.
Join Date: May 2013
Location: Italy
Posts: 286
Blog Entries: 6
Rep Power: 17
student666 is on a distinguished road
Well, it's hard to understand what you're doing, but I remember I performed a study case with a fan where the goal was to measure how much the rotational speed affected the rate of change of p at the suction side, using the "notes" I wrote on my personal blog, I managed to overcome the issue.
If I were you I would define an stl, as I did.

Regards.
student666 is offline   Reply With Quote

Old   July 5, 2018, 15:25
Default
  #6
New Member
 
Dan Vidal
Join Date: Dec 2017
Posts: 7
Rep Power: 8
Aurelius is on a distinguished road
I aim the same as in your case. It is a fan that is built up in a domain in which I cannot with patches catch control surfaces on the over/under-pressure sides to follow "p" during the calculation. The only surface definition in the model for that are faceZones, that's why I tried with my function object changing "patch" (with it works fine) with "faceZone". I have little experience with OF, I will look how to define a stl for these faceZones. Thanks again for your help!

Regards.
Aurelius is offline   Reply With Quote

Old   October 11, 2018, 07:46
Default
  #7
New Member
 
Josef Dobeš
Join Date: Mar 2012
Location: Czech republic
Posts: 12
Rep Power: 14
Iose is on a distinguished road
Hi Aurelius,
do you solve your issue? I use OpenFOAM dev - totalPressureDifference works perfectly for patches, but if I wanted to online monitoring the faceZone it doesn't work.
Thanks
Iose is offline   Reply With Quote

Old   October 11, 2018, 10:53
Default
  #8
New Member
 
Dan Vidal
Join Date: Dec 2017
Posts: 7
Rep Power: 8
Aurelius is on a distinguished road
Hi Iose,

no, i didn't. My model comes from a fluent .msh file and i do not know how to define the faceZone as it would be in a stl in order i can address it via sample function in controlDict.
Regards.

Last edited by Aurelius; October 12, 2018 at 14:55.
Aurelius is offline   Reply With Quote

Old   October 15, 2018, 04:30
Default
  #9
New Member
 
Josef Dobeš
Join Date: Mar 2012
Location: Czech republic
Posts: 12
Rep Power: 14
Iose is on a distinguished road
Hi Aurelius,
I found solution with help from wyldckat, see this
HTML Code:
https://www.cfd-online.com/Forums/openfoam/75393-internal-faces-monitoring.html#post710030
Create baffle from facezone enables monitoring pressure on these faces.
Iose is offline   Reply With Quote

Old   April 18, 2019, 10:18
Default
  #10
Member
 
Martin
Join Date: Aug 2018
Posts: 33
Rep Power: 8
artymk4 is on a distinguished road
Quote:
Originally Posted by Iose View Post
Hi Aurelius,
I found solution with help from wyldckat, see this
HTML Code:
https://www.cfd-online.com/Forums/openfoam/75393-internal-faces-monitoring.html#post710030
Create baffle from facezone enables monitoring pressure on these faces.
This link didn't work for me. Looks like it changed to
Code:
https://www.cfd-online.com/Forums/openfoam/75393-internal-faces-monitoring.html#post710029
artymk4 is offline   Reply With Quote

Old   May 16, 2022, 10:32
Post This solves the issue
  #11
New Member
 
Akshay
Join Date: Jan 2020
Posts: 28
Rep Power: 6
enthusiast is on a distinguished road
p, U are volume fields, if you are using surfaceFieldValue, you need surface fields.

Hence you need to interpolate the volume fields to get surface fields.

Go through this, this solution will definitely solve this issue.

HTML Code:
https://www.cfd-online.com/Forums/openfoam-post-processing/238974-facezoneaverage-function-object-does-not-work-field-u-p-etc.html
Regards
Akshay
enthusiast is offline   Reply With Quote

Reply

Tags
facezone, function objects

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
Average Facet, Surface Vertex or Area-Weighted Emmanuel FLUENT 3 March 27, 2020 11:55
Extract 2D velocity values zalho FLUENT 9 June 2, 2017 06:23
[snappyHexMesh] Extract Faces of FaceZone CellZone OpenFOAM Meshing & Mesh Conversion 0 August 25, 2016 09:55
using chemkin JMDag2004 OpenFOAM Pre-Processing 2 March 8, 2016 23:38
average values in fluent sankar FLUENT 0 July 11, 2006 23:04


All times are GMT -4. The time now is 02:53.