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

problem with wallFunctions (kEpsilon model)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 25, 2010, 07:37
Default problem with wallFunctions (kEpsilon model)
  #1
Member
 
Leonardo Nettis
Join Date: Mar 2009
Posts: 72
Rep Power: 17
dinonettis is on a distinguished road
Hi everybody,

I was trying to simulate the flow around a wing by means of RANS model in OpenFOAM. The wallfunctions I'm trying to use for the kEpsilon gives me the following error:

-----------------------------
gradientInternalCoeffs cannot be called for a genericFvPatchField (actual type kqRwallFunction)
on patch rear_wing of field k in file "/home/openfoam/Desktop/dinoOF/OFcase/3wing_SIMPLE/0/k"
You are probably trying to solve for a field with a generic boundary condition.

From function genericFvPatchField<Type>::gradientInternalCoeffs( ) const
in file fields/fvPatchFields/basic/generic/genericFvPatchField.C at line 782.
----------------------------

I compared my testcase with some tutorials and they seems to be similar, so I cannot understand where is the problem?!??

thanks in advance

dino
dinonettis is offline   Reply With Quote

Old   February 25, 2010, 07:48
Default
  #2
New Member
 
Tammo Wenterodt
Join Date: Mar 2009
Posts: 24
Rep Power: 17
wenterodt is on a distinguished road
Do you use a selfmade BC on the specific patch? I once got the same error message, which was easily fixed by specifying a "value uniform 0" entry, e.g.
Code:
    wallHeated {
        type fixedValueLinear;
        varA 353;
        varB 354;
        pointA (0 0 0);
        pointB (2 0 0);
        value uniform 0;
    }
even though the boundary condition itself wouldn't need it.

//Tammo
wenterodt is offline   Reply With Quote

Old   February 25, 2010, 08:10
Default
  #3
Member
 
Leonardo Nettis
Join Date: Mar 2009
Posts: 72
Rep Power: 17
dinonettis is on a distinguished road
actually I'm using an already implemented BC, i.e. kqRwallFunction.
In the "k" file I'm using these settings for all the walls:

rear_wing
{
type kqRwallFunction;
value uniform 0.00735;
}

main_wing
{
type kqRwallFunction;
value uniform 0.00735;
}

front_wing
{
type kqRwallFunction;
value uniform 0.00735;
}

The strange thing is that if I change only for the first one (rear_wing) the value uniform from 0.00735 to 0 I get the following error:

---------------
smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 0.0187915, No Iterations 2
smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 0.0186828, No Iterations 2
GAMG: Solving for p, Initial residual = 1, Final residual = 0.00799459, No Iterations 14
time step continuity errors : sum local = 8.85047e-07, global = 2.32762e-08, cumulative = 2.32762e-08
#0 Foam::error:rintStack(Foam::Ostream&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 ?? in "/lib/libc.so.6"
#3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#4 void Foam::divide<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libincompressibleRASModels.so"
#5 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam:perator/<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<doub le, Foam::fvPatchField, Foam::volMesh> > const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libincompressibleRASModels.so"
#6 Foam::incompressible::RASModels::kEpsilon::correct () in "/home/openfoam/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libincompressibleRASModels.so"
#7 main in "/home/openfoam/OpenFOAM/OpenFOAM-1.6.x/applications/bin/linux64GccDPOpt/simpleFoam"
#8 __libc_start_main in "/lib/libc.so.6"
#9 _start at /build/buildd/eglibc-2.10.1/csu/../sysdeps/x86_64/elf/start.S:116
Floating point exception
---------------------
and it remains also in the case i change the value for the other walls!!!
what could be the reason??

thanks for the fast reply

dino
dinonettis is offline   Reply With Quote

Old   February 25, 2010, 09:04
Default
  #4
Senior Member
 
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 17
florian_krause is on a distinguished road
Hi,

the error message tells you that you divide by zero somewhere, more specifically it is due to your setting at the rear_wing where you've set uniform 0

If you want a zero value there, just put a small non-zero value like 1e-10 to avoid division by zero there.

Best,
Florian
florian_krause is offline   Reply With Quote

Old   February 25, 2010, 09:49
Default
  #5
New Member
 
Join Date: Feb 2010
Posts: 24
Rep Power: 16
cboss is on a distinguished road
Hi,

do you use a solver for compressible flow?

I think I already had the same error. For compressible calculations using rhoSimpleFoam "kqRWallFunction" should be replaced by "compressible::kqRWallFunction". Same for omega, so I think also for epsilon in your case.

Just a guess.

Regards
cboss is offline   Reply With Quote

Old   February 25, 2010, 09:56
Default
  #6
Member
 
Leonardo Nettis
Join Date: Mar 2009
Posts: 72
Rep Power: 17
dinonettis is on a distinguished road
for Florian:
if I set a very small value 1e-10, I get again the previous error (that I wrote in my first message).

for cboss:
it's an incompressible solver, SimpleFoam.

I read in similar threads that the problem could be that the needed library is not loaded but comparing with another testcase that works I cannot see significative difference. If somebody wants to have a look I can upload the testcase on fileshare website.

thanks to all for your availability

dino
dinonettis is offline   Reply With Quote

Old   February 25, 2010, 10:18
Default
  #7
New Member
 
Join Date: Feb 2010
Posts: 24
Rep Power: 16
cboss is on a distinguished road
Perhaps just a spelling error. According to your post you use "kqRwallFunction". Should be "kqRWallFunction". This produces the same error on my system.

Regards
cboss is offline   Reply With Quote

Old   February 25, 2010, 10:48
Default
  #8
Member
 
Leonardo Nettis
Join Date: Mar 2009
Posts: 72
Rep Power: 17
dinonettis is on a distinguished road
thanks cboss, you're right!
that's exactly the kind of error I never realize!!
now it works great

thanks to all
dinonettis is offline   Reply With Quote

Old   April 22, 2010, 10:01
Default
  #9
New Member
 
beauty
Join Date: Feb 2010
Posts: 27
Blog Entries: 1
Rep Power: 16
beauty is on a distinguished road
I have the same problem when using twophaseEulerFoam,

gradientInternalCoeffs cannot be called for a genericFvPatchField (actual type epsilonWallFunction) on patch wall of field epsilon in file "/home/dft/OpenFOAM/dft-1.6/run/sg/0/epsilon" You are probably trying to solve for a field with a generic boundary condition.

please help me !
beauty is offline   Reply With Quote

Old   April 22, 2010, 10:16
Default
  #10
Member
 
Marine
Join Date: Mar 2010
Posts: 38
Rep Power: 16
marine is on a distinguished road
Can you post your epsilon field?
marine is offline   Reply With Quote

Old   April 22, 2010, 11:21
Default
  #11
New Member
 
beauty
Join Date: Feb 2010
Posts: 27
Blog Entries: 1
Rep Power: 16
beauty is on a distinguished road
Quote:
Originally Posted by marine View Post
Can you post your epsilon field?
my epsilon field is as follows:
dimensions [ 0 2 -3 0 0 0 0 ];

internalField uniform 0.05;

referenceLevel 0;

boundaryField
{
inlet
{
type fixedValue;
value uniform 0.05;
}

wall
{
type epsilonWallFunction;
value uniform 0.001;
}

outlet
{
type zeroGradient;
}

}
Is there any problem?

thanks
beauty is offline   Reply With Quote

Old   April 22, 2010, 11:33
Default
  #12
Member
 
Marine
Join Date: Mar 2010
Posts: 38
Rep Power: 16
marine is on a distinguished road
In my fields for epsilon I have the following for the wall :

wall
{

type epsilonWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.0067;

}

you have to specify the 3 constants,

hope this helps,

Marine
marine is offline   Reply With Quote

Old   April 22, 2010, 22:37
Default
  #13
New Member
 
beauty
Join Date: Feb 2010
Posts: 27
Blog Entries: 1
Rep Power: 16
beauty is on a distinguished road
I reset the epsilon file, but it does not work. When i use the simpleFoam to caculate single phase flow, the wallfunction goes well. But in the simulation of two phase fow applying the twophaseeulerfoam , it displays the error.
beauty is offline   Reply With Quote

Reply

Tags
kepsilon, openfoam, wallfunction


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
discrete model problem (water droplet evaporation) rabaeto1984 FLUENT 4 October 1, 2018 05:16
Viscous model problem with bubbles in multiphase Shin FLUENT 0 March 10, 2008 18:31
A mathematic model problem ztdep Main CFD Forum 0 May 8, 2007 03:12
Problem with Nonlinear k-epsilon model bylin FLUENT 4 November 23, 2003 22:45
Non premixed model - combustion validation problem David FLUENT 2 October 24, 2003 11:06


All times are GMT -4. The time now is 15:04.