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

Surface roughness

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 1, 2014, 11:09
Default
  #21
New Member
 
Leonardo Oliveira
Join Date: Aug 2014
Location: Brazil
Posts: 11
Rep Power: 12
leonardo.oliveira is on a distinguished road
Hello Burak,

I've downloaded the roughnessToFoam application but I can't use it. It asks for a z0 file in the "0" folder and I don't know how to write it.

Can you upload some z0 file so I can use it as an example, or show me how to write it.

Thanks in advance.
Sorry for the bad English.
leonardo.oliveira is offline   Reply With Quote

Old   October 13, 2014, 16:45
Default
  #22
New Member
 
Burak
Join Date: Nov 2012
Posts: 14
Rep Power: 14
Burak_1984 is on a distinguished road
Hi Leonardo

It has been a while since I ran this program.But as far as I remember the program didn't work for me either.So I cannot help you with the file.

What I did was to group my mesh to create patches like Mojtaba mentioned.Meshlab was a usefull tool for that.So the solution was more of a "manual" one than of an automatic one.

Wish you the best luck!

Regards
Burak
Burak_1984 is offline   Reply With Quote

Old   October 15, 2014, 08:08
Default
  #23
New Member
 
Leonardo Oliveira
Join Date: Aug 2014
Location: Brazil
Posts: 11
Rep Power: 12
leonardo.oliveira is on a distinguished road
Thanks for the reply man, I'will try what Mojtaba did.

Thank you.
leonardo.oliveira is offline   Reply With Quote

Old   July 12, 2021, 11:29
Default
  #24
New Member
 
SUVECKSHYA
Join Date: May 2021
Posts: 5
Rep Power: 5
Shuveksha is on a distinguished road
Quote:
Originally Posted by niklas View Post
I have added surface roughness according to the fluent manual.
found for instance here http://web.njit.edu/topics/Prog_Lang_Docs/html/FLUENT/fluent/fluent5/ug/html/nod e195.htm

What I did was to add

Ks_
(
dimensioned<scalar>::lookupOrAddToDict
(
"Ks",
subDict("wallFunctionCoeffs"),
0.0
)
),

Cs_
(
dimensioned<scalar>::lookupOrAddToDict
(
"Cs",
subDict("wallFunctionCoeffs"),
0.0
)
),

to RASModel.H and the corresponding stuff in RASModel.C

and in wallViscosityI.H i modified the for-loop to

forAll(curPatch, facei)
{
label faceCelli = curPatch.faceCells()[facei];

scalar uStar = Cmu25*sqrt(k_[faceCelli]);
scalar yPlus = y_[patchi][facei]*uStar/nuw[facei];
scalar KsPlus = Ks_.value()*uStar/nuw[facei];

// hydrodynamically smooth
scalar logDB = 1.0;

if (KsPlus > 2.25)
{
// fully rough
if (KsPlus > 90.0)
{
logDB = 1.0 + Cs_.value()*KsPlus;
}
else
// transitional
{
scalar n = ::sin(0.4258*(log(KsPlus) - 0.811))
scalar a = (KsPlus - 2.25)/87.75 + Cs_.value()*KsPlus;
logDB = :ow(a, n);
}
}

if (yPlus > yPlusLam_)
{
nutw[facei] =
nuw[facei]
*(yPlus*kappa_.value()/log(E_.value()*yPlus/logDB) - 1);
}
else
{
nutw[facei] = 0.0;
}
}

using the facts that
log(A)-log(B) = log(A/B)
log(A)*n = log(A^n)

you essentially just need to divide the wall constant E with the variable logDB.

Normally setting the constants to zero would revert to the normal smooth approach, but not here and that is easily fixed also.
But is there anything else I need to modify that I have missed or is this all I have to do?

N
Where do you write this program?
Shuveksha is offline   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
Surface roughness Rajesh CFX 1 February 10, 2008 17:36
surface roughness in HTC Trang CFX 0 August 4, 2007 04:51
CCM+ Surface Roughness AJ Siemens 3 March 8, 2006 19:14
surface roughness sankar Siemens 1 November 8, 2004 11:36
Surface roughness Peter Main CFD Forum 9 July 19, 2001 12:29


All times are GMT -4. The time now is 23:59.