|
[Sponsors] | |||||
|
|
|
#1 |
|
Member
Christian Lindbäck
Join Date: Mar 2009
Posts: 55
Rep Power: 18 ![]() |
How do I write y+ (so that I can plot y+ in paraFoam) when not running LES?
Best regards, Christian Svensson |
|
|
|
|
|
|
|
|
#2 |
|
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 27 ![]() |
Have a look at the checkYPlus postprocessing utility.
|
|
|
|
|
|
|
|
|
#3 |
|
Member
Christian Lindbäck
Join Date: Mar 2009
Posts: 55
Rep Power: 18 ![]() |
This is what I've done. From what I can see checkYPlus only reports the y+ values, it doesn't write them to a file so that I can plot them in paraFoam. How can I do this? yPlusLES has this feature.
Regards, Christian |
|
|
|
|
|
|
|
|
#4 |
|
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 52 ![]() ![]() |
Two possibilities (first is better):
a) Adopt the difference between checkYPlus and yPlusLES into a new utility b) use the two utilities I'm posting below (behave like original checkYPlus, with the -write option yPlus gets written to a field (only for wall-patches)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
|
|
|
|
|
|
|
#5 |
|
Member
Christian Lindbäck
Join Date: Mar 2009
Posts: 55
Rep Power: 18 ![]() |
When using the yPlusLES utility I don't get any values in the yPlus file. It simply says:
pipe { type calculated; value uniform 0; } etc. What is wrong? Grateful for a quick response. Best regards, Christian Svensson |
|
|
|
|
|
|
|
|
#6 |
|
Member
hadi tartoussi
Join Date: Mar 2009
Location: paris
Posts: 48
Rep Power: 18 ![]() |
Hi christian,
I am new to openFoam too, but maybe i can help! Did you modify yPlusLES utility? Are u trying to calculate a mean value over a boundary? Cheers Hadi |
|
|
|
|
|
|
|
|
#7 |
|
Member
Christian Lindbäck
Join Date: Mar 2009
Posts: 55
Rep Power: 18 ![]() |
No I haven't modified the yPlusLES utility. I'm running it in its original shape. However, I don't get any result data in the yPlus file of the time step directory.
|
|
|
|
|
|
|
|
|
#8 |
|
Member
hadi tartoussi
Join Date: Mar 2009
Location: paris
Posts: 48
Rep Power: 18 ![]() |
Your yPlus value is uniform over the boundary and is equal to zero:
type calculated; value uniform 0;!! In this utility you calculate yPlus as following : if (typeid(currPatch) == typeid(wallFvPatch)) { yPlus.boundaryField()[patchi] = d[patchi] *sqrt ( nuEff.boundaryField()[patchi] *mag(U.boundaryField()[patchi].snGrad()) ) /sgsModel->nu().boundaryField()[patchi]; } Y+ = Y*sqrt(nueff*gradU)/nu usually u get "value uniform 0" on a boundary; when it is not a wall. Try wallGradU utility to see if u will have the same problem. Can you tell me about the geometry and boundary conditions |
|
|
|
|
|
|
|
|
#9 |
|
Member
Christian Lindbäck
Join Date: Mar 2009
Posts: 55
Rep Power: 18 ![]() |
wallGradU gives me a lot of vector values for each of my boundaries as expected.
The geometry is a pipe containing plate with a hole, like a throttle. The pipe and throttle are walls with a uniform 0 velocity. The inlet is mapped from a RANS computation and the outlet is a pressure outlet. Can't understand why I don't get any yPlus values using yPlusLES??? |
|
|
|
|
|
|
|
|
#10 |
|
Member
Christian Lindbäck
Join Date: Mar 2009
Posts: 55
Rep Power: 18 ![]() |
I realised what was wrong. In my boundary file, the type of my wall boundaries was set to "patch". When I changed them to "wall" everything works fine. Thanks for taking the time to help me.
/ Christian |
|
|
|
|
|
|
|
|
#11 |
|
Senior Member
Join Date: Mar 2009
Posts: 225
Rep Power: 19 ![]() |
I'm using rasInterFoam solver and I want to calculate y+ for tested cases. Could anyone help here?
When I try to run it, first it says p field is missing. This is not a problem, cause I use an utility which calculates real pressure producing "p" field. Then in the next step it says there is trouble in what follows: Create mesh for time = 0 Time = 0 Reading field p Reading field U Reading/calculating face flux field phi --> FOAM FATAL IO ERROR : keyword transportModel is undefined in dictionary "/share/kiwiraid/krystian/OpenFOAM/krystian-1.4/run/tutorials/icoFoam/cavity/./c onstant/transportProperties" file: /share/kiwiraid/krystian/OpenFOAM/krystian-1.4/run/tutorials/icoFoam/cavity/./co nstant/transportProperties from line 25 to line 25. From function dictionary::lookupEntry(const word& keyword) const in file db/dictionary/dictionary.C at line 146. FOAM exiting Which clearly shows that transportProperties file differs from what was assumed initially. Could anyone please provide some tip what to fix in order to make it run with rasInterFoam solver or interFoam solver (definition files for transport properties are the same) or perfectly modify the code so it will be workable with mentioned solvers? BTW. For what solvers was checkYPlus tool done initially? I tried to run with some of other solvers including LES, but something is still wrong. I'm using OpenFOAM 1.4 version. Might it be a problem that checkYPlus doesn't work with newer versions? Many very thanks, Krystian |
|
|
|
|
|
|
|
|
#12 |
|
Senior Member
Join Date: Mar 2009
Posts: 225
Rep Power: 19 ![]() |
Actually, there is some problem reading 'p' field too. Hmm... So any input is greatly welcomed.
Thanks, Krystian |
|
|
|
|
|
|
|
|
#13 |
|
Member
hadi tartoussi
Join Date: Mar 2009
Location: paris
Posts: 48
Rep Power: 18 ![]() |
Hello Krystian,
Which utility did you use to calculate y+? hadi |
|
|
|
|
|
|
|
|
#14 |
|
Senior Member
Join Date: Mar 2009
Posts: 225
Rep Power: 19 ![]() |
I tried to use checkYPlus, however didn't work as I mentioned. Just in case I also tried to use the other related tool, made for LES, and also the one for incompressible flow attached in this topic. Neither of those worked.
|
|
|
|
|
|
|
|
|
#15 |
|
Member
hadi tartoussi
Join Date: Mar 2009
Location: paris
Posts: 48
Rep Power: 18 ![]() |
If you want to calculate y+. you should be running a turbulent solver, it will not work for icoFoam since it is a solver for laminar flow, try to use turbFoam, or the adequate turbulent solver for your case.
About rasInterFoam, i don't know this solver but apparently you don't have a P file, i am not sure if u can modify it. CheckYPlus does not work for LES solvers! Hadi |
|
|
|
|
|
|
|
|
#16 |
|
Senior Member
Join Date: Mar 2009
Posts: 225
Rep Power: 19 ![]() |
Yes, I figured that out that checkYPlus in not for LES, there is other tool for LES.
Even if the p field is created, then I think appears problem with transportProperties dictionary, since it specifies two phases. Any other input? thanks, Krystian |
|
|
|
|
|
|
|
|
#17 |
|
Member
Michele Vascellari
Join Date: Mar 2009
Posts: 70
Rep Power: 18 ![]() |
Hello!
I'm trying to compile the checkYPlusCompressible utility posted in this discussion with OpenFOAM 1.4.1, but I obtain the following errors: Making dependency list for source file checkYPlusCompressible.C SOURCE=checkYPlusCompressible.C ; g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/home/michele/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude -I/home/michele/OpenFOAM/OpenFOAM-1.4.1/src/thermophysicalModels/specie/lnInclud e -I/home/michele/OpenFOAM/OpenFOAM-1.4.1/src/thermophysicalModels/combustion/lnIn clude -I/home/michele/OpenFOAM/OpenFOAM-1.4.1/src/thermophysicalModels/basic/lnInclude -I/home/michele/OpenFOAM/OpenFOAM-1.4.1/src/thermophysicalModels/chemistryModel/ lnInclude -I/home/michele/OpenFOAM/OpenFOAM-1.4.1/src/turbulenceModels -I/home/michele/OpenFOAM/OpenFOAM-1.4.1/src/transportModels -IlnInclude -I. -I/home/michele/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC -pthread -c $SOURCE -o Make/linuxGccDPOpt/checkYPlusCompressible.o checkYPlusCompressible.C: In function 'int main(int, char**)': checkYPlusCompressible.C:171: error: no matching function for call to 'Foam::fixedValueFvPatchField<double>::fixedValueF vPatchField(const Foam::fvPatch&, Foam::Field<double>&)' /home/michele/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fixedValueFvPat chField.C:87: note: candidates are: Foam::fixedValueFvPatchField<type>::fixedValueFvPa tchField(const Foam::fixedValueFvPatchField<type>&, const Foam::DimensionedField<type,>&) [with Type = double] /home/michele/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fixedValueFvPat chField.C:76: note: Foam::fixedValueFvPatchField<type>::fixedValueFvPa tchField(const Foam::fixedValueFvPatchField<type>&) [with Type = double] /home/michele/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fixedValueFvPat chField.C:66: note: Foam::fixedValueFvPatchField<type>::fixedValueFvPa tchField(const Foam::fixedValueFvPatchField<type>&, const Foam::fvPatch&, const Foam::DimensionedField<type,>&, const Foam::fvPatchFieldMapper&) [with Type = double] /home/michele/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fixedValueFvPat chField.C:53: note: Foam::fixedValueFvPatchField<type>::fixedValueFvPa tchField(const Foam::fvPatch&, const Foam::DimensionedField<type,>&, const Foam::dictionary&) [with Type = double] /home/michele/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fixedValueFvPat chField.C:41: note: Foam::fixedValueFvPatchField<type>::fixedValueFvPa tchField(const Foam::fvPatch&, const Foam::DimensionedField<type,>&) [with Type = double] make: *** [Make/linuxGccDPOpt/checkYPlusCompressible.o] Error 1 Does someone have compiled this utility with the latest OpenFOAM release? Michele |
|
|
|
|
|
|
|
|
#18 |
|
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 52 ![]() ![]() |
Well. That removes the calculation/writing of yPlus for the wall-patches (that code had to be changed for 1.4.1). I will post an updated version later in the day.
Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
|
|
|
|
|
|
|
#19 |
|
Member
Michele Vascellari
Join Date: Mar 2009
Posts: 70
Rep Power: 18 ![]() |
thank you Bernhard!
I don't understand the real function of the code that I've commented, but the remaining part of the utility satisfies my needs, since it checks the value of Yplus on every bondary wall, creating a YPlus field in time directory. Michele |
|
|
|
|
|
|
|
|
#20 |
|
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 52 ![]() ![]() |
Hi Michele!
The 1.4.1-ready code can be downloaded via Subversion with the command svn checkout https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Breede r/utilities/postProcessing/YPlusWithWrite You're right. I'm not quite sure of the purpose of the offending code (seems I was trying to be too clever (trying to make sure that the wall-Patches are fixedValue-patches). But I'll have a look, before I remove it. Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| New with writing UDF/Need help pls | mac | FLUENT | 6 | June 14, 2007 07:11 |
| New to writing UDF | Sandilya | FLUENT | 0 | May 31, 2007 13:03 |
| UFD writing help | Nelly | FLUENT | 1 | January 19, 2007 12:29 |
| Writing geometry | Dadou | Siemens | 0 | March 15, 2004 12:34 |
| error while writing bc | Theju | FLUENT | 3 | March 8, 2002 14:20 |