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 Community New Posts Updated Threads Search

Like Tree45Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 22, 2020, 10:37
Default
  #21
New Member
 
Join Date: Aug 2016
Posts: 3
Rep Power: 10
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, hogsonik, hbulus and 2 others like this.
UebertreibeR is offline   Reply With Quote

Old   July 24, 2020, 23: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, 23: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, 03: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, 16:21
Default
  #25
Member
 
Jonathan Wells
Join Date: Oct 2020
Location: Indiana
Posts: 44
Rep Power: 6
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, 20:11
Default
  #26
Member
 
Jonathan Wells
Join Date: Oct 2020
Location: Indiana
Posts: 44
Rep Power: 6
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, 05:55
Default
  #27
Member
 
Bineet Mehra
Join Date: Aug 2013
Posts: 61
Rep Power: 13
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, 04:34
Post same problem in chtMultiRegionFoam
  #28
Member
 
cal
Join Date: Feb 2020
Location: nowhere
Posts: 65
Rep Power: 6
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, 15 views)
File Type: zip log-With-T-Limit.zip (19.3 KB, 3 views)
File Type: txt logchtMultiRegionFoam.txt (179.4 KB, 5 views)
saidc. is offline   Reply With Quote

Old   February 7, 2022, 10:23
Default
  #29
New Member
 
Joao Coelho
Join Date: Jun 2021
Posts: 23
Rep Power: 5
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, 08:25
Default
  #30
New Member
 
ZhuangLi
Join Date: Jan 2022
Posts: 13
Rep Power: 4
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, 13:32
Default
  #31
Member
 
Mahdi
Join Date: Jul 2012
Posts: 53
Rep Power: 14
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, 20:42
Default
  #32
New Member
 
ZhuangLi
Join Date: Jan 2022
Posts: 13
Rep Power: 4
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, 06:12
Default How to trace back from 'negative initial temperature T0'
  #33
Member
 
Join Date: May 2020
Posts: 31
Blog Entries: 1
Rep Power: 6
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

Old   November 5, 2022, 11:49
Default
  #34
New Member
 
Erdem
Join Date: May 2022
Posts: 1
Rep Power: 0
ERKSMAFA is on a distinguished road
Quote:
Originally Posted by saiguruprasad View Post
I was having the same problem and changing the mesh got rid of the problem.

Make sure that there is no sudden change in mesh spacings.
I had the same issue even though I created a quality mesh. After seeing this message I replaced my mesh file with one with better orthagonal quality. My problem was solved with the new mesh file.

Thanks for your help.
hogsonik likes this.
ERKSMAFA is offline   Reply With Quote

Old   Today, 09:48
Default
  #35
New Member
 
Suhan Umur Okuducu
Join Date: Oct 2024
Posts: 8
Rep Power: 2
suoCFD is on a distinguished road
Quote:
Originally Posted by ERKSMAFA View Post
I tried changing the mesh multiple times and it finally worked.
Sorry for my bad English.

I deal with an analysis using foamMultiRun. fluid solvers for fluid regions, solid solvers for solid regions. I had the same issue for fluid region (Negative initial value).

Firstly, I removed the radiation model which was added to the fluid from another tutorial case. Secondly, I adjusted p_rgh conditions accurately. Now, there is no error as negative initial value.
I will try to add radiation model in the future but how I dont know.
suoCFD is offline   Reply With Quote

Reply

Tags
chtmultiregionsimpefoam, temperature calculation


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 15:05
Extrusion with OpenFoam problem No. Iterations 0 Lord Kelvin OpenFOAM Running, Solving & CFD 8 March 28, 2016 12:08
Cannot run the code properly: very large time step continuity error crst15 OpenFOAM Running, Solving & CFD 9 December 14, 2014 19:17
pimpleFoam: turbulence->correct(); is not executed when using residualControl hfs OpenFOAM Running, Solving & CFD 3 October 29, 2013 09:35
SLTS+rhoPisoFoam: what is rDeltaT??? nileshjrane OpenFOAM Running, Solving & CFD 4 February 25, 2013 05:13


All times are GMT -4. The time now is 10:27.