CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   rhoSimpleFoam div(phi,k/K) 2.1.x 2.0.x (http://www.cfd-online.com/Forums/openfoam-solving/112590-rhosimplefoam-div-phi-k-k-2-1-x-2-0-x.html)

wernsen January 31, 2013 10:09

rhoSimpleFoam div(phi,k/K) 2.1.x 2.0.x
 
Dear Foamers,

I am having trouble with a rhoSimpleFoam case which is running under 2.0.x without a problem. If I try to run this case under 2.1.x I am gettin the Fatal Error:

Code:

--> FOAM FATAL IO ERROR:
keyword div(phi,K) is undefined in dictionary

What is the capital K and why do I need it since in 2.0.x it is not necessary?

thx
martin

doubtsincfd January 31, 2013 10:24

something is missing in fvSchemes

It might also be a missing comma or a {

Try giving a default scheme for div

wernsen January 31, 2013 10:42

my fvSchemes::divSchemes looks like that:

Code:

divSchemes
{
  default            none;
  div(phi,U)                    Gauss upwind;
  div(phi,h)                    Gauss upwind;
  div(phi,k)                    Gauss upwind;
  div(phi,epsilon)              Gauss upwind;
  div(phi,omega)                Gauss upwind;
  div(U,p)                    Gauss linear;
  dic(phi)              Gauss linear;
  div((muEff*dev2(T(grad(U)))))  Gauss linear;
}

so I already have a scheme for the div(phi,k) but not for div(phi,K) which confuses me. So what is the K?

maHein January 31, 2013 11:06

The formulation of the energy equation has changed from 2.0.x to 2.1x. In the later one, the divergence on the kinetic energy K is part of it. That's why you need div(phi,K) in your fvSchemes. See line 8 of the hEqn.H file:

Code:

- fvc::div(phi, 0.5*magSqr(U), "div(phi,K)")
By the way, I noticed considerable differences between results from both versions. I tested both for turbomachinery simulation and the 2.1.x resulted in negative isentropic efficiencies. So make sure to compare both results and see if they are reasonable.

wernsen February 4, 2013 03:43

Thank You very much "maHein"!

estang February 20, 2015 10:12

Quote:

Originally Posted by maHein (Post 405314)
The formulation of the energy equation has changed from 2.0.x to 2.1x. In the later one, the divergence on the kinetic energy K is part of it. That's why you need div(phi,K) in your fvSchemes. See line 8 of the hEqn.H file:

Code:

- fvc::div(phi, 0.5*magSqr(U), "div(phi,K)")
By the way, I noticed considerable differences between results from both versions. I tested both for turbomachinery simulation and the 2.1.x resulted in negative isentropic efficiencies. So make sure to compare both results and see if they are reasonable.

I use Version 2.3.0 and i do not understand why the angledDuctExplicitFixedCoeff tutorial for rhoSimpleFoam runs with
Code:

div(phi,k)      bounded Gauss upwind;
and the same fvSchemes file doesn't work with my case.

I get the following errormessage:
Quote:

--> FOAM FATAL IO ERROR:
keyword div(phi,K) is undefined in dictionary "/home/estang/OpenFOAM/estang-2.3.0/run/2_fluid_Testcase_comp_heat_transfer/system/fvSchemes.divSchemes"

file: /home/estang/OpenFOAM/estang-2.3.0/run/2_fluid_Testcase_comp_heat_transfer/system/fvSchemes.divSchemes from line 30 to line 40.

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

FOAM exiting
i just want to understand

maHein February 20, 2015 11:01

It is a capital "k" in your warning: div(phi, K).

estang February 23, 2015 02:20

Quote:

Originally Posted by maHein (Post 532672)
It is a capital "k" in your warning: div(phi, K).

That's why i'm asking here in this thread. I copied the fvSchemes without any edit from the tutorial. I can run the tutorial but when i try to run my own case with the same fvSchemes the solver complains. Shouldn't the same message appear with running the tutorial case?

maHein February 24, 2015 04:32

You have to check whether you use sensibleEnthalpy or sensibleInternalEnergy in your thermodynamicProperties. This changes the form of the energy equation and thus introduces different terms such as div(phi,K).

estang February 24, 2015 04:52

Thank you very much.

Bad that i didn't see the difference in my thermophysical Properties before.

I should have a look to the different formulations.


All times are GMT -4. The time now is 03:14.