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

How to average the value in a certain region in OpenFOAM?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 18, 2018, 04:51
Default How to average the value in a certain region in OpenFOAM?
  #1
Senior Member
 
Bill Wang
Join Date: Aug 2014
Posts: 109
Rep Power: 11
6863523 is on a distinguished road
Dear all,
I have run the simulations and caculate the volume averaged values over the whole domain in OF 4.0.1.
I wonder if there is a way to calculate the averaged value over only a part of the domain instead of the whole domain.
It seems that I need to separate the mesh first before I ran the simulations and average only in the needed region instead averaging over "all".
Code:
    volumeAverage
    {
        type            volRegion;
        libs            ("libfieldFunctionObjects.so");
        log             false;
        writeControl    timeStep;
        writeInterval   20000;
        writeFields     false;
        regionType      all;
        operation       volAverage;
        fields
        (
            U
        );
    }
If this is the case, how to separate the mesh but still run the simulation in the whole region?
Thanks in advance.
Best regards,
Bill
6863523 is offline   Reply With Quote

Old   January 18, 2018, 05:07
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Instead of all you set regionType to cellZone and create cellZone, where you would like to calculate volume average, with topoSet utility. See $FOAM_SRC/functionObjects/field/fieldValues/volFieldValue/volFieldValue.H for more details.
alexeym 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
Getting Started with OpenFOAM wyldckat OpenFOAM 25 August 14, 2022 13:55
Can I use fvOptions to couple a solid region and a fluid region? titanchao OpenFOAM Running, Solving & CFD 4 January 14, 2022 07:55
Problem with chtMultiregionFoam radiation boundary condition baran_foam OpenFOAM Running, Solving & CFD 10 December 17, 2019 17:36
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 05:36
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 09:04


All times are GMT -4. The time now is 11:14.