CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Supersonic flow with rhoCentralFoam (http://www.cfd-online.com/Forums/openfoam/112449-supersonic-flow-rhocentralfoam.html)

robdeb January 29, 2013 05:24

Supersonic flow with rhoCentralFoam
 
Hi everybody,

I'm trying to simulate a supersonic flow in a convergent-divergent 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 non-zero 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.

vwibaut January 29, 2013 12:28

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

robdeb January 31, 2013 05:20

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.

anishtain4 January 31, 2013 12:09

Quote:

Originally Posted by robdeb (Post 404740)
Hi everybody,

I'm trying to simulate a supersonic flow in a convergent-divergent 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 non-zero 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.

I believe rhoCentralFoam uses absolute pressure in the thermophysical model, so when you set it to zero it is just physically meaningless to it.

and by the way, in my personal experience rhoCenralFoam is a little bit fragile in comparison with say rhoPimpleFoam

robdeb January 31, 2013 12:23

Quote:

Originally Posted by anishtain4 (Post 405334)
I believe rhoCentralFoam uses absolute pressure in the thermophysical model, so when you set it to zero it is just physically meaningless to it.

and by the way, in my personal experience rhoCenralFoam is a little bit fragile in comparison with say rhoPimpleFoam

Thank you for your reply.
But when I set the velocity to a non-zero value, it makes more iterations, but I get the same error as vwibaut said it.

anishtain4 January 31, 2013 15:31

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.

vwibaut January 31, 2013 19:17

Quote:

Originally Posted by anishtain4 (Post 405373)
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.

The courant number seems to be good. Moreover we give an upper limit in the controldict file so it is not our problem.

anishtain4 February 1, 2013 05:23

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?

maHein February 1, 2013 15:47

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.

vwibaut February 2, 2013 06:33

1 Attachment(s)
Quote:

Originally Posted by maHein (Post 405551)
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.

Hi mahein,
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 :) :)

maHein February 3, 2013 08:32

I also experienced unphysical pressure distributions at the inlet when using "pressureInletVelocity" for U at the inlet. Try "pressureInletOutletVelocity" instead. It improved my results.

vwibaut February 4, 2013 09:58

Quote:

Originally Posted by maHein (Post 405746)
I also experienced unphysical pressure distributions at the inlet when using "pressureInletVelocity" for U at the inlet. Try "pressureInletOutletVelocity" instead. It improved my results.

I have tested "pressureInletOutletVelocity" :
inlet
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}

But this doesn't solve the problem

vwibaut February 6, 2013 05:30

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?

vwibaut February 11, 2013 06:43

I see on other threads that there is problem with rhoCentralFoam when using totalPressure and/or totalTemperature. But why? I don't understand

abdul Sami February 18, 2013 04:09

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

anishtain4 February 19, 2013 04:12

Quote:

Originally Posted by abdul Sami (Post 408388)
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

read a book like the one by anderson in gas dynamic


All times are GMT -4. The time now is 13:22.