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

Question about the fvmatrix and Laplacian operator

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By hjasak

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   December 28, 2007, 00:39
Default I have a question about the LD
  #1
New Member
 
Liu Huafei
Join Date: Mar 2009
Location: Shanghai, China
Posts: 20
Rep Power: 17
liuhuafei is on a distinguished road
I have a question about the LDUMatrix.

LDUMatrix contains the coefficients, lowerPtr,upperPtr,diagPtr ,and the address reference, uPtr and lPtr.

My questions are as follows:
1) Does the lPtr mean the owner of face and uPtr the neigbour of the face as done in the polyMesh?
In some mesh class in openfoam, owner's index(P)
is lower than neighbor index(N).

2) Does the upperPtr store the contribution of the neighbour cell(N) to the owner cell(P) and
the lowerPtr store the contribution of the owner(P) to the neighbour(N).

In Hoperations.C // H operator
template<class>
tmp<field<type> > lduMatrix::H(const ield<type>& ) const
{
.........
const scalarField& Lower = lower();
const scalarField& Upper = upper();

// Take refereces to addressing
const unallocLabelList& l = lduAddr_.lowerAddr();
const unallocLabelList& u = lduAddr_.upperAddr();

for (register label face=0; face<l.size(); face++) {
Hphi[u[face]] -= Lower[face]*sf[l[face]];
Hphi[l[face]] -= Upper[face]*sf[u[face]];
}
}

From this code, I guess the LowerAddr is owner list and UpperAddr is neighbour list,
Lower is the contribution of the owner (P) to the neighbour (N), Upper is the contribution of
the neighbour(N) to the owner.

if the matrix is
AD1 AU1 AU2 AU3 AU4
AL1 AD2 AU5 AU6 AU7
AL2 AL5 AD3 AU8 AU9
AL3 AL6 AL8 AD4 AU10
AL4 AL7 AL9 AL10 AD5

But in fvMatrix, the implementation of function negSumDiag() is as follows
negSumDiag:
for (register label face=0; face<l.size(); face++)
{
Diag[l[face]] -= Lower[face];
Diag[u[face]] -= Upper[face];
}
Diag[i] should be substract the contribution from all its neighbouring cell, why not the following code?
for (register label face=0; face<l.size(); face++)
{
Diag[l[face]] -= Upper[face];
Diag[u[face]] -= Lower[face];
}


3) For the implementation of FVM laplacian operator,only the fvm.upper is calculated,
why not the fvm.lower?
template<class>
tmp<fvmatrix<type> >
gaussLaplacianScheme<type>::fvmLaplacianUncorrecte d
(
const surfaceScalarField& gammaMagSf,
GeometricField<type,>& vf
)
{
.......
fvMatrix<type>& fvm = tfvm();

fvm.upper() = deltaCoeffs.internalField()*gammaMagSf.internalFie ld();

! why not the fvm.lower()
fvm.negSumDiag();

}

Thanks in advance!
Liu Huafei
liuhuafei is offline   Reply With Quote

 


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
FvMatrix coefficients shrina OpenFOAM Running, Solving & CFD 10 October 3, 2013 14:38
How to look at the coefficients from fvMatrix marco7 OpenFOAM Running, Solving & CFD 2 September 11, 2008 03:58
Question about fvmlaplacian operator cosimobianchini OpenFOAM Running, Solving & CFD 0 February 1, 2007 13:40
Material interfaces and the laplacian operator cliffoi OpenFOAM Running, Solving & CFD 8 November 8, 2006 08:57
Material interfaces using the laplacian operator cliffoi OpenFOAM 0 November 6, 2006 10:42


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