|
[Sponsors] |
July 31, 2017, 19:34 |
Verifying Mass Flux at Outlet Boundary
|
#1 |
New Member
Join Date: Nov 2016
Posts: 10
Rep Power: 10 |
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<scalar> &phiCheck = patch.lookupPatchField<surfaceScalarField, scalar>("phi"); const fvPatchField<vector> &U2 = patch.lookupPatchField<volVectorField, vector>("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, 17:45 |
|
#2 |
New Member
Join Date: Nov 2016
Posts: 10
Rep Power: 10 |
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wind turbine simulation | Saturn | CFX | 60 | July 17, 2024 06:45 |
Difficulty In Setting Boundary Conditions | Moinul Haque | CFX | 4 | November 25, 2014 18:30 |
Setting rotating frame of referece. | RPFigueiredo | CFX | 3 | October 28, 2014 05:59 |
RPM in Wind Turbine | Pankaj | CFX | 9 | November 23, 2009 05:05 |
Convective Heat Transfer - Heat Exchanger | Mark | CFX | 6 | November 15, 2004 16:55 |