- **OpenFOAM Running, Solving & CFD**
(*http://www.cfd-online.com/Forums/openfoam-solving/*)

- - **Laval Nozzle sonicFoam inlet and outlet bc**
(*http://www.cfd-online.com/Forums/openfoam-solving/77289-laval-nozzle-sonicfoam-inlet-outlet-bc.html*)

Laval Nozzle sonicFoam inlet and outlet bcI've been trying to run a Laval nozzle in OpenFOAM with bc settings displayed below. The nozzle is designed such that an incoming subsonic flow of inlet conditions (indexed with "1") is being accelerated to M2=1.3 (exit Mach number) without experiencing any shocks in the diverging part.
T1=420 K p1=1,0976 Pa (static pressure) u1=246.4 m/s kappa=1.4 (isentropic coefficient of air) M1=0.6 (Mach number) Unfortunately the inlet velocity is decreasing after a few time steps with sonicFoam, so I cannot guarantee the imposed Mach number of 0.6 at the entry. Velocity quickly falls down to Mach 0.4 where it keeps its level. Apart from that the solution looks quite well, with the flow being choked at the smallest area. Can someone please have a quick look at my bc settings, so I can solve this issue? I am new to OpenFOAM, and this issue imposes quite a challenge. I've shortened the following bc's down to just inlet and outlet patches (in case someone wonders where the walls have gone to): Pressure:internalField uniform 109000; boundaryField outlet { type waveTransmissive; field p; phi phi; rho rho; psi psi; gamma 1.4; fieldInf 100.0; lInf 1; value uniform 10000; } inlet { type totalPressure; p0 uniform 140000; <- Is that the total pressure? U U; phi phi; rho none; psi none; gamma 1.4; value uniform 109760; <- Is this static pressure? } } Temperature:internalField uniform 400; boundaryField { inlet { type fixedValue; value uniform 419.776; } outlet { type zeroGradient; } } Velocity:internalField uniform (246.4138 0 0); boundaryField { inlet { type pressureInletOutletVelocity; phi phi; value uniform (246.4138 0 0); } outlet { type zeroGradient; } } Thank you very much, Bernie |

One thought; the waveTransmissive boundary condition on the outlet overspecifies the case. The imposed pressure will have the effect of reducing the outlet Mach number.
If the flow is genuinely supersonic then the pressure should be extrapolated at the outlet. This can be achieved by setting the outlet pressure BC to zeroGradient. Paul. |

Thank you Paul! I will try it out and post my results.
Bernie |

Now that I've changed the pressure outlet bc from waveTransmissive to zeroGradient, the flow doesn't choke any more. Since it's also not reaching the desired Mach number of 0.6 at the inlet, I probably have to change my inlet conditions as well. Shortly after starting the calculation the converging part of the nozzle seems to slow down the upstream flow from Mach 0.6 to 0.4. Do you have an idea how I can keep the initial flow field at the inlet constant? FYI:The inlet section of my flow field is of the same cross section area as the inlet of the nozzle.
Thank you for helping me out, Bernie |

You mentioned above that static pressure and velocity are known at the inlet, so you can use these values directly. There is no need to use the totalPressure BC; instead use fixedValue;
inlet { type fixedValue; value uniform 10976; } Also, for velocity; inlet { type fixedValue; value uniform (246.4 0 0); } This will fix the inlet Mach number. The downstream conditions will then be determined by the geometry of the nozzle. Paul. |

Thanks again, Paul! Changing the inlet bcs to fixedValue and keeping the outlet bcs zeroGradient results in the following:
Right after starting the calculation Mach Number is reached in the smallest area. Unfortunately also the velocity in the very inlet part increases infinitely. Obviously the kinetic energy of the incoming fluid doesn't get transferred downstream into the Laval nozzle (with settings as described above). Instead also pressure builds up heavily in that very first inlet region (only there!). Do you know why? __________________________________________________ ____________________ (I'll be out of office for the next ten days, so I won't be able to reply to new posts right away) |

Two ideas:
i) check the maximum Courant number for the flow. This should be no higher than approx. 0.5 but may need to be as low as 0.05 in the early stages of the calculation. Adjust deltaT if necessary. ii) swap solvers; rhoCentralFoam is good for high velocity flows. The Ladenburg60psi tutorial is a good place to start. Paul. |

Dear Paul ,
I ve been using rhoCentralFoam for quite a long time and am quite satisfied with it . I am trying to simulate a free underexpnaded jet like the one in Ladenberg test case. The only difference is that my domain includes both nozzle geomentry and the expansion chamber [ as opposed to the Ladenberg case which only includes the latter] . So now case I am having trouble with inlet boundary conditions to represent the subsonic reservoir conditions . The inlet is maintained at atmospheric conditions , while outlet is 2500 Pa. According to Anderson's CFD text for subsonic inlet s P and T is to be specified and U is allowed to float. If I specify internalField = outlet Pressure my solution crashes. The code runs stable for an internalField value > 15000 Pa only . But the solution is not accurate . Could you suggest me the ideal set of BC's and internalField to represent conditions adequately . Ill post p , T U files here. P Code:
`internalField uniform 15000;` Code:
`internalField uniform 298;` Code:
`internalField uniform (5 0 0);` |

Dear Statesman,
The boundary conditions are reasonable, although I don't recognise the nonReflective boundary type (which version of OF are you using?). One minor point is that the type 'zeroGradient' does not require a value, so for U the 'value uniform (5 0 0)' line should be deleted. However, there could be problems with the extreme operating condition. Certainly there will be very rapid transients inside the nozzle if the initial internal pressure is set to the very low external pressure. To capture this start-up period would require very small time steps, perhaps a max. Courant number in the region of 0.02. One idea that would help is to set the initial pressure inside the nozzle to equal the inlet pressure. The internal flow would then remain subsonic during the start-up period. Also, check the Knudsen number for this flow (should be << 1). Very rapid flows at very low pressures approach the limit of the continuum hypothesis (on which CFD is based). It may be that the flow is 'rarified' and the conservation laws are not applicable. Paul. |

Paul ,
Thank you very much for your reply , Sorry for replying a little late . Your post has been very helpful . I am running cases by lowering the Courant Number to ensure stability. Another tool that I m trying is to initializing the solution by the internal field obtained by a stable steady state solution of a lower pressure ratio . nonReflective BC are almost the same as waveTransmissive. Both are based on a paper by Poinsot , Lele. Its interesting that you would mention the Knudsen number for the gas, as in the future ill be studying flow of Micron-sized particles in rarefied gas; the flow of whom lies in the raredied regime . I did run cases for such a low pressure in a domain representing only the expansion chamber i.e. sans the nozzle. That solution did converge successfully. So maybe its the nozzle geometry that complicates things. However I shall update you with my experience . |

All times are GMT -4. The time now is 01:11. |