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

Negative initial temperature

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree26Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 22, 2020, 09:37
Default
  #21
New Member
 
Join Date: Aug 2016
Posts: 3
Rep Power: 8
UebertreibeR is on a distinguished road
This error is caused when the solver tries to find T from h (or another energy variable). The task is to find T from known h when h = cp(T) * T and this is solved by a simple Newton-approach.


T is estimated and then re-calculated until convergence is reached. Bad estimates can lead to negative temperatures and cause the error. It's not always easy to find out why the estimated T is bad, but some possible reasons have been mentioned previously:
- bad mesh
- bad interpolation schemes
- bad thermophysical properties
kooki_13, hbulus, saidc. and 1 others like this.
UebertreibeR is offline   Reply With Quote

Old   July 24, 2020, 22:03
Unhappy the same problem in rhoCentralFoam and rhoPimpleFoam solvers.
  #22
New Member
 
Rebel Young
Join Date: Jul 2020
Posts: 2
Rep Power: 0
RebelYoung is on a distinguished road
It occurred in rhoC and rhoP solvers.
The temperature limiter in fvOption does not work, because I add the minMax functions in controlDict. The minimum temperature in the fields is not negative.

In my case , the error happened after about 30-100 time steps. So the negative initial temperature is in the sub-iteration.

I can not find a solution so far...
RebelYoung is offline   Reply With Quote

Old   July 24, 2020, 22:39
Default
  #23
New Member
 
Rebel Young
Join Date: Jul 2020
Posts: 2
Rep Power: 0
RebelYoung is on a distinguished road
Quote:
Originally Posted by UebertreibeR View Post
This error is caused when the solver tries to find T from h (or another energy variable). The task is to find T from known h when h = cp(T) * T and this is solved by a simple Newton-approach.


T is estimated and then re-calculated until convergence is reached. Bad estimates can lead to negative temperatures and cause the error. It's not always easy to find out why the estimated T is bad, but some possible reasons have been mentioned previously:
- bad mesh
- bad interpolation schemes
- bad thermophysical properties
Thank you for your suggestions.
As your advice, in rhoCentralFoam solver, it solves rho and rhoE for estimating the temperature, which has the equation "e=cv*T" . For the normalized gas , the Cv is constant.
So the negative initial temperature means the energy is negative?
RebelYoung is offline   Reply With Quote

Old   October 17, 2020, 02:23
Default
  #24
New Member
 
Niko_choko
Join Date: Sep 2020
Location: Jupiter
Posts: 2
Rep Power: 0
Niko_choko is on a distinguished road
Can confirm that changing mesh did work for me too.
Niko_choko is offline   Reply With Quote

Old   October 28, 2020, 15:21
Default
  #25
Member
 
Jonathan Wells
Join Date: Oct 2020
Location: Indiana
Posts: 44
Rep Power: 3
jdw135 is on a distinguished road
I am having the same issue, but I don't have a mesh problem. My entire domain is uniform spacing in a rectangular grid, so there is no change in mesh size, aspect ratio, or skewness. The solution runs fine with coarser grids, but my current grid is in no way over-refined, as edge length is 1 mm. I am doing LES in rhoPimpleFoam.
jdw135 is offline   Reply With Quote

Old   October 28, 2020, 19:11
Default
  #26
Member
 
Jonathan Wells
Join Date: Oct 2020
Location: Indiana
Posts: 44
Rep Power: 3
jdw135 is on a distinguished road
As a follow-up, I noticed that for my grid the max Courant number was approaching 1 when I would get the error. I reduced the dt and solved my issue.
jdw135 is offline   Reply With Quote

Old   November 19, 2020, 04:55
Default
  #27
Member
 
Bineet Mehra
Join Date: Aug 2013
Posts: 61
Rep Power: 11
bineet_aero is on a distinguished road
Quote:
Originally Posted by vs1 View Post
I get the same error when i set turbulence to laminar but with other turbulence models the error is gone.
opposite for me, no such error for laminar simulations but i get the error for turbulent ones !!
bineet_aero is offline   Reply With Quote

Old   February 4, 2021, 03:34
Post same problem in chtMultiRegionFoam
  #28
Member
 
Said CATALBAS
Join Date: Feb 2020
Location: Türkiye
Posts: 55
Rep Power: 4
saidc. is on a distinguished road
Hi,

I'm having same problem in LES, I tried with refined mesh but the result is the same again. Also when i added temperature limit in fvOption it stops iterrate after like 200 iterates. Maybe the problem is in my boundary conditions. I'm open any suggestion. Files attached.

Kind regards
Said.

checkMesh
Code:
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:           34125
    faces:            386106
    internal faces:   380986
    cells:            191773
    faces per cell:   4
    boundary patches: 3
    point zones:      0
    face zones:       0
    cell zones:       2

Overall number of cells of each type:
    hexahedra:     0
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    191773
    polyhedra:     0

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
    Patch               Faces    Points   Surface topology                  
    inlet               214      128      ok (non-closed singly connected)  
    outlet              242      142      ok (non-closed singly connected)  
    wall                4664     2372     ok (non-closed singly connected)  

Checking geometry...
    Overall domain bounding box (-0.025 -0.125 -0.025) (0.025 0.125 0.025)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (8.44415e-17 -7.50933e-17 5.0822e-18) OK.
    Max cell openness = 2.41502e-16 OK.
    Max aspect ratio = 5.2589 OK.
    Minimum face area = 1.47893e-07. Maximum face area = 3.61292e-05.  Face area magnitudes OK.
    Min volume = 2.65313e-11. Max volume = 6.60658e-08.  Total volume = 0.000625.  Cell volumes OK.
    Mesh non-orthogonality Max: 53.9367 average: 14.5269
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 0.518146 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

End
Attached Files
File Type: zip hotSpehe.zip (35.8 KB, 9 views)
File Type: zip log-With-T-Limit.zip (19.3 KB, 2 views)
File Type: txt logchtMultiRegionFoam.txt (179.4 KB, 4 views)
saidc. is offline   Reply With Quote

Old   February 7, 2022, 09:23
Default
  #29
New Member
 
Joao Coelho
Join Date: Jun 2021
Posts: 16
Rep Power: 3
jcoelho5 is on a distinguished road
Quote:
Originally Posted by bineet_aero View Post
opposite for me, no such error for laminar simulations but i get the error for turbulent ones !!
Same here. Did you solve it? Any tip?
jcoelho5 is offline   Reply With Quote

Old   February 19, 2022, 07:25
Default
  #30
New Member
 
ZhuangLi
Join Date: Jan 2022
Posts: 13
Rep Power: 2
zhuangli is on a distinguished road
Hi Tobias,
I got into trouble with the negative temperature, could you give me some advice to deal with it?
Thanks in advance!


_______
Kind regards!
Zhuangli
zhuangli is offline   Reply With Quote

Old   February 20, 2022, 12:32
Default
  #31
Member
 
Mahdi
Join Date: Jul 2012
Posts: 53
Rep Power: 12
Mahdi2010 is on a distinguished road
Quote:
Originally Posted by zhuangli View Post
Hi Tobias,
I got into trouble with the negative temperature, could you give me some advice to deal with it?
Thanks in advance!


_______
Kind regards!
Zhuangli
This functionObject may help to prevent negative T in compressible solvers:

fvOptions limitTemperature crashing in compressibleInterFoam
Mahdi2010 is offline   Reply With Quote

Old   February 20, 2022, 19:42
Default
  #32
New Member
 
ZhuangLi
Join Date: Jan 2022
Posts: 13
Rep Power: 2
zhuangli is on a distinguished road
Quote:
Originally Posted by Mahdi2010 View Post
This functionObject may help to prevent negative T in compressible solvers:

fvOptions limitTemperature crashing in compressibleInterFoam
Thank U Mahdi.
zhuangli is offline   Reply With Quote

Old   August 3, 2022, 05:12
Default How to trace back from 'negative initial temperature T0'
  #33
New Member
 
Join Date: May 2020
Posts: 27
Blog Entries: 1
Rep Power: 4
Mars409 is on a distinguished road
I ran buoyantSimpleFoam with Boussinesq as the EoS but it crashed at Time=3 for ‘negative initial temperature T0=-24’ error. fvOptions limitT solves it, but the resulting flow pattern is unphysical. I would like to trace back in the code to find out what causes T0 < 0 (T0 is given as a fixed number in the EquationOfState subdict in constant/thermophysicalProperties as one of the requisite parameters for the Boussinesq EoS.)



My question: How to trace back from the thermol.H at line 300 (grep -r 'Negative initial temperature T0' reports it as the only place where this text appears under src/) through the source codes?


thermol.H is at https://cpp.openfoam.org/v9/thermoI_8H_source.html




td p { orphans: 0; widows: 0; background: transparent }p { line-height: 115%; margin-bottom: 0.1in; background: transparent }
Mars409 is offline   Reply With Quote

Reply

Tags
chtmultiregionsimpefoam, temperature calculation

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Free surface issues with interDyMFoam for hydroturbine oumnion OpenFOAM Running, Solving & CFD 0 October 6, 2017 14:05
Extrusion with OpenFoam problem No. Iterations 0 Lord Kelvin OpenFOAM Running, Solving & CFD 8 March 28, 2016 11:08
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 01:52.