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

Floating Point Exception for rhoCentralFoam at Mach 7

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 21, 2024, 15:50
Default Floating Point Exception for rhoCentralFoam at Mach 7
  #1
New Member
 
Join Date: Aug 2022
Location: Mexico
Posts: 16
Rep Power: 4
Leckie is on a distinguished road
I am simulating hypersonic flow in a variable geometry (I'm using the compressible forwardStep folder as a guideline). I'm able to run the simulation at Mach 4, but when increasing the velocity to Mach 5, 6 or 7 I get a floating point exception.

The mesh quality is good (I did the Mesh in Fluent and then exported it into OpenFoam) I aimed for the mesh to be as fine as possible with high orthogonality, low skewness and a high average quality.

But I just can't figure out why am I getting this error, does rhoCentralFoam have a maximum Mach Number? Is there any other option to simulate Mach 6 or 7? Should I lower my deltaT (currently set at 0.002 with endTime at 4)?
Here are my details:

Knowing that from the thermophysicialProperties *Note: these are the properties for a "normalised" inviscid gas for which the speed of sound is 1 m/s at a temperature of 1K and gamma = 7/5

And the values for U, T and P are as follows:

For U:
Code:
internalField   uniform (5 0 0);

boundaryField
{
    inlet
    {
        type            fixedValue;
        value           uniform (5 0 0);
    }

    outlet
    {
        type            inletOutlet;
        inletValue      uniform (5 0 0);
        value           uniform (5 0 0);
    }

    bottom
    {
        type            symmetryPlane;
    }

    top
    {
        type            symmetryPlane;
    }

    obstacle
    {
        type            slip;
    }

    defaultFaces
    {
        type            empty;
    }
}
for P:
Code:
internalField   uniform 1.197;

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

    outlet
    {
        type            zeroGradient;
    }

    bottom
    {
        type            symmetryPlane;
    }

    top
    {
        type            symmetryPlane;
    }

    obstacle
    {
        type            zeroGradient;
    }

    defaultFaces
    {
        type            empty;
    }
}
and for T:
Code:
internalField   uniform 0.22;

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

    outlet
    {
        type            inletOutlet;
        inletValue      uniform 0.22;
        value           uniform 0.22;
    }

    bottom
    {
        type            symmetryPlane;
    }

    top
    {
        type            symmetryPlane;
    }

    obstacle
    {
        type            zeroGradient;
    }

    defaultFaces
    {
        type            empty;
    }
}
Here's the controlDict:
Code:
application     rhoCentralFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         4;

deltaT          0.002;

writeControl    adjustable;

writeInterval   0.1;

purgeWrite      10;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

adjustTimeStep  yes;

maxCo           0.2;

maxDeltaT       1;
Thanks!
Leckie is offline   Reply With Quote

Old   February 22, 2024, 14:29
Default
  #2
New Member
 
Join Date: Aug 2022
Location: Mexico
Posts: 16
Rep Power: 4
Leckie is on a distinguished road
Anyone that could point me in the right direction?
Leckie is offline   Reply With Quote

Old   February 27, 2024, 19:23
Default
  #3
New Member
 
Join Date: Aug 2022
Location: Mexico
Posts: 16
Rep Power: 4
Leckie is on a distinguished road
Quick update:


I added viscosity in the thermophysicalProperties, and now the floating point error has gone and now it's a negative temperature issue, with led me to believe I'm dealing with a Meshing issue.


After several meshing iterations, I was able to run my geometry when I used the 'original' boundary conditions of:

  • Temperature = 1K
  • Pressure = 1Pa
But when I set my boundary conditions: T=220K and P=2500Pa and the results are not yielding any shockwaves... I tried also setting T=0.22 and P=2.5 and I'm still getting negative temperature errors.


Any idea on how could I set the BC I'm trying to work with?
Leckie is offline   Reply With Quote

Old   February 28, 2024, 02:23
Default try other solvers
  #4
New Member
 
chandrashekhar a patankar
Join Date: Mar 2023
Posts: 10
Rep Power: 3
chandrashekharapatankar is on a distinguished road
try to use a different solver like "sonicFoam" and check, it might be more appropriate
chandrashekharapatankar is offline   Reply With Quote

Old   February 28, 2024, 03:26
Default
  #5
New Member
 
Join Date: Aug 2022
Location: Mexico
Posts: 16
Rep Power: 4
Leckie is on a distinguished road
Quote:
Originally Posted by chandrashekharapatankar View Post
try to use a different solver like "sonicFoam" and check, it might be more appropriate

Thank you! Honestly I've been all over the place, and sonicFoam is not running for my geometry at Mach 7.


I tried doing a more coarse mesh and, it's been running (some good and some bad results) but I'm still trying to figure out how to input my initial conditions with the thermophysicalProperties set by rhoCentralFoam:



Any suggestion?


Code:
thermoType
{
    type            hePsiThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleInternalEnergy;
}

// Note: these are the properties for a "normalised" inviscid gas
//       for which the speed of sound is 1 m/s at a temperature of 1K
//       and gamma = 7/5
mixture
{
    specie
    {
        molWeight       11640.3;
    }
    thermodynamics
    {
        Cp              2.5;
        Hf              0;
    }
    transport
    {
        mu              0;
        Pr              0.7;
Leckie is offline   Reply With Quote

Old   February 29, 2024, 04:42
Default
  #6
New Member
 
Join Date: Nov 2017
Posts: 6
Rep Power: 9
chemak is on a distinguished road
Maybe you need to set the ground energy of the solver by adding Tref and Href values in thermodynamics section.

You can also take a look to another thread about negative temperature issue:
temperature negative occurred in rhoCentralFoam at high M
chemak is offline   Reply With Quote

Old   April 24, 2024, 13:33
Default
  #7
New Member
 
Join Date: Aug 2022
Location: Mexico
Posts: 16
Rep Power: 4
Leckie is on a distinguished road
Quote:
Originally Posted by chemak View Post
Maybe you need to set the ground energy of the solver by adding Tref and Href values in thermodynamics section.

You can also take a look to another thread about negative temperature issue:
temperature negative occurred in rhoCentralFoam at high M



Thank you! Sorry for the late reply! I made it run beautifully by lowering deltaT by A LOT... which makes sense when working with a LES simulation, a very fine Mesh and high velocities.


It's taking time to run though, but it's looking great!


Thank you!
Leckie 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
icoFoam floating point exception (8) leizhao512 OpenFOAM Running, Solving & CFD 7 November 1, 2018 12:43
A floating point exception has occurred: floating point exception [Overflow]. starlight STAR-CCM+ 4 May 4, 2016 10:08
A floating point exception - SEM Model yansheng STAR-CCM+ 1 April 4, 2016 05:57
Floating point exception from twoPhaseEulerFoam openfoammaofnepo OpenFOAM Running, Solving & CFD 1 March 19, 2016 14:56
Floating point exception (core dumped) for GAMG solver yuhou1989 OpenFOAM Running, Solving & CFD 2 March 24, 2015 20:28


All times are GMT -4. The time now is 14:34.