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

Maybe some bug in leastSquaresVectorsc

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   December 24, 2007, 21:25
Default Maybe some bug in leastSquares
  #1
New Member
 
Liu Huafei
Join Date: Mar 2009
Location: Shanghai, China
Posts: 20
Rep Power: 17
liuhuafei is on a distinguished road
Maybe some bug in leastSquaresVectors.c

Description:
some error in calculation of dd in leastsquare vector

Source file:
leastSquaresVectors.c

function
void Foam::leastSquaresVectors::makeLeastSquaresVectors () const

if (p.coupled())
{
forAll(pd, patchFacei)
{
const vector& d = pd[patchFacei];

dd[faceCells[patchFacei]] +=
(pw[patchFacei]*pMagSf[patchFacei]/magSqr(d))*sqr(d);
}
}

dd maybe done by the following:
dd[faceCells[patchFacei]] +=
(1.-pw[patchFacei])*pMagSf[patchFacei]/magSqr(d))*sqr(d);

also a question:
for the couple boundary,dd is calculated only for P cell(owner),why not for N cell(neighbour)?
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



All times are GMT -4. The time now is 16:19.