Convergence problems with simpleFoam on human airway
1 Attachment(s)
I'm trying to simulate the flow trough a part of the human airways. I'm using simpleFoam (with an added volScalarField ptot in createFields.H in order to write out the total pressure) to obtain a steady-state solution. However, the results are very bad while the case converges perfectly in Fluent.
First, what do I want to do:
Code:
Create time Code:
ddtSchemes Code:
solvers Code:
dimensions [0 2 -2 0 0 0 0]; Code:
dimensions [0 1 -1 0 0 0 0]; As all my files look good, I thought that it had something to do with the boundary conditions. For that reason, I altered the U file: Code:
dimensions [0 1 -1 0 0 0 0]; Has anybody an idea to make my case converge? Thanks in advance |
In order to reduce mesh scaling errors and rounding errors, I have set my writeFormat to binary. I have also tried to run potentialFoam first, but this makes things even worse as the initial conditions are assumed wrong (even with high (50) nNonOrthogonalCorrectors). As you can see it then goes wrong from the first time step:
Code:
Time = 1 |
Try lowering relTol on p to 0.001 and 0.01 on U. Did you try zeroGradient on U inlet?
Can you post the case? |
Hi,
have you tried to run some flow with a given inlet velocity? just to see where are the problems. I'm doing human airways simulations myself but except real geometry from CT-scan I'm pretty sure the mesh could always be of better quality. I'd run the case with given velocity to see where the mesh is wrong, and then I'd try two things: A/ U at inlet set to simple fixedGradient and then I'd try more limiting as: cellLimitedGrad - The scalar limiter based on limiting the extrapolated face values between the maximum and minumum cell and cell neighbour values and is applied to all components of the gradient. $FOAM/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellLimitedGrad/cellLimitedGrads.C in fvSchemes: div(phi,U) Gauss linearUpwind cellLimited Gauss linear 1; cellMDLimitedGrad - the same as cellLimitedGrad with explicit limiter btw. I'd like to know how did you find out 20Pa pressure drop in airways. Do you have papers or reports on your work? good luck matej |
Quote:
Code:
gradSchemes Code:
div(phi,U) Gauss linearUpwindV cellLimited Gauss linear 1; You can additionally use cellMDLimited instead than cellLimited, if you want the limiter to be applied independently in the three directions. Additionally, lower the tolerance required for the pressure to at least one order less than the one used for the velocity. I'd set the pressure to 10^-8, and U to 10^-7, with a convergence criteria for the the steady solution ~ 10^-6 (or the minimum you can reach, when residuals stop changing). Best, |
Thanks for all the replies! I'm sorry that I did not answer faster, but I had other projects going on. I'm doing studies on patient-specific basis, so my geometries are segmented from CT-scans. As I have a lot of patients to deal with, the meshing procedure has to be almost fully automatic (tri/tet in TGrid 5.0.6) so my mesh quality can not improve.
The -20Pa is just arbitrary in order to obtain a laminar solution, it has nothing to do with the real under-pressures. I have just started my PhD in October and do not have any A1 publications. However, I have just send in my first paper and I will post it here when it is published. I have changed several things according to your suggestions:
When using my original boundary conditions for the inlet (U = pressureInletVelocity and p = fixedValue 0), the system still diverges and gives very unphysical values. In the logfiles2.zip file, you can see the logfile (logfile_pvi_io2.txt) and the residual plot (residuals_pvi_io2.eps). Like josp suggested, I have changed my boundary conditions for my pressure inlet to (U = zeroGradient and p = fixedValue 0). I have always learned that zeroGradient for U is not recommended as the system can become instable due to possible inward flow (and that therefore pressureInletVelocity was created). The results seem better and the case does not diverge as fast. However, at 1000 iterations, the mass flow rate is rather good, but the total pressure drop is completely wrong. Also the residuals start to increase. In the logfiles2.zip file, you can see the logfile (logfile_Uzerogradient.txt) and the residual plot (residuals_Uzerogradient.eps). Using freestream for U and fixedValue for p (for both inlet and outlet) still gives the best results if one wants to have a pressure inlet and pressure outlet. Using your suggestions, the residual plot looks a bit better than before and also the values for mass flow and pressure drop are physical and rather steady. It seems that these boundary condition are the best for my cases although they are not so obvious. In the logfiles2.zip file, you can see the logfile (logfile_freestream2.txt) and the residual plot (residuals_freestream2.eps). If somebody has another suggestion to improve my results, just bring it on! The logfiles2.zip file can be found at: http://www.2shared.com/file/jnlWk1Us/logfiles2.html |
Quote:
Quote:
Best, |
Quote:
I fix the static pressures at inlet and outlet, however, I am interested in the total pressure at inlet and outlet in order to measure the pressure drop. These values are completely wrong. |
Quote:
Quote:
Best, |
All times are GMT -4. The time now is 07:36. |