CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   unused variable ‘momentumPredictor’ (https://www.cfd-online.com/Forums/openfoam-programming-development/81477-unused-variable-momentumpredictor.html)

RalphS October 28, 2010 03:12

unused variable ‘momentumPredictor’
 
What does it mean?

kathrin_kissling October 28, 2010 03:32

Hi Ralph,

if you apply the momentum predictor the UEqn is solved before the pEqn to get a better velocity field for the matrixcoefficients for the pEqn.
A detailed description can be found for example in Hrvoje Jasak's or Henrik Rusche's PhD thesis. They can be found under

http://powerlab.fsb.hr/ped/kturbo/openfoam/docs/

If I intpret this right. This variable is not used. When does the error message appear? During compilation? If yes you need to decide whether you need a momentum predictor or not.

To get your actual problem... Can you be a little more specific on which solver you are using, what case you are trying to solve ...?

Best

Kathrin

RalphS October 28, 2010 04:02

Hi Kathrin,

The error message appear when I compile my_rhoSimpleFoam solver. I have modified the enthalphy equation. The simulation works and the results looks almost fine. I compare my results with a simulation done with starccm+.

I only wanted to get more information about the momentum error message and if it's important for me, in which way it influence my results.
Thanks for the link.

Regards

Ralph

RalphS October 28, 2010 04:36

Here some more information:

I simulate flow through an elbow. I compare the results with a simulation with starccm+.

The velocity field is identical.
The static pressure field is also identical.
Kinetic energy and eddy-viscosity almost identical.
I also calculate an "Uniformity Index" at the outlet, the value is also comparably.

The distribution of the Temperaturfield is also very analog (With the new total enthalpy equation). But the temperatur is a bit too low, and the density a little bit too high at the outlet. So my total pressure lose is about 50 % too low.

The value of total Temperatur is identical.

I think the total enthalpy equation is not 100 % perfect, or I don't use the right thermophysical model. Have you some idea?

kathrin_kissling October 28, 2010 04:41

Which Foam Version are you using?
In your solver you call "readSimpleControlls.H".

(http://foam.sourceforge.net/doc/Doxy...8H_source.html)

There the bool variable momentumPredictor is read from the fvSolution dictionary.
Afterwards it's not used any longer.

In which line does the compiler find the warning. It is not an error but an unused variable that could get deleted. They just didn't change the "readSimpleControlls.H" file.

In summary, if you don't need a momentum predictor everything is fine.

Best

Kathrin

kathrin_kissling October 28, 2010 04:45

I was a bit to slow...

For the other problems... sorry I'm not working on compressible flows, so I cannot help further from here...

Best!

Kathrin

RalphS October 28, 2010 04:46

Quote:

Originally Posted by kathrin_kissling (Post 281137)
Which Foam Version are you using?
In your solver you call "readSimpleControlls.H".

(http://foam.sourceforge.net/doc/Doxy...8H_source.html)

There the bool variable momentumPredictor is read from the fvSolution dictionary.
Afterwards it's not used any longer.

In which line does the compiler find the warning. It is not an error but an unused variable that could get deleted. They just didn't change the "readSimpleControlls.H" file.

In summary, if you don't need a momentum predictor everything is fine.

Best

Kathrin


In my opinion I don't need a momentum predictor.

Thanks

And now I have to find the reason, why I get not the right measuring totalpressure at the outlet

SJSW August 26, 2015 23:43

Could you tell me why the denominator of Uniformity Index is multiplied by 2?

sharonyue September 6, 2015 15:00

I remember exactly Henry had said somewhere that;" Whether to use momentum predictor is rather empirical,"... But I can not locate this post now.


All times are GMT -4. The time now is 22:42.