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

Bug in adjustPhiC

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 9, 2009, 13:44
Default Hi everybody, maybe there i
  #1
Member
 
Luca M.
Join Date: Mar 2009
Location: Luzern, Switzerland
Posts: 59
Rep Power: 8
luca is on a distinguished road
Hi everybody,

maybe there is a severe bug in the adjustPhi.C.


Shouldn't be the line 57 and 134 (check of processor type) corrected to:

if (!isType<processorfvspatchscalarfield> (phip))

instead of

if (!isType<processorfvpatchscalarfield>(phip))?

(Sorry for the missing capital letters it should be processorFvsPatchScalarField )

With such implementation (the uncorrected one) the proc patch are not recognized: so adjustableMassOut and massIn are wrongly evaluated. Moreover the massCorr factor scales processors mass exchange while processor boundaries should not be used to correct mass global imbalance.

The error is present also in the 1.4.1 version

Regards

Lu & Co
luca is offline   Reply With Quote

Old   March 9, 2009, 13:58
Default Hi everybody, (There is a p
  #2
Member
 
Luca M.
Join Date: Mar 2009
Location: Luzern, Switzerland
Posts: 59
Rep Power: 8
luca is on a distinguished road
Hi everybody,

(There is a problem in the visualization, I tried in this way)

maybe there is a severe bug in the adjustPhi.C.


Shouldn't be the line 57 and 134 (check of processor type) corrected to:

if (!isType<
processorFvspatchscalarfield> (phip))

instead of

if (!isType<
processorFvpatchscalarfield>(phip))?

(Sorry for the missing capital letters it should be processorFvsPatchScalarField )

With such implementation (the uncorrected one) the proc patch are not recognized: so adjustableMassOut and massIn are wrongly evaluated. Moreover the massCorr factor scales processors mass exchange while processor boundaries should not be used to correct mass global imbalance.

The error is present also in the 1.4.1 version

Regards

Lu & Co
luca is offline   Reply With Quote

Old   March 9, 2009, 13:59
Default I believe you are right, thank
  #3
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 13
henry is on a distinguished road
I believe you are right, thanks for finding this error. Do you get the correct behavior after correcting the code?

H
henry is offline   Reply With Quote

Old   March 9, 2009, 14:04
Default Hi everybody, Sorry for the
  #4
Member
 
Luca M.
Join Date: Mar 2009
Location: Luzern, Switzerland
Posts: 59
Rep Power: 8
luca is on a distinguished road
Hi everybody,

Sorry for the spam but there is a problem in email visualization of the post, you can see the bug post for the correct spell directly on the web site

Regards

Lu & Co
luca is offline   Reply With Quote

Old   March 9, 2009, 14:14
Default Hi Henry, debugging the cod
  #5
Member
 
Luca M.
Join Date: Mar 2009
Location: Luzern, Switzerland
Posts: 59
Rep Power: 8
luca is on a distinguished road
Hi Henry,

debugging the code now the mass flux in parallel calculation are right and processor patch are correctly skipped in the boundary loop thus the mass correction apply only to non processor patches.


Luca
luca is offline   Reply With Quote

Old   March 9, 2009, 16:15
Default Thanks for the info. I have p
  #6
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 13
henry is on a distinguished road
Thanks for the info. I have pushed the correction into our 1.5.x git repository.

H
henry 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



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