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

nutRoughWallFunction and Surface Roughness Documented

Register Blogs Community New Posts Updated Threads Search

Like Tree24Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 16, 2010, 07:09
Default Lower limit for simulating roughness effect
  #21
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Hello everybody,
as wrote before, I would like to simulate the flow around an airfoil evaluating the effect of different surface roughness. I downloaded the OF 1.6.x version, thus the bug on nutRoughWallFunction is fixed. However, I cannot notice any difference on results applying different values for Ks.
I am thinking that this may be due to the surface roughness that I am considering. Indeed, they are smaller than 1 millimeters, thus it may happen that Ks+ is lower than 2.25, which is the limit for the hydrodynamically smooth regime as pointed out in Fluent UserGuide.
Is there anyone that has any experience on the subject? And what if I want to consider such lower surface roughness? Is there any modification that I can add to the Law of the Wall?
Any comment on that is appreciated.
Thanks

mad
maddalena is offline   Reply With Quote

Old   June 16, 2010, 10:30
Default
  #22
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Mmm...
now I get the point: Ks is not the physical roughness, the one prescribed as a tolerance, but it is the equivalent sand diameter. Is there anyone that knows a relationship between the two?
thanks.

mad
maddalena is offline   Reply With Quote

Old   June 22, 2010, 11:15
Default
  #23
New Member
 
Thomas Smyth
Join Date: Apr 2010
Posts: 14
Rep Power: 16
Thom is on a distinguished road
Hi all,

I have compiled the git version and have found the same problems as Sylvain and Adrian. That is when I apply a Ks and Cs roughness value the flow is substantially different to when the wall is zeroGradient but when i change the values of Ks and Cs the flow values remain the same.

Has anyone been able to successfully change roughness values and notice a change in the flow?
Thom is offline   Reply With Quote

Old   June 23, 2010, 03:31
Default Check Ks+ and y+
  #24
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Yes, I did! Some weeks ago I had the same problem as you, Thom: changing Ks and Cs do not affect flow and aerodynamic forces.
A first indication of what is going wrong is to check y+ and Ks+ values: activate the debug flag for nutRoughWallFunction adding the following lines to your controlDict file:
Code:
DebugSwitches
{
  nutWallFunction 1;
}
I guess that Ks+ is under 2.25, that is the upper limit under which the flow is considered hydrodynamically smooth. That may be a consequence of your mesh: the y+ values is probably under the limit prescribed by your turbulence model (30 if a high-Re turbulence model is applied).
Hope that helps.
Cheers,

mad
maddalena is offline   Reply With Quote

Old   June 23, 2010, 06:47
Default
  #25
New Member
 
Thomas Smyth
Join Date: Apr 2010
Posts: 14
Rep Power: 16
Thom is on a distinguished road
Hi Mad,

Thanks for the reply and the debug code but I'm just wondering where I read the output of that? (Probably a silly question!)

Thanks again
Thom
Thom is offline   Reply With Quote

Old   June 23, 2010, 08:45
Default debug
  #26
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Hi Thom,
the debug output is on your screen or in the log code! there is a line for every wall cell.
Enjoy.

mad
maddalena is offline   Reply With Quote

Old   June 23, 2010, 14:01
Default
  #27
Member
 
Matthew J. Churchfield
Join Date: Nov 2009
Location: Boulder, Colorado, USA
Posts: 49
Rep Power: 19
mchurchf is on a distinguished road
Alan,

I saw your post about doing atmospheric flows with rough walls. I'm working in the same area but with LES. I have developed a wall function based on Monin-Obukhov theory in which one can specify either surface roughness or friction velocity. If you're interested in talking, let me know. I am in the process of testing the boundary condition and should know by next month how well it works. Although designed for LES, I think it could be fairly easily extended to work with any linear eddy viscosity RANS model.

Matt
mchurchf is offline   Reply With Quote

Old   June 26, 2010, 10:56
Default
  #28
New Member
 
Jesper
Join Date: May 2010
Posts: 9
Rep Power: 16
jgpeder is on a distinguished road
Hi Maddalena and others,
I also have the problem that changing Ks doesn't change the flow.
I've tried to activate the nutRoughWallFunction debugger, but I don't get any output from it. As I understand it is in the ~/OpenFOAM/OpenFOAM-1.6.x/etc/ControlDict file, I should activate the debugger. Is that right?
Thanks
-Jesper
jgpeder is offline   Reply With Quote

Old   June 28, 2010, 06:26
Default
  #29
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Hi Jesper,
as I wrote before, I added the following lines to controlDict in my case folder:
Code:
DebugSwitches
{
  nutWallFunction 1;
}
Enjoy

mad
maddalena is offline   Reply With Quote

Old   July 29, 2010, 13:22
Default
  #30
Member
 
83_Ale_83's Avatar
 
Alessandro
Join Date: Nov 2009
Posts: 67
Rep Power: 17
83_Ale_83 is on a distinguished road
Hi to everybody,
I have added the line posted by maddalena to my controldict case-file and also change the values of the controldict file inside ../etc folder. Then I have re-sourced openFoam 1.7.x but I have no debug values on my console..

Where is the mistake?
__________________

83_Ale_83 is offline   Reply With Quote

Old   August 31, 2010, 10:47
Default mutRoughWallFunction
  #31
OMN
New Member
 
Olivier Macchion
Join Date: Jun 2010
Posts: 12
Rep Power: 16
OMN is on a distinguished road
Hello

I tried to set up a rough wall for a run with buoyantSimpleFoam using the syntax:

wall
{
type mutRoughWallFunction;
Ks uniform 0.005;
Cs uniform 0.5;
value uniform 0;
}

and I got this error message after starting buoyantSimpleFoam:

Selecting RAS turbulence model realizableKE
#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam170/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/opt/openfoam170/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Uninterpreted:
#3 log in "/lib/tls/i686/cmov/libm.so.6"
#4 Foam::compressible::RASModel::yPlusLam(double, double) const in "/opt/openfoam170/lib/linuxGccDPOpt/libcompressibleRASModels.so"
#5 Foam::compressible::RASModels::mutRoughWallFunctio nFvPatchScalarField::calcMut() const in "/opt/openfoam170/lib/linuxGccDPOpt/libcompressibleRASModels.so"
#6 Foam::compressible::RASModels::mutWallFunctionFvPa tchScalarField::updateCoeffs() in "/opt/openfoam170/lib/linuxGccDPOpt/libcompressibleRASModels.so"
#7 Foam::fvPatchField<double>::evaluate(Foam::Pstream ::commsTypes) in "/opt/openfoam170/applications/bin/linuxGccDPOpt/buoyantSimpleFoam"
#8 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::evaluate() in "/opt/openfoam170/applications/bin/linuxGccDPOpt/buoyantSimpleFoam"
#9 Foam::compressible::RASModels::realizableKE::reali zableKE(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo const&) in "/opt/openfoam170/lib/linuxGccDPOpt/libcompressibleRASModels.so"
#10 Foam::compressible::RASModel::adddictionaryConstru ctorToTable<Foam::compressible::RASModels::realiza bleKE>::New(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo const&) in "/opt/openfoam170/lib/linuxGccDPOpt/libcompressibleRASModels.so"
#11 Foam::compressible::RASModel::New(Foam::GeometricF ield<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo const&) in "/opt/openfoam170/lib/linuxGccDPOpt/libcompressibleRASModels.so"
#12
in "/opt/openfoam170/applications/bin/linuxGccDPOpt/buoyantSimpleFoam"
#13 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#14
in "/opt/openfoam170/applications/bin/linuxGccDPOpt/buoyantSimpleFoam"
Floating point exception

Would someone know what the problem is? Everything works fine with mutWallFunction.

Cheers

Olivier
OMN is offline   Reply With Quote

Old   October 8, 2010, 11:12
Default
  #32
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Hi,
does anybody know if there is a lowRe version of nutRoughWallFunction? Is it enough to add the two lines on the nut file definition?

mad
maddalena is offline   Reply With Quote

Old   November 10, 2010, 13:00
Default
  #33
Senior Member
 
aerothermal's Avatar
 
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 120
Rep Power: 16
aerothermal is on a distinguished road
Send a message via Skype™ to aerothermal
Quote:
Originally Posted by OMN View Post
Hello

I tried to set up a rough wall for a run with buoyantSimpleFoam using the syntax:

wall
{
type mutRoughWallFunction;
Ks uniform 0.005;
Cs uniform 0.5;
value uniform 0;
}

and I got this error message after starting buoyantSimpleFoam:

Selecting RAS turbulence model realizableKE
#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam170/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/opt/openfoam170/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Uninterpreted:
#3 log in "/lib/tls/i686/cmov/libm.so.6"
#4 Foam::compressible::RASModel::yPlusLam(double, double) const in "/opt/openfoam170/lib/linuxGccDPOpt/libcompressibleRASModels.so"
#5 Foam::compressible::RASModels::mutRoughWallFunctio nFvPatchScalarField::calcMut() const in "/opt/openfoam170/lib/linuxGccDPOpt/libcompressibleRASModels.so"
#6 Foam::compressible::RASModels::mutWallFunctionFvPa tchScalarField::updateCoeffs() in "/opt/openfoam170/lib/linuxGccDPOpt/libcompressibleRASModels.so"
#7 Foam::fvPatchField<double>::evaluate(Foam::Pstream ::commsTypes) in "/opt/openfoam170/applications/bin/linuxGccDPOpt/buoyantSimpleFoam"
#8 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::evaluate() in "/opt/openfoam170/applications/bin/linuxGccDPOpt/buoyantSimpleFoam"
#9 Foam::compressible::RASModels::realizableKE::reali zableKE(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo const&) in "/opt/openfoam170/lib/linuxGccDPOpt/libcompressibleRASModels.so"
#10 Foam::compressible::RASModel::adddictionaryConstru ctorToTable<Foam::compressible::RASModels::realiza bleKE>::New(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo const&) in "/opt/openfoam170/lib/linuxGccDPOpt/libcompressibleRASModels.so"
#11 Foam::compressible::RASModel::New(Foam::GeometricF ield<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo const&) in "/opt/openfoam170/lib/linuxGccDPOpt/libcompressibleRASModels.so"
#12
in "/opt/openfoam170/applications/bin/linuxGccDPOpt/buoyantSimpleFoam"
#13 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#14
in "/opt/openfoam170/applications/bin/linuxGccDPOpt/buoyantSimpleFoam"
Floating point exception

Would someone know what the problem is? Everything works fine with mutWallFunction.

Cheers

Olivier
I have also erros here but with kOmegaSST RAS model. As Olivier said, everything works fine with mutWallFunction.

See the errors below.


Create time

Create mesh for time = 0

Reading thermophysical properties

Selecting thermodynamics package hPsiThermo<pureMixture<sutherlandTransport<specieT hermo<hConstThermo<perfectGas>>>>>
Reading field U

Reading/calculating face flux field phi

Creating turbulence model

Selecting RAS turbulence model kOmegaSST
#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam171/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/opt/openfoam171/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 in "/lib/libc.so.6"
#3 in "/lib/libm.so.6"
#4 log in "/lib/libm.so.6"
#5 Foam::compressible::RASModel::yPlusLam(double, double) const in "/opt/openfoam171/lib/linux64GccDPOpt/libcompressibleRASModels.so"
#6 Foam::compressible::RASModels::mutRoughWallFunctio nFvPatchScalarField::calcMut() const in "/opt/openfoam171/lib/linux64GccDPOpt/libcompressibleRASModels.so"
#7 Foam::compressible::RASModels::mutWallFunctionFvPa tchScalarField::updateCoeffs() in "/opt/openfoam171/lib/linux64GccDPOpt/libcompressibleRASModels.so"
#8 Foam::fvPatchField<double>::evaluate(Foam::Pstream ::commsTypes) in "/opt/openfoam171/applications/bin/linux64GccDPOpt/rhoSimpleFoam"
#9 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::evaluate() in "/opt/openfoam171/applications/bin/linux64GccDPOpt/rhoSimpleFoam"
#10 Foam::compressible::RASModels::kOmegaSST::kOmegaSS T(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo const&) in "/opt/openfoam171/lib/linux64GccDPOpt/libcompressibleRASModels.so"
#11 Foam::compressible::RASModel::adddictionaryConstru ctorToTable<Foam::compressible::RASModels::kOmegaS ST>::New(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo const&) in "/opt/openfoam171/lib/linux64GccDPOpt/libcompressibleRASModels.so"
#12 Foam::compressible::RASModel::New(Foam::GeometricF ield<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo const&) in "/opt/openfoam171/lib/linux64GccDPOpt/libcompressibleRASModels.so"
#13
in "/opt/openfoam171/applications/bin/linux64GccDPOpt/rhoSimpleFoam"
#14 __libc_start_main in "/lib/libc.so.6"
#15
in "/opt/openfoam171/applications/bin/linux64GccDPOpt/rhoSimpleFoam"
Floating point exception
aerothermal is offline   Reply With Quote

Old   November 10, 2010, 13:56
Default
  #34
Senior Member
 
aerothermal's Avatar
 
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 120
Rep Power: 16
aerothermal is on a distinguished road
Send a message via Skype™ to aerothermal
Olivier,

I found the fix for the issue. It is more related to run-time execution than models, parameters or inputs. You need to code in terminal where you are running OpenFOAM:

[CODE]
unset FOAM_SIGFPE
[\CODE]

or

[CODE]
export FOAM_SIGFPE=false
[\CODE]


http://www.cfd-online.com/Forums/ope...exception.html

http://www.cfd-online.com/OpenFOAM_D...tml?1201770596

Regards,
aerothermal is offline   Reply With Quote

Old   January 17, 2011, 05:44
Default define roughness for case
  #35
Member
 
s.rasoul_varedi
Join Date: Feb 2010
Posts: 82
Rep Power: 15
desert_1250 is an unknown quantity at this point
Send a message via Yahoo to desert_1250
Hi all of foamers, i hope that you are well
i compiled the new solver with roughness( i modified simpleFoam & i used OF 1.5dev), but my question is how to change the related case to read this coeffs (Ks , Cs)? how to define the BC for this Coeffs?


best regards
desert_1250 is offline   Reply With Quote

Old   January 18, 2011, 19:43
Default
  #36
Senior Member
 
aerothermal's Avatar
 
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 120
Rep Power: 16
aerothermal is on a distinguished road
Send a message via Skype™ to aerothermal
desert,

try to set uniform fields...

Code:
wall
{
type mutRoughWallFunction;
Ks uniform 0.005;
Cs uniform 0.5;
value uniform 0;
}
or see what Dr. Tapia implemented...

http://hig.diva-portal.org/smash/get...936/FULLTEXT01

regards,

aerothermal
aerothermal is offline   Reply With Quote

Old   January 23, 2011, 12:12
Default
  #37
New Member
 
bita
Join Date: Jan 2011
Posts: 2
Rep Power: 0
bita.kh is on a distinguished road
Send a message via Yahoo to bita.kh
hi aerothermal

where must add this uniform fields?in which folder in my case?

best regards
bita.kh is offline   Reply With Quote

Old   January 23, 2011, 16:15
Default
  #38
Senior Member
 
aerothermal's Avatar
 
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 120
Rep Power: 16
aerothermal is on a distinguished road
Send a message via Skype™ to aerothermal
Hello bita.kh,

Please take a look at thesis of Dr. Tapia.
See my post above, when you state "Cs uniform 0.5" in 0 directory (BC definitions), you are informing openfoam that the field is uniform.

regards,

guilherme
www.ats4i.com.br
aerothermal is offline   Reply With Quote

Old   January 23, 2011, 17:20
Default Hi Guilherme
  #39
Member
 
s.rasoul_varedi
Join Date: Feb 2010
Posts: 82
Rep Power: 15
desert_1250 is an unknown quantity at this point
Send a message via Yahoo to desert_1250
hello Guiherme, thanks for your reply

i think that Bita's question is "where needed to add this type of BC to define roughness, mean that needed to add this code to all off boundary condition in 0 directory or needed to add in U or p ...

this is my question, too

Best,
Rasoul
desert_1250 is offline   Reply With Quote

Old   January 23, 2011, 18:23
Default
  #40
Senior Member
 
aerothermal's Avatar
 
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 120
Rep Power: 16
aerothermal is on a distinguished road
Send a message via Skype™ to aerothermal
Dear foamers,

Go to 0/ directory and mut or nut files depending if you are using compressible or incompressible RAS.

Please take a look at forum previous posts about the subject.

Regards,

aerothermal
www.ats4i.com.br
aerothermal 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 in Flow-3d Marco FLOW-3D 3 June 3, 2018 03:15
[Gmsh] Error : Self intersecting surface mesh, computing intersections & Error : Impossible velan OpenFOAM Meshing & Mesh Conversion 3 October 22, 2015 12:05
[Gmsh] Problem with Gmsh nishant_hull OpenFOAM Meshing & Mesh Conversion 23 August 5, 2015 03:09
[Gmsh] boundaries with gmshToFoam‏ ouafa OpenFOAM Meshing & Mesh Conversion 7 May 21, 2010 13:43
CFX4.3 -build analysis form Chie Min CFX 5 July 13, 2001 00:19


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