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

mass imbalance / div(U) vs div(phi)

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By hjasak

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   June 21, 2022, 03:33
Default mass imbalance / div(U) vs div(phi)
  #1
Senior Member
 
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 355
Rep Power: 8
geth03 is on a distinguished road
hi all,

i searched up the forum about this issue, but could not find a satisfactory explanation.

i would like to know what the mass imbalance is in every iteration step for a steady state calculation with simpleFoam.

1.normally, for an incompressible, steady state case the continuity equation would be: div(U)=0. from the computational side this equation should be div(U)=r, meaning there should be a residual r in every iteration.

2. Integral of div(U) over a control volume is equal to integral over the bounding surface of this control volume when Gauss theorem is applied:
Integral(div(U))dV=Integral(U_f*vector_n)dS, further this Integral can be discretized for a polyhedra -> SumOverAllFaces(U_f*vector_n*faceArea). This sum should be 0 ideally, but will give a residual r for every iteration step, which could be viewed as the mass imbalance for each cell.
i want to compute and output exactly this value.

so the question is, what do i need to do to compute this mass imbalance.
i know that there is the postprocessing utility "div". i did execute div(U) and div(phi) for icofoam. both values differ from each other (in this thread Meaning of "fvc::div(phi)" , post #20, it is claimed that both should give the same value). the dimension for both is 1/second.
i did calculate div(U) values with excel for this case manually, and got the same values which are shown in paraview.

i hope anybody can tell me how to compute the mass imbalance correctly.
Attached Images
File Type: jpg plot_paraview.jpg (37.2 KB, 22 views)
File Type: png terminal_output.png (30.9 KB, 13 views)
geth03 is offline   Reply With Quote

 


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
DPMFoam - Serious Error --particle-laden flow in simple geometric config benz25 OpenFOAM Running, Solving & CFD 27 December 19, 2017 20:47
mass imbalance at the inlet, interface, outlet CFDturbomachinery CFX 2 October 30, 2014 11:54
Mass imbalance in fast chem. reaction Laexzzz FLUENT 3 March 16, 2014 23:19
Integral of mass Imbalance drops with time TfG FLUENT 0 April 3, 2009 11:38
OutletBoundary Condition Causes Mass Imbalance Andy Main CFD Forum 0 March 11, 2004 14:05


All times are GMT -4. The time now is 10:58.