y+ (yPlus) in OpenFOAM
Hello all,
Is there any script available in OpenFOAM to calculate y+ value ? Regards Raghavendra |
compiling yPlusRAS
I tried using the utility yPlusRAS but I had some problem during compilingg
$ wmake Making dependency list for source file yPlusRAS.C SOURCE=yPlusRAS.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/apps/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude -I/apps/OpenFOAM/OpenFOAM-1.5/src/turbulenceModels/RAS -I/apps/OpenFOAM/OpenFOAM-1.5/src/transportModels -IlnInclude -I. -I/apps/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/apps/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/yPlusRAS.o g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/apps/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude -I/apps/OpenFOAM/OpenFOAM-1.5/src/turbulenceModels/RAS -I/apps/OpenFOAM/OpenFOAM-1.5/src/transportModels -IlnInclude -I. -I/apps/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/apps/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC Make/linux64GccDPOpt/yPlusRAS.o -L/apps/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt \ -lincompressibleRASModels -lincompressibleTransportModels -lfiniteVolume -lOpenFOAM -liberty -ldl -lm -o /apps/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/yPlusRAS /usr/bin/ld: cannot open output file /apps/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/yPlusRAS: Permission denied collect2: ld returned 1 exit status make: *** [/apps/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/yPlusRAS] Error 1 ( installation path of OF is /apps/OpenFOAM ) |
compiling yPlusRAS
Quote:
|
Hi Olesen ,
Thanks for your reply.. Yes I have copied the directory to $FOAM_USER_APPBIN and I tried to compile there only..(Where I have read/write permission) Regards Raghavendra |
Quote:
The issue is not about read/write permission for the source code, but for the resulting executable (as stated in the error message). Please see the EXE = ... entry in Make/files for settting the target. |
Hi Olesen,
as you said the problem was not setting the path in file EXE = ... now i am able to compile :) Thanks for your support Regards Raghavendra |
Hi Mark,
I am trying to compile yPlusRAS.C with turbFoam.C. While compiling, I am getting the following error: Make/linuxGccDPOpt/yPlusRAS.o: In function 'main': yPlusRAS.C:(.text+0x70):multiple definition of 'main' Make/linuxGccDPOpt/newturbFoam.o:newturbFoam.C:(.text+0x70):first defined here collect 2: ld returned 1 exit status The above error is clearly due to multiple "main" functions in the C files yPlusRAS.C and turbFoam.C. I tried by not including the main in yPlusRAS.C, but that did not work. Can you suggest a way out ? Thanks, Sanjib |
Quote:
|
Thanks Mark.
So, I would just copy the portion of y+ calculation from yPlusRAS.C to createfields.H ? I did that but it did not work. The error message is: RASModel not declared in this scope. I tried to include the RASModel.H file at the beginning in the createfields.H file, but that did not solve the problem either. |
The problem is - why do you copy the bits of yPlusRAS to CreateFields.H.
Assuming your goal is to have y+ computed during the run and not in postprocessing step, you want to evaluate the y+ value at the end of the PISO time step computation. The CreateFields.H is just a way how to keep the code tidy by putting all variables instantiation away from the main code. It means that in your CreateFields you want to add only the bit defining y+ field. The most tricky part is which bits you really need to put into the new solver. From my experience it is allways good to try how the whole thing work by implementing some dummy crazy bit of code before fighting with more complicated parts, like your y+. good luck matej |
What about compressible flow?
I was able to modify and compile yPlusRAS for OF 1.4.1 (need to maintain compatibility with some in-house software) and it seems to have worked well.
Having just learned about yPlus and its use, I was wondering what modifications would be needed to make it work for compressible, reacting flow. At first I thought all we would need is to change the turbulence model creation, but then I saw the incompressible transport model is used in some of the calculation. How do the two interact? |
LES and Yplus
Dear All
Is there a way to calculate y+ from our LES simulations? Thanks |
Did you consider the yPlusLES utility?
|
Not yet. I will consider it. Thanks. And I like to calculate lift and drag forces over the airfoil but the forces that openFOAM utility gives are incorrect. Could you help me in this regard as well?
Thanks |
yPlusRAS error
Hello,
Currently I am running the case in OpenFOAM 2.3.0. I am having a problem calculating the y plus value. My case is in sonicfoam having Re 3e6 and I am using K-Epsilon RAS model. However, after post processing I type the command yPlusRAS in terminal, I get following error message, * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Create time Create mesh for time = 0 Time = 0 Calculating wall distance Writing wall distance to field y Reading field U Reading/calculating face flux field phi --> FOAM FATAL IO ERROR: cannot open file file: /home/cae/OpenFOAM/cae-2.3.0/run/jaydeep/Pen_3D_4.5/constant/transportProperties at line 0. From function regIOobject::readStream() in file db/regIOobject/regIOobjectRead.C at line 87. FOAM exiting * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Can anybody suggest a possible solution to overcome this error message ? Thanks and Regards jaydeep |
Hello everybody,
I tried yPlusRAS -compressible and it worked. Thanks for the suggestions. However, it gives me an output "no rho field Writing yPlus to field yPlus" It did not give y plus for any time step. Does anybody know anything about this? jaydeep |
Hi,
the transportProperties is a file with a specification of viscosity. For compressible flow, viscosity could be a function of temperature typical, therefore it is prescribed in thermophysicalProperties. Without a compressible switch the utility does not know this. With compressible switch the utility looks for a rho - density and apparently could not find the field in the time directories. Now the rho does not exist in the 0 directory with initial conditions. Solution: run your utility with a -time 1:10 to get y+ for times from 1 to 10 seconds. happy foaming |
All times are GMT -4. The time now is 04:57. |