Unable to plot residuals (Interfoam) [Solved]
Hi everyone,
I am currently working on a two-phase laminar flow through a pipe. To check my mesh, I ran a simulation with only air through the pipe (alpha = 0) using the interFoam solver and the results matches the hagen-poiseuille equation. However, I am currently trying to plot the residuals using help from the forum in the following link: https://www.cfd-online.com/Forums/op...residuals.html The residual plot was successful in the past when I was using the simpleFoam solver. However, using the interFoam solver, I am getting an error message stating the following
Does anyone have any idea of what I am doing wrong? p/s: I also notice that in my log file, they are only solving for the p_rgh term and no ux,uy or uz term Kind regards Shaq |
Hi,
you donīt solve for p, thus you have to grep for p_rgh if you want to get the residuals for p_rgh. In most cases there is no need to solve the momentum prediction. In your fvSolutions you momentumPredictor is false. Thats why you donīt see Ux, Uy and Uz residuals. |
Quote:
Thanks for getting back to me. I had a look in the fvSolution folder and it is true that my momentumPredictor is set to "no". Could you kindly explain the following please:
Kind regards Shaq |
Hi,
|
Quote:
I have another question: When not activating the momentum predictor, the solver only solves the residual for p_rgh. However, every time iteration has 3 p_rgh residuals, Which one should I take from each iteration? Also, if one does not activate the momentum predicture, what are the recommended tolerance for pressure residuals? Will it have to be below 1e-7 or will a residual of magnitude below 1e-5 be reasonable? Regards Shafik |
Quote:
|
Example!
Quote:
PIMPLE: iteration 1 smoothSolver: Solving for alpha.water, Initial residual = 0.000529543, Final residual = 2.66809e-11, No Iterations 2 Phase-1 volume fraction = 0.517887 Min(alpha.water) = 0 Max(alpha.water) = 1.06837 MULES: Correcting alpha.water MULES: Correcting alpha.water Phase-1 volume fraction = 0.517887 Min(alpha.water) = -8.72144e-07 Max(alpha.water) = 1.06794 DICPCG: Solving for p_rgh, Initial residual = 1, Final residual = 0.880426, No Iterations 1001 time step continuity errors : sum local = 0.00204219, global = -2.39327e-05, cumulative = -4.39327e-05 DICPCG: Solving for p_rgh, Initial residual = 0.270516, Final residual = 0.753417, No Iterations 1001 time step continuity errors : sum local = 0.00579181, global = -2.39253e-05, cumulative = -6.7858e-05 DICPCG: Solving for p_rgh, Initial residual = 0.510678, Final residual = 0.1488, No Iterations 1001 time step continuity errors : sum local = 0.00170815, global = -1.19552e-05, cumulative = -7.98132e-05 ExecutionTime = 12.26 s ClockTime = 12 s Regards Shaq |
Pimplefoam residual
1 Attachment(s)
Quote:
I have used your advice and greped for p_rgh successfully, is there a command to only grep the final residual in every outer loop iteration? Because at the moment, my residual plot is plotting every single iteration (inner loop and outer loop) as shown in the attached file. Yaxis: residuals Xaxis: Iterations Kind regards Shafik |
velocity component residuals are missing (multiphaseEulerFoam)
Quote:
I'm working with multiphaseEulerFoam solver with 3 phases I did set momentumPredictor to yes and I've also tried setting nUcorrectors to 0; but still I can't see the velocity component residuals. why is that? how can I fix this? |
Can you provide use the solver log file?
If you have the momentumPredictor activated, you have to see it. Maybe its related to the solver and the residual control function object (don't know how you are extracting your data) should give the velocity field. Otherwise, its a feature we would / could be implement in newer versions. |
Quote:
this is what I get in log file: (RAS bubble column tutorial in multiphaseEulerFoam): Code:
PIMPLE: Iteration 1 it seems that momentunPredictor can not be actually activated in multiphaseEulerFoam. because the solver gave no error that for example UFinal is undefined in fvSolution like other solvers. thank you so much for your answer btw. |
You mix up a few things here. However, you are right, the momentum-prediction is not implemented: https://develop.openfoam.com/Develop...erFoam/UEqns.H
So probably, there is a reason why its not implemented or why we cannot use a prediction step prior to the pressure-equation. I am not familiar with multiphase flows. However, UFinal, if you don't set the "*.Final" Relaxation, it is commonly 1. It should be a <lookupOrDefault> value. So I never had issues that "*.Final" is not defined in terms of relaxation factors. Furthermore, in the UEqns.H file, you can see that the relaxation of the matrix is commented. Hence, not used at all. Note. In the Foundation version, there you have the relaxation included: https://github.com/OpenFOAM/OpenFOAM...oam/pU/UEqns.H |
Quote:
is there any chance that other versions don't have this bug? |
All times are GMT -4. The time now is 12:34. |