CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Post-Processing

yPlusLES: compressible flow

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   January 13, 2014, 13:19
Default
  #21
Senior Member
 
Join Date: Jan 2013
Posts: 196
Rep Power: 4
openfoammaofnepo is on a distinguished road
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 View Post
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

Last edited by openfoammaofnepo; January 29, 2014 at 11:49.
openfoammaofnepo is offline   Reply With Quote

Old   January 13, 2014, 18:52
Default
  #22
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,258
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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 is offline   Reply With Quote

Old   January 16, 2014, 16:04
Default
  #23
Senior Member
 
Join Date: Jan 2013
Posts: 196
Rep Power: 4
openfoammaofnepo is on a distinguished road
Thank you so much, Bruno.

That can be used now. But it is specific for the thermophysical options. Thank you.
openfoammaofnepo is offline   Reply With Quote

Old   January 22, 2014, 16:09
Default
  #24
Senior Member
 
Join Date: Jan 2013
Posts: 196
Rep Power: 4
openfoammaofnepo is on a distinguished road
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 View Post
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 is offline   Reply With Quote

Old   January 22, 2014, 19:20
Default
  #25
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,258
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi openfoammaofnepo,

Quote:
Originally Posted by openfoammaofnepo View Post
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
wyldckat is offline   Reply With Quote

Old   January 22, 2014, 20:09
Default
  #26
Senior Member
 
Join Date: Jan 2013
Posts: 196
Rep Power: 4
openfoammaofnepo is on a distinguished road
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.
openfoammaofnepo is offline   Reply With Quote

Old   January 26, 2014, 10:00
Default
  #27
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,258
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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
wyldckat is offline   Reply With Quote

Old   January 26, 2014, 11:21
Default
  #28
Senior Member
 
Join Date: Jan 2013
Posts: 196
Rep Power: 4
openfoammaofnepo is on a distinguished road
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
openfoammaofnepo is offline   Reply With Quote

Old   January 26, 2014, 11:31
Default
  #29
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,258
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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

Last edited by wyldckat; January 26, 2014 at 11:56. Reason: see "edit:"
wyldckat is offline   Reply With Quote

Old   January 26, 2014, 11:35
Default
  #30
Senior Member
 
Join Date: Jan 2013
Posts: 196
Rep Power: 4
openfoammaofnepo is on a distinguished road
OK, many thanks!

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

Have a nice Sunday!
openfoammaofnepo is offline   Reply With Quote

Old   January 26, 2014, 11:50
Default
  #31
Senior Member
 
Join Date: Jan 2013
Posts: 196
Rep Power: 4
openfoammaofnepo is on a distinguished road
Besides, just for curiosity, how did you input the equations in the thread? ......simple questions for you.
openfoammaofnepo is offline   Reply With Quote

Old   January 26, 2014, 12:08
Default
  #32
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,258
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Quote:
Originally Posted by openfoammaofnepo View Post
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: Guide: Writing Equations in LaTeX on the CFD Online Forums
wyldckat is offline   Reply With Quote

Old   January 26, 2014, 12:12
Default
  #33
Senior Member
 
Join Date: Jan 2013
Posts: 196
Rep Power: 4
openfoammaofnepo is on a distinguished road
Got it, many thanks!!
openfoammaofnepo is offline   Reply With Quote

Old   January 29, 2014, 11:53
Default
  #34
Senior Member
 
Join Date: Jan 2013
Posts: 196
Rep Power: 4
openfoammaofnepo is on a distinguished road
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.
openfoammaofnepo is offline   Reply With Quote

Old   January 30, 2014, 18:15
Default
  #35
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,258
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi openfoammaofnepo,

Quote:
Originally Posted by openfoammaofnepo View Post
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

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   February 1, 2014, 00:27
Default
  #36
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,258
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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
wyldckat is offline   Reply With Quote

Old   February 1, 2014, 07:14
Default
  #37
Senior Member
 
Join Date: Jan 2013
Posts: 196
Rep Power: 4
openfoammaofnepo is on a distinguished road
Thank you for your information, Bruno!

Have a nice day!
openfoammaofnepo is offline   Reply With Quote

Old   February 1, 2014, 19:15
Default
  #38
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,258
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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.
wyldckat is offline   Reply With Quote

Old   February 1, 2014, 19:59
Default
  #39
Senior Member
 
Join Date: Jan 2013
Posts: 196
Rep Power: 4
openfoammaofnepo is on a distinguished road
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? :-) :-)
openfoammaofnepo is offline   Reply With Quote

Old   February 2, 2014, 08:14
Default
  #40
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,258
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Quote:
Originally Posted by openfoammaofnepo View Post
Do they provide any awards for the bug reports? :-) :-)
In my case, certainly not I've been a pain sometimes with my bug reports .

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

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Natural Convection using Compressible Flow (chtMultiRegionFOAM) msarkar OpenFOAM 2 September 7, 2010 00:13
Compressible flow, no data at the outlet mireis FLUENT 1 July 28, 2010 05:22
help with compressible flow BC's (need subsonic flow) meangreen Main CFD Forum 5 July 24, 2010 13:16
Compressible Fluid Flow in COMSOL Multiphysics BBG Main CFD Forum 1 November 19, 2008 15:05
Solving unsteady compressible low speed flow atit Main CFD Forum 8 July 31, 2000 13:19


All times are GMT -4. The time now is 01:40.