CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

y+ (yPlus) in OpenFOAM

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 28, 2009, 08:31
Default y+ (yPlus) in OpenFOAM
  #1
Member
 
Raghavendra
Join Date: Mar 2009
Location: Goteborg, Sweden
Posts: 95
Rep Power: 17
raagh77 is on a distinguished road
Send a message via Yahoo to raagh77 Send a message via Skype™ to raagh77
Hello all,

Is there any script available in OpenFOAM to calculate y+ value ?

Regards
Raghavendra
raagh77 is offline   Reply With Quote

Old   April 28, 2009, 08:45
Default compiling yPlusRAS
  #2
Member
 
Raghavendra
Join Date: Mar 2009
Location: Goteborg, Sweden
Posts: 95
Rep Power: 17
raagh77 is on a distinguished road
Send a message via Yahoo to raagh77 Send a message via Skype™ to raagh77
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 )
raagh77 is offline   Reply With Quote

Old   April 29, 2009, 03:21
Default compiling yPlusRAS
  #3
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,677
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by raagh77 View Post
I tried using the utility yPlusRAS but I had some problem during compiling
...
/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
As the error message clearly indicates, you do not have write permission for this directory. Either set/get write permissions for this directory, or else compile with the target as $FOAM_USER_APPBIN instead of $FOAM_APPBIN.
olesen is offline   Reply With Quote

Old   April 29, 2009, 03:59
Default
  #4
Member
 
Raghavendra
Join Date: Mar 2009
Location: Goteborg, Sweden
Posts: 95
Rep Power: 17
raagh77 is on a distinguished road
Send a message via Yahoo to raagh77 Send a message via Skype™ to raagh77
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
raagh77 is offline   Reply With Quote

Old   April 29, 2009, 04:05
Default
  #5
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,677
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by raagh77 View Post
Yes I have copied the directory to $FOAM_USER_APPBIN and I tried to compile there only..(Where I have read/write permission)
I have absolutely no idea why you would even consider placing the source code in $FOAM_USER_APPBIN.
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.
olesen is offline   Reply With Quote

Old   April 29, 2009, 04:58
Default
  #6
Member
 
Raghavendra
Join Date: Mar 2009
Location: Goteborg, Sweden
Posts: 95
Rep Power: 17
raagh77 is on a distinguished road
Send a message via Yahoo to raagh77 Send a message via Skype™ to raagh77
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
raagh77 is offline   Reply With Quote

Old   August 11, 2009, 01:42
Default
  #7
New Member
 
Sanjib Das Sharma
Join Date: May 2009
Posts: 22
Rep Power: 16
sanjibdsharma is on a distinguished road
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
sanjibdsharma is offline   Reply With Quote

Old   August 11, 2009, 03:10
Default
  #8
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,677
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by sanjibdsharma View Post
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 ?
The obvious thing would be to only steal what you actually need from yPlusRAS.C instead of copying the entire file.
olesen is offline   Reply With Quote

Old   August 11, 2009, 03:17
Default
  #9
New Member
 
Sanjib Das Sharma
Join Date: May 2009
Posts: 22
Rep Power: 16
sanjibdsharma is on a distinguished road
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.
sanjibdsharma is offline   Reply With Quote

Old   August 11, 2009, 04:59
Default
  #10
Senior Member
 
matej forman
Join Date: Mar 2009
Location: Brno, Czech Republic
Posts: 182
Rep Power: 17
matejfor is on a distinguished road
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
matejfor is offline   Reply With Quote

Old   June 1, 2010, 14:29
Question What about compressible flow?
  #11
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
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?
mturcios777 is offline   Reply With Quote

Old   November 21, 2011, 05:21
Default LES and Yplus
  #12
Senior Member
 
Ehsan
Join Date: Mar 2009
Posts: 112
Rep Power: 17
ehsan is on a distinguished road
Dear All

Is there a way to calculate y+ from our LES simulations?

Thanks
ehsan is offline   Reply With Quote

Old   November 21, 2011, 05:46
Default
  #13
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
Did you consider the yPlusLES utility?
Bernhard is offline   Reply With Quote

Old   November 21, 2011, 06:06
Default
  #14
Senior Member
 
Ehsan
Join Date: Mar 2009
Posts: 112
Rep Power: 17
ehsan is on a distinguished road
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
ehsan is offline   Reply With Quote

Old   September 8, 2015, 07:46
Default yPlusRAS error
  #15
New Member
 
jaydeep
Join Date: Sep 2015
Location: Pune, Maharashtra, India
Posts: 7
Rep Power: 10
jaydeepKhajure is on a distinguished road
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
jaydeepKhajure is offline   Reply With Quote

Old   September 10, 2015, 04:05
Default
  #16
New Member
 
jaydeep
Join Date: Sep 2015
Location: Pune, Maharashtra, India
Posts: 7
Rep Power: 10
jaydeepKhajure is on a distinguished road
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
jaydeepKhajure is offline   Reply With Quote

Old   September 10, 2015, 04:15
Default
  #17
Senior Member
 
matej forman
Join Date: Mar 2009
Location: Brno, Czech Republic
Posts: 182
Rep Power: 17
matejfor is on a distinguished road
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
matejfor is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 19:07
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 15:25
OpenFOAM Debian packaging current status problems and TODOs oseen OpenFOAM Installation 9 August 26, 2007 14:50
OpenFOAM Training and Workshop Zagreb 2628Jan2006 hjasak OpenFOAM 1 February 2, 2006 22:07


All times are GMT -4. The time now is 04:27.