|
[Sponsors] |
February 25, 2018, 14:49 |
Negative temperature T0 in sonicFoam OF 5.x
|
#1 |
Senior Member
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 9 |
I am trying to understand why this error exists in the first place. I am running sonicFoam in parallel. To initialise the case, for an inlet, knowing only pressure is practical so am trying to implement boundary conditions like pressureInletVelocity, pressureDirectedInletVelocity etc. however with no luck.
I am getting errors on account of negative temperature T0. I'm trying to find the source of this error but am stuck. I as hoping someone could help? I looked at some of the relevant threads (Negative temperature and pressure in sonicFoam :O , sonicFoam forwardstep negative temperature problem.) but changing pressure tolerance in fvSolution or changing the fvSchemes to cellLimited Gauss linear 1 and some variations of these do not seem to affect the outcome. According to one more thread, the temperature limits through fvOptions do not seem to affect sonicFoam (Tmax, Tmin), which anyway is sort of meddling with the energy equation which I don't really want to do. my inlet and outlet conditions are as below: U: Code:
inlet1 { type supersonicFreestream; pInf $pressure; TInf $temperature; UInf $speed; gamma 1.4; // Specific heat ratio value $internalField; } inlet2 //check this again, try variations { type pressureDirectedInletVelocity; //Trial:24 Feb 2018 phi phi; rho rho; inletDirection uniform (-1 0 0); value uniform (0 0 0); } Code:
inlet1 { type zeroGradient; } inlet2 { // type zeroGradient; //Original condition. fixedValue trial: 20Feb2018 type fixedValue; value uniform $pressurePorous; } Code:
[3] --> FOAM FATAL ERROR: [3] Negative initial temperature T0: -31.0648 [3] [3] 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::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>] [3] in file /home/ubuntu/OpenFOAM/OpenFOAM-5.x/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 54. [3] FOAM parallel run aborting [3] [3] #0 Foam::error::printStack(Foam::Ostream&) at ??:? [3] #1 Foam::error::abort() at ??:? [3] #2 Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>::TEs(double, double, double) const at ??:? [3] #3 Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate() at ??:? [3] #4 Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct() at ??:? [3] #5 ? at ??:? [3] #6 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" [3] #7 ? at ??:? |
|
February 26, 2018, 03:52 |
|
#2 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
I don't know your boundary and initial conditions of the temperature. But if you work close to 0 K, values below that may be calculated due to numerical effects. If that is the case you may considering to rise the problem to higher temperatures bu correcting the temperature dependant functions.
__________________
Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950) |
|
February 26, 2018, 07:32 |
|
#3 | |
Senior Member
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 9 |
Quote:
The temperature difference within the initialised domain is rather low: 180 - 300K. The difference is expected to grow high over the next time steps up to 1000K. |
||
February 26, 2018, 09:31 |
|
#4 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
180 K is not such close to 0 K and you should not have the effect.
I recommend starting first with a very simple geometry, but all of the physics. I have seen strange effects with temperature when more complicated geometries are used. Of course, I don't know your case en détail. If you need more help it would be useful to describe what do you try to calculate. Mey be there exists a slighly or even total different way.
__________________
Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950) |
|
February 27, 2018, 07:05 |
|
#5 | |
Senior Member
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 9 |
Quote:
By the way, when it comes to those BCs at inlet (pressureInletVelocity, pressureDirectedInletVelocity,...) what does the value parameter mean? The respective .h definitions clearly indicate a scaler (e.g. uniform 0) and that's logical since we do know pressure at the inlet and that's what we need to supply. But I get error demanding that to be a vector! I figured out after a couple of simulations that it actually is velocity. I'm confused! |
||
August 15, 2018, 18:45 |
|
#6 |
Member
Join Date: Oct 2015
Posts: 63
Rep Power: 11 |
Hi Deep!
I'm facing a similar problem as well where my temperature becomes negative. Have you managed to find a work around for this issue? Best, Scram_1 |
|
August 17, 2018, 03:22 |
|
#7 |
New Member
Srikar Reddy Palla
Join Date: May 2018
Posts: 19
Rep Power: 8 |
Try changing b.conditions as some fixed pressure and zetoGradient for velocity at inlet and please inform back.
|
|
August 18, 2018, 14:57 |
|
#8 |
Member
Join Date: Oct 2015
Posts: 63
Rep Power: 11 |
Tried changing the BCs but still doesn't work. I also tried a couple of other things. I noticed that the simulation works if the equationOfState in the thermophysical properties is set to perfectGas instead of incompressiblePerfectGas. I want my bulk fluid to behave like an incompressible gas. The negative temperature occurs with incompressiblePerfectGas when delta t is 1e-8. With delta t = 1e-6, the simulation does not crash. However, I need delta t to be 1e-8 to capture the physics involved. I don't know if perfectGas as thermo will give me the right result though. Also, when the size of the particle is reduced to the order of nanometers (1e-9), the particles tend to flash i.e. the mass change equals the mass introduced. This doesn't happen with micron sized particles. Does anyone have any idea about this?
Best, Scram_1 |
|
August 20, 2018, 10:40 |
|
#9 | |
Senior Member
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 9 |
Quote:
No I did not find a reason for that behaviour. However, I got around it by doing this in fvOptions: Code:
temperatureLimit { type limitTemperature; active true; limitTemperatureCoeffs { selectionMode all; min 150; max 6000; } } |
||
Tags |
negative temperature, pressureinletvelocity, sonicfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CompressibleInterFoam crashing with negative temperature values | rzahoor | OpenFOAM Running, Solving & CFD | 9 | November 4, 2017 15:19 |
[blockMesh] blockMesh error - Negative Volume Block | adoledin | OpenFOAM Meshing & Mesh Conversion | 2 | June 22, 2016 11:44 |
Ansys CFX problem: unexpected very high temperatures in premix laminar combustion | faizan_habib7 | CFX | 4 | February 1, 2016 18:00 |
Unexpected large decrease in Total temperature across the shock using sonicFoam | JLight | OpenFOAM | 0 | December 16, 2010 12:46 |
Negative temperature | Julie | Siemens | 7 | September 13, 2004 09:39 |