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

Some misleading about the treatment of coupled boundary

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 26, 2008, 01:39
Default Files: fvMatrix.C fvMatr
  #1
New Member
 
Liu Huafei
Join Date: Mar 2009
Location: Shanghai, China
Posts: 20
Rep Power: 9
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, 02:54
Default All this messing around is bec
  #2
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 14
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
henry is offline   Reply With Quote

Old   September 26, 2008, 03:15
Default Heya, The coupled treatment
  #3
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,781
Rep Power: 22
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, 03:35
Default Thanks for your answer
  #4
New Member
 
Liu Huafei
Join Date: Mar 2009
Location: Shanghai, China
Posts: 20
Rep Power: 9
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: 52
Rep Power: 5
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

Reply

Thread Tools
Display Modes

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 On
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 12:36
Fluent Treatment of mixed boundary condition HELP Amr FLUENT 0 May 26, 2006 05:46
Treatment of inflow boundary William M. Main CFD Forum 2 June 1, 2005 02:46
Immersed boundary boundary treatment AFP Main CFD Forum 0 January 30, 2004 08:16


All times are GMT -4. The time now is 15:10.