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

Wrong results after Modifying yPlus.C & OP 1.6-ext

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By nimasam

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 22, 2013, 07:47
Default Wrong results after Modifying yPlus.C & OP 1.6-ext
  #1
Senior Member
 
Sasan Ghomi
Join Date: Sep 2012
Location: Denmark
Posts: 292
Rep Power: 14
sasanghomi is on a distinguished road
Hi Foamers ,

I am using OP 1.6-ext . I understood yPlusRAS have a bug and Actually it calculates Y* instead of Y+ . So I searched in the forums and I didn't find any correct yPlus.C for 1.6-ext . {there was some codes for standard versions}. I modified the yPlus.C for 1.6-ext and after compiling I checked this utility for a case but unfortunately I got zero values for Y+ everywhere in all times. I attached this code . Please anybody help me for finding the problem in this code .

I appreciate any help from you.
Thanks and best regards,
Sasan.

P.S. I only changed compressible and incompressible parts and I didn't change two phase part .
Attached Files
File Type: c yPlus.C (9.6 KB, 4 views)
sasanghomi is offline   Reply With Quote

Old   September 22, 2013, 09:48
Default
  #2
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24
nimasam is on a distinguished road
Dear Sasan

prepare a simple test case which we can examine your code there
__________________
My Personal Website (http://nimasamkhaniani.ir/)
Telegram channel (https://t.me/cfd_foam)
nimasam is online now   Reply With Quote

Old   September 22, 2013, 09:57
Default
  #3
Senior Member
 
Sasan Ghomi
Join Date: Sep 2012
Location: Denmark
Posts: 292
Rep Power: 14
sasanghomi is on a distinguished road
Hi Dr.Sam

I attached a cavity case that the solver of that is rhoPisoFoam so you should use yPlusRAS -compressible for getting Y+ .

Thank you very much
best regards
sasan
Attached Files
File Type: gz cavity.tar.gz (18.8 KB, 2 views)
sasanghomi is offline   Reply With Quote

Old   September 22, 2013, 11:56
Default
  #4
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24
nimasam is on a distinguished road
Hello Dear Sasan

i feel the code should be like that :
Quote:
yPlus.boundaryField()[patchi] =y[patchi]
* sqrt
(
//mut.boundaryField()[patchi]
(RASModel->mu().boundaryField()[patchi])
* mag(U.boundaryField()[patchi].snGrad())
/ rho.boundaryField()[patchi]
)
/ (RASModel->mu().boundaryField()[patchi]/rho.boundaryField()[patchi]);
actually i replace
Quote:
mut.boundaryField()[patchi]
with this:
Quote:
(RASModel->mu().boundaryField()[patchi])
i guess we should use mu in that equation not mut , however im not turbulent expert
Attached Files
File Type: c yPlus.C (9.7 KB, 3 views)
__________________
My Personal Website (http://nimasamkhaniani.ir/)
Telegram channel (https://t.me/cfd_foam)
nimasam is online now   Reply With Quote

Old   September 22, 2013, 14:03
Default
  #5
Senior Member
 
Sasan Ghomi
Join Date: Sep 2012
Location: Denmark
Posts: 292
Rep Power: 14
sasanghomi is on a distinguished road
I really appreciate your help and your attention replacing RASModel->mu().boundaryField()[patchi] eliminate the problem in the code.I think this formula is good for Y+<5 because when Y+ is lower than 5 So mut is very low comparing to mu . Do you know about order of Y+ in openfoam? is it similar to fluent or not ? Actually I can't set Y+ between 30 and 300 in my case (engine) .In my case the order of Y+ is low. So I want to set it lower than 5 and I want to know this order of Y+ in openfoam for standard wall Functions is acceptable or not ?

Anyway thank you very much Dr.Sam
Your help solved the problem.
Best regards,
Sasan.
sasanghomi is offline   Reply With Quote

Old   September 22, 2013, 14:11
Default
  #6
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24
nimasam is on a distinguished road
you can define muEff = mu + mut
However as i said before im not turbulent expert , so i dont know
sasanghomi likes this.
__________________
My Personal Website (http://nimasamkhaniani.ir/)
Telegram channel (https://t.me/cfd_foam)
nimasam is online now   Reply With Quote

Reply


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
OpenFOAM - Validation of Results Ahmed OpenFOAM Running, Solving & CFD 10 May 13, 2018 18:28
k-omega-SST model (OF 1.6) - turbulent flat plate cboss OpenFOAM Running, Solving & CFD 25 August 9, 2016 09:53
BuoyantBoussinesqSimpleFoam and axial-symmetric results wrong mass flow Thomas Baumann OpenFOAM 6 December 21, 2009 10:31
why dynamic mesh method give wrong results? weiyang1980 Main CFD Forum 0 September 22, 2009 21:06
[OpenFOAM] 'integrate variables' filter on a polyhedral mesh gives wrong results... jbf ParaView 0 September 4, 2009 04:08


All times are GMT -4. The time now is 03:37.