About interFoam
Hi,
I'm using interFoam to observe the filling of an injection-molded piece. I ran the simulation to my case and changed boundary conditions. Case is still laminar due to high viscosity, 0.1 Pa.s I let fvSolution the same as the damBreak tutorial, and just changed Co to 2 in controlDict. Ran the simulation for 12h and got this : https://drive.google.com/file/d/0B3B...ZsZWNxbzg/view I also used an inlet velocity of 0.5m/s instead of 2m/s to have an higher timestep (for a first try). So my goal is to reduce computational time. First, what's the point of momentumPredictor in fvSolution ? It's set to 'no' in every interFoam tutorials. Then, I think the idea to reduce computational is to use PIMPLE like it's clearly explained here : https://www.researchgate.net/profile...-OpenFOAMR.pdf p.111 to 134 So fix a dt = 1e-4 for example, and run the simulation. Here's fvSolution : Code:
PIMPLE Code:
PIMPLE: iteration 5 If there's a way to optimize computational time I'd be glad to know how to |
As you can see in output, you do not solve for p, you solve for p_rgh. So
Code:
residualControl relaxationFactors are also a little bit strange. |
Hello again alexeym :p,
Yes right. About relaxationFactors, how are you supposed to chose them ? I just put random values actually |
Hi,
In general, people agree on the following: - There should be no relaxation on final iteration. This can be achieved by setting relaxation factor to 1 or just removing relaxation factor from dictionary (faster variant). - There are several mentions in presentations, that for optimal performance sum of relaxation factor for U equation and for p field should be 1. - For PISO (or PIMPLE), in general, there is no need in relaxation. So you start from no relaxation, if your solution diverges, you add relaxation for diverging equations. BUT relaxation is not a solution for incorrectly posed BCs. Momentum predictor can be useful in certain problems. Though it introduces solution of additional equation, and seems to increase computation time, this step can improve convergence in pressure, so finally simulation with momentum predictor could run faster, than one without it. And finally not only PIMPLE settings affect computation speed (in fact, PIMPLE dictionary is the last place to go, to improve speed). Mesh and linear solver settings have greater influence. |
Quote:
https://www.researchgate.net/profile...-OpenFOAMR.pdf Quote:
My mesh is already quite coarse, I can't reduce its size. I don't know if I'll mange to improve the calculation time, but I'd like to understand better how things work. |
OK. Let's wait for Herr Holzmann (aka Tobi), at least he can comment on his PDF.
Here are little comments on mesh and Courant number. 1. I used mesh in terms of mesh quality, not resolution. You can have two meshes with the same resolution and same shape, one perfectly orthogonal and another with high degree of non-orthogonality. Calculation on the highly non-orthogonal mesh will be rather slow and unpleasant thing. 2. Your aims are not quite clear. You need to reduce computation time or you need to get meaningful results? In the first case go with upwind schemes, use high Courant number, increase value of tolerances for linear solvers, increase value for convergence residuals. You will obtain certain results. Can we trust them? I doubt. |
Quote:
Question about this, let's imagine you have a perfect orthogonal mesh with one cell that is 100 times smaller than the others, Co will be based on the small one, right ? So using a high Co in this case may lead to good results. 2. Both :p. For the purpose I have now, the goal is just to have an idea of how the flow is propagating, so I'll try with your tips next week to reduce computation time and see if I obtain different results |
All times are GMT -4. The time now is 10:28. |