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/)
-   -   yPlus Difference between OpenFoam and CFX (https://www.cfd-online.com/Forums/openfoam-solving/187725-yplus-difference-between-openfoam-cfx.html)

khedar May 13, 2017 17:40

yPlus Difference between OpenFoam and CFX
 
Hi All,
I recently completed a mesh independence study for a plane rectangular channel in OpenFoam and compared it to CFX for Total average Heat Transfer over the wall patch. I had to implement a wallHeatFlux utility for wall function meshes similar to the way it is implemented in CFX. I get good agreement between the Heat Flux values.
The issue is in yPlus values, OF values are almost 1/3 to 1/2 of that of CFX. Now I know one reason for this is the Vertex based formulation of CFX compared to cell-centered in OpenFoam. But my doubt is which value i should trust?

piu58 May 14, 2017 02:02

y+ is in close connection to the Prandtl boundary layer. So I recommend to look at the course of the velocity inside this layer at different places. May be, the wall functions are not identical and lead to a difference in the boundary layer.

For the openFoam suite the paraFoam with the "plot over line" filter may be used for that task.

khedar May 14, 2017 07:58

Hi piu58,
If you look at the formula for yPlus, it is proportional to the first grid point distance (y) and sqrt(tau_w) the wall shear stress. What I found was y value for Openfoam = 0.5 CFX due to the difference in Cell-Centered vs Vertex-based implementation. Also I compared the wall_shear stress values for both using kOmegaSST model and found that values of CFX are approximately twice that of OpenFoam. This in total would give a factor of 2*sqrt(2) = 3 for the yPlus values between OF and CFX and matches well with the values which I am getting. Correct me if I am wrong.

If I am right, than one has to keep in mind this difference while generating the mesh which is quiet tricky.

Regards,
khedar

P.S. I would also try your suggestion of plotting along the line to compare CFX and OF results.

piu58 May 14, 2017 08:05

> = 0.5 CFX due to the difference in Cell-Centered vs Vertex-based implementation

This is some kind of definition: Which y+ is given.

> also I compared the wall_shear stress values for both using kOmegaSST model and found that values of CFX are approximately twice that of OpenFoam.

This is a real difference in the calculated results. It point to different models in both programs. Of course you know which wall function you used in Openfoam. Is that known for CFX too? I don't know CFX at all.

arjun May 14, 2017 08:16

Quote:

Originally Posted by khedar (Post 648830)
Hi piu58,
If you look at the formula for yPlus, it is proportional to the first grid point distance (y) and sqrt(tau_w) the wall shear stress. What I found was y value for Openfoam = 0.5 CFX due to the difference in Cell-Centered vs Vertex-based implementation. Also I compared the wall_shear stress values for both using kOmegaSST model and found that values of CFX are approximately twice that of OpenFoam. This in total would give a factor of 2*sqrt(2) = 3 for the yPlus values between OF and CFX and matches well with the values which I am getting. Correct me if I am wrong.

If I am right, than one has to keep in mind this difference while generating the mesh which is quiet tricky.

Regards,
khedar

P.S. I would also try your suggestion of plotting along the line to compare CFX and OF results.

Why the shear stress has to be twice?

Are you suggesting that by shifting the node to 2 d distance CFX can give you twice shear force?

Edited to add: If what you say is true then by refining mesh you would get almost 0 shear force, but we do DNS to get accurate shear force and usually it is not 0.

khedar May 14, 2017 09:58

I did not say shear stress has to be twice, but i made a mistake in reading the results, tau_w for openfoam is around 7 Pa against 8.5 Pa which is a much smaller difference (I said twice in my previous post).

But still it is bit confusing, because in some places one talks in term of grid spacing (ds) of the first cell and other places, its the the distance to the first grid point(center of the first cell).

arjun May 14, 2017 15:03

Quote:

Originally Posted by khedar (Post 648838)
I did not say shear stress has to be twice, but i made a mistake in reading the results, tau_w for openfoam is around 7 Pa against 8.5 Pa which is a much smaller difference (I said twice in my previous post).

But still it is bit confusing, because in some places one talks in term of grid spacing (ds) of the first cell and other places, its the the distance to the first grid point(center of the first cell).


I wrote that because of this
"Also I compared the wall_shear stress values for both using kOmegaSST model and found that values of CFX are approximately twice that of OpenFoam"


Anyway, the reason for confusion is because you are only looking at yplus. What value has to be taken depends on where the variable is stored. As you noted for CFX variable is stored at the nodes while openfoam it is at cell center.

Now for solver the value of shear stress is what matters, yplus etc is means to achieve it.
Other than yplus you also have other quantities like for example uplus, they also change based on the location.

also the difference stems from slight difference in formulation (for example using different profile than log or something like that).

As long as you get similar shear stress you are fine, it would be tough for you to match exact values of yplus etc as these details are not completely written in manuals.

piu58 May 15, 2017 00:37

I recommend to analyse the wall shear stress and the velocity profile in normal direction form the surface. With these values you may come closer to the differences of the program results.

LThomes July 10, 2017 08:01

So, assuming that you did the same simulation in both softwares, the recommended values of yPlus would be different for OpenFOAM and CFX?
For exemple:
OpenFOAM: yPlus = 45, recommended 30 < yPlus < 500
CFX: yPlus = 90, recommended 60 < yPlus < 1000

LThomes July 10, 2017 09:18

Quote:

Originally Posted by khedar (Post 648790)
Hi All,
I recently completed a mesh independence study for a plane rectangular channel in OpenFoam and compared it to CFX for Total average Heat Transfer over the wall patch. I had to implement a wallHeatFlux utility for wall function meshes similar to the way it is implemented in CFX. I get good agreement between the Heat Flux values.
The issue is in yPlus values, OF values are almost 1/3 to 1/2 of that of CFX. Now I know one reason for this is the Vertex based formulation of CFX compared to cell-centered in OpenFoam. But my doubt is which value i should trust?

I've read some posts saying that, in some cases, OF calculates y* instead of y+. I don't know if it's true, but it might be a point to care about.

khedar July 11, 2017 17:26

Quote:

Originally Posted by LThomes (Post 656463)
So, assuming that you did the same simulation in both softwares, the recommended values of yPlus would be different for OpenFOAM and CFX?
For exemple:
OpenFOAM: yPlus = 45, recommended 30 < yPlus < 500
CFX: yPlus = 90, recommended 60 < yPlus < 1000

Exactly this is what i wanted to know. You have put it in a very clear way. I have no answer yet though.

Quote:

I've read some posts saying that, in some cases, OF calculates y* instead of y+. I don't know if it's true, but it might be a point to care about.
What I compared were the yPlus values from the yPlus calculation utility in OF (should give the standard yPlus, whatever that is :) ) and the yPlus in CFD-Post (and not Solver yPlus, which is also available in post processing).


All times are GMT -4. The time now is 05:16.