CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   yPlusLES: compressible flow (https://www.cfd-online.com/Forums/openfoam-post-processing/117857-yplusles-compressible-flow.html)

openfoammaofnepo May 16, 2013 07:12

yPlusLES: compressible flow
 
Hi All ,

I am new to openFOAM. I just finished a compressible LES with OpenFOAM. When I want to use yPlusLES to calculate the y+ in my case, I got the messege to provide nuSGS. I think this quantity is only for incompressible flows. Could anyone know how to calculate the y+ in compressible flows?

Thank you so much!

wyldckat May 18, 2013 13:41

Hi openfoammaofnepo,

I managed to remember two details:
  1. The yPlusLES and yPlusRAS should both have the "-compressible" option, but I've taken a look into it and only the yPlusRAS has got one. You can check by running:
    Code:

    yPlusRAS -help
  2. This problem isn't new. You can calculate yPlusLES in a compressible simulation, by using a function object, while the solver is running. For more information about this and the report about the missing feature: http://www.openfoam.org/mantisbt/view.php?id=802
Best regards,
Bruno

openfoammaofnepo May 18, 2013 14:16

Thank you wyldckat!

I am using OF211, but this problem has been fixed in OF210 maybe.

Quote:

Originally Posted by wyldckat (Post 428458)
Hi openfoammaofnepo,

I managed to remember two details:
  1. The yPlusLES and yPlusRAS should both have the "-compressible" option, but I've taken a look into it and only the yPlusRAS has got one. You can check by running:
    Code:

    yPlusRAS -help
  2. This problem isn't new. You can calculate yPlusLES in a compressible simulation, by using a function object, while the solver is running. For more information about this and the report about the missing feature: http://www.openfoam.org/mantisbt/view.php?id=802
Best regards,
Bruno


wyldckat May 18, 2013 14:41

Hi openfoammaofnepo,

Quote:

Originally Posted by openfoammaofnepo (Post 428461)
I am using OF211, but this problem has been fixed in OF210 maybe.

I forgot to mention the version... In OpenFOAM 2.2.0 you can use yPlusLES as a function object in a compressible simulation, as indicated here: http://www.openfoam.org/version2.2.0...processing.php - this link is shown in the other link in the previous posts.

As for yPlusLES application itself, it has not yet been fixed to use compressible, not even in OpenFOAM 2.2.x, which is the very latest bug fix version of OpenFOAM.

Best regards,
Bruno

openfoammaofnepo May 18, 2013 17:51

Thank you wyldckat.

If I would like to calculate yPlus for compressible LES using OF211, how can I do it? Could you please give me some hints?

thanks.

Quote:

Originally Posted by wyldckat (Post 428464)
Hi openfoammaofnepo,


I forgot to mention the version... In OpenFOAM 2.2.0 you can use yPlusLES as a function object in a compressible simulation, as indicated here: http://www.openfoam.org/version2.2.0...processing.php - this link is shown in the other link in the previous posts.

As for yPlusLES application itself, it has not yet been fixed to use compressible, not even in OpenFOAM 2.2.x, which is the very latest bug fix version of OpenFOAM.

Best regards,
Bruno


wyldckat May 19, 2013 06:49

Hi openfoammaofnepo,

I've made a note to look into this next week.

In the mean time, have a look into the source code of the "yPlusLES" application in your own OpenFOAM version. You can find it by running this command:
Code:

find $FOAM_UTILITIES -name yPlusLES
Then compare with the source code on OpenFOAM 2.2, namely this file: https://github.com/OpenFOAM/OpenFOAM...LES/yPlusLES.C - compare the methods "calcIncompressibleYPlus" with "calcCompressibleYPlus", with the ones on the application you've got.

As to modifying an OpenFOAM application, check this tutorial: http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam

Best regards,
Bruno

wyldckat May 26, 2013 18:32

Hi openfoammaofnepo,

Done! I've created the "yPlusLESWCompressible" utility for OpenFOAM 2.2.x and then back-ported to 2.1.x. Simply follow the instructions given here https://github.com/wyldckat/yPlusLES...swcompressible

Hopefully everything will work as intended. At least the tests I've made seemed to indicate that everything was OK.

Best regards,
Bruno

guilha September 18, 2013 14:33

Can not get some post processing
 
Good afternoon,

I tried to get the y+ or the wall shear stress, in order to put some probes for some tests, but unsuccessfully.
The simulation I did, was compressible LES, and the OpenFOAM version I am using is the 2.0.1 (maybe where the problem is).
I tried to compute y+ with the command yPlusLES but it gave me this error:

Code:


--> FOAM FATAL IO ERROR:
cannot find file

file: /home/guilha/Desktop/cavidade_les/cavidade_128kx24_les_smagorinsky_galego_96-32_processadores/constant/transportProperties at line 0.

I saw the previous posts, and typed for the compressible case, but it said it was an invalid option. And I also saw the code, and seeing that the transport properties is used for incompressible, I think my version does not have the possibility to compute y+ for compressible flow in this way.

Is it possible to get what I need, without running the simulation again ? And if so, will I need the function object ?

(Doing an upgrade in my version will be complicated.)

wyldckat September 21, 2013 15:04

Greetings guilha,

Try following the latest instructions given here: https://github.com/wyldckat/yPlusLES...ble/tree/of210

Best regards,
Bruno

openfoammaofnepo December 16, 2013 15:35

Hi Bruno,

Thank you very much for your help.

When I compiled it using wmake yPlusLESWCompressible, I got the following information:

make: *** No rule to make target `yPlusLESWCompressible'. Stop.

Do I need to add something in the Make folder? Thank you very much.



Quote:

Originally Posted by wyldckat (Post 430144)
Hi openfoammaofnepo,

Done! I've created the "yPlusLESWCompressible" utility for OpenFOAM 2.2.x and then back-ported to 2.1.x. Simply follow the instructions given here https://github.com/wyldckat/yPlusLES...swcompressible

Hopefully everything will work as intended. At least the tests I've made seemed to indicate that everything was OK.

Best regards,
Bruno


owayz December 16, 2013 19:28

http://www.cfd-online.com/Forums/ope...tml#post376918

Zou can also have a look at this thread.

openfoammaofnepo December 27, 2013 00:05

Hi wyldckat,

Sorry to bother you. Could you please give me some suggestions about how to compile the yPlusLESWCompressible package? When I compiled it I had the problem I mentioned in the last thread. I am not very familiar with C++ compilation. Thank you and happy new year!

Quote:

Originally Posted by wyldckat (Post 430144)
Hi openfoammaofnepo,

Done! I've created the "yPlusLESWCompressible" utility for OpenFOAM 2.2.x and then back-ported to 2.1.x. Simply follow the instructions given here https://github.com/wyldckat/yPlusLES...swcompressible

Hopefully everything will work as intended. At least the tests I've made seemed to indicate that everything was OK.

Best regards,
Bruno


wyldckat December 27, 2013 14:08

Greetings to all!

@owayz: :eek: I had no idea someone else had already provided a compressible y+ for LES!

@openfoammaofnepo:
Quote:

Originally Posted by openfoammaofnepo (Post 467812)
Sorry to bother you. Could you please give me some suggestions about how to compile the yPlusLESWCompressible package? When I compiled it I had the problem I mentioned in the last thread. I am not very familiar with C++ compilation. Thank you and happy new year!

I need to know:
  1. The exact instructions you have followed to try and install "yPlusLESWCompressible".
  2. Which exact version of OpenFOAM are you using and how you installed it.
  3. Which Linux Distribution are you using.
  4. What is the complete output that you get. That last error message is far from enough to figure out what's wrong :(.
Best regards,
Bruno

openfoammaofnepo December 27, 2013 14:40

Hi,

1, The install procedure is from the following:

https://github.com/wyldckat/yPlusLES...swcompressible

I put the install package in the folder:
/users/openfoammaofnepo/OpenFOAM/openfoammaofnepo-2.1.1/utilities/yPlusLESWCompressible-of21x/yPlusLESWCompressible

2, The OF version is 2.1.1
3, the Linux version is Distributor ID: ScientificSL
Description: Scientific Linux SL release 5.5 (Boron)
Release: 5.5
4, The complete output info is (after inputting the command wmake yPlusLESWCompressible)
make: *** No rule to make target `yPlusLESWCompressible'. Stop.

Thank you very much.

Quote:

Originally Posted by wyldckat (Post 467873)
Greetings to all!

@owayz: :eek: I had no idea someone else had already provided a compressible y+ for LES!

@openfoammaofnepo:

I need to know:
  1. The exact instructions you have followed to try and install "yPlusLESWCompressible".
  2. Which exact version of OpenFOAM are you using and how you installed it.
  3. Which Linux Distribution are you using.
  4. What is the complete output that you get. That last error message is far from enough to figure out what's wrong :(.
Best regards,
Bruno


wyldckat December 27, 2013 14:54

Hi openfoammaofnepo,

Quote:

Originally Posted by openfoammaofnepo (Post 467876)
[...]

I put the install package in the folder:
/users/openfoammaofnepo/OpenFOAM/openfoammaofnepo-2.1.1/utilities/yPlusLESWCompressible-of21x/yPlusLESWCompressible

[...]

4, The complete output info is (after inputting the command wmake yPlusLESWCompressible)
make: *** No rule to make target `yPlusLESWCompressible'. Stop.

:eek: OK OK, got it. You did not perfectly follow the instructions written on the page ;)
Whoops... and I forgot to write the command for unzipping it :( That explains why you didn't perfectly follow the instructions :( Sorry about that.

OK, the exact instructions should be:
Code:

wget "https://github.com/wyldckat/yPlusLESWCompressible/archive/of21x.zip" -O yPlusLESWCompressible.zip
unzip yPlusLESWCompressible.zip
cd yPlusLESWCompressible-of21x
wmake yPlusLESWCompressible

The detail here is that you are running the wmake command from within the folder "yPlusLESWCompressible" and not from its parent folder. This is why you get that error message.

You have two possible solutions:
  1. While you are still within the folder "yPlusLESWCompressible-of21x/yPlusLESWCompressible", simply run:
    Code:

    wmake
  2. Or while you are still within the folder "yPlusLESWCompressible-of21x/yPlusLESWCompressible", go back to the parent folder and build as originally described. In other words, run:
    Code:

    cd ..
    wmake yPlusLESWCompressible

Best regards,
Bruno

openfoammaofnepo December 27, 2013 16:46

Hi wyldckat, successfully installed. Thanks.

Quote:

Originally Posted by wyldckat (Post 467878)
Hi openfoammaofnepo,


:eek: OK OK, got it. You did not perfectly follow the instructions written on the page ;)
Whoops... and I forgot to write the command for unzipping it :( That explains why you didn't perfectly follow the instructions :( Sorry about that.

OK, the exact instructions should be:
Code:

wget "https://github.com/wyldckat/yPlusLESWCompressible/archive/of21x.zip" -O yPlusLESWCompressible.zip
unzip yPlusLESWCompressible.zip
cd yPlusLESWCompressible-of21x
wmake yPlusLESWCompressible

The detail here is that you are running the wmake command from within the folder "yPlusLESWCompressible" and not from its parent folder. This is why you get that error message.

You have two possible solutions:
  1. While you are still within the folder "yPlusLESWCompressible-of21x/yPlusLESWCompressible", simply run:
    Code:

    wmake
  2. Or while you are still within the folder "yPlusLESWCompressible-of21x/yPlusLESWCompressible", go back to the parent folder and build as originally described. In other words, run:
    Code:

    cd ..
    wmake yPlusLESWCompressible

Best regards,
Bruno


openfoammaofnepo December 28, 2013 23:55

Hi wyldckat,

When we run wmake in the folder yPlusLESWCompressible-of21x/yPlusLESWCompressible, which file or executable is run for this command? Thank you very much.

wyldckat December 29, 2013 07:27

Hi openfoammaofnepo,
Quote:

Originally Posted by openfoammaofnepo (Post 467992)
When we run wmake in the folder yPlusLESWCompressible-of21x/yPlusLESWCompressible, which file or executable is run for this command? Thank you very much.

I'm not sure I understand your question, because the "obvious" answer would be: it's wmake, it's a script that will take care of building the application on demand. You can find more information about this in the User Guide: http://www.openfoam.org/docs/user/co...plications.php

Best regards,
Bruno

openfoammaofnepo January 8, 2014 11:08

Dear Bruno,

When I run yPlusLESWCompressible -compressible, I found that there is an error information about my thermodynamics option:

Code:

Selecting thermodynamics package hsPsiMixtureThermo<singleStepReactingMixture<gasThermoPhysics>>


--> FOAM FATAL ERROR:
Unknown basicThermo type hsPsiMixtureThermo<singleStepReactingMixture<gasThermoPhysics>>

Valid basicThermo types are:

26
(
ePsiThermo<pureMixture<constTransport<specieThermo<eConstThermo<perfectGas>>>>>
ePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>
ePsiThermo<pureMixture<sutherlandTransport<specieThermo<eConstThermo<perfectGas>>>>>
ePsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>
ePsiThermo<pureMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>
hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>
hPsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>
hPsiThermo<pureMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>
hRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<incompressible>>>>>
hRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<isobaricPerfectGas>>>>>
hRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>
hRhoThermo<pureMixture<icoPoly3ThermoPhysics>>
hRhoThermo<pureMixture<icoPoly8ThermoPhysics>>
hRhoThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<isobaricPerfectGas>>>>>
hRhoThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>
hRhoThermo<pureMixture<sutherlandTransport<specieThermo<janafThermo<isobaricPerfectGas>>>>>
hRhoThermo<pureMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>
hsPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>
hsPsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>
hsPsiThermo<pureMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>
hsRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<isobaricPerfectGas>>>>>
hsRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>
hsRhoThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<isobaricPerfectGas>>>>>
hsRhoThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>
hsRhoThermo<pureMixture<sutherlandTransport<specieThermo<janafThermo<isobaricPerfectGas>>>>>
hsRhoThermo<pureMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>
)

The version of OF is 2.1.1, and I think the thermodyanmic library should be fine for my case. But I am not sure why this error comes from. Do you have the problem when you use it? Thank you so much.

wyldckat January 12, 2014 12:40

Hi openfoammaofnepo,

I need more specific information on how you have configured the "thermodynamicProperties" file and how you load your customized thermodynamics library.

Best regards,
Bruno

openfoammaofnepo January 13, 2014 12:19

Hi wyldckat,

Thank you very much for your help. For example, in the following tutorial:

Code:

OpenFOAM/openfoammaofnepo-2.1.1/run/tutorials/combustion/XiFoam/les/pitzDaily3D
Then after I run XiFoam, and then will get some results. If I apply this utilities for the time director 0.0002

Code:

yPlusLESWCompressible -time 0.0002 -compressible
I got the following output:

Code:

/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.1.1                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.1.1-221db2718bbb
Exec  : yPlusLESWCompressible -time 0.0002 -compressible
Date  : Jan 13 2014
Time  : 10:08:33
Host  : "stokes"
PID    : 353
Case  : /users/of/OpenFOAM/openfoammaofnepo-2.1.1/run/tutorials/combustion/XiFoam/les/pitzDaily3D
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0.0002

Time = 0.0002
Calculating wall distance

Writing wall distance to field y

Reading field U

Selecting thermodynamics package hhuMixtureThermo<homogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>


--> FOAM FATAL ERROR:
Unknown basicThermo type hhuMixtureThermo<homogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>

Valid basicThermo types are:

26
(
ePsiThermo<pureMixture<constTransport<specieThermo<eConstThermo<perfectGas>>>>>
ePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>
ePsiThermo<pureMixture<sutherlandTransport<specieThermo<eConstThermo<perfectGas>>>>>
ePsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>
ePsiThermo<pureMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>
hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>
hPsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>
hPsiThermo<pureMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>
hRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<incompressible>>>>>
hRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<isobaricPerfectGas>>>>>
hRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>
hRhoThermo<pureMixture<icoPoly3ThermoPhysics>>
hRhoThermo<pureMixture<icoPoly8ThermoPhysics>>
hRhoThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<isobaricPerfectGas>>>>>
hRhoThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>
hRhoThermo<pureMixture<sutherlandTransport<specieThermo<janafThermo<isobaricPerfectGas>>>>>
hRhoThermo<pureMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>
hsPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>
hsPsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>
hsPsiThermo<pureMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>
hsRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<isobaricPerfectGas>>>>>
hsRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>
hsRhoThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<isobaricPerfectGas>>>>>
hsRhoThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>
hsRhoThermo<pureMixture<sutherlandTransport<specieThermo<janafThermo<isobaricPerfectGas>>>>>
hsRhoThermo<pureMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>
)



    From function basicThermo::New(const fvMesh&)
    in file basicThermo/basicThermoNew.C at line 60.

FOAM exiting

But of course, for the two cases you provided in the package, the utility is fine. Thank you very much.


Quote:

Originally Posted by wyldckat (Post 469688)
Hi openfoammaofnepo,

I need more specific information on how you have configured the "thermodynamicProperties" file and how you load your customized thermodynamics library.

Best regards,
Bruno


wyldckat January 13, 2014 17:52

Hi openfoammaofnepo,

Thanks for the detailed description! It a lot easier to reproduce the same error!

I've updated the branch "of21x" on the repository. Follow the download and installation instructions once again from the updated page: https://github.com/wyldckat/yPlusLES...ble/tree/of21x

The new utility is named "yPlusLESWCompressibleNCombustion", so try it instead of the utility "yPlusLESWCompressible".

Best regards,
Bruno

openfoammaofnepo January 16, 2014 15:04

Thank you so much, Bruno.

That can be used now. But it is specific for the thermophysical options. Thank you.

openfoammaofnepo January 22, 2014 15:09

Dear wyldckat,

Thank you so much for your help.

In the utilities you upload recently:

yPlusLESWCompressibleNCombustion

In the following source files:

Code:

yPlusLESWCompressibleNCombustion
I think when we calculate the yPlusLES for combustion, we need to use the following one:

Code:

            yPlus.boundaryField()[patchi] =
                d[patchi]
                *sqrt
                (
                    muEff.boundaryField()[patchi]
                    *mag(U.boundaryField()[patchi].snGrad())
                    *rho.boundaryField()[patchi]
                )
                /muLam.boundaryField()[patchi];

Here I think the rho is needed to get the correct values. Please give me some comments if there is any problems.

Thank you so much.

Quote:

Originally Posted by wyldckat (Post 469887)
Hi openfoammaofnepo,

Thanks for the detailed description! It a lot easier to reproduce the same error!

I've updated the branch "of21x" on the repository. Follow the download and installation instructions once again from the updated page: https://github.com/wyldckat/yPlusLES...ble/tree/of21x

The new utility is named "yPlusLESWCompressibleNCombustion", so try it instead of the utility "yPlusLESWCompressible".

Best regards,
Bruno


wyldckat January 22, 2014 18:20

Hi openfoammaofnepo,

Quote:

Originally Posted by openfoammaofnepo (Post 471298)
Here I think the rho is needed to get the correct values. Please give me some comments if there is any problems.

You might be correct. I honestly only handled the procedure of "replace 6mm screw" for a "8mm screw"... I didn't check if things were all held together properly, since I didn't know how exactly to ascertain if it was correct or not. Although the "yPlus" field is non-dimensional as a result, so I assume that everything is working as intended.

So my question is: what is the reasoning you've followed for making that suggestion?
In addition: are you using the "-compressible" option for running the application?

Best regards,
Bruno

openfoammaofnepo January 22, 2014 19:09

Hello,

Thanks.

I just followed the definition of yPlus like

Code:

http://www.cfd-online.com/Wiki/Dimensionless_wall_distance_(y_plus)
Without the rho, yPlus is not dimensionless, although the values obtained from it will show no big difference.

I use the option '-compressible' and it is OK.

Thank you for your sharing.

wyldckat January 26, 2014 09:00

Hi openfoammaofnepo,

OK, let's see how I can manage LaTeX equations here on the forum... based on these wiki pages:
The fully extended equation is: y^+ \equiv y \, \frac{\sqrt{\frac{\mu \left(\frac{\partial u}{\partial y} \right)_{y=0}}{\rho}}}{\frac{\mu}{\rho}}

In contrast, the equation present on the utility is this (if I'm not mistaken): y^+ \equiv y \, \frac {\sqrt{ \mu_{Eff} \, \|{\frac{\partial u}{\partial y}}\| } } {\mu}

:) Yes, you are correct!!! It's missing a \rho inside the square root! Feel free to report this at the official bug tracker: http://www.openfoam.org/bugs/ - since this problem is present in the original code of the function object "yPlusLES".

If you don't want to report this yourself, I can report this for you.

Best regards,
Bruno

openfoammaofnepo January 26, 2014 10:21

Dear Bruno,

Thank you for your help. What do you mean by "original code"? We do not have the original compressible LES yPlus. In the incompressible version, the equation should be correct.

If it is convenient for you, please help us to report this to them. I think we need to correct. Although the values of yPlus will not have big difference, however, conceptually it is not correct without rho. Thank you for your help.

Best,
op**po

wyldckat January 26, 2014 10:31

Hi openfoammaofnepo,

It's available as a function object, as explained here http://www.openfoam.org/version2.2.0...processing.php - and I quote:
Quote:

new yPlusRAS and yPlusLES - calculates yPlus for incompressible and compressible cases, employing RAS and LES turbulence, respectively.
The original code is located at "src/postProcessing/functionObjects/utilities/yPlusLES": https://github.com/OpenFOAM/OpenFOAM...LES/yPlusLES.C

OK, I'll report this in a minute and edit this post indicating the bug report.
edit: Reported here: http://www.openfoam.org/mantisbt/view.php?id=1141 - I'll wait for them to fix the issue and then I'll propagate the fix to my repository.

Best regards,
Bruno

openfoammaofnepo January 26, 2014 10:35

OK, many thanks!

I always use OF211 and so I did not find that. Thank you for your help!

Have a nice Sunday!

openfoammaofnepo January 26, 2014 10:50

Besides, just for curiosity, how did you input the equations in the thread? ......simple questions for you.

wyldckat January 26, 2014 11:08

Quote:

Originally Posted by openfoammaofnepo (Post 471837)
Besides, just for curiosity, how did you input the equations in the thread? ......simple questions for you.

There is a forum here at CFD-Online for help regarding using the forum itself: http://www.cfd-online.com/Forums/sit...k-discussions/
There you'll find this thread: http://www.cfd-online.com/Forums/sit...ne-forums.html

openfoammaofnepo January 26, 2014 11:12

Got it, many thanks!!

openfoammaofnepo January 29, 2014 10:53

Hello Bruno,

Any update from the bug report? Was it indeed a bug or just any other saying? Just for my knowledge. Thank you so much.

wyldckat January 30, 2014 17:15

Hi openfoammaofnepo,

Quote:

Originally Posted by openfoammaofnepo (Post 472358)
Any update from the bug report? Was it indeed a bug or just any other saying?

You can see for yourself ;): http://www.openfoam.org/mantisbt/view.php?id=1141 :rolleyes:

Best regards,
Bruno

wyldckat January 31, 2014 23:27

Hi openfoammaofnepo,

I've done some more homework and prepared 2 test cases that solve pretty much the same simulation, but using compressible vs incompressible variants of the same solver, namely pimpleFoam vs rhoPimpleFoam. The cases are provided in the bug report and also in my repository.

The conclusion is that I do believe that you are right in affirming that "rho" is missing inside the square root and these two test cases seem to prove that. Therefore, I've applied this fix to the source code in the utilities at my repository.

Best regards,
Bruno

openfoammaofnepo February 1, 2014 06:14

Thank you for your information, Bruno!

Have a nice day!

wyldckat February 1, 2014 18:15

Well, the bug fix has finally been implemented in 2.2.x: http://www.openfoam.org/mantisbt/view.php?id=1141

The commit can be viewed here: https://github.com/OpenFOAM/OpenFOAM...17f4ec1bde1348

The strange detail is that Henry chose to implemented the division by "rho" in both occurrences of "mu", instead of using the single multiplication by "rho" inside the square root.
There are two possibilities for this:
  1. By dividing by "rho" in both parts of the equation, it might be numerically more stable than using the simplified equation.
    • It makes sense, because the flow near the wall should be small enough and on a similar scale of "mu/rho". This would minimize the loss of numerical precision during the math operation.
  2. Or he simply couldn't spend any time thinking more about this.
    • Given his first quick comment/reply on this bug report, leading to him to close it and not accepting it as a bug report, it's a possibility.
If tomorrow I can remember to get around to this, I'll implement the same bug fix on my repository.

openfoammaofnepo February 1, 2014 18:59

Thank you, Bruno. I read their updated code of yPlusLES. At least from the the point of view of math, it is correct. I cannot say more in terms of numerical precision. Do they provide any awards for the bug reports? :-) :-)

wyldckat February 2, 2014 07:14

Quote:

Originally Posted by openfoammaofnepo (Post 472924)
Do they provide any awards for the bug reports? :-) :-)

In my case, certainly not :) I've been a pain sometimes with my bug reports :rolleyes:.

But usually the award is the feeling we get that when we feel that we're helping something we like to get even better.


All times are GMT -4. The time now is 02:41.