CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   nutRoughWallFunction and Surface Roughness Documented (https://www.cfd-online.com/Forums/openfoam-programming-development/71412-nutroughwallfunction-surface-roughness-documented.html)

maddalena June 16, 2010 06:09

Lower limit for simulating roughness effect
 
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 June 16, 2010 09:30

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

Thom June 22, 2010 10:15

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?

maddalena June 23, 2010 02:31

Check Ks+ and y+
 
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

Thom June 23, 2010 05:47

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

maddalena June 23, 2010 07:45

debug
 
Hi Thom,
the debug output is on your screen or in the log code! there is a line for every wall cell.
Enjoy.

mad

mchurchf June 23, 2010 13:01

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

jgpeder June 26, 2010 09:56

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

maddalena June 28, 2010 05:26

Hi Jesper,
as I wrote before, I added the following lines to controlDict in my case folder:
Code:

DebugSwitches
{
  nutWallFunction 1;
}

Enjoy

mad

83_Ale_83 July 29, 2010 12:22

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?

OMN August 31, 2010 09:47

mutRoughWallFunction
 
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::printStack(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

maddalena October 8, 2010 10:12

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

aerothermal November 10, 2010 12:00

Quote:

Originally Posted by OMN (Post 273487)
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::printStack(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::printStack(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 November 10, 2010 12:56

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,

desert_1250 January 17, 2011 04:44

define roughness for case
 
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

aerothermal January 18, 2011 18:43

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

bita.kh January 23, 2011 11:12

hi aerothermal

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

best regards

aerothermal January 23, 2011 15:15

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

desert_1250 January 23, 2011 16:20

Hi Guilherme
 
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

aerothermal January 23, 2011 17:23

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


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