
[Sponsors] 
how to do the fvSolution configuration  SIMPLE Foam  complex cylinder geometry 

LinkBack  Thread Tools  Display Modes 
July 2, 2012, 13:21 
how to do the fvSolution configuration  SIMPLE Foam  complex cylinder geometry

#1 
Senior Member
Sören
Join Date: Mar 2012
Posts: 102
Rep Power: 5 
Hello,
I have(had) a problem with one of my OpenFoam simulations. OpenFoam 2.0.1 finished the simulation before the entire stream was simulated > just the beginning of the inlet was simulated  see picture 1: https://dl.dropbox.com/u/77194917/fa...imulation2.png To solve this problem I modified the fvSolution file (U, p and nNonOrthogonalCorrectors). The result is better, it seems that OpenFoam 2.0.1 does the simulation from inlet to outlet  see picture 2: https://dl.dropbox.com/u/77194917/re...se%20cells.png The changes I did at the fvSolution file are just "good guesses". So, now I would like to know if they are correct, how to check if they are correct and how to determine the right values for the fvSolution and fvScheme files? Are there rules of thumb or some methods to calculate/estimate these values??? Here are my fvSolution file (the old values are written behind a double backslash //) and my fvSchemes file: https://dl.dropbox.com/u/77194917/fvSolution https://dl.dropbox.com/u/77194917/fvSchemes CheckMesh is O.K.  see the file: https://dl.dropbox.com/u/77194917/checkMesh_Log5 And here is the terminal outputfile: https://dl.dropbox.com/u/77194917/Log5 Kind regards, Sören 

July 2, 2012, 16:52 

#2 
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84 
Greetings Sören,
OK, now we're getting somewhere In fvSolution, try this instead: Code:
residualControl { p 1e2; U 1e3; "(kepsilonomega)" 1e3; } For more about plotting residuals: Tutorial of how to plot residuals ! Best regards, Bruno
__________________


July 3, 2012, 04:11 

#3 
Senior Member
Sören
Join Date: Mar 2012
Posts: 102
Rep Power: 5 
Thanks for the quick reply on my question.
The fvSolution part that you showed to use instead I already used it in my fvSolution file. Did you accidently copied that part from my file instead from your file? Kind regards, Sören 

July 3, 2012, 04:19 

#4 
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84 
Hi Sören,
My apologies... Firefox crashed yesterday while I was writing the post and had to write all over again and forgot to recalibrate the values. What I meant was this: Code:
residualControl { p 1e3; U 1e4; "(kepsilonomega)" 1e4; } Best regards, Bruno
__________________


July 3, 2012, 11:55 

#5 
Senior Member
Sören
Join Date: Mar 2012
Posts: 102
Rep Power: 5 
Thanks for the reply again.
I plotted the residuals according to the tutorial but they don't converge to a stable line but within an interval one could say. The plot is attached also my fvSolution and fvSchemes file with some modifications. I put the residual control up to 1e5 for "U" and "p". 1) According to the plot  is convergence fulfilled? 2) The convergence we are talking about is the convergence of the mathematical calculation of a physical problem, right? The statement one can make is that our mathematical solution is correct and "if" the mathematical solution is an exact description of the physical problem, we can "trust" the results of this simulation  is my understanding correct here? 3) In the logfile the statement at the end that say e.g. "SIMPLE solution converged in 171 iterations" is missing this time. But I OpenFoam did 2000 Iterations  what does this mean? Best regards and sorry for some maybe stupid questions, Sören 

July 3, 2012, 12:15 

#6  
Senior Member
Sören
Join Date: Mar 2012
Posts: 102
Rep Power: 5 
...I just remembered what I read in the "best practice guidelines"
Quote:


July 3, 2012, 12:32 

#7  
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84 
Quote:
As for not being a line: it rarely is linear. The objective is to have it not fluctuate too much and not come back up again. By what I see from that plot... isn't not looking very good Wide band fluctuations and the residual values too high! In these cases, the best is to go back to the tutorials OpenFOAM has, as well as trying simpler setups of your own case. That should give you a better feel of what's good or bad.
__________________


July 4, 2012, 08:33 
gnuplot p;N;N' or N;N;p'

#8 
Senior Member
Sören
Join Date: Mar 2012
Posts: 102
Rep Power: 5 
Hi,
I've tried to plot the residuals and it works quite fine but I have problems understanding this part: "< cat Log5  grep 'Solving for p'  cut d' ' f9  sed n 'p;N;N'  tr d ','" title 'p' with lines How do I change the IterationResidual that is plotted? I've tried  sed n 'N;N;p'  but this only destroyed my axis... What is for example the right code to plot the second or the last of the three iterationresiduals? my logfile and my Residualfile are attached. Kind regards, Sören 

July 4, 2012, 10:02 
pimpleFoam try

#9 
Senior Member
Sören
Join Date: Mar 2012
Posts: 102
Rep Power: 5 
I also tried with pimpleFoam in case it's not steadystate but transient. The residualgraph is attached. Doesn't look good neither...


July 4, 2012, 18:14 

#10 
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84 
Note to other readers: if you have more experience than me on this case, feel free to contribute with your experience!
______________________________ Hi Sören, I've got a feeling you didn't read the rest of thread about plotting residuals. There you'll find references to PyFoam, which is more advanced that this trick with Gnuplot Now, since unfortunately I'm not an expert in using OpenFOAM for any and all CFD cases, here are my suggestions:
Check OpenFOAM's tutorials for ideas on simple geometries and how to use the solvers. Here are some cases that should give you good ideas:
By the way: although checkMesh gives and OK at the end, this message might probably shouldn't be ignored: Code:
Number of severely nonorthogonal faces: 191. Good luck! Bruno
__________________


July 5, 2012, 03:36 

#11 
Senior Member
Sören
Join Date: Mar 2012
Posts: 102
Rep Power: 5 
Thanks again for your advise.
I did some simple cases of my geometry...lets see if can come closer to the solution with them. I've read the thread about plotting but gnuplot was working so I thought why change it...but I'll also try PyFoam. So, thanks again, Sören 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Using starToFoam  clo  OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ...  33  September 26, 2012 04:04 
[ICEM] Meshing adjacent wall geometry and simple ICEM questions  everdimension  ANSYS Meshing & Geometry  25  June 20, 2012 04:25 
[ICEM] Cylinder Geometry and Blocking  Leepox  ANSYS Meshing & Geometry  2  November 21, 2011 11:32 
Import problem  ARC  Open Source Meshers: Gmsh, Netgen, CGNS, ...  0  February 27, 2010 11:56 
StarToFoam error  Kart  OpenFOAM Meshing & Mesh Conversion  1  February 4, 2010 05:38 