CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

cyclic BC - modify boundary face values

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 4, 2015, 16:50
Default cyclic BC - modify boundary face values
  #1
Member
 
Luca
Join Date: Mar 2011
Location: Italy
Posts: 62
Rep Power: 15
marluc is on a distinguished road
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
marluc is offline   Reply With Quote

Reply

Tags
cyclic bc, face values


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Other] mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 13 March 7, 2022 17:22
snappyhexmesh remove blockmesh geometry philipp1 OpenFOAM Running, Solving & CFD 2 December 12, 2014 10:58
Radiation interface hinca CFX 15 January 26, 2014 17:11
Pressure instability with rhoSimpleFoam daniel_mills OpenFOAM Running, Solving & CFD 44 February 17, 2011 17:08
[blockMesh] BlockMeshmergePatchPairs hjasak OpenFOAM Meshing & Mesh Conversion 11 August 15, 2008 07:36


All times are GMT -4. The time now is 00:03.