
[Sponsors] 
September 17, 2010, 11:10 

#21 
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 15 
Hello,
finally I have my simulation running! the mesh is not perfect: about 4000 nonorthogonal cells out of 600000. However, I want to keep the cell number "low" to understand how to set up everything properly. For the same reason, I switched the turbulence off and considered the flow as laminar. On a second step, I will apply what both suggested above for the mesh generation & the turbulence model. What I have noticed so far is that my pressure residual flattens after about 100 iterations, and at the same time the GAMG solver makes hundreds of iterations. The latter is due to the solver residual, that are quite low indeed: Code:
p { solver GAMG; tolerance 1e09; relTol 1e04; smoother GaussSeidel; nPreSweeps 0; nPostSweeps 2; cacheAgglomeration true; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; } U { solver smoothSolver; smoother GaussSeidel; tolerance 1e09; relTol 1e04; } Code:
smoothSolver: Solving for Ux, Initial residual = 0.00482599, Final residual = 4.45505e07, No Iterations 8 smoothSolver: Solving for Uy, Initial residual = 0.0339055, Final residual = 2.32396e06, No Iterations 8 smoothSolver: Solving for Uz, Initial residual = 0.0122788, Final residual = 1.10086e06, No Iterations 8 GAMG: Solving for p, Initial residual = 0.127016, Final residual = 1.26726e05, No Iterations 151 GAMG: Solving for p, Initial residual = 0.0437082, Final residual = 4.28262e06, No Iterations 221 time step continuity errors : sum local = 2.32733e05, global = 7.60473e07, cumulative = 2.55991e05 Suggestions? mad 

September 17, 2010, 23:27 

#22 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,911
Rep Power: 28 
Usually it is convenient to keep the pressure residual lower than the others (say p: 10^10, U: 10^8), and to reduce the relTol to zero.
About the nonorthogonal correctors, use a number that allows the pressure equation to converge within the iteration. Best,
__________________
Alberto Passalacqua GeekoCFD  A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

September 20, 2010, 04:06 

#23  
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 15 
Hi Alberto,
just to understand what I am doing... Quote:
The pressure relTol or every relTol? What does this mean? That I will accept the iteration solution only if approaching the computing precision? In that way, the iteration time will be terribly high! Quote:
Thanks a lot for your suggestions. Regards, mad 

September 20, 2010, 05:20 

#24  
Senior Member
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 9 
Quote:
The user guide says that relTol is the ratio of initial residual to final residual. Meaning when the residual gets below (relTol X inital residual) the solution is stopped. And if you set it to zero then the the absolute residual value u specify is used. So it doesnt take forever. I thinkit takes higher of the two numbers (i.e from relTol and the absolute value u specify) as stopping criteria.
__________________
Imagination is more important than knowledge..


September 20, 2010, 05:31 

#25  
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 15 
I should have checked par 4.5.1.1 of the user guide!
Summarizing:
This is always a good news... Quote:
Thank you! mad Last edited by maddalena; September 20, 2010 at 06:11. 

September 20, 2010, 14:29 

#26  
Senior Member
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 9 
Hi maddalena,
This is the exact text from the UG: Quote:
Quote:
Quote:
Quote:
__________________
Imagination is more important than knowledge..


September 21, 2010, 02:57 

#27  
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,911
Rep Power: 28 
Quote:
Quote:
Best,
__________________
Alberto Passalacqua GeekoCFD  A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

September 21, 2010, 04:14 

#28 
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 15 
Thank you to both of you for the suggestions!
Now I have this fvSolution: Code:
p { solver GAMG; tolerance 1e05; relTol 0; smoother GaussSeidel; nPreSweeps 0; nPostSweeps 2; cacheAgglomeration true; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; } U { solver smoothSolver; smoother GaussSeidel; tolerance 1e03; relTol 0; } Code:
SIMPLE { nNonOrthogonalCorrectors 6; pRefCell 0; pRefValue 0; } Code:
Time = 50 smoothSolver: Solving for Ux, Initial residual = 0.00866536, Final residual = 0.000815573, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 0.0404917, Final residual = 0.000930839, No Iterations 3 smoothSolver: Solving for Uz, Initial residual = 0.0188665, Final residual = 0.000551953, No Iterations 3 GAMG: Solving for p, Initial residual = 0.127684, Final residual = 9.3116e06, No Iterations 458 GAMG: Solving for p, Initial residual = 0.0403606, Final residual = 9.66437e06, No Iterations 63 GAMG: Solving for p, Initial residual = 0.0146646, Final residual = 9.23663e06, No Iterations 20 GAMG: Solving for p, Initial residual = 0.00838198, Final residual = 8.57141e06, No Iterations 15 GAMG: Solving for p, Initial residual = 0.00576653, Final residual = 8.45709e06, No Iterations 13 GAMG: Solving for p, Initial residual = 0.00450226, Final residual = 9.49696e06, No Iterations 12 GAMG: Solving for p, Initial residual = 0.00368982, Final residual = 8.7992e06, No Iterations 9 time step continuity errors : sum local = 3.52275e05, global = 6.45865e07, cumulative = 5.60862e05 ExecutionTime = 6313.95 s ClockTime = 6771 s Thus, I analyzed the velocity and pressure distribution on the domain. What I can see is that velocity increases locally on the small pipe, in a position where the flow is supposed to follow pipe theory strictly. What I think is that this is a consequence of the mesh, since its grading is not really nice there, see the attached picture. Am I right? I definitely should follow your advices on mesh generation... Cheers mad 

September 21, 2010, 13:29 

#29 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,911
Rep Power: 28 
Well, yes, the mesh needs love :)
__________________
Alberto Passalacqua GeekoCFD  A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

September 30, 2010, 11:32 

#30 
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 15 
Hi everyone,
I finally got my simulations running (including turbulence), and everything went nice with the first case that I described in the previous posts. Then I change geometry (refer to the new file attached)
However, what I really want to test is to keep the mass flow fixed and calculate the pressure losses on the system. So, I am thinking to change the condition on the fan. Instead of using a standard fan BC, use the following:
What do you think about this approach? Is it logical? or are there any other solution I can use to mantain flow rate constant inside the closed loop system? Regards mad 

September 30, 2010, 13:27 

#31 
Senior Member
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 9 
Hi,
I don't have any experience of fan BC as such. But, when i think of such situation, when in real situation my mass flow is not enough, i would increase fan rpm. U know what i mean?? i will increase fan power and thus the pressure difference across the fan. So, how about doing this?? Increase the pressure across the fan till you get the right mass flow rate. I am sure you can estimate a rough value by simple hand calculations. Just a suggestion.. Have fun.. Nilesh
__________________
Imagination is more important than knowledge..


October 1, 2010, 02:19 

#32  
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 15 
Hello,
Quote:
In any case... I run the simulation as described yesterday during the night. Not checked results yet, however I guess there is something wrong with this approach: Code:
Time = 500 smoothSolver: Solving for Ux, Initial residual = 0.00914707, Final residual = 8.10372e05, No Iterations 4 smoothSolver: Solving for Uy, Initial residual = 0.0282209, Final residual = 8.3451e05, No Iterations 5 smoothSolver: Solving for Uz, Initial residual = 0.00963077, Final residual = 8.75521e05, No Iterations 4 GAMG: Solving for p, Initial residual = 0.0236841, Final residual = 9.83143e07, No Iterations 236 GAMG: Solving for p, Initial residual = 0.00560969, Final residual = 9.7794e07, No Iterations 12 GAMG: Solving for p, Initial residual = 0.00171942, Final residual = 9.14703e07, No Iterations 13 GAMG: Solving for p, Initial residual = 0.000945763, Final residual = 8.96619e07, No Iterations 16 GAMG: Solving for p, Initial residual = 0.000616439, Final residual = 8.78768e07, No Iterations 15 time step continuity errors : sum local = 2.60889e+11, global = 4.1978e+10, cumulative = 2.13409e+12 smoothSolver: Solving for epsilon, Initial residual = 1.13585e07, Final residual = 1.13585e07, No Iterations 0 smoothSolver: Solving for k, Initial residual = 1.12936e17, Final residual = 1.12936e17, No Iterations 0 mad 

October 4, 2010, 05:21 

#33 
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 15 
Hi,
I opened a new thread on the subject: http://www.cfdonline.com/Forums/ope...flowrate.html. However, you are my two gurus on the closed loop pipe flow subject and your opinion is important... What do you think about the approach described there? mad 

October 11, 2010, 03:08 

#34  
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 15 
Hello FOAMers,
I need one more suggestion on the turbulence model. As I said before, for the case I am simulating: Quote:
Code:
Patch 35 named xxx y+ : min: 0.636791 max: 4.52537 average: 1.14473 cheers, mad 

August 16, 2011, 11:46 

#35 
Member
Sylvain Aguinaga
Join Date: Feb 2010
Posts: 39
Rep Power: 10 
Hi everybody,
Nice thread again madalena. I'm currently working on modeling a closed loop circuit with both a fan and a porous zone (actually an heat exchanger). To do that I used simpleFoam komega SST model, a fan BC, and the brand new porousBafflePressure BC. This is something I used to do in Fluent, and I try to do it on OpenFOAM now. I succeeded in making the whole mesh with SHM and the createBaffle utility (and I'm quite proud of it). I have ran the simulation with only the fan, worked well except that the wake of the fan didn't converge... but still the flow looks OK. When I added the porous baffle, then it became a mess. The case explodes at the tenth iteration. From what I have read in your thread i think about many ways of improving my case: 1) maybe switch from simpleFoam to another solver, maybe a transient one like pimpleFoam (this is the solver used for the fan tutorial actually) 2) adjust schemes constants like you did, but i have to admit I'm not comfortable with that, so is it worth playing with it??? 3) maybe splitting my case in such a way that my fan is no longer a baffle but a distinct inlet and an outlet with classical inlet/outlet BCs What do you think about it? I'm wondering if those cases are naturally instables due to the closure of the circuit.... Thanks ahead for your remarks about this subject... Sylvain 

Tags 
fan, flowrateinletvelocity, lowre, pipe, simplefoam 
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
flow in perforated pipe distributor  pertupd  ANSYS  0  August 12, 2009 08:36 
NACA0012 geometry/design software needed  Franny  Main CFD Forum  13  July 7, 2007 15:57 
Flow in a Closed Loop  John Collins  Main CFD Forum  2  February 27, 2003 11:26 
Terrible Mistake In Fluid Dynamics History  Abhi  Main CFD Forum  12  July 8, 2002 09:11 
Pulsatile blood flow in closed loops  Michael F. Wolf  Main CFD Forum  3  July 1, 1999 16:37 