
[Sponsors] 
January 5, 2013, 11:17 
How the cyclic boundary condition affect the coefficient matrix

#1 
New Member
Join Date: Jan 2012
Posts: 5
Rep Power: 7 
Hi all,
does anyone examine on how the cyclic boundary condition is implemented? I apply the cyclic boundary condition to the inlet and outlet in a 2D pipe flow, and it works well (generating parabolic flow with right maximum velocity). But I find that the neighbor/owner list of the cyclic boundary generated by 'blockMesh' has no difference with that of normal inlet/outlet boundary. I think the crucial code is not in 'cyclicFvPatchField.C'. can someone kindly give me some hint which part in OpenFOAM deal with the cyclic boundary in generating the coefficient matrix? Thanks. Mill 

October 19, 2015, 12:25 

#2  
New Member
Join Date: Oct 2015
Posts: 15
Rep Power: 4 
Quote:
Did you find any information related to your question of how cyclic boundary conditions modify the coefficient matrix? Thanks in advance for your help. C 

October 20, 2015, 06:44 
treatment of cyclic boundary conditions

#3 
New Member
Join Date: Jan 2012
Posts: 5
Rep Power: 7 
Hi Martel,
As far as I know, the coefficient matrix is not affected by the cyclic boundary conditions. If you output the coefficient matrix for a Dirichlet boundary or a Neumann boundary and compare it with that for a cyclic boundary, you would find they are the same. The treatment of cyclic boundary is similar to the treatment of the processorPatch. Functions or variables including valueInternalCoeffs(), valueBoundaryCoeffs() are affected. Cheers, Mill 

October 20, 2015, 06:58 

#4  
New Member
Join Date: Oct 2015
Posts: 15
Rep Power: 4 
Thank you for your quick reply codinging.
Please let me ask you another related question: I am trying to understand how openfoam generates the matrices for the differential operators. I have programmed a simple example for the laplacian operator: Quote:
* Matrix Diagonal terms * Matrix out of diagonal terms * Indices of the out of diagonal terms * source terms (right hand side of the linear system) (zero in my example) * Boundary conditions contribution to the source term coefficients * Boundary conditions contribution to the matrix term coefficients As you said, the effect of the boundary conditions is not yet included in the matrix and source term that I get. My question is: How can I get the indices (I already have the values) of the Boundary Conditions contribution to the matrix coefficients and to the source term? Thanks in advance for your help. CME But the effect of the boundary conditions is not yet included in the matrix and source term that I get. My question is: How can I get the contribution (coefficients and indices) of the Boundary Conditions to the matrix coefficients (diag and outofdiag) and to the source term? Thanks in advance for your help. CME 

October 20, 2015, 07:19 
boundary conditions

#5 
New Member
Join Date: Jan 2012
Posts: 5
Rep Power: 7 
Hi Martel,
you are correct that boundary condition contribution to the source terms and the coefficient matrix are separately store in internalCoeffs() and boundaryCoeffs(). I would suggest you to have a look at the D(), H(), A() operators of a fvMatrix. e.g. in fvMatrix.C template<class Type> Foam::tmp<Foam::scalarField> Foam::fvMatrix<Type>:() const { tmp<scalarField> tdiag(new scalarField(diag())); addCmptAvBoundaryDiag(tdiag()); return tdiag; } 'addCmptAvBoundaryDiag(tdiag())' considers the contribution for the treatment of differential operators related to a boundary. In addition to this, you might find how internalCoeffs() and boundaryCoeffs() are generated by looking at a specific implementation of a boundary condition, e.g. 'fixedValueFvPatchField.C’ for the Dirichlet boundary condition. Cheers, Mill 

October 20, 2015, 07:26 

#6 
New Member
Join Date: Oct 2015
Posts: 15
Rep Power: 4 
Thanks for the comment


Tags 
cyclic boundary 
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Radiation interface  hinca  CFX  15  January 26, 2014 18:11 
inlet velocity boundary condition  murali  CFX  5  August 3, 2012 08:56 
CFX twophase cyclic boundary condition problem  ukbid  CFX  1  May 2, 2012 04:09 
Cyclic Boundary Condition  Asgarian  OpenFOAM Running, Solving & CFD  3  December 29, 2011 20:45 
Slip boundary condition what is inside  normunds  OpenFOAM Running, Solving & CFD  2  June 4, 2007 06:45 