Supersonic flow with rhoCentralFoam
Hi everybody,
I'm trying to simulate a supersonic flow in a convergentdivergent nozzle with rhoCentralFoam. I have a problem with my inlet boundary conditions: I impose a totale pressure and use pressureInletVelocity for the velocity. The problem is that I would like to impose (0 0 0) as value of the pressureInletVelocity condition but when I do this, I get a "floating point exception". When I impose a nonzero value, it works but it doesn't give me the expected results. When I use sonicFoam with the same conditions, everything goes well. The aim of using rhoCentralFoam is to compare the two solvers, so I need some help. Thank you. 
Hello
I have the same problems with rhoCentralFoam and I also try to simulate the flow in a nozzle. But when I impose a different value for the velocity I have the same error (after more iterations). Do you find the problem robdeb? Regards 
Hi Valentin,
Yes, I get the same problem. I think the problem come from the fact I set a to big inlet pressure compare to my outlet pressure (inlet: 1100000, outlet : 101325) and the solver can't handle it. I try a setField to divide my domain and impose a pressure that decrease slowly to the outlet value but it didn't solve anything. If anybody has a solution, it would be great. Thank you. 
Quote:
and by the way, in my personal experience rhoCenralFoam is a little bit fragile in comparison with say rhoPimpleFoam 
Quote:
But when I set the velocity to a nonzero value, it makes more iterations, but I get the same error as vwibaut said it. 
Check the courant number, it's a matter of wave propagation, you may play with some stuff to hinder it but if you set the case in a manner that leads to it, it will be inevitable.

Quote:

this error means a variable is being out of range (divide by zero, or negative in sqrt, etc) and this usually happens when the physical modelling collapses. To see what is wrong set very small time steps so you may get many runs and have some written data before the core gets dump. Then view your flow and report what is getting out of order first?

What did you use as initial conditions for U? I would recommend to use values which are close to the final expected axial speed. Furthermore, you could try to steadily increase the total pressure at the inlet in order to avoid extreme pressure and velocity gradients within the first iterations.

1 Attachment(s)
Quote:
First, thanks for your reply. For U, I have inlet { type pressureInletVelocity; value uniform (0 0 0); } outlet { type zeroGradient; } I have used values wich are given by sonicFoam just before convergence and with that no more "floating point exception" error but there is another problem. The solver rhoCentralFoam doesn't give a (good) solution and never stabilize although the initial conditions are close to convergence. When I look at the solution at the different time step, I can see that the cells at the inlet have high pressure. And this pressure increases with time. I don't know if this is the cause of the no convergence. Attachment 18705 Other test I made, I use setFields to impose different pressure in the nozzle and decrease the pressure and velocity gradient for the first iterations. There is no more floating point exception but the solution is wrong!! I thtink I'll try to use a time varying condition. Thank you very much for your help for the floating point exception :) :) 
I also experienced unphysical pressure distributions at the inlet when using "pressureInletVelocity" for U at the inlet. Try "pressureInletOutletVelocity" instead. It improved my results.

Quote:
inlet { type pressureInletOutletVelocity; value uniform (0 0 0); } But this doesn't solve the problem 
When I replace the boundary condition for the velocity (pressureInletVelocity) by zeroGradient, I have the same problem. An idea??
For the other problem, I try with setFields but always the problem of wrong solution. Somebody has an idea about how to solve this problem? 
I see on other threads that there is problem with rhoCentralFoam when using totalPressure and/or totalTemperature. But why? I don't understand

Plz tell me the terms, static pressure, total pressure, static temperature and total temperature with respect to convergent divergent nozzle I m so worried plzz help me I will be thankful

Quote:

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