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

Negative Initial Temperature in rhoCentralFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By dlahaye
  • 1 Post By Alczem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 23, 2023, 13:17
Default Negative Initial Temperature in rhoCentralFoam
  #1
New Member
 
Singh
Join Date: Jul 2023
Posts: 7
Rep Power: 2
MrSingh is on a distinguished road
Hello experts,

I have been running a 3D simulation on a hemispherical blunt body of length 1 m with a spike attached in front also of 1 m in rhoCentralFoam.
The free-stream conditions are:
U = 2339.26 m/s / Mach 6.82
P = 101325 Pa
T = 300 K
mu = 0.011965
rho_inf = 1.176407
Re no. = 0.23 * 10^6
Other thermal properties like Cv are of standard air.
Both the top wall and the bottom wall is supersonicFreestream.
I am also using k-epsilon turbulence model.

It is a fine structured mesh with a good quality. But when I try to run the simulation, it crashes with the error:

Code:
Mean and max Courant Numbers = 0.00171279 0.543028
Time = 1e-08

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal:  Solving for rhoUx, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal:  Solving for rhoUy, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal:  Solving for rhoUz, Initial residual = 0, Final residual = 0, No Iterations 0
smoothSolver:  Solving for Ux, Initial residual = 0.999999, Final residual = 9.9914e-06, No Iterations 613
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 9.90744e-06, No Iterations 114
smoothSolver:  Solving for Uz, Initial residual = 1, Final residual = 9.91186e-06, No Iterations 114
diagonal:  Solving for rhoE, Initial residual = 0, Final residual = 0, No Iterations 0
smoothSolver:  Solving for e, Initial residual = 6.68248e-05, Final residual = 9.6125e-06, No Iterations 1


--> FOAM FATAL ERROR: (openfoam-2212 patch=230110)
Negative initial temperature T0: -21.4718

    From Foam::scalar Foam::species::thermo<Thermo, Type>::T(Foam::scalar, Foam::scalar, Foam::scalar, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar, Foam::scalar) const, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar, Foam::scalar) const, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar) const) const [with Thermo = Foam::hConstThermo<Foam::perfectGas<Foam::specie> >; Type = Foam::sensibleInternalEnergy; Foam::scalar = double; Foam::species::thermo<Thermo, Type> = Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>]
    in file ./src/thermophysicalModels/specie/lnInclude/thermoI.H at line 57.

FOAM aborting
I tried changing the tolerances, scheme types, also added a fvOptions file with the code:
Code:
limitT
{
    type       limitTemperature;
    min        100;
    max        1000;
    selectionMode all;
}
but this also didn't work. It crashes on the first iteration. Also kept the deltaT quite low but that also didn't work. Please somebody tell me some solution for this.
fvSchemes:
Code:
fluxScheme          Kurganov;

ddtSchemes
{
    default         Euler;
}

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    default         none;

    div(phi,U)      Gauss limitedLinearV 1;

    div(phi,e)      Gauss limitedLinear 1;
    div(phid,p)     Gauss limitedLinear 1;
    div(phi,K)      Gauss limitedLinear 1;
    div(phiv,p)     Gauss limitedLinear 1;
    div(tauMC)      Gauss linear;

    turbulence      Gauss upwind;
    div(phi,k)      $turbulence;
    div(phi,epsilon) $turbulence;

    div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
    
    reconstruct(rho) vanLeer;
    reconstruct(U)  vanLeerV;
    reconstruct(T)  vanLeer;
}

snGradSchemes
{
    default         corrected;
}
fvSolution:
Code:
solvers
{
    "rho.*"
    {
        solver          diagonal;
    }

    "p.*"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-08;
        relTol          0;
    }

    "(U|e|R).*"
    {
        $p;
        tolerance       1e-05;
    }

    "(k|epsilon).*"
    {
        $p;
        tolerance       1e-08;
    }
}

PIMPLE
{
    nOuterCorrectors 2;
    nCorrectors      1;
    nNonOrthogonalCorrectors 0;
}
MrSingh is offline   Reply With Quote

Old   September 25, 2023, 03:08
Default
  #2
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 741
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
1/ First, test sanity of the case set-up by running using lower inlet mass flow rates.

2/ Second, try lower mass flow rates as initial guess for higher mass flow rate.

3/ Third, I imagine then negative temperatures can re-appear. Check whether using a limiter on temperature allows to run higher inflow rates. See https://www.openfoam.com/documentati...mitFields.html

4/ Fourth, get in touch in case difficulties persist.
hogsonik likes this.
dlahaye is offline   Reply With Quote

Old   September 25, 2023, 03:55
Default
  #3
Senior Member
 
Join Date: Dec 2021
Posts: 215
Rep Power: 5
Alczem is on a distinguished road
Quote:
2/ Second, try lower mass flow rates as initial guess for higher mass flow rate.

I would also try to ramp up the velocity over a few seconds at the beginning of the run, instead of going full throttle instantly
MrSingh likes this.
Alczem is offline   Reply With Quote

Old   September 28, 2023, 15:50
Default
  #4
New Member
 
Singh
Join Date: Jul 2023
Posts: 7
Rep Power: 2
MrSingh is on a distinguished road
Quote:
Originally Posted by dlahaye View Post
1/ First, test sanity of the case set-up by running using lower inlet mass flow rates.

2/ Second, try lower mass flow rates as initial guess for higher mass flow rate.

3/ Third, I imagine then negative temperatures can re-appear. Check whether using a limiter on temperature allows to run higher inflow rates. See https://www.openfoam.com/documentati...mitFields.html

4/ Fourth, get in touch in case difficulties persist.
Thank you for the suggestion.
MrSingh is offline   Reply With Quote

Old   February 10, 2024, 23:04
Default
  #5
chc
New Member
 
Join Date: Nov 2023
Posts: 12
Rep Power: 2
chc is on a distinguished road
Hi, I'm working with the kOmegaSST model and am getting a similar issue. I've tried ramping the velocity but I still wind up with the same problem, have you been able to find a fix?
chc 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
Maximum number of iterations exceeded chtmultiregionsimpleFoam Moncef OpenFOAM Running, Solving & CFD 28 July 13, 2020 14:26
Free surface issues with interDyMFoam for hydroturbine oumnion OpenFOAM Running, Solving & CFD 0 October 6, 2017 14:05
Cannot run the code properly: very large time step continuity error crst15 OpenFOAM Running, Solving & CFD 9 December 14, 2014 18:17
pimpleFoam: turbulence->correct(); is not executed when using residualControl hfs OpenFOAM Running, Solving & CFD 3 October 29, 2013 08:35
SLTS+rhoPisoFoam: what is rDeltaT??? nileshjrane OpenFOAM Running, Solving & CFD 4 February 25, 2013 04:13


All times are GMT -4. The time now is 05:37.