Processor Boundary Conditions
Dear Developers,
Suppose we have a domain and let a cell, say owner, own a face, say facei, whose downstream cell, say neighbour, be internal cells of the domain. While running application in parallel, let facei be a processor boundary and let cell owner be in a subdomain, say OwnerSubdomain and neighbour be in the neighbouring subdomain, say NeighbourSubdomain. If we have a volVectorfield, say U, and run a solver like icoFOAM to solve the laplace equation or any other equation for that matter, say
fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi, U) - fvm::laplacian(nu, U) );
, when we assemble the matrix and inspect its assembly, the value of the neighbour velocity are suppose to appear as the Boundary field of facei when in ownersubdomain. Also the value of U[owner] are suppose to appear as U.boundaryField()[patchID][faceID] in the neighbourSubdomain corresponding to facei. see the code below.
forAll(mesh.C(), cellid) { const cell& faces = mesh.cells()[cellid]; label face; forAll( faces, faceid) { face = faces[faceid]; if(mesh.isInternalFace(face)) { continue; } else { label patchID = mesh.boundaryMesh().whichPatch(face); label faceID = mesh.boundaryMesh()[patchID].whichFace(face); if( mesh.boundaryMesh()[mesh.boundaryMesh().whichPatch(face)].type() == "processor" ) Pout<<"\n\nFace:\t"<<face<<"\tFace centr:\t"<<mesh.Cf()[face]<<"\tOwner:\t"<<mesh.owner()[face]<<"\tU:\t"<<U[mesh.owner()[face]]<<"\tDiagonal:\t"<< UEqn.diag()[mesh.owner()[face]]<<"\tSourceU\t"<<UEqn.source()[mesh.owner()[face]][0] <<"\tSourceV\t"<<UEqn.source()[mesh.owner()[face]][1]<<"\tSourceW\t"<<UEqn.source()[mesh.owner()[face]][2] <<"\nType\t"<< mesh.boundaryMesh()[mesh.boundaryMesh().whichPatch(face)].type() <<"\tPatchName:\t"<<mesh.boundaryMesh()[mesh.boundaryMesh().whichPatch(face)].name()<< "\tU boundary field:\t"<<U.boundaryField()[patchID][faceID]<<"\tBoundary Coeff:\t"<< UEqn.boundaryCoeffs()[patchID][faceID]<<"\tInternal Coeff:\t"<< UEqn.internalCoeffs()[patchID][faceID]<<"\n"; }
}
}
However, Openfoam moves a value U*DV/Dt (where U = velocity, DV = cell volume, Dt is timestep) to the source term which I think is an error. Please correct me if am wrong and explain the meaning of the quantity moved to the source. Also, please clarify the why we need the values of UEqn.boundaryCoeffs() since the out of core updates are performed explicitly.
Best, Kamau K University of North Texas.