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

y+ (yPlus) in OpenFOAM

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 28, 2009, 07:31
Default y+ (yPlus) in OpenFOAM
  #1
Member
 
Raghavendra
Join Date: Mar 2009
Location: Goteborg, Sweden
Posts: 94
Rep Power: 7
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, 07:45
Default compiling yPlusRAS
  #2
Member
 
Raghavendra
Join Date: Mar 2009
Location: Goteborg, Sweden
Posts: 94
Rep Power: 7
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, 02:21
Default compiling yPlusRAS
  #3
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.io/
Posts: 774
Rep Power: 17
olesen will become famous soon enough
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, 02:59
Default
  #4
Member
 
Raghavendra
Join Date: Mar 2009
Location: Goteborg, Sweden
Posts: 94
Rep Power: 7
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, 03:05
Default
  #5
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.io/
Posts: 774
Rep Power: 17
olesen will become famous soon enough
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, 03:58
Default
  #6
Member
 
Raghavendra
Join Date: Mar 2009
Location: Goteborg, Sweden
Posts: 94
Rep Power: 7
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, 00:42
Default
  #7
New Member
 
Sanjib Das Sharma
Join Date: May 2009
Posts: 22
Rep Power: 7
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, 02:10
Default
  #8
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.io/
Posts: 774
Rep Power: 17
olesen will become famous soon enough
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, 02:17
Default
  #9
New Member
 
Sanjib Das Sharma
Join Date: May 2009
Posts: 22
Rep Power: 7
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, 03:59
Default
  #10
Member
 
matej forman
Join Date: Mar 2009
Location: Brno, Czech Republic
Posts: 91
Rep Power: 7
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, 13:29
Question What about compressible flow?
  #11
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 673
Rep Power: 17
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, 04:21
Default LES and Yplus
  #12
Member
 
ehsan
Join Date: Mar 2009
Posts: 82
Rep Power: 7
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, 04:46
Default
  #13
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 787
Rep Power: 12
Bernhard is on a distinguished road
Did you consider the yPlusLES utility?
Bernhard is offline   Reply With Quote

Old   November 21, 2011, 05:06
Default
  #14
Member
 
ehsan
Join Date: Mar 2009
Posts: 82
Rep Power: 7
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

Reply

Thread Tools
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 On
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 17 August 22, 2009 03:59
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 18:07
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 14:25
OpenFOAM Debian packaging current status problems and TODOs oseen OpenFOAM Installation 9 August 26, 2007 13:50
OpenFOAM Training and Workshop Zagreb 2628Jan2006 hjasak OpenFOAM 1 February 2, 2006 21:07


All times are GMT -4. The time now is 01:34.