# Choice of boundary conditions

 Register Blogs Members List Search Today's Posts Mark Forums Read

 March 7, 2019, 12:46 Choice of boundary conditions #1 New Member   F Join Date: Feb 2019 Posts: 3 Rep Power: 6 Hello, I am currently working on my school project and Im having some trouble with boundary conditions. Simulation description: Im simulating water nozzle with exit to atmosphere. Before the nozzle itself there is piping with 100 m length and before it there is hydraulic pump (Im modeling only the nozzle). Length of nozzle is 0,4 m and there is a contraction of diameter from 42 mm to 12 mm. What I know is that at the inlet of the nozzle is pressure of 1 820 000 Pa (measured in real conditions). Flow rate is 0,044 m3/s (measured on the pump). And outlet should be to atmospheric conditions. I'm using turbulent model k-omega SST. Problem: I've set inlet BC as pressure inlet and set pressure to 1 820 000 Pa. However I'm facing a problem at the outlet, where I've set pressure outlet at first and set atmospheric pressure (101 325 Pa), but I was getting weird results in the domain where there were local velocity maximums in the middle of pipe. During solution there was a lot of inlet backflow too. Next I've set outlet BC as velocity inlet and calculated velocity from flow rate and set it as negative value (there is only velocity inlet, not velocity outlet), but I'm getting some strange pressure values where at the end of the nozzle the are pressure values like 1,2e-7 and so on. Backflow is occuring here too, but only for like first 25 iterations. I would like to ask you for some advice about this, if someone have an idea how to set this right. I'm getting really desperate about this . Thanks in advance for you advices

 March 7, 2019, 15:13 #2 Senior Member   Lucky Join Date: Apr 2011 Location: Orlando, FL USA Posts: 5,149 Rep Power: 61 The most robust set of boundary conditions is a pressure inlet and pressure outlet. If you have trouble with these, then start debugging. Check for mesh quality, etc. Backflow for only 25 iterations is nothing. If it goes away then it goes away. Crank for a long time, thousands of iterations and see if the solution is still wildly oscillating or has converged (even if it converges to the wrong result).

 March 8, 2019, 10:21 #3 New Member   F Join Date: Feb 2019 Posts: 3 Rep Power: 6 Hello and thanks for the answer. Simulations usually converge, it takes something like 200-300 iterations, but the result is obviously bad (attached picture). I'm really confused about this. This is little bit confusing, when I approached my teacher with this problem I'm currently facing and described my settings. He was sure that problem is in usage of pressure inlet along with pressure outlet, so I changed outlet BC to velocity inlet and set negative velocity there (to get velocity outlet). And now you post that pressure inlet and pressure outlet is most robust combination, so I'm little confused . So I'm little bit lost now. I crawled this forum for similar problems but I wasn't able to find something useful for problem of mine. Any suggestions? Thanks image link: https://ibb.co/V067dsX

 March 8, 2019, 10:33 #4 Senior Member     Daniele Join Date: Oct 2010 Location: Italy Posts: 1,016 Rep Power: 25 I agree with LuckyTran, I would go with pressure inlet/pressure outlet. If you have backflow at inlet and for stability purposes just add some length to the inlet pipe, such as 40-50 cm. If you have backflow at the outlet do the same for the outlet. The restriction causes turbulence, so backflow is possibile if your nozzle length you are simulating is relatively short (just print velocity vectors to see if backflow is due to turbulence). I simulated a lot of cases with venturi tubes and ejector, always with that type of boudaries. Make sure your boundary conditions (pressure values) are correct and look carefully at your setup to be sure you have no errors in input data. For convergence, let the residuls go down more than 10^-3; also check other convergence criteria, not only residuals. __________________ Google is your friend and the same for the search button!

 March 8, 2019, 14:13 #5 New Member   F Join Date: Feb 2019 Posts: 3 Rep Power: 6 Thank you very much!! I'm gonna give it a try and I'll wrote here how it figured out... I have one more question, since you mentioned proper definition of parameters at BCs. If I have exit to atmosphere at the end of the nozzle. Is it correct to set pressure on outlet boundary condition as atmospheric pressure? I'm wondering that at the exit of the nozzle there may be air with that pressure, but the pressure of the water would be different no? Or am I wrong? Maybe this is stupid question, but since I'm quite a newcomer to this topic and I'm still learning, I would rather know for sure. Thanks again I really appreciate your help!

 March 8, 2019, 15:13 #6 Senior Member     Daniele Join Date: Oct 2010 Location: Italy Posts: 1,016 Rep Power: 25 It is correct, you can calculate the pressure drop in the outlet pipe (the portion of the pipe you re not simulating) and you can add that value to the atmospheric pressure, but I think you will find that they are negligible. __________________ Google is your friend and the same for the search button!

 Tags backflow, boundary condition, pressureinlet