CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   problem with wallFunctions (kEpsilon model) (http://www.cfd-online.com/Forums/openfoam/73044-problem-wallfunctions-kepsilon-model.html)

dinonettis February 25, 2010 07:37

problem with wallFunctions (kEpsilon model)
 
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

wenterodt February 25, 2010 07:48

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

dinonettis February 25, 2010 08:10

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::printStack(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::operator/<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

florian_krause February 25, 2010 09:04

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

cboss February 25, 2010 09:49

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

dinonettis February 25, 2010 09:56

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

cboss February 25, 2010 10:18

Perhaps just a spelling error. According to your post you use "kqRwallFunction". Should be "kqRWallFunction". This produces the same error on my system.

Regards

dinonettis February 25, 2010 10:48

thanks cboss, you're right!
that's exactly the kind of error I never realize!!
now it works great

thanks to all

beauty April 22, 2010 10:01

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 !

marine April 22, 2010 10:16

Can you post your epsilon field?

beauty April 22, 2010 11:21

Quote:

Originally Posted by marine (Post 255886)
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

marine April 22, 2010 11:33

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

beauty April 22, 2010 22:37

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.


All times are GMT -4. The time now is 13:39.