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

How to calculate the cumulative mass flow over time at patches (total mass volume)?

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By Tobi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 19, 2022, 01:03
Default How to calculate the cumulative mass flow over time at patches (total mass volume)?
  #1
New Member
 
Long Jiang
Join Date: Mar 2019
Posts: 5
Rep Power: 7
jianglong is on a distinguished road
Dear all, Here I have a simple question about the calculation of flow rate. Already, I have calculated the transient flow rates across the patches. How can I cumulate them to a sum value (total mass transport) over time? From my knowledge, Mass is equal to the sum(flux*deltaT). Or it can be calculated by cumulative trapezoidal numerical integration, such as deltaT*(flux1+flux2)/2. Any difference or which could be more suitable? Will these two methods introduce the error of mass balance?
jianglong is offline   Reply With Quote

Old   February 1, 2022, 18:13
Default
  #2
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hey,

you can use FO to calculate the flux at a patch (or faceZone) and integrate the data over time. This is possible by using the functionObject feature in OpenFOAM. In your case we should be able to do it somehow in that way:

Code:
functions
{
    massThroughPatch
    {
        type    surfaceFieldValue;
        libs    (fieldFunctionObjects);

        // Adjust yourself
        writeControl    adjustableRunTime;
        writeInterval   0.1;
        writeFields     false;

        regionType  patch;
        name        <YOURPATCH>;

        log         true;

        operation   integrate;  // << use some non-sense to see the list of operations we can use
        fields
        (
            phi
        );
    }
}
francescomarra and wstapel like this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Reply

Tags
calculation mass fw rate, flow rate


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
Multiple floating objects CKH OpenFOAM Running, Solving & CFD 14 February 20, 2019 10:08
pressure in incompressible solvers e.g. simpleFoam chrizzl OpenFOAM Running, Solving & CFD 13 March 28, 2017 06:49
Star cd es-ice solver error ernarasimman STAR-CD 2 September 12, 2014 01:01
AMI interDyMFoam for mixer nu problem danny123 OpenFOAM Programming & Development 8 September 6, 2013 03:34
Low Mixing time Problem Mavier CFX 5 April 29, 2013 01:00


All times are GMT -4. The time now is 16:54.