|
[Sponsors] |
June 21, 2022, 03:33 |
mass imbalance / div(U) vs div(phi)
|
#1 |
Senior Member
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 365
Rep Power: 8 |
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. |
|
June 22, 2022, 04:57 |
|
#2 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,906
Rep Power: 33 |
fvc::div(phi) is the right thing to do. If you need a smaller error, tighten the pressure solver tolerance.
Face flux phi is the face representation of the velocity field and this is what we apply the div(u) constraint on. Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk Last edited by hjasak; June 22, 2022 at 08:52. |
|
June 22, 2022, 12:27 |
|
#3 |
Senior Member
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 365
Rep Power: 8 |
Thank you Prof. Jasak.
What confuses me is that div(phi) has the dimension "per second" in the output-file. I don't know how to interpret that, do i need to multiply that value with the cell volume to get the volume flux imbalance and maybe that again with the density to get the mass imbalance in kg/second? Thanks again for any advice. |
|
August 5, 2023, 15:14 |
|
#4 |
New Member
Shenhui Ruan
Join Date: Nov 2021
Location: Karlsruhe
Posts: 16
Rep Power: 4 |
Hello geth03,
You can read the following two answers: Meaning of "fvc::div(phi)" the difference between div(U) and div(phi) They already talked a lot. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
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 |