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

negative temperature with twoPhaseEulerFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 22, 2021, 12:49
Default negative temperature with twoPhaseEulerFoam
  #1
New Member
 
Thibaut
Join Date: Nov 2020
Posts: 21
Rep Power: 5
Taendyr is on a distinguished road
Hi,



I'm trying to simulate a mix of gas and dust against a disc using twoPhaseEulerFoam. After some iterations, the solver stops without any error message, but we can see some negative temperature for the air:
Courant Number mean: 0.122993 max: 0.401974
Max Ur Courant Number = 0.0456224
Time = 0.195

PIMPLE: iteration 1
MULES: Solving for alpha.particles
MULES: Solving for alpha.particles
smoothSolver: Solving for alpha.particles, Initial residual = 1.22398e-08, Final residual = 2.15733e-15, No Iterations 1
alpha.particles volume fraction = 0.199907 Min(alpha.particles) = 0.00159117 Max(alpha.particles) = 0.992272
Constructing momentum equations
smoothSolver: Solving for e.particles, Initial residual = 0.0643472, Final residual = 2.2115e-12, No Iterations 3
smoothSolver: Solving for e.air, Initial residual = 0.252945, Final residual = 2.55661e-13, No Iterations 5
min T.particles 119.995
min T.air -18672.9
GAMG: Solving for p_rgh, Initial residual = 0.999183, Final residual = 3.63007e-18, No Iterations 1
GAMG: Solving for p_rgh, Initial residual = 1.40899e-18, Final residual = 1.40899e-18, No Iterations 0
PIMPLE: iteration 2
MULES: Solving for alpha.particles
MULES: Solving for alpha.particles
smoothSolver: Solving for alpha.particles, Initial residual = 1.07889e-08, Final residual = 2.02332e-15, No Iterations 1
alpha.particles volume fraction = 0.199984 Min(alpha.particles) = 0.00158145 Max(alpha.particles) = 0.996012
Constructing momentum equations.


I tried to change the pressure tolerance, to change deltaT,etc.. I always have this behaviour.


How can I fix it ? Imposing a limit to the temperature doens't work.



I joined the files case.
Attached Files
File Type: gz system.tar.gz (3.2 KB, 4 views)
File Type: gz 0.tar.gz (1.6 KB, 5 views)
File Type: gz constant.tar.gz (1.6 KB, 4 views)
Taendyr is offline   Reply With Quote

Old   March 23, 2021, 05:33
Default
  #2
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
There might be several reasons. You can start with first order schemes instead of vanLeer. Why do you use vanLeer btw? Do you have strong gradients? You should also check your pressure BCs, because I dont think "calculated" for all boundaries is physically correct.


Also you can implement the limitTemperature function in your solver. There are some instructions how to do that in this forum.
shock77 is offline   Reply With Quote

Old   March 23, 2021, 06:40
Default
  #3
New Member
 
Thibaut
Join Date: Nov 2020
Posts: 21
Rep Power: 5
Taendyr is on a distinguished road
Thanks, I am, indeed not really sure about the BCs.
Limiting the temperature doens't work.


I should have strong gradient indeed. It is supposed to have some shocks
Taendyr is offline   Reply With Quote

Old   March 23, 2021, 06:46
Default
  #4
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
Did you implement the limitTemperature functionality? Because it is not implemented in the standard version of the solver.


If you have shocks than using a limiter makes perfect sense.
shock77 is offline   Reply With Quote

Old   March 23, 2021, 09:31
Default
  #5
New Member
 
Thibaut
Join Date: Nov 2020
Posts: 21
Rep Power: 5
Taendyr is on a distinguished road
I was using this in fvOptions:
Code:
limitTemperature
{
    type    limitTemperature;
    active    true;
    limitTemperatureCoeffs
    {
        selectionMode all;
        phase air;
        min    10;
        max 200;
    }
}
I get a Temperature of 10 everywhere in the domain (except for the inlet which is ok) since the first iteration
Taendyr is offline   Reply With Quote

Old   March 24, 2021, 05:25
Default
  #6
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
10 K for air is really really low. The only gas I know that stays in its gaseos form is helium for 10 K. So air should be either liquid or solod depending on the pressure. You should definitly check your BCs.
shock77 is offline   Reply With Quote

Old   March 24, 2021, 06:44
Default
  #7
New Member
 
Thibaut
Join Date: Nov 2020
Posts: 21
Rep Power: 5
Taendyr is on a distinguished road
imposing 10 or 120 for the minimum gives me same behaviour actually. It is indeed not air for the gas, I just kept the name "air"
Taendyr is offline   Reply With Quote

Old   March 24, 2021, 06:47
Default
  #8
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
Did you implement the limitTemperature utility? As I said, its not implemented in the standard openfoam version. You can add whatever your want in fvOptions, if its not implemented, you wont see any impact.
shock77 is offline   Reply With Quote

Old   March 24, 2021, 07:07
Default
  #9
New Member
 
Thibaut
Join Date: Nov 2020
Posts: 21
Rep Power: 5
Taendyr is on a distinguished road
oh ok. I thought that waht I put in fvOptions was ok. So, no, I didn't
Taendyr is offline   Reply With Quote

Old   March 24, 2021, 07:12
Default
  #10
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
That's what I thought from start.


Here is how you do it: Sudden Increase of residuals
shock77 is offline   Reply With Quote

Old   March 24, 2021, 08:13
Default
  #11
New Member
 
Thibaut
Join Date: Nov 2020
Posts: 21
Rep Power: 5
Taendyr is on a distinguished road
Ok thank you, I'll do it.


But I don't understand this solution. The solver crashes, by imposing a boundary, it won't anymore but I don't understand how it can give me good results
Taendyr is offline   Reply With Quote

Old   March 24, 2021, 08:27
Default
  #12
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
I still think that your BCs are wrong. "Calculated" for all your boundaries doenst make sense for me. That way your pressure can rise or drecrese to infity or negative values. I have really good experiences with the totalPressure boundary condition. I dont know your case, but you should definitly check your BCs!
shock77 is offline   Reply With Quote

Old   March 24, 2021, 10:30
Default
  #13
New Member
 
Thibaut
Join Date: Nov 2020
Posts: 21
Rep Power: 5
Taendyr is on a distinguished road
Yes, I changed them to zeroGradient for the outlet and the walls and fixed it for the inlet, the behaviour remains the same



When I look at the temperature, I have some instabilities on the walls. I guess the crash emerges from there. I don't what's wrong for the pressure or the temperature for the walls' BC (zeroGradient for both). Can it come from somewhere else ?
Taendyr is offline   Reply With Quote

Old   March 24, 2021, 10:39
Default
  #14
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
zeroGradient for pressure and temperature at the walls is correct for adiabatic walls. I dont think thats the issue. If there are troubles at the walls, it could come from several reasons, e. g. bad mesh quality, or too big or too small cells (logarithmic law). What are your y+ values at the wall?


I usually use for the inlet totalPressure, totalTemperature and pressureInletOutletVelocity for U. For the outlet waveTransmissive for u and p and zeroGradient for T. I dont know how your mesh and how your geometry looks like. If you post some images of your u-fields and your mesh, I might be able to help you better.
shock77 is offline   Reply With Quote

Old   March 24, 2021, 11:27
Default
  #15
New Member
 
Thibaut
Join Date: Nov 2020
Posts: 21
Rep Power: 5
Taendyr is on a distinguished road
Thanks, I'm going to have a look on how work tho one you gave me.


here are some pics.


This is the only part of the domain where I have someting. Otherwise the variables kept their initial values.
These were taken with the BCs I used.
Attached Images
File Type: jpg mesh1.jpg (114.0 KB, 14 views)
File Type: jpg mesh2.jpg (136.4 KB, 14 views)
File Type: jpg p_rgh.jpg (18.3 KB, 12 views)
File Type: jpg temp.jpg (17.8 KB, 13 views)
File Type: jpg U.jpg (19.5 KB, 10 views)
Taendyr is offline   Reply With Quote

Old   March 24, 2021, 11:34
Default
  #16
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
The mesh looks ok acutally. I dont know what kind of application that is, but velocities of 4000 m/s are really difficult to reach. Do you expect such high velocities?


And check if the BCs I suggested are applicable for your application.
shock77 is offline   Reply With Quote

Old   March 24, 2021, 11:36
Default
  #17
New Member
 
Thibaut
Join Date: Nov 2020
Posts: 21
Rep Power: 5
Taendyr is on a distinguished road
Actually I need, in further simulation, go until 9km/s
Taendyr is offline   Reply With Quote

Reply


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
whats the cause of error? immortality OpenFOAM Running, Solving & CFD 13 March 24, 2021 08:15
[blockMesh] Errors during blockMesh meshing Madeleine P. Vincent OpenFOAM Meshing & Mesh Conversion 51 May 30, 2016 11:51
[blockMesh] non-orthogonal faces and incorrect orientation? nennbs OpenFOAM Meshing & Mesh Conversion 7 April 17, 2013 06:42
is internalField(U) equivalent to zeroGradient? immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 02:27
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 10:56


All times are GMT -4. The time now is 12:18.