Negative temperature T0 in sonicFoam OF 5.x
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 (https://www.cfd-online.com/Forums/op...nicfoam-o.html , https://www.cfd-online.com/Forums/op...e-problem.html) 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 Code:
inlet1 Code:
[3] --> FOAM FATAL ERROR: |
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.
|
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. |
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. |
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! |
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 |
Try changing b.conditions as some fixed pressure and zetoGradient for velocity at inlet and please inform back.
|
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 |
Quote:
No I did not find a reason for that behaviour. However, I got around it by doing this in fvOptions: Code:
temperatureLimit |
All times are GMT -4. The time now is 10:34. |