Negative initial temperature
1 Attachment(s)
Hello,
i'm trying to simulate the heating of a cube with a channel full of hot oil through it with the chtMultiRegionSimpleFoam-solver. But whenever the initialfield temperature of the oil differs from the temperature of my inlet, openfoam aborts after a few time steps with the explanation, that the inital temperature is negative. The error message says something about an error in thermophysicalProperties.H line 54. Does anybody know a solution, please? I attach the T, fvSolution and fvsheme files of the fluid. |
Do you have radiation in your case?
Quote:
|
I have the file, but the radiation is turned off.
|
Quote:
|
1 Attachment(s)
The geometry is quite simple. A cube with a hole and a cylinder inside the hole. The cube is declared as solid and the cylinder as fluid.
|
Maybe it is helpful, if i post the complete error message:
Time = 417 Solving for fluid region FLUIDROHR DILUPBiCG: Solving for h, Initial residual = 0.0006912361, Final residual = 2.371398e-11, No Iterations 1 Min/max T:-0.6823983 433 GAMG: Solving for p_rgh, Initial residual = 0.7395947, Final residual = 0.3443955, No Iterations 10 time step continuity errors : sum local = 1.071075e-13, global = 4.308673e-16, cumulative = -1.476626e-14 Min/max rho:2 2 Solving for solid region SOLIDWURFEL DICPCG: Solving for h, Initial residual = 0.009793508, Final residual = 0.0001714627, No Iterations 3 DICPCG: Solving for h, Initial residual = 0.01000549, Final residual = 0.000171063, No Iterations 3 DICPCG: Solving for h, Initial residual = 0.009274253, Final residual = 0.0001471489, No Iterations 3 DICPCG: Solving for h, Initial residual = 0.009199457, Final residual = 0.0001446249, No Iterations 3 Min/max T:316.1508 318.3617 ExecutionTime = 88.38 s ClockTime = 92 s Time = 418 Solving for fluid region FLUIDROHR DILUPBiCG: Solving for h, Initial residual = 0.0006895797, Final residual = 2.367034e-11, No Iterations 1 --> FOAM FATAL ERROR: Negative initial temperature T0: -0.6823983 From function 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::rhoConst<Foam::specie> >; Type = Foam::sensibleEnthalpy; Foam::scalar = double; Foam::species::thermo<Thermo, Type> = Foam::species::thermo<Foam::hConstThermo<Foam::rho Const<Foam::specie> >, Foam::sensibleEnthalpy>] in file /home/pawan/OpenFOAM/OpenFOAM-v1712/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 54. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::error::abort() at ??:? #2 Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::constTransport<Foam::speci es::thermo<Foam::hConstThermo<Foam::rhoConst<Foam: :specie> >, Foam::sensibleEnthalpy> > > >::calculate(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, bool) at ??:? #3 Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::constTransport<Foam::speci es::thermo<Foam::hConstThermo<Foam::rhoConst<Foam: :specie> >, Foam::sensibleEnthalpy> > > >::correct() at ??:? #4 ? at ??:? #5 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #6 ? at ??:? Abgebrochen (Speicherabzug geschrieben) FLUIDROHR is the oil-cylinder and SOLIDWURFEL is the cube. The respective line says this: scalar Ttol = T0*tol_; |
can you use min/Max functionobject to identify where is the negative temperature?
|
Sorry, i am not very experienced, how do i do that?
Via trial and error, I also found out, that i can postpone the error by decreasing the relaxationFactors for h. But then i don't have any heat transfer between inlet and oil(not sure if that is always the case, or only with the small relaxation factor) |
Anybody? Please, i need this for my thesis and i'm running out of time.
|
I'm not familiar with that solver but maybe you could make use of a fvOptions file with the limitTemperature function in it? Here's an example,
limitTemperature { type limitTemperature; active true; limitTemperatureCoeffs { selectionMode all; Tmin 200; Tmax 400; } } |
I get the same error when i set turbulence to laminar but with other turbulence models the error is gone.
|
I am not familiar with that solver but I think that you should check how it calculates the temperature. Then you will better understand who's the culprit.
Have you tried to reduce the time step or the cell size? |
Hi all,
just a few comments on your situations Quote:
Quote:
Quote:
|
The Same Problem
2 Attachment(s)
Dear Tobias and everyone else!
Thank you for your nice comments. I have the same problem. I am trying to simulate an air pocket traveling upstream in a pipe and eventually escaping from a ventilation hole at the top of the the tower (image attached). I use compressibleInterFoam solver, but the temperature drops below zero and the simulation stops. As you mentioned, I am not sure about the boundary conditions, but I am sure BCs are set wrong. The "limitTemperature" function does not work. I have attached an image of the apparatus and a file that contains all BCs from 0 folder. Can you please have a look and let me know what is wrong with them. Thank you all in advance! Jalil |
Hello everyone,
I'm trying to simulate something very similar to Jalil and having the same problem. The limitTemperature function approach also did not work for me. Does anybody have any other solution? Thanks! |
Hi,
For me, the limit Temperature function is working fine always. Is it initialized at the start of the application? |
Quote:
Hello everyone I also have a problem with 'limitTemperature', but it is only when I try to run this in parallel. In that case, it seems to ignore the fvOptions (it errors at the same time with the same negative value for the temperature as when fvOptions was not present) even though it is certainly read. Does anyone have experience with limitTemperature in parallel run? Thanks in advance. Best regards Arne |
Based on my experience, the problem "Negative Initial Temperature" usually existed with the mesh. If there are some bad cells in the mesh or the cells are too different from each other in a region i.e the cells are refined in some regions and are very course in some other regions, then the model crashes.
I tried changing the mesh multiple times and it finally worked. |
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. |
Quote:
Same here. Running a mesh convergence study on a buoyantSimpleFoam case and it ran just fine (ie boundary conditions are OK) until a bad quality iteration of the mesh made it crash with negative temperature. In many cases just running checkMesh will give you a good idea of how your simulation is likely to behave. |
All times are GMT -4. The time now is 06:13. |