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

rhoSimpleFoam error while run with turbulence

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 28, 2022, 11:03
Default rhoSimpleFoam error while run with turbulence
  #1
Member
 
Nguyen Trong Hiep
Join Date: Aug 2018
Posts: 48
Rep Power: 7
hiep.nguyentrong is on a distinguished road
When i try to run rhoSimpleFoam or steadyCompressibleFoam (foam-extend-4.1) with turbulence models (kEpsilon or kOmegaSST), i get this error.
My case is transonic flow over NACA0012. It run fine with laminar or other version like OpenFOAM-v2112 or OpenFOAM-dev.

How can i solve this? Is it a bug?

Code:
Selecting RAS turbulence model kEpsilon

Program received signal SIGFPE, Arithmetic exception.
0x00007ffff721d84f in Foam::compressible::RASModels::mutkWallFunctionFvPatchScalarField::calcMut (this=0x555555dd1760) at derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.C:69
69	            Cmu25*y[faceI]*sqrt(k[faceCellI])/(muw[faceI]/rhow[faceI]);
hiep.nguyentrong is offline   Reply With Quote

Old   March 3, 2022, 04:47
Default
  #2
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
Seems like a division by zero -> rhok is probably zero some where
mAlletto is offline   Reply With Quote

Old   March 7, 2022, 03:24
Default
  #3
Member
 
Nguyen Trong Hiep
Join Date: Aug 2018
Posts: 48
Rep Power: 7
hiep.nguyentrong is on a distinguished road
Thank you for reply.
I tried to initiate all turbulence variable with difference value but still get floating point at start
hiep.nguyentrong is offline   Reply With Quote

Old   March 7, 2022, 04:27
Default
  #4
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
Usually one adds a small value to the denominator to avoid divisions by zero
mAlletto is offline   Reply With Quote

Old   March 8, 2022, 03:05
Default
  #5
Member
 
Nguyen Trong Hiep
Join Date: Aug 2018
Posts: 48
Rep Power: 7
hiep.nguyentrong is on a distinguished road
i tried add 0.1 value at wall and internalField, but still get the error. I did same with other field and nothing change

Code:
    "(WALL3|WALL4)"
    {
        type            mutkWallFunction;
        Cmu             0.09;
        kappa           0.41;
        E               9.8;
        value           uniform 0.1;
    }
hiep.nguyentrong is offline   Reply With Quote

Old   March 8, 2022, 03:46
Default
  #6
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
The small value like 1.0e-04 should go in the denominator in the source code
mAlletto is offline   Reply With Quote

Old   March 8, 2022, 03:59
Default
  #7
Member
 
Nguyen Trong Hiep
Join Date: Aug 2018
Posts: 48
Rep Power: 7
hiep.nguyentrong is on a distinguished road
Thank you but i did not solve the problem. Here is my 0 file:

alphat:
Code:
dimensions      [1 -1 -1 0 0 0 0];

internalField   uniform 1e-4;

boundaryField
{
    "(INLE1|PRES2)"
    {
        type            calculated;
        value           uniform 1e-4;
    }

    "(WALL3|WALL4)"
    {
        type            alphatWallFunction;
        value           uniform 1e-4;
    }

}
k:
Code:
boundaryField
{
    "(INLE1|PRES2)"
    {
        type            inletOutlet;
        inletValue      uniform $kInlet;
        value           uniform $kInlet;
    }

    "(WALL3|WALL4)"
    {
        type            kqRWallFunction;
        value           uniform $kInlet;
    }

    //#includeEtc "caseDicts/setConstraintTypes"
}
mut:
Code:
dimensions      [1 -1 -1 0 0 0 0];

internalField   uniform 1e-4;

boundaryField
{
    "(WALL3|WALL4)"
    {
        type            mutkWallFunction;
        Cmu             0.09;
        kappa           0.41;
        E               9.8;
        value           uniform 1e-4;
    }
    "(INLE1|PRES2)"
    {
        type            calculated;
        value           uniform 1e-4;
    }
    frontAndBackPlanes
    {
        type            empty;
    }
}
omega
Code:
//omegaInlet      10;
omegaInlet 		4000;

dimensions      [0 0 -1 0 0 0 0];

internalField   uniform $omegaInlet;

boundaryField
{
    "(INLE1|PRES2)"
    {
        type            inletOutlet;
        inletValue      uniform $omegaInlet;
        value           uniform $omegaInlet;
    }

    "(WALL3|WALL4)"
    {
        type            omegaWallFunction;
        value           uniform $omegaInlet;
    }

    //#includeEtc "caseDicts/setConstraintTypes"
}
hiep.nguyentrong is offline   Reply With Quote

Old   March 8, 2022, 04:23
Default
  #8
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
The keyword value is just a placeholder since the boundary conditions are derived from a fixedValue b.c. you have to modify the source code to avoid a floating point exception
mAlletto 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
Only two turbulence options available in CFX Pre Jack001 CFX 5 March 30, 2016 02:47
Strange Behavior of A Mesh Run at Two Dfferent Velocities Using Turbulence Model zachnap Main CFD Forum 0 May 11, 2011 15:22
How can run MRFSimpleFoam with KOmegaSST turbulence model waynezw0618 OpenFOAM Running, Solving & CFD 0 April 21, 2008 04:40
RhoSimpleFoam negative pressure gzink OpenFOAM Running, Solving & CFD 10 June 4, 2007 05:35
Turbulence boundary values lego Main CFD Forum 0 October 24, 2002 13:47


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