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

Some misleading about the treatment of coupled boundary

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By henry

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 26, 2008, 02:39
Default Files: fvMatrix.C fvMatr
  #1
New Member
 
Liu Huafei
Join Date: Mar 2009
Location: Shanghai, China
Posts: 20
Rep Power: 17
liuhuafei is on a distinguished road
Files:
fvMatrix.C
fvMatrixSolve.C
lduMatrixATmul.C

Some question about the coupled boundary.
In fvMatrix.C
In subroutine Foam::lduMatrix::solverPerformance Foam::fvMatrix<Type)::solve。

Firstly we call addBoundarySource(source),then the 'implicit' part of coupled boundary has been added to the source.

void Foam::fvMatrix<type>::addBoundarySource
(
....
if (!ptf.coupled()){
addToInternalField(lduAddr().patchAddr (patchI), pbc, source);
}
else if (couples)
{
...
forAll(addr, facei)
{
source[addr[facei]] += cmptMultiply(pbc[facei], pnf[facei]);
}

But in the following code, the updateMatrixInterface will add the 'implicit' part to the source once again. If the updateMatrixInterface has the same function, the addBoundarySource doesn't need including the coupled boundary part. Why need add the 'implicit' part twice?

Another question,what the function of the initMatrixinterfaces

In addition,In lduMatrix's AMul and TMul also call the initMatrixInterfaces and UpdateMatrixInterfaces,it seems that we needn't call the initMatrixInterfaces and Updatematrix in the solve subroutine.
liuhuafei is offline   Reply With Quote

Old   September 26, 2008, 03:54
Default All this messing around is bec
  #2
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
All this messing around is because the solver is segregated so the contributions for the other components must be included explicitly and those for the component being solved for included implicitly for each component.

H
yueyun likes this.
henry is offline   Reply With Quote

Old   September 26, 2008, 04:15
Default Heya, The coupled treatment
  #3
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Heya,

The coupled treatment is done in updateMatrixInterface and its init function. This business of the addBoundarySource is there because the boundary condition contribution is kept separate until the matrix is completed. This used to be necessary because the matrix coefficients were only scalar and for a vector/tensor variable the b.c. contribution is clearly a vector or a tensor. Therefore, splitting it in components means you have to add the (explicit) part one at a time.

Don't worry, all is well.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   September 26, 2008, 04:35
Default Thanks for your answer
  #4
New Member
 
Liu Huafei
Join Date: Mar 2009
Location: Shanghai, China
Posts: 20
Rep Power: 17
liuhuafei is on a distinguished road
Thanks for your answer
liuhuafei is offline   Reply With Quote

Old   February 22, 2014, 16:01
Default
  #5
Member
 
Malik
Join Date: Dec 2012
Location: Austin, USA
Posts: 53
Rep Power: 14
malaboss is on a distinguished road
Quote:
Originally Posted by hjasak View Post
The coupled treatment is done in updateMatrixInterface and its init function.
Hrv
Hi FOAMers,
I have been examining in details how boundary conditions were implemented in OpenFOAM since for my problem, when I commented out updateMatrixInterface my case converged more easily than with it, especially when I set the reference pressure with cell reference.

Does anyone know what is precisely meant by the "coupled treatment" of updateMatrix Interface that Hrv is talking about ?

Thanks in advance !
malaboss is offline   Reply With Quote

Old   December 24, 2017, 11:29
Default
  #6
Member
 
Di Cheng
Join Date: May 2010
Location: Beijing, China
Posts: 47
Rep Power: 16
chengdi is on a distinguished road
"coupled treatment" of updateMatrix Interface that Hrv is talking about is `coupled BC treatment`. Coupled BC includes cyclic and processor BC. They are `interfaces` so every face on the BC have two owner cells. The face on normal BC only have one owner.

More importantly, the matrix coefficient (indicating the interaction between the cells sharing a face) cannot be expressed in lduMatrix class because of the limit of lduAddressing used in most programs which uses "lower==owner, upper==neighbour" strategy for simplification. So the extra off-diagonal coeffs must be stored in another way.
chengdi is offline   Reply With Quote

Old   February 20, 2018, 11:11
Default
  #7
Member
 
Emad Tandis
Join Date: Sep 2010
Posts: 77
Rep Power: 16
EmadTandis is on a distinguished road
Quote:
Originally Posted by malaboss View Post
Hi FOAMers,
I have been examining in details how boundary conditions were implemented in OpenFOAM since for my problem, when I commented out updateMatrixInterface my case converged more easily than with it, especially when I set the reference pressure with cell reference.

Does anyone know what is precisely meant by the "coupled treatment" of updateMatrix Interface that Hrv is talking about ?

Thanks in advance !
The way that updatematrixInterface acts is as below:
the matrixUpdateBuffer_ -which is calculated by initMatrixInterfaceUpdate, and actually is the most recent approximation of interpolated unknown variable on neighbour cells- is multiplied by boundaryCoeffs() of regionCouplePatch and then added to the source of current matrix.
EmadTandis is offline   Reply With Quote

Reply


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
OF 15 Misleading information in README about Qt 43x in openSUSE alberto OpenFOAM Bugs 40 November 7, 2008 10:20
Treatment of Boundary Conditions Harun CFX 7 August 10, 2007 13:36
Fluent Treatment of mixed boundary condition HELP Amr FLUENT 0 May 26, 2006 06:46
Treatment of inflow boundary William M. Main CFD Forum 2 June 1, 2005 03:46
Immersed boundary boundary treatment AFP Main CFD Forum 0 January 30, 2004 08:16


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