Quote:
Hi: I saw your results of yPlus, the value seems very big, and how can we judg the y+ is in the proper range? |
1 Attachment(s)
@post 71.
I posting here as I have not found any other source for the yPlus utility from Daniel WEI. I have attached a patch to allow yPlus.C to be compiled under OpenFOAM-2.2.x. Runs fine in my environment. Please check my work. |
1 Attachment(s)
Quote:
Hi foamers, i have change the source code of the "plusPostRANS" tool for the usage in OpenFOAM 2.2.0 (see the attached file) Just compile it and it works ;) @romant: i hope this helps.. |
Quote:
Sorry, I was too busy. Thanks a lot for your contribution. |
Quote:
Hi foamers, firstly thanks for the nice tool. I want to compile the yPlus.C under OpenFoam 2.2.0 and have some errors due to a new header file: they change the name from "basicThermo.H" to "fluidThermo.H" (OpenFoam 2.1.x --> OpenFoam 2.2.x). This is why i change all entries in the source code of "yPlus.C" and it works fine, now. I have attached the new files for OpenFoam 2.2.x: |
1 Attachment(s)
Quote:
|
1 Attachment(s)
Hi
is this useful tool appropriate for low-Re turbulent models only or is general? also I have found another tool for yPlus calculating. could someone have a look into it to see if its correct too and what are the differences and which is more suitable for compressible unsteady cases? and also could someone suggest some turbulent methods for compressible unsteady internal flow cases with low-Re mesh(y+<=1) and with wall function(30<=y+<60 or 100 in some unsteady cases) thanks. ---------------------------------------------------------- complement: in the file I have attached the fomula of yPlus is: Code:
yPlus.boundaryField()[patchi] = Code:
yPlus.boundaryField()[patchi] = (if there are other differences anyone notices please let me know) |
Hi Dan,
just a heads up to say thanks for the x2 tools - worked great for me and i thought well distributed functionality (i.e. in terms of separating yStar / yPlus / refinedWallLayer etc). much appreciated Jon Quote:
|
I'm having trouble building yPlus with wmake. I have no problem running OF 2.2.1 in Ubuntu 12.04 64-bit.
I extracted yPlus.c and the Make folder to /opt/openfoam221/src. It seems that, according to http://www.openfoam.org/docs/user/co...0-720003.2.2.1, all I need to do is run wmake (no arguments, no directory) from /opt/openfoam221/src/yPlus. But when I run wmake, I get the following errors. gac@gac-vm01:/opt/openfoam221/src/yPlus$ wmake mkdir: cannot create directory `linuxGccDPOpt': Permission denied /bin/sh: 1: cannot create linuxGccDPOpt/options: Directory nonexistent make: *** [linuxGccDPOpt/options] Error 2 /opt/openfoam221/wmake/MakefileFiles:40: linuxGccDPOpt/options: No such file or directory make: *** No rule to make target `linuxGccDPOpt/options'. Stop. wmake error: file 'Make/linuxGccDPOpt/objectFiles' could not be created in /opt/openfoam221/src/yPlus Thanks for any assistance. Regards, Glenn |
Try either "sudo wmake" if you have root privileges, or compile it from a directory where you do have write access, e.g. "cd $WM_PROJECT_USER_DIR"
|
Thanks for quick reply.
Extracting yPlus.c and Make folder to $WM_PROJECT_USER_DIR/yPlus helped (proper permissions), but I get another permission error when I run wmake from there: gac@gac-vm01:~/OpenFOAM/gac-2.2.1/yPlus$ wmake Making dependency list for source file yPlus.C SOURCE=yPlus.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam221/src/meshTools/lnInclude -I/opt/openfoam221/src/turbulenceModels -I/opt/openfoam221/src/transportModels -I/opt/openfoam221/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam221/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam221/src/OpenFOAM/lnInclude -I/opt/openfoam221/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/yPlus.o g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam221/src/meshTools/lnInclude -I/opt/openfoam221/src/turbulenceModels -I/opt/openfoam221/src/transportModels -I/opt/openfoam221/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam221/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam221/src/OpenFOAM/lnInclude -I/opt/openfoam221/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linuxGccDPOpt/yPlus.o -L/opt/openfoam221/platforms/linuxGccDPOpt/lib \ -lcompressibleTurbulenceModel -lcompressibleRASModels -lcompressibleLESModels -lincompressibleTurbulenceModel -lincompressibleTransportModels -lincompressibleRASModels -lincompressibleLESModels -lfiniteVolume -lgenericPatchFields -lOpenFOAM -ldl -lm -o /opt/openfoam221/platforms/linuxGccDPOpt/bin/yPlus /usr/bin/ld: cannot open output file /opt/openfoam221/platforms/linuxGccDPOpt/bin/yPlus: Permission denied collect2: ld returned 1 exit status When I run 'sudo wmake', I get the error 'sudo: wmake: command not found'. Perhaps next time I will not install OpenFOAM as root. Thanks again. |
I successfully built yPlus by changing 'FOAM_APPBIN' in Make/files to 'FOAM_USER_APPBIN'.
|
2 Attachment(s)
Hey guys,
1. I found calculate wall distance twice is unnecessary, so I disable it. 2. Here are the two utilities doing the same job as before, with small changes. Tested on OpenFOAM-2.2.x 3. I have also added a few write-out control. Please use "-help" to find more info. yPlus: Attachment 26083 yStar: Attachment 26084 |
|
Ask for your help
Dear all,
This issue was already discussed in some length in various threads. Therefore I finally reviewed and attached my plusPostRANS utility. It calculates y+ and u+ values when using one of the available low-Re RANS turbulence models. I hope the code as well as the output will be self-explaining I also attached a case. It is a straight pipe (wedge) with periodic inlet/outlet boundary conditions. The Reynolds number based on the mean axial velocity is Re=5300. You can run the case using pisoFoam. I would appreciate any feedback, it might be still improved at some point! Best regards, Florian |
Ask for your help
Dear all,
This issue was already discussed in some length in various threads. Therefore I finally reviewed and attached my plusPostRANS utility. It calculates y+ and u+ values when using one of the available low-Re RANS turbulence models. I hope the code as well as the output will be self-explaining I also attached a case. It is a straight pipe (wedge) with periodic inlet/outlet boundary conditions. The Reynolds number based on the mean axial velocity is Re=5300. You can run the case using pisoFoam. I would appreciate any feedback, it might be still improved at some point! Best regards, Florian Dear Florian, I guess you have been discussing about y+. I have a series of experimental data (u as velocity and y as normal distance+ u free stream+ characteristic length) and I would like to u* and then y+ as well as u+...I was wondering if you or any friend can help me in this respect. |
Dear borhanalhoseini,
is there a working version of yPlusUplus (or plusPostRANS) for OF.2.2.2 for LES simulations (NWR) that calculates the fields - as originally intended by florian_krause - to be able to create plots u+ vs. y+? Quote:
Thank you ! Aylalisa |
The best way is to simulate the case then use the wallshearstress to calculate tau or the yplus (you'll have yplus and y so you can derive utau). At this point you have all the needed data to calculate uplus.
|
Hello ArathoN,
documentation for wallShearStress utility says: 'Calculates and writes the wall shear stress, for the specified times when using RAS turbulence models. ' This description prevented me to use it. The computation of stress is 'stress tensor * vector', that is what wallShearStress utility does. Why does the documentation insist on RAS turbulence models:confused: Aylalisa |
Quote:
Never noticed that part, unfortunately my C++ knowledge is almost null so i can't delve into the appropriate code. If you have the yPlus, y and the cinematic viscosity you can calculate the friction velocity (utau) and from it you can compute the uPlus. My only problem here would be how to consider the utau, because I'm certain it is variable on the domain so it's better to averag it (in my opinion) but I'm not certain about this. P.S Another doubt what section would you consider when you want to compare the simulated data with the experimental data for example in a channel? |
Hello,
I have the same problem like aylalisa. The post-Processing utility "wallShearStress" actually only works for RANS-Simulation. I actually dont understand why it is so but ok. I found a thread here on the forum how to calculate the wall shear stress tau_w for LES( http://www.cfd-online.com/Forums/ope...imulation.html ) but this does not work for OP2.3.0 anymore. I had a look in wallShearStress.C, but there is no reference to #include "incompressible/RAS/RASModel/RASModel.H" anymore as mentioned in the above thread. I want to plot u+ over y+ as well, therefor I need u+. When I extract u_tau from y+, is it possible to calculate u+ then with u+ = u / u_tau? I am unsure about the directions. In which direction points u_tau, when you have a simple Channel flow in x-direction? When I extract it from y+, does it point in x-direction then? The u+ over y+ graph is actually a dimensionless velocity profile, so it is velocity in x over wall distance in y. But i am unsure about u_tau. Any tips? |
Quote:
The u_tau calculated is the magnitude of the friction velocity utau (u_taux, u_tauy , u_tauz); same thing for the wallshearstress. Obviously if you study a 1-D case the values over that direction are the ones to study hence their value over the other 2 directions are negligeble. |
hi,
I have some problem in making compressibleyPlusLES utility. when I want to make it the following error is appeared: Code:
In file included from compressibleyPlusLES.C:70:0: Regards, Mostafa Edit: I'm using OF-2.2.2 |
1 Attachment(s)
Hi dear FOAMERs, specially LES fans!
I decided to change the compressibleyPlusLES to incompressibleyPlusLES utility. I made the changes and fortunately it was made without any errors. I attach the final utility and if it's possible for you guys to check it and if I made some mistakes in writing the codes, please let me know. Regards, Mostafa |
Quote:
Thank you for continually updating and uploading your utility for newer versions of OF. I have a question about your utility. Please forgive if it is an ignorant question, but I haven't been able to find the answers elsewhere. I read that you wrote it for low Re numbers, is it valid for high Re turbulence models (in my case realizable k-eps)? Also when I build and run your utility (in OF version 2.3.x) it only displays the yPlus values for one of my patches and the value displayed is much lower than the y* values calculated by the yPlusRAS utility. Is it working correctly, or could you suggest how to modify it? Or is there something else I am missing? Thank youin advance, your help is greatly appreciated! Chrissy. |
Quote:
yplus and ystar have different relations so they will obviously give different values. They have a comparable results only in the log layer because the assumption to define ystar depends on the log layer. this utility gives the possibility to calculate yplus when you are using a wall resolved case where nut at wall must be set as calculated. However the yPlusRAS calculate yplus only if it is declared a nutWallFunction (whatever it is) so for the wall resolved case, it will give you errors and no yplus will be clculated. For high Re meshes use teh yPlusRAS included in OF, take care on how it is defined yplus in the wallfunction, because the utility yPlusRAS does only call the function to calculate yplus inside the nutWallFunction chosen in /0/nut. Some of them use ystar others not, I Advice you to read teh code and you'll understand better (see the unige and chalmers course for OF they are really good). |
Quote:
but when I try to compile I am getting this error Code:
Making dependency list for source file yPlus.C Thanks for your time, Hasan K.J |
plusPostRANS
I have a question about the plusPostRANS utility. If I understood correctly, the average(uTauWall) function calculates the wall-average of u_tau. So for a flat plate flow ,for example, if I wanted to plot the dimensionless velocity profile at certain x-coordinate location using the u+ and y+ values output from the utility, the values are actually quite far off?
Has anyone come up with a nice way to plot the accurate dimensionless velocity profile with low-Re models? So far I've always calculated the u+ and y+ manually using the velocity gradient (wallGradU) at certain point but for more complex geometries this is quite tedious. Is it possible to modify the utility so that it uses the same location for the surface normal gradient of the velocity and the point at the wall it calculates the distance to? |
1 Attachment(s)
Quote:
when I try to compile it I get the attached output. I'm running OpenFOAM 2.3.1 on OS X Yosemite. I'd appreciate it if anyone could answer my questions: 1) Has anyone successfully compiled the tool on 2.3.x? 2) What is the compiler complaining about? 3) How can I make it work? Best regards, Kate |
Quote:
while your current code (line 314 [(int) pi*100, yeah]) The fact that has the in the nominator is due to the in the nominator of the -Equation: At least that's my take at those equations. Maybe someone should re-check, I got a bit confused with all the mu, nu, muEff, nuEff, y+ and y* reading. Anyway, thanks for the utility, works great so far (tested with 2.3.x). |
1 Attachment(s)
Hi there, me again.
For whoever is interested, I updated lakeat's code with the above mentioned correction for , since so far no one complained. Apart from that I added a -newTimes option, which is just like the -newTimes option in reconstructPar. And finally I update the Make/files to build the tool in the FOAM_USER_APPBIN, not in the global one, so it can be compiled by everyone. Tested with OF 2.3.x. Both tools in one package. And zipped. I hate .tar.gz. |
erro compilation
Quote:
ERRO: Quote:
|
Hello gu1,
The utility was written for OF2.3.x. So compiling for OF3.0 can give problems. I cannot help you solve it, but you can download OF2.3.x and use that to run your model and the utility or you can find out what changed between OF2.3 and OF3.0 and adapt the utility to OF3.0 (please post the adapted utility if you do). Best regards, Wouter |
how can I plot y+ and u+ in OpenFOAM. Dose anyone modify the tools? Thank you.
|
Hello everyone,
I did not read all the threads. But I have done sth about calculating the yPlus value for all cells. I modified the code of chegdan for calculating yPlus for all cells. Thanks for his contribution. This is the link to the old code: https://github.com/chegdan/yPlusUplus. This is the link to my code: https://github.com/Ruansh233/RshOpen.../main/yPlusCFD The old version is run on OF-2.1. And my new version can run on OF-v2106 I delete some redundant steps and omit to create too many new objects. My code is running much faster compared to the old version. |
All times are GMT -4. The time now is 18:36. |