CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (http://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   Bug in adjustPhiC (http://www.cfd-online.com/Forums/openfoam-bugs/62295-bug-adjustphic.html)

luca March 9, 2009 13:44

Hi everybody, maybe there i
 
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 March 9, 2009 13:58

Hi everybody, (There is a p
 
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

henry March 9, 2009 13:59

I believe you are right, thank
 
I believe you are right, thanks for finding this error. Do you get the correct behavior after correcting the code?

H

luca March 9, 2009 14:04

Hi everybody, Sorry for the
 
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 March 9, 2009 14:14

Hi Henry, debugging the cod
 
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

henry March 9, 2009 16:15

Thanks for the info. I have p
 
Thanks for the info. I have pushed the correction into our 1.5.x git repository.

H


All times are GMT -4. The time now is 21:38.