CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Solver "nonNewtonianIcoFoam" (https://www.cfd-online.com/Forums/openfoam-solving/163728-solver-nonnewtonianicofoam.html)

Movie December 4, 2015 17:50

Solver "nonNewtonianIcoFoam"
 
Hi everybody!
I hope I will not bother you too much. I am a newbie on the OpenFOAM and I'm trying to develop my Openfoam skills by myself. My main focus is the courses of prof.Hakan Nilsson and the reports of his students. So I was doing one of that reports and I stuck with one problem.

The report is about "Non-Newtonian Models in OpenFOAM, Implementation a non-Newtonian model" by Naser Hamedi (http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2014/). Step by step I did everything but on the last step I get the problem. When I run "nonNewtonianIcoFoam" the error comes out like this:

HTML Code:

--> FOAM FATAL IO ERROR: Unable to set reference cell for field p    Please supply either pRefCell or pRefPointfile: /home/sehic/OpenFOAM/sehic-3.0.0/run/test_Casson/system/fvSolution.PISO from line 45 to line 46.    From function void Foam::setRefCell    (        const volScalarField&,        const volScalarField&,        const dictionary&,        label& scalar&,        bool    )    in file cfdTools/general/findRefCell/findRefCell.C at line 129.
When I run the folder that I downloaded from this page everything is OK but when I run my solver done with the step from the report there is the problem. I looked through the solver but I didn't find the bug. I'm using openfoam 3.0 and report is done in the 2.3.

Thank you for you time and I hope you will help me with this maybe silly bug.

kmefun December 4, 2015 23:03

Try to add "pRefCell 0;" at system/fvsolution

PISO
{
nCorrectors 4;
nNonOrthogonalCorrectors 2;
pRefCell 0; //specify the pressure level in one cell
}

Movie December 5, 2015 05:46

Quote:

Originally Posted by kmefun (Post 576273)
Try to add "pRefCell 0;" at system/fvsolution

PISO
{
nCorrectors 4;
nNonOrthogonalCorrectors 2;
pRefCell 0; //specify the pressure level in one cell
}

I done this but now I get the message:

"--> FOAM FATAL IO ERROR:
keyword pRefValue is undefined in dictionary "/home/sehic/OpenFOAM/sehic-3.0.0/run/test_Casson/system/fvSolution.PISO"

file: /home/sehic/OpenFOAM/sehic-3.0.0/run/test_Casson/system/fvSolution.PISO from line 45 to line 47.

From function dictionary::lookupEntry(const word&, bool, bool) const
in file db/dictionary/dictionary.C at line 442.

FOAM exiting"

I think it is not problem in these values because when I run the case from Naser Hamedi, the original one everything is OK. I was looking every single file my and his and I didn't find the bug.

I hope we will find the bug. Thank you!

kmefun December 6, 2015 11:52

Add "pRefValue 0;" as well

Movie December 6, 2015 13:33

Quote:

Originally Posted by kmefun (Post 576445)
Add "pRefValue 0;" as well


Because of your suggestion I have found the bug :D So basically I was guilty the whole time. The reason I was having the bug is because I put the zero gradient on the outlet same as the inlet. My bad :D And when I get the outlet fixed value there is no need for pRefValue and pRefCell.

Everything finished very smooth and my results are the same as from the tutorial.

Thank you very much.


All times are GMT -4. The time now is 18:06.