cyclic BC - modify boundary face values

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

 May 4, 2015, 16:50 cyclic BC - modify boundary face values #1 Member   Luca Join Date: Mar 2011 Location: Italy Posts: 62 Rep Power: 15 Dear All, consider a straight duct with inlet and outlet defined as being cyclic patches. Inside of my own solver I am solving for a scalar transport equation for, say phi. I also define another volScalarField, say phi1, which is not solved but it is derived from the values of phi: Code: ```forAll(mesh.cells(),cellI) phi1[cellI] = ( phi[cellI] + (B * mesh.C().internalField()[cellI]) + C );``` where B and C can be here assumed as constant scalar values. Moreover I modify the boundary values of phi1 at the inlet and outlet patch faces as follows: Code: ```const fvPatch& currPatchInlet = mesh.boundaryField()[patchInlet] forAll(currPatchInlet,faceI) phi1.boundaryField()[patchInlet][faceI] = phi.boundaryField()[patchID][faceI] + C const fvPatch& currPatchOutlet = mesh.boundaryField()[patchOutlet] forAll(currPatchOutlet,faceI) phi1.boundaryField()[patchOutlet][faceI] = phi.boundaryField()[patchOutlet][faceI] + C``` If I loop over the faces and print the resulting values on the stdout I obtain the expected value but if I check the results in ParaView or if I run a patchAverage on the inlet and outlet patches at the end of a simulation, I obtain the same values on both patches. Can someone explain me why? Is this related to the cyclic BC or am I missing something? I hope my question is clear enough to get an answer. Thank you in advance, Luca

 Tags cyclic bc, face values