|
[Sponsors] |
October 17, 2011, 08:48 |
|
#21 |
Senior Member
Join Date: Mar 2009
Posts: 138
Rep Power: 17 |
I get 0 on every wall for fully resolved boundary layers. As reported here: http://www.cfd-online.com/Forums/ope...earstress.html
For wallFunction I get value but I canīt assess them...
__________________
OF - 2.0.0 |
|
October 18, 2011, 20:53 |
y+ = y*
|
#22 |
New Member
Saxwax
Join Date: Aug 2010
Posts: 17
Rep Power: 16 |
Hi Cameosas,
Glad to hear that the file compiled, not sure about the 0 for fully resolved boundary layers. It is possible that I used the old version of Niklas' yPlus utility. Have you checked that? Vaina74, I'm not sure which version of the FLUENT manual you are quoting. In the version that I have (Version 12 April 2009) the section Near-Wall Treatment for Wall Bounded FLows contains the following quote: "It should be noted that, in ANSYS FLUENT, the laws-of-the-wall for mean velocity and temperature are based on the wall unit, y*, rather than y+. These quantities are approximately equal in equilibrium turbulent boundary layers." Comparing the equations for y+ and y* we can see that the only difference between the two are the frictionVelocity, Cmu^0.25 and k^0.5 terms. y+ = rho*frictionVelocity*y/mu y* = rho*(Cmu^0.25)*(k^0.5)*y/mu For equilibrium turbulent boundary layers (ETBL) frictionVelocity = (Cmu^0.25)*(k^0.5) (Ferziger), i.e. y+ is equal to y*. If you are using standard wall functions for flows with an ETBL then y*, or yPlusRAS, probably will give you a good enough indication of the appropriateness of your cell size. Not sure if that helps (it definitely wont if I am wrong ). Let me know your thoughts on this one. It would be good to have a better idea on why things are the way they are in OpenFOAM. Regards, D. |
|
October 20, 2011, 05:09 |
|
#23 |
Senior Member
Join Date: Mar 2009
Posts: 138
Rep Power: 17 |
HI Saxwax,
I have downloaded both, but I am using the newer version.
__________________
OF - 2.0.0 |
|
October 25, 2011, 00:50 |
Nut?
|
#24 |
New Member
Saxwax
Join Date: Aug 2010
Posts: 17
Rep Power: 16 |
Cameosas,
The way I see it, based on the equation used to calculate the cell y+ value in the yPlus utility there are three possible reasons why a value of exactly zero would be output: 1) y = 0 2) snGrad = 0 3) nut = 0 Two of these are very easy to check, y and nut. The third is also probably quite easy to check (edit yPlus utility to output snGrad instead) - I haven't tried this. My guess would be that nut is the likely culprit. Either a boundary condition at the wall is set to nut = 0, or the wall function being used (i.e. nutkWallFunction) is calculating the nut value at some (or all) points to be zero. I'd either have a look at the nut file or colour the wall patch by nut in Paraview. I have noticed the same zero values being output by yPlus. A quick check showed that the nut field had several cells showing up as zero (nutkWallFunction). I'm not really sure if this is the expected behavior or not. Someone else can probably answer that. Regards, D. Last edited by Saxwax; October 25, 2011 at 02:10. |
|
October 25, 2011, 11:00 |
|
#25 |
Senior Member
Join Date: Mar 2009
Posts: 138
Rep Power: 17 |
HI Saxwax,
Thats a really good hint! Thanks! I get zero values for: Code:
yPlus.boundaryField()[patchi] = y[patchi] Code:
yPlus.boundaryField()[patchi] = mut.boundaryField()[patchi] Code:
yPlus.boundaryField()[patchi] = mag(U.boundaryField()[patchi].snGrad()); Code:
yPlus.boundaryField()[patchi] = (RASModel->mu().boundaryField()[patchi]/rho.boundaryField()[patchi]);
__________________
OF - 2.0.0 Last edited by camoesas; October 26, 2011 at 02:47. |
|
October 26, 2011, 04:06 |
|
#26 |
Senior Member
Join Date: Mar 2009
Posts: 138
Rep Power: 17 |
I have defined the walls for mut like:
Code:
{ type mutkWallFunction; value uniform 0; }
__________________
OF - 2.0.0 |
|
November 1, 2011, 20:11 |
|
#27 |
New Member
Saxwax
Join Date: Aug 2010
Posts: 17
Rep Power: 16 |
Cameosas,
Are the zero values for mut and y in the same cells (or all the cells)? If so I would guess that the mutkWallFunction uses y to calculate the mut value. You could check this by looking at the mutkWallFunction.C source code. This way you would know that the zero values originate from y. If not well then I am not really sure. Again, looking at the source code may help. Regards, D. |
|
June 10, 2013, 04:56 |
|
#28 |
Member
Join Date: Aug 2011
Posts: 89
Rep Power: 15 |
Hello,
I just want to check that yPlusRAS is calculating the right thing. So I calculated yPlus with yPlusRAS and by hand with this equation: yPlus= Cmu^(0.25) * y * k^(0.5) / nu with: Cmu =0.09 y = 0.00125 (it is the cell height / 2 because I am looking at the cell directly at the wall) k = 0.19 (from paraview) nu = 1.0e-6 So i get: yPlus = 298 yPlusRAS says: yPlus = 6.7 The domain is a rectangular channel, so Iīve got a nice grid. To get the yPlus from yPlusRAS I should use y = 2.8e-5 Can somebody help me what is wrong? Thanks a lot |
|
June 11, 2013, 04:00 |
|
#29 |
Member
Join Date: Aug 2011
Posts: 89
Rep Power: 15 |
I found my mistake
the yPlus = 6.7 was shown in paraview. If I look at the output in the shell after I tipped yPlusRAS I see complete different values in comparison to the values in paraview. But the values in the output are the values I calculated by hand. So the interpolation in paraview was the problem. But still one simple question is left: I have a rectangular channel and I decided to use wall functions for k, epsilon and nut. Am I right that the distance from the wall to the cell centre of the first cell at the wall has to be smaller than yPlus = 11? If itīs not, do I get a wrong result? I am also not sure what k I should use for calculating yPlus. At the beginning I only have the k which I enter in the k-file. But at the end of my simulation the k at the wall has changed. So yPlus has changed too. So maybe after the run I know that my grid should be smaller. How can I solve this problem? thanks a lot for your help |
|
August 6, 2014, 14:18 |
|
#30 |
New Member
Marvin
Join Date: Jan 2014
Posts: 11
Rep Power: 12 |
Sorry for bumping that old thread.
Has anyone a compiling version of the right "yPlus" for OF 2.3. Or can anyone tell me what I have to change in the original yPlusRAS.H to calculate the right yPlus. I'm quite new to openFOAM so I'm greatful for any hint that teaches me how to write my own sourcecode. Actually I'm just grepping through source code on and on with little progress. Unlike OF 1.7, in OF 2.3 I can't find yPlus.H there is only yPlusRAS.H which somehow calculates yPlus using the nutWallFunctionFvPatchScalarField. |
|
September 9, 2014, 14:01 |
|
#31 | |
New Member
Chrissy Stanford
Join Date: Oct 2013
Location: South Africa
Posts: 11
Rep Power: 13 |
Quote:
I am struggling with the same problem. Have you found a way of calculating y+ yet? I have found other yPlus utilities in similar threads (See link below) and tried to apply them to my model, but since I'm working with a high Re turbulence model (and the code is written for low Re models) I get y+ values of zero. This is not necessarily the problem, though. I might just be implementing it completely incorrectly. Here is the link to the other posts on this topic that I read: http://www.cfd-online.com/Forums/ope...estcase-5.html. Post #93 is where I found the utility I mentioned. I have also wondered how openFoam v. 2.3.x calculates y* and whether it is possible to find a relation between y* and y+ and modify the values that are generated by yPlusRAS? I have scoured through the nutWallFunctionFvPatchScalarField, but since my programming is rusty I can't figure out how y* is calculated. Any help would be greatly appreciated. Thanks, Chrissy |
||
September 15, 2014, 05:14 |
|
#32 |
New Member
Marvin
Join Date: Jan 2014
Posts: 11
Rep Power: 12 |
Hey Chrissy,
I am sorry but my final approach was now to use CFX to compute yPlus values instead. I haven't found a relation between y* and y+. What I have noticed is that the yStar values from CFX are more than ten times higher if the prisms are very thin (12 prism layers and more, enough to resolve the boundary layer). For meshes with 3 prism layers, yStar and yPlus were only slightly different (both average and min max). What I need to add is that OF is directly computing on teds and CFX is using the nodes to create a polyeder mesh around them. Therefore the elements slighly differ. You are right with the nutFunction. They are essential for yPlus computation. For example if you resolve the BL (set nut = computed) you can't compute yPlus any more. I found nutkWallfunction: const scalar Cmu25 = pow025(Cmu_); tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0)); scalarField& nutw = tnutw(); forAll(nutw, faceI) { label faceCellI = patch().faceCells()[faceI]; scalar yPlus = Cmu25*y[faceI]*sqrt(k[faceCellI])/nuw[faceI]; if (yPlus > yPlusLam_) { nutw[faceI] = nuw[faceI]*(yPlus*kappa_/log(E_*yPlus) - 1.0); } } return tnutw; } maybe it is the definition you are looking for. I hope I could help you little. But now I have to return writing my thesis Greets Marvin |
|
July 7, 2015, 09:53 |
|
#33 |
New Member
Luka Denies
Join Date: Oct 2014
Posts: 28
Rep Power: 12 |
I've changed the file previously uploaded here. This file works for OF 2.3.1 and calculates y+ instead of y*.
|
|
August 24, 2015, 11:50 |
|
#34 |
Senior Member
Join Date: Mar 2015
Posts: 250
Rep Power: 12 |
Hello,
I know it sounds a bit odd but could anybody explain how to compile these little utilities? I don't even know where to put this file or doesn't it matter at all. Best regards, Kate |
|
August 24, 2015, 12:00 |
|
#35 |
New Member
Luka Denies
Join Date: Oct 2014
Posts: 28
Rep Power: 12 |
Dear Kate,
The file I have uploaded is a C++ file that still has to be compiled. Attached is the directory that also includes the Make file. Unpack this into OpenFOAM/username-version/applications/yPlus. Then you can compile the utility by going to this directory in a terminal and typing Code:
wmake Code:
yPlus Code:
yPlus -compressible I hope this explanation clears things up. |
|
August 26, 2015, 03:37 |
|
#36 | |
Senior Member
Join Date: Mar 2015
Posts: 250
Rep Power: 12 |
Hello Luka,
many thanks for your support. Unfortunately it doesn't work. Please note that I run OpenFOAM on OS X Yosemite. When you are talking about the OpenFOAM directory, I assume you mean the OpenFOAM sparseboundle which I have to mount every time I restart my system. This contains two folders, OpenFOAM-2.3.1 and kateeisenhower-2.3.1. However the folder kateeisenhower-2.3.1 only contains a folder run which is empty. So I unpacked the download into OpenFOAM/OpenFOAM-2.3.1/applications and tried to compile the source code with wmake. I got the following output: Code:
Last login: Wed Aug 26 08:23:03 on ttys006 Kates-MacBook-Pro:~ kateeisenhower$ hdiutil attach -mountpoint $HOME/OpenFOAM OpenFOAM.sparsebundle /dev/disk2 GUID_partition_scheme /dev/disk2s1 EFI /dev/disk2s2 Apple_HFS /Users/kateeisenhower/OpenFOAM Kates-MacBook-Pro:~ kateeisenhower$ source $HOME/OpenFOAM/OpenFOAM-2.3.1/etc/bashrc Using paraview in directory /Applications/paraview.app Kates-MacBook-Pro:~ kateeisenhower$ cd /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/applications/yPlus Kates-MacBook-Pro:yPlus kateeisenhower$ wmake Making dependency list for source file yPlus.C could not open file fluidThermo.H for source file yPlus.C due to No such file or directory SOURCE=yPlus.C ; clang++ -m64 -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-overloaded-virtual -Wno-unused-comparison -Wno-deprecated-register -O3 -DNoRepository -ftemplate-depth-100 -I/Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/meshTools/lnInclude -I/Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/transportModels -I/Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/turbulenceModels -I/Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions -I/Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions -I/Users/kateeisenhower/OpenFOAM/kateeisenhower-2.3.1/src/thermophysicalModels/basic/lnInclude -I/Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude -IlnInclude -I. -I/Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude -I/Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -std=c++11 -c $SOURCE -o Make/darwinIntel64ClangDPOpt/yPlus.o In file included from yPlus.C:32: In file included from /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude/fvCFD.H:6: In file included from /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/Time.H:47: In file included from /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/TimeState.H:38: In file included from /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/dimensionedScalar.H:38: In file included from /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/dimensionedType.H:40: In file included from /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/dimensionSet.H:46: In file included from /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/scalarField.H:38: In file included from /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/Field.H:394: /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/Field.C:461:10: warning: reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion] && &mapper.directAddressing() ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~ /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/FieldMapper.H:71:35: note: 'directAddressing' returns a reference virtual const labelUList& directAddressing() const ^ In file included from yPlus.C:32: In file included from /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude/fvCFD.H:6: In file included from /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/Time.H:47: In file included from /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/TimeState.H:38: In file included from /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/dimensionedScalar.H:38: In file included from /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/dimensionedType.H:40: In file included from /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/dimensionSet.H:46: In file included from /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/scalarField.H:38: In file included from /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/Field.H:394: /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/Field.C:496:14: warning: reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion] && &mapper.directAddressing() ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~ /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/FieldMapper.H:71:35: note: 'directAddressing' returns a reference virtual const labelUList& directAddressing() const ^ In file included from yPlus.C:32: In file included from /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude/fvCFD.H:8: In file included from /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude/fvc.H:39: In file included from /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude/surfaceInterpolate.H:41: In file included from /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude/surfaceInterpolationScheme.H:234: In file included from /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude/surfaceInterpolationScheme.C:30: In file included from /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude/volFields.H:40: In file included from /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude/fvPatchField.H:588: /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude/fvPatchField.C:253:14: warning: reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion] && &mapper.directAddressing() ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~ /Users/kateeisenhower/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/FieldMapper.H:71:35: note: 'directAddressing' returns a reference virtual const labelUList& directAddressing() const ^ yPlus.C:37:10: fatal error: 'fluidThermo.H' file not found #include "fluidThermo.H" ^ 3 warnings and 1 error generated. make: *** [Make/darwinIntel64ClangDPOpt/yPlus.o] Error 1 Kates-MacBook-Pro:yPlus kateeisenhower $ Best regards, Kate Quote:
|
||
August 26, 2015, 04:29 |
|
#37 |
New Member
Luka Denies
Join Date: Oct 2014
Posts: 28
Rep Power: 12 |
Hi Kate,
I think the warnings are indeed a result of you working on OS X, but I also think you can safely ignore them. The error, on the other hand, is important but easily resolved. The clue is found in the following line Code:
yPlus.C:37:10: fatal error: 'fluidThermo.H' file not found Code:
-I$(WM_PROJECT_USER_DIR)/src/thermophysicalModels/basic/lnInclude \ Code:
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ As a side note, it is common practice to put the "applications" directory you just created in the same directory as run (kateeisenhower-2.3.1). However, I do not think this is the cause for your warnings and errors. |
|
August 26, 2015, 06:30 |
|
#38 |
Senior Member
Join Date: Mar 2015
Posts: 250
Rep Power: 12 |
Hi Luka,
thanks for the explanation. I understood why I got this error in the first place. But it still doesn't work. I keep getting some warnings which I don't understand. Nethertheless I tried Code:
yPlus Best regards, Kate |
|
August 28, 2015, 08:48 |
|
#39 |
New Member
Luka Denies
Join Date: Oct 2014
Posts: 28
Rep Power: 12 |
Hi Kate,
After some googling, it looks like this error is Mac OS-related. Since I'm not familiar with this setup and the resulting error, I'm afraid I can't help you. |
|
August 29, 2015, 11:49 |
|
#40 |
Senior Member
Join Date: Mar 2015
Posts: 250
Rep Power: 12 |
Hi Luka, no problem, thank you for trying!
|
|
Tags |
komegasst, openfoam 1.7.1, simplefoam, yplusras |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFOAM static build on Cray XT5 | asaijo | OpenFOAM Installation | 9 | April 6, 2011 13:21 |
Working directory via command line | Luiz | CFX | 4 | March 6, 2011 21:02 |
OpenCFD release OpenFOAMŪ version 1.7.1 | opencfd | OpenFOAM Announcements from ESI-OpenCFD | 0 | August 26, 2010 12:40 |
yPlusRAS in OF 1.6.x - Low Re Models | ivan_cozza | OpenFOAM Running, Solving & CFD | 0 | September 23, 2009 06:27 |
OpenFOAM14 for Mac OSX Darwin 104 | gschaider | OpenFOAM Installation | 118 | July 20, 2008 06:19 |