CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   K-eps Error (https://www.cfd-online.com/Forums/openfoam-solving/114184-k-eps-error.html)

Soheyl March 6, 2013 14:20

K-eps Error
 
When I'm trying to use the k-eps model with my MRFSimpleFOAM problem, I get the following error:

Quote:

Create time

Create mesh for time = 0

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting RAS turbulence model kEpsilon
bounding k, min: 0 max: 1 average: 1
bounding epsilon, min: 0 max: 20 average: 20
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/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 "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#5 at kEpsilon.C:0
#6 Foam::incompressible::RASModels::kEpsilon::kEpsilo n(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&, Foam::word const&, Foam::word const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#7 Foam::incompressible::RASModel::adddictionaryConst ructorToTable<Foam::incompressible::RASModels::kEp silon>::New(Foam::GeometricField<Foam::Vector<doub le>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&, Foam::word const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#8 Foam::incompressible::RASModel::New(Foam::Geometri cField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&, Foam::word const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#9
in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/MRFSimpleFoam"
#10 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#11
in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/MRFSimpleFoam"
Floating point exception (core dumped)
Any idea what is going on?

wyldckat March 6, 2013 17:37

Greetings Soheyl,

Quote:

Code:

bounding k, min: 0 max: 1 average: 1
bounding epsilon, min: 0 max: 20 average: 20
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigFpe::sigHandler(int) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"


About SIGFPE: http://en.wikipedia.org/wiki/SIGFPE#SIGFPE
In essence, it looks like you have incorrectly initialized the fields for "k" and "epsilon" with 0 values. Those two fields should be initiated with values larger than 0.

Best regards,
Bruno

Soheyl March 6, 2013 19:04

Thank you very much Bruno. This was my 0/k file:

Quote:

internalField uniform 1;

boundaryField
{
RotorWalls
{
type kqRWallFunction;
value uniform 0;
}

Walls
{
type kqRWallFunction;
value uniform 0;
}

Inlet
{
type fixedValue;
value uniform 0;

}

Outlet
{
type zeroGradient;
}
}
and this was my 0/epsilon:

Quote:

internalField uniform 20;

boundaryField
{
RotorWalls
{
type epsilonWallFunction;
value uniform 0;
}

Walls
{
type epsilonWallFunction;
value uniform 0;
}

Inlet
{
type fixedValue;
value uniform 0;

}

Outlet
{
type zeroGradient;
}
}
My understanding was that the "initial" internal values come from internalField lines, which are nonzero. My boundary values were zero though. By changing them to nonzero values the problem is solved.

I'm curious to know why this happens though.

wyldckat March 7, 2013 08:18

Quote:

Originally Posted by Soheyl (Post 412138)
I'm curious to know why this happens though.

All I can remember is that they cannot be zero. You can check the math behind the k-epsilon model: http://www.cfd-online.com/Wiki/K-epsilon_models ;)


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