# Problem with jet flow

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

 May 2, 2006, 12:03 Hi, we try to calculate a j #1 Senior Member   Fabian Braennstroem Join Date: Mar 2009 Posts: 407 Rep Power: 12 Sponsored Links Hi, we try to calculate a jet flow in a room using simpleFoam. Inlet velocity is set to 2.6m/s; for the outlet pressureoutlet is used (p=0) and 'wallFunctions' for the surrounding walls. Unfortunately we have strange 'singularity problems' and somehow no 'visible' time steps from 3 to 44 in the log as shown below: Starting time loop Time = 1 BICCG: Solving for Ux, Initial residual = 1.99239e-05, Final residual = 8.52279e-08, No Iterations 1 BICCG: Solving for Uy, Initial residual = 0.000382404, Final residual = 1.11723e-06, No Iterations 1 BICCG: Solving for Uz, Initial residual = 0.00130972, Final residual = 3.30692e-06, No Iterations 1 ICCG: Solving for p, Initial residual = 1, Final residual = 0.00981217, No Iterations 76 time step continuity errors : sum local = 4.51616e-06, global = -2.50011e-07, cumulative = -2.50011e-07 BICCG: Solving for epsilon, Initial residual = 0.0527458, Final residual = 8.61077e-06, No Iterations 1 BICCG: Solving for k, Initial residual = 1, Final residual = 0.00244073, No Iterations 1 ExecutionTime = 65.93 s ClockTime = 66 s Time = 2 BICCG: Solving for Ux, Initial residual = 1.62207e-05, Final residual = 4.69139e-08, No Iterations 1 BICCG: Solving for Uy, Initial residual = 0.000286247, Final residual = 9.1854e-07, No Iterations 1 BICCG: Solving for Uz, Initial residual = 0.00106412, Final residual = 3.19452e-06, No Iterations 1 lution singularity BICCG: Solving for Uy: solution singularity BICCG: Solving for Uz: solution singularity ICCG: Solving for p: solution singularity time step continuity errors : sum local = nan, global = nan, cumulative = nan BICCG: Solving for epsilon: solution singularity BICCG: Solving for k: solution singularity ExecutionTime = 6989.99 s ClockTime = 7395 s Time = 45 BICCG: Solving for Ux: solution singularity BICCG: Solving for Uy: solution singularity BICCG: Solving for Uz: solution singularity ICCG: Solving for p: solution singularity time step continuity errors : sum local = nan, global = nan, cumulative = nan BICCG: Solving for epsilon: solution singularity BICCG: Solving for k: solution singularity ExecutionTime = 7307.35 s ClockTime = 7714 s We used a one time step potential flow solution as initial conditions and reduced the relaxation factors to p=0.0001 and the rest to 0.2. Do you have any suggestions what we can do? Greetings! Fabian

 May 2, 2006, 14:27 No idea. My suggestion: Ha #2 Assistant Moderator   Bernhard Gschaider Join Date: Mar 2009 Posts: 4,008 Rep Power: 43 No idea. My suggestion: Have you written the solution after the first time-step? Usually looking at that gives a good hint (crazy velocities etc). And try it without turbulence (can't think of anything els you can switch off, to isolate the problem) The time warp looks real interesting. __________________ Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request

 May 3, 2006, 03:52 Hi, over night some strange #3 Senior Member   Fabian Braennstroem Join Date: Mar 2009 Posts: 407 Rep Power: 12 Hi, over night some strange things happened: the simpleFoam case runs without any solution singularity at time step 800, but as mentioned above we have such a time warp again, but now at two different time steps. One at: Time = 25 BICCG: Solving for Ux, Initial residual = 1.02744e-05, Final residual = 2.61834e-08, No Iterations 1 BICCG: Solving for Uy, Initial residual = 0.000112404, Final residual = 3.61779e-07, No Iterations 1 BICCG: Solving for Uz, Initial residual = 0.000370707, Final residual = 1.23968e-06, No Iterations 1 ICCG: Solving for p, Initial residual = 0.991788, Final residual = 0.00943836, No Iterations 263 time step continuity errors : sum local = 1.61653e-05, global = 8.07791e-08, cumulative = -3.11282e-06 BICCG: Solving for epsilon, Initial residual = 0.000213944, Final residual = 1.55127e-07, No Iterations 1 BICCG: Solving for k, Initial residual = 0.00118659, Final residual = 3.08639e-06, No Iterations 1 ExecutionTime = 1800.61 s ClockTime = 1805 s Time = 26 BICCG: Solving for Ux, Initial residual = 1.0157e-05, Final residual = 2.60278e-08, No Iterations 1 BICCG: Solving for Uy, Initial residual = 0.000110948, Final residual = 3.56346e-07, No Iterations 1 BICCG: Solving for Uz, Initial residual = 0.000366185, Final residual = 1.21793e-06, No Iterations 1 ICCG: 0678 s Time = 54 BICCG: Solving for Ux: solution singularity BICCG: Solving for Uy: solution singularity BICCG: Solving for Uz: solution singularity ICCG: Solving for p: solution singularity time step continuity errors : sum local = nan, global = nan, cumulative = nan BICCG: Solving for epsilon: solution singularity BICCG: Solving for k: solution singularity ExecutionTime = 10572.6 s ClockTime = 11076 s And the second one back from 140 to 73: Time = 139 BICCG: Solving for Ux: solution singularity BICCG: Solving for Uy: solution singularity BICCG: Solving for Uz: solution singularity ICCG: Solving for p: solution singularity time step continuity errors : sum local = nan, global = nan, cumulative = nan BICCG: Solving for epsilon: solution singularity BICCG: Solving for k: solution singularity ExecutionTime = 64227 s ClockTime = 65789 s Time = 140 BICCG: Solving for Ux: solution singularity BICCG: Solving for Uy: solution singularity al = 0.000774369, Final residual = 2.21301e-06, No Iterations 1 ExecutionTime = 5199.55 s ClockTime = 5313 s Time = 73 BICCG: Solving for Ux, Initial residual = 6.89053e-06, Final residual = 6.89053e-06, No Iterations 0 BICCG: Solving for Uy, Initial residual = 8.43502e-05, Final residual = 2.05703e-07, No Iterations 1 BICCG: Solving for Uz, Initial residual = 0.000290531, Final residual = 6.80189e-07, No Iterations 1 ICCG: Solving for p, Initial residual = 0.967161, Final residual = 0.00946104, No Iterations 267 time step continuity errors : sum local = 2.25708e-05, global = -1.6871e-07, cumulative = -2.90604e-06 BICCG: Solving for epsilon, Initial residual = 0.000100511, Final residual = 1.14051e-07, No Iterations 1 BICCG: Solving for k, Initial residual = 0.000770152, Final residual = 2.1998e-06, No Iterations 1 ExecutionTime = 5269.9 s ClockTime = 5383 s Do you have an idea? Greetings! Fabian

 May 3, 2006, 05:32 Just checking: You're using an #4 Assistant Moderator   Bernhard Gschaider Join Date: Mar 2009 Posts: 4,008 Rep Power: 43 Just checking: You're using an umodified simpleFoam? You're not using any of the adaptive time-step stuff? __________________ Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request

 May 3, 2006, 05:38 Bernhard, there's no adaptive #5 Senior Member   Hrvoje Jasak Join Date: Mar 2009 Location: London, England Posts: 1,802 Rep Power: 24 Bernhard, there's no adaptive time step here - it's a steady state solver (time is only used as iteration counter). This looks to me like a problem at the outlet or your solution has already gone bananas. Most of the stuff looks OK, but the initial pressure residual of (0.967161) is way too high for 70-odd iterations. I would suggest looking carefully at your solution and discretisation: either there's something obviously wrong with the flow, the turbulence is all wrong or you're using central differencing on some convection terms you should not. In short, visual inspection required. Hrv __________________ Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk

 May 3, 2006, 08:21 Hrv, I know that it's steady-s #6 Assistant Moderator   Bernhard Gschaider Join Date: Mar 2009 Posts: 4,008 Rep Power: 43 Hrv, I know that it's steady-state. The adaptive stuff was just a silly notion I had because I was to lazy to look at the source and I couldn't think of any other explanation for the time warps. Now I looked at the source and I have still no idea where the time-warps come from. If the two runs are with identical settings and they're failing in different ways I have an even sillier idea: maybe it's not Foam. I know this is the lamest excuse in the book: maybe some RAM is failing (never witnessed that myself, but that indeterministic behaviour would be what I would expect in such a case; on the other hand why would Fabian's machine still run) The only other explanation (I can think of, but I have a very limited imagination) for the time-warps would be that somebody is modifying the controlDict during the simulation (which I think is read during the runTime++) without Fabian's knowledge. Which is not a nice prank. __________________ Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request

 May 5, 2006, 03:03 I have a similar problem with #7 New Member   Steffen Jahnke Join Date: Mar 2009 Posts: 14 Rep Power: 10 I have a similar problem with turbFoam but only if I use OF1.3, i.e. running OF1.2 on the same setup everything is o.k.: OF1.3: Starting time loop Time = 5e-05 Mean and max Courant Numbers = 0.0026444 0.117819 BICCG: Solving for Ux, Initial residual = 0.00605567, Final residual = 1.32513e-06, No Iterations 2 BICCG: Solving for Uy, Initial residual = 0.0218626, Final residual = 4.30722e-06, No Iterations 2 BICCG: Solving for Uz, Initial residual = 0.0224129, Final residual = 4.56185e-06, No Iterations 2 AMG: Solving for p, Initial residual = 0.974855, Final residual = 7.20409e-07, No Iterations 28 AMG: Solving for p, Initial residual = 0.00219321, Final residual = 9.15636e-07, No Iterations 6 time step continuity errors : sum local = 7.1722e-10, global = 1.12086e-11, cumulative = 1.12086e-11 AMG: Solving for p, Initial residual = 0.0295064, Final residual = 8.58992e-07, No Iterations 24 AMG: Solving for p, Initial residual = 0.000449758, Final residual = 9.81688e-07, No Iterations 5 time step continuity errors : sum local = 7.20766e-10, global = -3.60251e-12, cumulative = 7.60611e-12 BICCG: Solving for epsilon, Initial residual = 0.0109446, Final residual = 9.07372e-06, No Iterations 1 BICCG: Solving for k, Initial residual = 1, Final residual = 9.971e-07, No Iterations 3 ExecutionTime = 11.61 s ClockTime = 12 s Time = 0.0001 Mean and max Courant Numbers = 0.00255982 0.120631 BICCG: Solving for Ux: solution singularity BICCG: Solving for Uy: solution singularity BICCG: Solving for Uz: solution singularity AMG: Solving for p, Initial residual = nan, Final residual = nan, No Iterations 501 AMG: Solving for p, Initial residual = nan, Final residual = nan, No Iterations 501 time step continuity errors : sum local = nan, global = nan, cumulative = nan AMG: Solving for p, Initial residual = nan, Final residual = nan, No Iterations 501 AMG: Solving for p, Initial residual = nan, Final residual = nan, No Iterations 501 time step continuity errors : sum local = nan, global = nan, cumulative = nan BICCG: Solving for epsilon: solution singularity BICCG: Solving for k: solution singularity ExecutionTime = 157.94 s ClockTime = 159 s With OF1.2 everything runs fine: Starting time loop Time = 5e-05 Mean and max Courant Numbers = 0.0026444 0.117819 BICCG: Solving for Ux, Initial residual = 0.00605567, Final residual = 1.32513e-06, No Iterations 2 BICCG: Solving for Uy, Initial residual = 0.0218626, Final residual = 4.30722e-06, No Iterations 2 BICCG: Solving for Uz, Initial residual = 0.0224129, Final residual = 4.56185e-06, No Iterations 2 AMG: Solving for p, Initial residual = 0.974855, Final residual = 5.6738e-07, No Iterations 33 AMG: Solving for p, Initial residual = 0.0021932, Final residual = 9.30452e-07, No Iterations 6 time step continuity errors : sum local = 7.28832e-10, global = 5.95128e-12, cumulative = 5.95128e-12 AMG: Solving for p, Initial residual = 0.0295062, Final residual = 9.88774e-07, No Iterations 20 AMG: Solving for p, Initial residual = 0.000449719, Final residual = 4.93959e-07, No Iterations 6 time step continuity errors : sum local = 3.62678e-10, global = -4.78015e-12, cumulative = 1.17113e-12 BICCG: Solving for epsilon, Initial residual = 1, Final residual = 7.44754e-10, No Iterations 1 BICCG: Solving for k, Initial residual = 1, Final residual = 1.01302e-06, No Iterations 3 ExecutionTime = 14.35 s Time = 0.0001 Mean and max Courant Numbers = 0.00255982 0.120631 BICCG: Solving for Ux, Initial residual = 0.0157106, Final residual = 8.84689e-07, No Iterations 2 BICCG: Solving for Uy, Initial residual = 0.0641733, Final residual = 2.42521e-06, No Iterations 2 BICCG: Solving for Uz, Initial residual = 0.0655767, Final residual = 2.67305e-06, No Iterations 2 AMG: Solving for p, Initial residual = 0.790297, Final residual = 7.86614e-07, No Iterations 31 AMG: Solving for p, Initial residual = 0.00732114, Final residual = 6.37712e-07, No Iterations 11 time step continuity errors : sum local = 1.49292e-10, global = -5.40232e-12, cumulative = -4.23119e-12 AMG: Solving for p, Initial residual = 0.0683789, Final residual = 7.55717e-07, No Iterations 23 AMG: Solving for p, Initial residual = 0.0012786, Final residual = 6.3544e-07, No Iterations 7 time step continuity errors : sum local = 1.29184e-10, global = 7.67925e-12, cumulative = 3.44805e-12 BICCG: Solving for epsilon, Initial residual = 0.134013, Final residual = 3.11612e-11, No Iterations 1 BICCG: Solving for k, Initial residual = 0.158505, Final residual = 5.05454e-06, No Iterations 2 ExecutionTime = 25.99 s I tried several modifications of relaxations factors, interpolation schemes (upwind) for grad and div schemes but nothing changed. Also using ICCG for pressure gives the same result. Any suggestions are welcome. Thanks, Steffen

 May 5, 2006, 04:30 Have you already inspected the #8 Assistant Moderator   Bernhard Gschaider Join Date: Mar 2009 Posts: 4,008 Rep Power: 43 Have you already inspected the solution after the first time-step (as already suggested twice in this thread)? __________________ Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request

 May 5, 2006, 05:57 Hi, thanks for the suggesti #9 Senior Member   Fabian Braennstroem Join Date: Mar 2009 Posts: 407 Rep Power: 12 Hi, thanks for the suggestion! The bc and ic were probably mixed up a bit; we started to set 'k' and 'epsilon' to 1 after we had singularity issues every run before. It seems to run without any time warps now, but due to the 'weird' bc and ic the jet looks kind of funny. We will start over ... But I wonder that the bc and/or ic can influence the time step procedure!? Greetings! Fabian

 May 5, 2006, 06:12 Of course they can: with k and #10 Senior Member   Hrvoje Jasak Join Date: Mar 2009 Location: London, England Posts: 1,802 Rep Power: 24 Of course they can: with k and epsilon = 1 you get the turbulen vicsosity of 0.09 compared with the laminar viscosity of e.g. 1-e6, i.e. you are out by 3 orders of magnitude. This would explain a lot... Hrv __________________ Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk

 May 8, 2006, 02:12 Hi Hrvoje, I just thought, #11 Senior Member   Fabian Braennstroem Join Date: Mar 2009 Posts: 407 Rep Power: 12 Hi Hrvoje, I just thought, that writing out the actual time step is done in some kind of loop, which is not affected by the bc and ic at all. Greetings! Fabian

 May 8, 2006, 03:20 Hi Fabian, I see what you m #12 Senior Member   Hrvoje Jasak Join Date: Mar 2009 Location: London, England Posts: 1,802 Rep Power: 24 Hi Fabian, I see what you mean - I was much more interested in the NaNs bit than what happens afterwards. I'm worried by the fact that the solver blows up without any symptoms first so the only possible culprit is a weird-looking solution. As for the time-step problem, this looks to me like a possible memory violation (someone over-writing bits of memory that contain the time information. Is this all out-of-box OpenFOAM stuff you are running? It woul be useful to set the environment variables to catch the error: setenv FOAM_ABORT 1 setenv FOAM_SIGFPE 1 setenv FOAM_SETNAN 1 or to run the solver through valgrind and see what it says. I usually run the debug version with array bounds checking (good for me but not in general), which may tell you much more if you are developing your own code. Hrv __________________ Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk

 May 11, 2006, 01:34 Hi Hrvoje, yes, it is out-o #13 Senior Member   Fabian Braennstroem Join Date: Mar 2009 Posts: 407 Rep Power: 12 Hi Hrvoje, yes, it is out-of-box simpleFoam. We will try to set the environments and the debug version. I don't know valgrind yet, but I'll take a look at it; thanks! Greetings! Fabian

 May 11, 2006, 05:03 You probably already have valg #14 Senior Member   Hrvoje Jasak Join Date: Mar 2009 Location: London, England Posts: 1,802 Rep Power: 24 You probably already have valgrind on your system and this is the easiets thing to try. Do valgrind --tool=memcheck simpleFoam and (with your permission) I'd like to have a look at the output. A few more questions: - Are you getting these outputs on the screen or into a log file? - Is there any possibility that you've got two processes writing into a same log file at the same time and making a mess of it? - Can you reproduce this with one of tutorial cases (just in case the library got corrupted somehow). - Did you add anything into the FOAM, which required recompiling one of the libraries since you've installed it (maybe we've got an incomplete build here) Hmm, Hrv __________________ Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk

 May 14, 2006, 14:30 Hello Foam users i am tryin #15 atzaru Guest   Posts: n/a Hello Foam users i am trying to simulate Fluid Flow and Heat Transfer in a Mixing Elbow (a problem similar with the one in fluent tutorials). the file can be downloaded MixingElbow.tar.gz when i run the case i optain always: BICCG: Solving for Ux: solution singularity BICCG: Solving for Uy: solution singularity BICCG: Solving for h: solution singularity ICCG: Solving for pd: solution singularity time step continuity errors : sum local = nan, global = nan, cumulative = nan rho max/min : 0 0 ExecutionTime = 0.34 s ClockTime = 0 s Can anybody have a look on my file and give me a hint? thanks Atzaru

 May 14, 2006, 14:54 sorry for posting in the wrong #16 atzaru Guest   Posts: n/a sorry for posting in the wrong place, i will open a new thread. atzaru

 May 15, 2006, 02:23 Hi Hrvoje, I did write it o #17 Senior Member   Fabian Braennstroem Join Date: Mar 2009 Posts: 407 Rep Power: 12 Hi Hrvoje, I did write it out to a log file; I could send you a copy!? Writing from two processes into the same log file is probably the best explanation, but I do not think that writing it to a log file using the commandline (simpleFoam > logfile &) could mix it; it would rather erase the old file and create a new one. We did not add anything into version 1.3. Thanks for the valgrind hint, it looks pretty easy! Greetings! Fabian

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post saad Main CFD Forum 4 November 1, 2007 08:45 Rams FLUENT 0 June 20, 2006 00:52 Rams FLUENT 1 June 18, 2006 19:59 Rams FLUENT 0 June 13, 2006 11:08 Rams CFX 2 June 13, 2006 03:30