# Verifying Mass Flux at Outlet Boundary

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

 July 31, 2017, 18:34 Verifying Mass Flux at Outlet Boundary #1 New Member   Join Date: Nov 2016 Posts: 10 Rep Power: 9 Hi, I am verifying the calculation of several key quantities in openfoam. Specifically, I want to make sure that I understood how "phi" is calculated at the boundary faces. In the code below I expect phi = dot product of face normal vector with velocity * area (phi = A n_i U_i). I have verified this on inlet boundaries, but I am finding that at outlet boundaries phi ~= A n_i U_i. The numbers are very close, but not exact. Does anyone know why? Thanks for the help! Code: const fvBoundaryMesh& boundaryMesh = mesh.boundary(); forAll(boundaryMesh, patchI) { const fvPatch& patch = boundaryMesh[patchI]; const fvsPatchField &phiCheck = patch.lookupPatchField("phi"); const fvPatchField &U2 = patch.lookupPatchField("U"); forAll(patch, faceI) { vector faceNormal = patch.Sf()[faceI]; scalar phiOut = phiCheck[faceI]; vector vel2 = U2[faceI]; Info << "Face Area vector (A n_i): " << faceNormal << endl; Info << "Velocity (v_i): " << vel2 << endl; Info << "Phi: " << phiOut << endl; Info << "Calculated Phi: A n_i & v_i: " << (faceNormal & vel2) << endl; Info << endl; } }

 August 1, 2017, 16:45 #2 New Member   Join Date: Nov 2016 Posts: 10 Rep Power: 9 Update: I am using the icoFoam solver. I find that if I comment out the "U.correctBoundaryConditions();" line at the bottom of the solver, then my code above does lead to exact agreement between phi and A n_i * U_i. So, a new question, what exactly is "correctBoundaryConditions()" changing and why doesn't the change seem to propagate out to the patch field values?

 Tags mass flow, outlet